From 8245dcf96e8689d7d22aa9be8959452fb7df76fd Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 23 Mar 2017 15:53:57 +0800 Subject: [PATCH 001/221] update comments --- api/src/main/java/info/xiaomo/api/ApiMain.java | 13 ++++++------- .../xiaomo/api/controller/AdminUserController.java | 14 +++++++------- .../xiaomo/api/controller/ChangeLogController.java | 14 +++++++------- .../info/xiaomo/api/controller/LinkController.java | 14 +++++++------- .../api/controller/TechnologyController.java | 14 +++++++------- .../info/xiaomo/api/controller/UserController.java | 14 +++++++------- .../xiaomo/api/controller/WebSetController.java | 14 +++++++------- .../xiaomo/api/controller/WorksController.java | 14 +++++++------- .../java/info/xiaomo/api/dao/AdminUserDao.java | 12 ++++++------ .../java/info/xiaomo/api/dao/ChangeLogDao.java | 12 ++++++------ api/src/main/java/info/xiaomo/api/dao/LinkDao.java | 12 ++++++------ .../java/info/xiaomo/api/dao/TechnologyDao.java | 12 ++++++------ api/src/main/java/info/xiaomo/api/dao/UserDao.java | 12 ++++++------ .../main/java/info/xiaomo/api/dao/WebSetDao.java | 12 ++++++------ .../main/java/info/xiaomo/api/dao/WorksDao.java | 12 ++++++------ .../java/info/xiaomo/api/dao/base/CommonDao.java | 14 +++++++------- .../java/info/xiaomo/api/model/AdminModel.java | 12 ++++++------ .../java/info/xiaomo/api/model/ChangeLogModel.java | 12 ++++++------ .../main/java/info/xiaomo/api/model/LinkModel.java | 12 ++++++------ .../java/info/xiaomo/api/model/SystemSetModel.java | 12 ++++++------ .../info/xiaomo/api/model/TechnologyModel.java | 12 ++++++------ .../main/java/info/xiaomo/api/model/UserModel.java | 12 ++++++------ .../java/info/xiaomo/api/model/WorksModel.java | 12 ++++++------ .../info/xiaomo/api/service/AdminUserService.java | 12 ++++++------ .../info/xiaomo/api/service/ChangeLogService.java | 12 ++++++------ .../java/info/xiaomo/api/service/LinkService.java | 12 ++++++------ .../info/xiaomo/api/service/TechnologyService.java | 12 ++++++------ .../java/info/xiaomo/api/service/UserService.java | 12 ++++++------ .../info/xiaomo/api/service/WebSetService.java | 12 ++++++------ .../java/info/xiaomo/api/service/WorksService.java | 12 ++++++------ .../api/service/impl/AdminUserServiceImpl.java | 14 +++++++------- .../api/service/impl/ChangeLogServiceImpl.java | 12 ++++++------ .../xiaomo/api/service/impl/LinkServiceImpl.java | 12 ++++++------ .../api/service/impl/TechnologyServiceImpl.java | 12 ++++++------ .../xiaomo/api/service/impl/UserServiceImpl.java | 14 +++++++------- .../xiaomo/api/service/impl/WebSetServiceImpl.java | 12 ++++++------ .../xiaomo/api/service/impl/WorksServiceImpl.java | 12 ++++++------ api/src/main/resources/public/swagger-ui.js | 2 +- .../info/xiaomo/application/ApplicationMain.java | 12 ++++++------ .../application/controller/UserController.java | 14 +++++++------- .../java/info/xiaomo/application/dao/UserDao.java | 12 ++++++------ .../info/xiaomo/application/model/UserModel.java | 12 ++++++------ .../xiaomo/application/service/UserService.java | 12 ++++++------ .../application/service/impl/UserServiceImpl.java | 14 +++++++------- .../main/resources/config/application.properties | 6 +++--- .../src/main/resources/public/swagger-ui.js | 2 +- application/src/test/java/Test11.java | 2 +- .../src/main/java/info/xiaomo/aries/AriesMain.java | 2 +- .../xiaomo/aries/controller/UserController.java | 2 +- .../main/java/info/xiaomo/aries/dao/UserDao.java | 2 +- .../java/info/xiaomo/aries/model/UserModel.java | 2 +- .../info/xiaomo/aries/service/UserService.java | 2 +- .../xiaomo/aries/service/impl/UserServiceImpl.java | 2 +- .../src/main/java/info/xiaomo/anysc/AsyncMain.java | 14 +++++++------- .../xiaomo/anysc/controller/TestController.java | 14 +++++++------- .../java/info/xiaomo/core/base/AuthOperate.java | 2 +- .../java/info/xiaomo/core/base/BaseController.java | 2 +- .../main/java/info/xiaomo/core/base/BaseDao.java | 2 +- .../main/java/info/xiaomo/core/base/BaseModel.java | 12 ++++++------ .../java/info/xiaomo/core/base/BaseService.java | 2 +- .../main/java/info/xiaomo/core/base/Result.java | 14 +++++++------- .../main/java/info/xiaomo/core/constant/Code.java | 14 +++++++------- .../java/info/xiaomo/core/constant/GenderType.java | 14 +++++++------- .../core/exception/UserNotFoundException.java | 14 +++++++------- .../java/info/xiaomo/core/field/LoginField.java | 12 ++++++------ .../java/info/xiaomo/core/filter/CORSFilter.java | 14 +++++++------- .../java/info/xiaomo/core/untils/AuthUtil.java | 10 +++++----- .../java/info/xiaomo/core/untils/CastUtil.java | 12 ++++++------ .../java/info/xiaomo/core/untils/CharUtil.java | 2 +- .../java/info/xiaomo/core/untils/DownUtil.java | 2 +- .../info/xiaomo/core/untils/LunarCalendarUtil.java | 2 +- .../main/java/info/xiaomo/core/untils/MD5Util.java | 14 +++++++------- .../java/info/xiaomo/core/untils/MailUtil.java | 14 +++++++------- .../java/info/xiaomo/core/untils/QiniuUtil.java | 2 +- .../java/info/xiaomo/core/untils/RandomUtil.java | 2 +- .../java/info/xiaomo/core/untils/RegExUtil.java | 2 +- .../info/xiaomo/core/untils/SerializeUtil.java | 14 +++++++------- .../java/info/xiaomo/core/untils/StringUtil.java | 2 +- .../main/java/info/xiaomo/core/untils/XmlUtil.java | 2 +- .../main/java/info/xiaomo/crawler/CrawlerMain.java | 12 ++++++------ .../java/info/xiaomo/crawler/dao/ShikigamaDao.java | 2 +- .../info/xiaomo/crawler/model/MitamaModel.java | 2 +- .../info/xiaomo/crawler/model/ShikigamiModel.java | 2 +- .../xiaomo/crawler/schedule/ScheduledTasks.java | 2 +- .../xiaomo/crawler/service/ShikigamaService.java | 2 +- .../crawler/service/impl/ShikigamaServiceImpl.java | 2 +- .../xiaomo/crawler/spider/OnnmyoujiSpider.java | 2 +- .../info/xiaomo/freemarker/FreemarkerMain.java | 12 ++++++------ .../controller/FreemarkerController.java | 12 ++++++------ .../main/java/info/xiaomo/mongodb/MongodbMain.java | 14 +++++++------- .../mongodb/controller/MongoUserController.java | 12 ++++++------ .../java/info/xiaomo/mongodb/dao/MongoUserDao.java | 14 +++++++------- .../java/info/xiaomo/mongodb/model/MongoUser.java | 14 +++++++------- .../xiaomo/mongodb/service/MongoUserService.java | 12 ++++++------ .../mongodb/service/impl/MongoUserServiceImpl.java | 12 ++++++------ mongodb/src/main/resources/public/swagger-ui.js | 2 +- .../xiaomo/multipleSource/MultipleSourceMain.java | 14 +++++++------- .../controller/MultipleSourceController.java | 14 +++++++------- .../java/info/xiaomo/multipleSource/sql/Sql.java | 14 +++++++------- .../main/java/info/xiaomo/mybatis/MybatisMain.java | 12 ++++++------ .../mybatis/controller/MybatisUserController.java | 14 +++++++------- .../java/info/xiaomo/rabbitmq/RabbitMqMain.java | 14 +++++++------- .../src/main/java/info/xiaomo/redis/RedisMain.java | 14 +++++++------- .../xiaomo/redis/controller/TestController.java | 12 ++++++------ .../java/info/xiaomo/redis/dao/CommonRedisDao.java | 14 +++++++------- .../xiaomo/redis/dao/impl/CommonRedisDaoImpl.java | 14 +++++++------- .../java/info/xiaomo/scheduled/ScheduledMain.java | 14 +++++++------- .../java/info/xiaomo/security/SecurityMain.java | 14 +++++++------- .../src/main/java/info/xiaomo/chat/ChatMain.java | 14 +++++++------- .../java/info/xiaomo/chat/socket/MyWebSocket.java | 14 +++++++------- .../java/info/xiaomo/velocity/VelocityMain.java | 12 ++++++------ .../velocity/controller/VelocityController.java | 12 ++++++------ .../main/java/info/xiaomo/website/XiaomoMain.java | 14 +++++++------- .../website/controller/AdminUserController.java | 14 +++++++------- .../website/controller/ChangeLogController.java | 14 +++++++------- .../xiaomo/website/controller/IndexController.java | 12 ++++++------ .../xiaomo/website/controller/LinkController.java | 14 +++++++------- .../xiaomo/website/controller/MailController.java | 14 +++++++------- .../website/controller/TechnologyController.java | 14 +++++++------- .../xiaomo/website/controller/UserController.java | 14 +++++++------- .../website/controller/WebSetController.java | 14 +++++++------- .../xiaomo/website/controller/WorksController.java | 14 +++++++------- .../java/info/xiaomo/website/dao/AdminUserDao.java | 12 ++++++------ .../java/info/xiaomo/website/dao/ChangeLogDao.java | 12 ++++++------ .../main/java/info/xiaomo/website/dao/LinkDao.java | 12 ++++++------ .../info/xiaomo/website/dao/TechnologyDao.java | 12 ++++++------ .../main/java/info/xiaomo/website/dao/UserDao.java | 12 ++++++------ .../java/info/xiaomo/website/dao/WebSetDao.java | 12 ++++++------ .../java/info/xiaomo/website/dao/WorksDao.java | 12 ++++++------ .../info/xiaomo/website/dao/base/CommonDao.java | 14 +++++++------- .../website/interceptor/LoginInterceptor.java | 12 ++++++------ .../java/info/xiaomo/website/model/AdminModel.java | 12 ++++++------ .../info/xiaomo/website/model/ChangeLogModel.java | 12 ++++++------ .../java/info/xiaomo/website/model/LinkModel.java | 12 ++++++------ .../info/xiaomo/website/model/SystemSetModel.java | 12 ++++++------ .../info/xiaomo/website/model/TechnologyModel.java | 12 ++++++------ .../java/info/xiaomo/website/model/UserModel.java | 12 ++++++------ .../java/info/xiaomo/website/model/WorksModel.java | 12 ++++++------ .../xiaomo/website/service/AdminUserService.java | 12 ++++++------ .../xiaomo/website/service/ChangeLogService.java | 12 ++++++------ .../info/xiaomo/website/service/LinkService.java | 12 ++++++------ .../xiaomo/website/service/TechnologyService.java | 12 ++++++------ .../info/xiaomo/website/service/UserService.java | 12 ++++++------ .../info/xiaomo/website/service/WebSetService.java | 12 ++++++------ .../info/xiaomo/website/service/WorksService.java | 12 ++++++------ .../website/service/impl/AdminUserServiceImpl.java | 14 +++++++------- .../website/service/impl/ChangeLogServiceImpl.java | 12 ++++++------ .../website/service/impl/LinkServiceImpl.java | 12 ++++++------ .../service/impl/TechnologyServiceImpl.java | 12 ++++++------ .../website/service/impl/UserServiceImpl.java | 14 +++++++------- .../website/service/impl/WebSetServiceImpl.java | 12 ++++++------ .../website/service/impl/WorksServiceImpl.java | 12 ++++++------ .../java/info/xiaomo/website/util/MailUtil.java | 14 +++++++------- .../info/xiaomo/website/view/AdminUserView.java | 12 ++++++------ .../info/xiaomo/website/view/ChangeLogView.java | 12 ++++++------ .../java/info/xiaomo/website/view/LinkView.java | 12 ++++++------ .../info/xiaomo/website/view/TechnologyView.java | 12 ++++++------ .../java/info/xiaomo/website/view/UserView.java | 12 ++++++------ .../java/info/xiaomo/website/view/WorksView.java | 12 ++++++------ 159 files changed, 855 insertions(+), 856 deletions(-) diff --git a/api/src/main/java/info/xiaomo/api/ApiMain.java b/api/src/main/java/info/xiaomo/api/ApiMain.java index 69d92055..94b62b55 100644 --- a/api/src/main/java/info/xiaomo/api/ApiMain.java +++ b/api/src/main/java/info/xiaomo/api/ApiMain.java @@ -31,13 +31,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: 后台管理启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + * Date: 2016/4/1 15:38 + * Description: 后台管理启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java index 0a39252c..f21fe6e7 100644 --- a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java @@ -30,13 +30,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 12:47 - * @Description: 后台用户控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 12:47 + * Description: 后台用户控制器 + * Copyright(©) 2015 by xiaomo. */ @RestController @RequestMapping("/adminUser") diff --git a/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java b/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java index ae47dad3..3a0455a0 100644 --- a/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java +++ b/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java @@ -22,13 +22,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1117:40 - * @Description: 更新日志控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1117:40 + * Description: 更新日志控制器 + * Copyright(©) 2015 by xiaomo. **/ @RestController @RequestMapping("/changeLog") diff --git a/api/src/main/java/info/xiaomo/api/controller/LinkController.java b/api/src/main/java/info/xiaomo/api/controller/LinkController.java index 99010b82..228ed0bc 100644 --- a/api/src/main/java/info/xiaomo/api/controller/LinkController.java +++ b/api/src/main/java/info/xiaomo/api/controller/LinkController.java @@ -22,13 +22,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:55 - * @Description: 友情连接控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:55 + * Description: 友情连接控制器 + * Copyright(©) 2015 by xiaomo. **/ @RestController @RequestMapping("/link") diff --git a/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java b/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java index cac1e49d..ff5589af 100644 --- a/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java +++ b/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java @@ -22,13 +22,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:36 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:36 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ diff --git a/api/src/main/java/info/xiaomo/api/controller/UserController.java b/api/src/main/java/info/xiaomo/api/controller/UserController.java index 7263ee0a..b641a637 100644 --- a/api/src/main/java/info/xiaomo/api/controller/UserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/UserController.java @@ -30,13 +30,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:51 - * @Description: 用户控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:51 + * Description: 用户控制器 + * Copyright(©) 2015 by xiaomo. **/ @RestController @RequestMapping("/user") diff --git a/api/src/main/java/info/xiaomo/api/controller/WebSetController.java b/api/src/main/java/info/xiaomo/api/controller/WebSetController.java index 712ca7c0..d9376f4b 100644 --- a/api/src/main/java/info/xiaomo/api/controller/WebSetController.java +++ b/api/src/main/java/info/xiaomo/api/controller/WebSetController.java @@ -20,13 +20,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:21 - * @Description: 系统设置控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:21 + * Description: 系统设置控制器 + * Copyright(©) 2015 by xiaomo. **/ @RestController @RequestMapping("/webSet") diff --git a/api/src/main/java/info/xiaomo/api/controller/WorksController.java b/api/src/main/java/info/xiaomo/api/controller/WorksController.java index f2a0513a..18ece45f 100644 --- a/api/src/main/java/info/xiaomo/api/controller/WorksController.java +++ b/api/src/main/java/info/xiaomo/api/controller/WorksController.java @@ -22,13 +22,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:36 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:36 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ diff --git a/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java b/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java index 1115bd11..e754d725 100644 --- a/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:08 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:08 + * Copyright(©) 2015 by xiaomo. */ @Repository public interface AdminUserDao extends JpaRepository { diff --git a/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java b/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java index 05b5eaac..326971c0 100644 --- a/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:52 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:52 + * Copyright(©) 2015 by xiaomo. **/ @Repository public interface ChangeLogDao extends JpaRepository { diff --git a/api/src/main/java/info/xiaomo/api/dao/LinkDao.java b/api/src/main/java/info/xiaomo/api/dao/LinkDao.java index f75a94ff..6a8abb85 100644 --- a/api/src/main/java/info/xiaomo/api/dao/LinkDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/LinkDao.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:52 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:52 + * Copyright(©) 2015 by xiaomo. **/ @Repository public interface LinkDao extends JpaRepository { diff --git a/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java b/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java index 75a0ae3e..6455d7ad 100644 --- a/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:08 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:08 + * Copyright(©) 2015 by xiaomo. */ @Repository public interface TechnologyDao extends JpaRepository { diff --git a/api/src/main/java/info/xiaomo/api/dao/UserDao.java b/api/src/main/java/info/xiaomo/api/dao/UserDao.java index 76106962..316e158b 100644 --- a/api/src/main/java/info/xiaomo/api/dao/UserDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/UserDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/3 10:53 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/3 10:53 + * Copyright(©) 2015 by xiaomo. */ @Repository diff --git a/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java b/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java index 088854c6..6eada575 100644 --- a/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:26 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:26 + * Copyright(©) 2015 by xiaomo. **/ @Repository public interface WebSetDao extends JpaRepository { diff --git a/api/src/main/java/info/xiaomo/api/dao/WorksDao.java b/api/src/main/java/info/xiaomo/api/dao/WorksDao.java index eaf47a85..d5c99ee7 100644 --- a/api/src/main/java/info/xiaomo/api/dao/WorksDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/WorksDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:08 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:08 + * Copyright(©) 2015 by xiaomo. */ @Repository public interface WorksDao extends JpaRepository { diff --git a/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java b/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java index 5c4aef25..1600a193 100644 --- a/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java @@ -15,13 +15,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 20:46 - * @Description: 公共dao层 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 20:46 + * Description: 公共dao层 + * Copyright(©) 2015 by xiaomo. **/ @Repository @Transactional diff --git a/api/src/main/java/info/xiaomo/api/model/AdminModel.java b/api/src/main/java/info/xiaomo/api/model/AdminModel.java index 8e655402..5d66e945 100644 --- a/api/src/main/java/info/xiaomo/api/model/AdminModel.java +++ b/api/src/main/java/info/xiaomo/api/model/AdminModel.java @@ -26,12 +26,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 12:39 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 12:39 + * Copyright(©) 2015 by xiaomo. */ @Entity @Table(name = "adminUser") diff --git a/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java b/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java index 869ca686..bb3540ac 100644 --- a/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java +++ b/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/517:17 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/517:17 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "changeLog") diff --git a/api/src/main/java/info/xiaomo/api/model/LinkModel.java b/api/src/main/java/info/xiaomo/api/model/LinkModel.java index f501d823..73a29028 100644 --- a/api/src/main/java/info/xiaomo/api/model/LinkModel.java +++ b/api/src/main/java/info/xiaomo/api/model/LinkModel.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:47 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:47 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "link") diff --git a/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java b/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java index 32903b79..c2becdae 100644 --- a/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java +++ b/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java @@ -19,12 +19,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/517:17 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/517:17 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "systemSet") diff --git a/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java b/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java index af411958..4cd0ba4c 100644 --- a/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java +++ b/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:27 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:27 + * Copyright(©) 2015 by xiaomo. **/ @Entity diff --git a/api/src/main/java/info/xiaomo/api/model/UserModel.java b/api/src/main/java/info/xiaomo/api/model/UserModel.java index 92877fa8..c967d041 100644 --- a/api/src/main/java/info/xiaomo/api/model/UserModel.java +++ b/api/src/main/java/info/xiaomo/api/model/UserModel.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:36 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:36 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "user") diff --git a/api/src/main/java/info/xiaomo/api/model/WorksModel.java b/api/src/main/java/info/xiaomo/api/model/WorksModel.java index 28d8c263..acec64e7 100644 --- a/api/src/main/java/info/xiaomo/api/model/WorksModel.java +++ b/api/src/main/java/info/xiaomo/api/model/WorksModel.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:15 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:15 + * Copyright(©) 2015 by xiaomo. **/ // hibernate diff --git a/api/src/main/java/info/xiaomo/api/service/AdminUserService.java b/api/src/main/java/info/xiaomo/api/service/AdminUserService.java index ef735bd6..acd6d843 100644 --- a/api/src/main/java/info/xiaomo/api/service/AdminUserService.java +++ b/api/src/main/java/info/xiaomo/api/service/AdminUserService.java @@ -20,12 +20,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:04 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:04 + * Copyright(©) 2015 by xiaomo. */ public interface AdminUserService { diff --git a/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java b/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java index 167122b6..9b3d2660 100644 --- a/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java +++ b/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java @@ -11,12 +11,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:49 + * Copyright(©) 2015 by xiaomo. **/ public interface ChangeLogService { diff --git a/api/src/main/java/info/xiaomo/api/service/LinkService.java b/api/src/main/java/info/xiaomo/api/service/LinkService.java index 6637d286..f68f93f1 100644 --- a/api/src/main/java/info/xiaomo/api/service/LinkService.java +++ b/api/src/main/java/info/xiaomo/api/service/LinkService.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:49 + * Copyright(©) 2015 by xiaomo. **/ public interface LinkService { diff --git a/api/src/main/java/info/xiaomo/api/service/TechnologyService.java b/api/src/main/java/info/xiaomo/api/service/TechnologyService.java index 8d9ad3af..32159f23 100644 --- a/api/src/main/java/info/xiaomo/api/service/TechnologyService.java +++ b/api/src/main/java/info/xiaomo/api/service/TechnologyService.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:33 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:33 + * Copyright(©) 2015 by xiaomo. **/ public interface TechnologyService { diff --git a/api/src/main/java/info/xiaomo/api/service/UserService.java b/api/src/main/java/info/xiaomo/api/service/UserService.java index 1aebebcd..97d363c4 100644 --- a/api/src/main/java/info/xiaomo/api/service/UserService.java +++ b/api/src/main/java/info/xiaomo/api/service/UserService.java @@ -16,12 +16,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:45 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:45 + * Copyright(©) 2015 by xiaomo. **/ public interface UserService { diff --git a/api/src/main/java/info/xiaomo/api/service/WebSetService.java b/api/src/main/java/info/xiaomo/api/service/WebSetService.java index 1eb2c1e0..9b76a282 100644 --- a/api/src/main/java/info/xiaomo/api/service/WebSetService.java +++ b/api/src/main/java/info/xiaomo/api/service/WebSetService.java @@ -11,12 +11,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:23 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:23 + * Copyright(©) 2015 by xiaomo. **/ public interface WebSetService { diff --git a/api/src/main/java/info/xiaomo/api/service/WorksService.java b/api/src/main/java/info/xiaomo/api/service/WorksService.java index c54474c6..022bfb84 100644 --- a/api/src/main/java/info/xiaomo/api/service/WorksService.java +++ b/api/src/main/java/info/xiaomo/api/service/WorksService.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:33 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:33 + * Copyright(©) 2015 by xiaomo. **/ public interface WorksService { diff --git a/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java index 0dc6811d..6824e737 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java @@ -27,13 +27,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:34 - * @Description: 后台用户serviceImpl - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:34 + * Description: 后台用户serviceImpl + * Copyright(©) 2015 by xiaomo. */ @Service public class AdminUserServiceImpl implements AdminUserService { diff --git a/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java index 4e2bb456..a9df2fa6 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/11 19:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/11 19:49 + * Copyright(©) 2015 by xiaomo. **/ @Service public class ChangeLogServiceImpl implements ChangeLogService { diff --git a/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java index d60e8c2b..b65b006f 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/11 19:50 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/11 19:50 + * Copyright(©) 2015 by xiaomo. **/ @Service public class LinkServiceImpl implements LinkService { diff --git a/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java index b749954c..978a9d9d 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:34 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:34 + * Copyright(©) 2015 by xiaomo. **/ @Service diff --git a/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java index ab319023..f069e7dd 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java @@ -19,13 +19,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:46 - * @Description: 用户service实现 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:46 + * Description: 用户service实现 + * Copyright(©) 2015 by xiaomo. **/ @Service public class UserServiceImpl implements UserService { diff --git a/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java index 3c8ca889..c344b42d 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java @@ -15,12 +15,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:24 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:24 + * Copyright(©) 2015 by xiaomo. **/ @Service public class WebSetServiceImpl implements WebSetService { diff --git a/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java index b5967165..feab917c 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:34 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:34 + * Copyright(©) 2015 by xiaomo. **/ @Service diff --git a/api/src/main/resources/public/swagger-ui.js b/api/src/main/resources/public/swagger-ui.js index 57f512a7..f3de3380 100644 --- a/api/src/main/resources/public/swagger-ui.js +++ b/api/src/main/resources/public/swagger-ui.js @@ -7949,7 +7949,7 @@ process.umask = function() { return 0; }; /*! * The buffer module from node.js, for the browser. * - * @author Feross Aboukhadijeh + * author Feross Aboukhadijeh * @license MIT */ diff --git a/application/src/main/java/info/xiaomo/application/ApplicationMain.java b/application/src/main/java/info/xiaomo/application/ApplicationMain.java index 09db81c0..db3b25ef 100644 --- a/application/src/main/java/info/xiaomo/application/ApplicationMain.java +++ b/application/src/main/java/info/xiaomo/application/ApplicationMain.java @@ -31,12 +31,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/application/src/main/java/info/xiaomo/application/controller/UserController.java b/application/src/main/java/info/xiaomo/application/controller/UserController.java index a9bef8be..3ca8725e 100644 --- a/application/src/main/java/info/xiaomo/application/controller/UserController.java +++ b/application/src/main/java/info/xiaomo/application/controller/UserController.java @@ -26,13 +26,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:51 - * @Description: 用户控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:51 + * Description: 用户控制器 + * Copyright(©) 2015 by xiaomo. **/ @RestController @RequestMapping("/user") diff --git a/application/src/main/java/info/xiaomo/application/dao/UserDao.java b/application/src/main/java/info/xiaomo/application/dao/UserDao.java index ff79242f..10ffd9f3 100644 --- a/application/src/main/java/info/xiaomo/application/dao/UserDao.java +++ b/application/src/main/java/info/xiaomo/application/dao/UserDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/3 10:53 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/3 10:53 + * Copyright(©) 2015 by xiaomo. */ @Repository diff --git a/application/src/main/java/info/xiaomo/application/model/UserModel.java b/application/src/main/java/info/xiaomo/application/model/UserModel.java index 2375ccac..75c4c5ae 100644 --- a/application/src/main/java/info/xiaomo/application/model/UserModel.java +++ b/application/src/main/java/info/xiaomo/application/model/UserModel.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:36 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:36 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "user") diff --git a/application/src/main/java/info/xiaomo/application/service/UserService.java b/application/src/main/java/info/xiaomo/application/service/UserService.java index 528a6e43..440e28da 100644 --- a/application/src/main/java/info/xiaomo/application/service/UserService.java +++ b/application/src/main/java/info/xiaomo/application/service/UserService.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:45 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:45 + * Copyright(©) 2015 by xiaomo. **/ public interface UserService extends BaseService { diff --git a/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java b/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java index 591decf4..0749960c 100644 --- a/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java +++ b/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java @@ -18,13 +18,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:46 - * @Description: 用户service实现 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:46 + * Description: 用户service实现 + * Copyright(©) 2015 by xiaomo. **/ @Service public class UserServiceImpl implements UserService { diff --git a/application/src/main/resources/config/application.properties b/application/src/main/resources/config/application.properties index 98b12d2b..54dbb748 100644 --- a/application/src/main/resources/config/application.properties +++ b/application/src/main/resources/config/application.properties @@ -3,9 +3,9 @@ server.port=8080 server.session.timeout=1800 server.max-http-header-size=20971520 #datasource -spring.datasource.url=jdbc:mysql://ip/xiaomoApp?useUnicode=true&characterEncoding=UTF-8 -spring.datasource.username=\u4F60\u7684\u5E10\u53F7 -spring.datasource.password=\u4F60\u7684\u5BC6\u7801 +spring.datasource.url=jdbc:mysql://115.29.137.34/xiaomoApp?useUnicode=true&characterEncoding=UTF-8 +spring.datasource.username=xiaomo +spring.datasource.password=123456 spring.datasource.driver-class-name=com.mysql.jdbc.Driver # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss diff --git a/application/src/main/resources/public/swagger-ui.js b/application/src/main/resources/public/swagger-ui.js index 57f512a7..f3de3380 100644 --- a/application/src/main/resources/public/swagger-ui.js +++ b/application/src/main/resources/public/swagger-ui.js @@ -7949,7 +7949,7 @@ process.umask = function() { return 0; }; /*! * The buffer module from node.js, for the browser. * - * @author Feross Aboukhadijeh + * author Feross Aboukhadijeh * @license MIT */ diff --git a/application/src/test/java/Test11.java b/application/src/test/java/Test11.java index 12069fc3..9da972cb 100644 --- a/application/src/test/java/Test11.java +++ b/application/src/test/java/Test11.java @@ -11,7 +11,7 @@ import static info.xiaomo.core.untils.ExcelUtil.getListData; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/13 18:33 */ @RunWith(SpringJUnit4ClassRunner.class) // SpringJUnit支持,由此引入Spring-Test框架支持! diff --git a/aries/src/main/java/info/xiaomo/aries/AriesMain.java b/aries/src/main/java/info/xiaomo/aries/AriesMain.java index 226eb82a..9f43cfb2 100644 --- a/aries/src/main/java/info/xiaomo/aries/AriesMain.java +++ b/aries/src/main/java/info/xiaomo/aries/AriesMain.java @@ -21,7 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:34 */ @Configuration diff --git a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java index fa8372ae..5088bcbe 100644 --- a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java +++ b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java @@ -17,7 +17,7 @@ /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:40 */ @RequestMapping("/user") diff --git a/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java b/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java index d18573bc..bacac97b 100644 --- a/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java +++ b/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseDao; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:39 */ public interface UserDao extends BaseDao { diff --git a/aries/src/main/java/info/xiaomo/aries/model/UserModel.java b/aries/src/main/java/info/xiaomo/aries/model/UserModel.java index fb777822..69ec05dd 100644 --- a/aries/src/main/java/info/xiaomo/aries/model/UserModel.java +++ b/aries/src/main/java/info/xiaomo/aries/model/UserModel.java @@ -10,7 +10,7 @@ import javax.persistence.Table; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:40 */ @Entity diff --git a/aries/src/main/java/info/xiaomo/aries/service/UserService.java b/aries/src/main/java/info/xiaomo/aries/service/UserService.java index c04edee2..d40a7b76 100644 --- a/aries/src/main/java/info/xiaomo/aries/service/UserService.java +++ b/aries/src/main/java/info/xiaomo/aries/service/UserService.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseService; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:39 */ public interface UserService extends BaseService { diff --git a/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java b/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java index 313c2b97..547b868a 100644 --- a/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java +++ b/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java @@ -15,7 +15,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:39 */ diff --git a/async/src/main/java/info/xiaomo/anysc/AsyncMain.java b/async/src/main/java/info/xiaomo/anysc/AsyncMain.java index 1b3c4880..ad6625ed 100644 --- a/async/src/main/java/info/xiaomo/anysc/AsyncMain.java +++ b/async/src/main/java/info/xiaomo/anysc/AsyncMain.java @@ -13,13 +13,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: RabbitMq启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: RabbitMq启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/async/src/main/java/info/xiaomo/anysc/controller/TestController.java b/async/src/main/java/info/xiaomo/anysc/controller/TestController.java index c226001b..c3c3efe1 100644 --- a/async/src/main/java/info/xiaomo/anysc/controller/TestController.java +++ b/async/src/main/java/info/xiaomo/anysc/controller/TestController.java @@ -16,13 +16,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/15 15:12 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/15 15:12 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @RestController diff --git a/core/src/main/java/info/xiaomo/core/base/AuthOperate.java b/core/src/main/java/info/xiaomo/core/base/AuthOperate.java index 0cd03d4b..873c5686 100644 --- a/core/src/main/java/info/xiaomo/core/base/AuthOperate.java +++ b/core/src/main/java/info/xiaomo/core/base/AuthOperate.java @@ -5,7 +5,7 @@ import java.util.Date; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/13 9:51 */ public interface AuthOperate { diff --git a/core/src/main/java/info/xiaomo/core/base/BaseController.java b/core/src/main/java/info/xiaomo/core/base/BaseController.java index f43746d7..b163e736 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseController.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseController.java @@ -10,7 +10,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:41 */ @RestController diff --git a/core/src/main/java/info/xiaomo/core/base/BaseDao.java b/core/src/main/java/info/xiaomo/core/base/BaseDao.java index de4336ed..b87d8074 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseDao.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseDao.java @@ -4,7 +4,7 @@ import org.springframework.stereotype.Repository; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/13 11:23 */ @Repository diff --git a/core/src/main/java/info/xiaomo/core/base/BaseModel.java b/core/src/main/java/info/xiaomo/core/base/BaseModel.java index 0cbbbaf8..c4b2034c 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseModel.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseModel.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 20:37 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 20:37 + * Copyright(©) 2015 by xiaomo. **/ @MappedSuperclass diff --git a/core/src/main/java/info/xiaomo/core/base/BaseService.java b/core/src/main/java/info/xiaomo/core/base/BaseService.java index 7a88a169..eda97bdb 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseService.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseService.java @@ -6,7 +6,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/11 16:42 */ @Service diff --git a/core/src/main/java/info/xiaomo/core/base/Result.java b/core/src/main/java/info/xiaomo/core/base/Result.java index 12bb2283..83e3905f 100644 --- a/core/src/main/java/info/xiaomo/core/base/Result.java +++ b/core/src/main/java/info/xiaomo/core/base/Result.java @@ -8,13 +8,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/10/31 15:25 - * @Description: 返回结果 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/10/31 15:25 + * Description: 返回结果 + * Copyright(©) 2015 by xiaomo. */ @Data public class Result { diff --git a/core/src/main/java/info/xiaomo/core/constant/Code.java b/core/src/main/java/info/xiaomo/core/constant/Code.java index 02804d55..878f0cbf 100644 --- a/core/src/main/java/info/xiaomo/core/constant/Code.java +++ b/core/src/main/java/info/xiaomo/core/constant/Code.java @@ -6,13 +6,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/10/29 10:59 - * @Description: 错误码 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/10/29 10:59 + * Description: 错误码 + * Copyright(©) 2015 by xiaomo. */ public enum Code { SUCCESS(200, "成功"), diff --git a/core/src/main/java/info/xiaomo/core/constant/GenderType.java b/core/src/main/java/info/xiaomo/core/constant/GenderType.java index e0514f30..cc7cb46d 100644 --- a/core/src/main/java/info/xiaomo/core/constant/GenderType.java +++ b/core/src/main/java/info/xiaomo/core/constant/GenderType.java @@ -6,13 +6,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/1/12 16:37 - * @Description: 性别 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/1/12 16:37 + * Description: 性别 + * Copyright(©) 2015 by xiaomo. **/ public interface GenderType { diff --git a/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java b/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java index f35d8642..f76f4709 100644 --- a/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java +++ b/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java @@ -14,13 +14,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/3 11:08 - * @Description: 找不到用户异常 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/3 11:08 + * Description: 找不到用户异常 + * Copyright(©) 2015 by xiaomo. */ public class UserNotFoundException extends Exception { diff --git a/core/src/main/java/info/xiaomo/core/field/LoginField.java b/core/src/main/java/info/xiaomo/core/field/LoginField.java index 36fb098a..fe0ead57 100644 --- a/core/src/main/java/info/xiaomo/core/field/LoginField.java +++ b/core/src/main/java/info/xiaomo/core/field/LoginField.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com(83387856) - * @Date: 2016/1/8 13:16 - * @Description: QQ登录常量类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info(83387856) + * Date: 2016/1/8 13:16 + * Description: QQ登录常量类 + * Copyright(©) 2015 by xiaomo. */ public interface LoginField { //qq diff --git a/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java b/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java index 0505e0c6..3a47953c 100644 --- a/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java +++ b/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java @@ -12,13 +12,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1516:25 - * @Description: - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1516:25 + * Description: + * Copyright(©) 2015 by xiaomo. **/ @Component public class CORSFilter implements Filter { diff --git a/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java b/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java index d58ebd28..fe689f7d 100644 --- a/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java @@ -8,12 +8,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 + * author: xiaomo + * github: https://github.com/syoubaku * @email: xiaomo@xiaomo.info - * @QQ_NO: 83387856 - * @Date: 2016/11/31 9:50 - * @Copyright(©) 2015 by xiaomo. + + * Date: 2016/11/31 9:50 + * Copyright(©) 2015 by xiaomo. **/ public class AuthUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/CastUtil.java b/core/src/main/java/info/xiaomo/core/untils/CastUtil.java index 162b478d..3df44b47 100644 --- a/core/src/main/java/info/xiaomo/core/untils/CastUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/CastUtil.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/22 14:55 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/22 14:55 + * Copyright(©) 2015 by xiaomo. **/ public class CastUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/CharUtil.java b/core/src/main/java/info/xiaomo/core/untils/CharUtil.java index ffaeb1da..846fecbe 100644 --- a/core/src/main/java/info/xiaomo/core/untils/CharUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/CharUtil.java @@ -7,7 +7,7 @@ *

Title:字符编码工具类

* * @version 1.0 - * @author: xiaomo + * author: xiaomo */ public class CharUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/DownUtil.java b/core/src/main/java/info/xiaomo/core/untils/DownUtil.java index 66744a8c..643aad04 100644 --- a/core/src/main/java/info/xiaomo/core/untils/DownUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/DownUtil.java @@ -8,7 +8,7 @@ import java.net.URLConnection; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/26 13:25 */ public class DownUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java b/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java index f13d22f1..bdbf7187 100644 --- a/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java @@ -5,7 +5,7 @@ import java.util.GregorianCalendar; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @version : 2017/1/14 9:59 */ diff --git a/core/src/main/java/info/xiaomo/core/untils/MD5Util.java b/core/src/main/java/info/xiaomo/core/untils/MD5Util.java index 7f5d8211..27b4ae24 100644 --- a/core/src/main/java/info/xiaomo/core/untils/MD5Util.java +++ b/core/src/main/java/info/xiaomo/core/untils/MD5Util.java @@ -16,13 +16,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/3 10:03 - * @Description: md5加密解密 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/3 10:03 + * Description: md5加密解密 + * Copyright(©) 2015 by xiaomo. */ public class MD5Util { diff --git a/core/src/main/java/info/xiaomo/core/untils/MailUtil.java b/core/src/main/java/info/xiaomo/core/untils/MailUtil.java index 035faa31..f596b320 100644 --- a/core/src/main/java/info/xiaomo/core/untils/MailUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/MailUtil.java @@ -14,13 +14,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/511:00 - * @Description: 发送邮件 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/511:00 + * Description: 发送邮件 + * Copyright(©) 2015 by xiaomo. **/ public class MailUtil { private static String USERNAME; diff --git a/core/src/main/java/info/xiaomo/core/untils/QiniuUtil.java b/core/src/main/java/info/xiaomo/core/untils/QiniuUtil.java index 38f14ae2..5aef786f 100644 --- a/core/src/main/java/info/xiaomo/core/untils/QiniuUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/QiniuUtil.java @@ -5,7 +5,7 @@ /** * 七牛云储存的帮助类 * - * @author l.cm + * author l.cm */ public class QiniuUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java b/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java index 11cc14e9..e7ac17e6 100644 --- a/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java @@ -15,7 +15,7 @@ /** * 随机工具类 * - * @author xiaomo + * author xiaomo */ public class RandomUtil { private static final Logger LOGGER = LoggerFactory.getLogger(RandomUtil.class); diff --git a/core/src/main/java/info/xiaomo/core/untils/RegExUtil.java b/core/src/main/java/info/xiaomo/core/untils/RegExUtil.java index f3e7ff80..b0e5e27e 100644 --- a/core/src/main/java/info/xiaomo/core/untils/RegExUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/RegExUtil.java @@ -10,7 +10,7 @@ /** * 这是个正则表达式应用类,用来匹配和替换字串用的 * - * @author xiaomo + * author xiaomo */ public class RegExUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java b/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java index 117f4a07..3bf56773 100644 --- a/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java @@ -16,13 +16,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 15/9/6 16:05 - * @Description: 序列化通用方法 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 15/9/6 16:05 + * Description: 序列化通用方法 + * Copyright(©) 2015 by xiaomo. */ public class SerializeUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/StringUtil.java b/core/src/main/java/info/xiaomo/core/untils/StringUtil.java index a5833008..7830d3e8 100644 --- a/core/src/main/java/info/xiaomo/core/untils/StringUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/StringUtil.java @@ -15,7 +15,7 @@ /** * 对字符串的简单处理 * - * @author L.cm + * author L.cm * @date 2013-6-6 下午5:08:06 */ public class StringUtil extends StringUtils { diff --git a/core/src/main/java/info/xiaomo/core/untils/XmlUtil.java b/core/src/main/java/info/xiaomo/core/untils/XmlUtil.java index 94739a10..2fc91315 100644 --- a/core/src/main/java/info/xiaomo/core/untils/XmlUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/XmlUtil.java @@ -11,7 +11,7 @@ import java.util.List; /** - * @author advance + * author advance */ public class XmlUtil { /** diff --git a/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java b/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java index f3e7e31c..d86a8b03 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java +++ b/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java @@ -13,12 +13,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java b/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java index 02a3130b..1db09f70 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java +++ b/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java @@ -4,7 +4,7 @@ import org.springframework.data.jpa.repository.JpaRepository; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 15:55 */ public interface ShikigamaDao extends JpaRepository { diff --git a/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java b/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java index 784c9914..f699d296 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java +++ b/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseModel; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 18:06 * 御魂模型 */ diff --git a/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java b/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java index 9b49b4a9..8ad11cbe 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java +++ b/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java @@ -7,7 +7,7 @@ import javax.persistence.Table; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 15:09 */ diff --git a/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java b/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java index 361e418d..695b0fb0 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java +++ b/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java @@ -15,7 +15,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 15:59 */ @Component diff --git a/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java b/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java index 881e3e63..acb9a9c5 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java +++ b/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java @@ -5,7 +5,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 15:54 */ public interface ShikigamaService { diff --git a/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java b/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java index 1b3fed2e..04573f85 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java +++ b/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java @@ -11,7 +11,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 15:54 */ @Service diff --git a/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java b/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java index 8c167d3d..f9d568f8 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java +++ b/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java @@ -11,7 +11,7 @@ import java.util.List; /** - * @author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) * @created : 2016/12/24 15:05 * 阴阳师获取数据 */ diff --git a/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java b/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java index a3e01514..e3ea7bfe 100644 --- a/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java +++ b/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java b/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java index 9840332f..d23cc9b9 100644 --- a/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java +++ b/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/16 10:19 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/16 10:19 + * Copyright(©) 2015 by xiaomo. **/ @Controller diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java b/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java index 2acc45fb..4fea6dbb 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java @@ -27,13 +27,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: RabbitMq启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: RabbitMq启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java index 6b8b3e8c..6e39b302 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java @@ -14,12 +14,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/15 15:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/15 15:49 + * Copyright(©) 2015 by xiaomo. **/ @RestController diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java b/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java index 8b8262bd..3748a3ab 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java @@ -10,13 +10,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/15 15:42 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/15 15:42 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @Repository diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java b/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java index 17df6c57..7e7ef866 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java @@ -14,13 +14,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/15 15:39 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/15 15:39 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @Data diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java b/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java index 242fa0db..742468f9 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/15 15:45 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/15 15:45 + * Copyright(©) 2015 by xiaomo. **/ diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java b/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java index 4bf75c9f..3c6a2b4a 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java @@ -14,12 +14,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/15 15:45 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/15 15:45 + * Copyright(©) 2015 by xiaomo. **/ @Service diff --git a/mongodb/src/main/resources/public/swagger-ui.js b/mongodb/src/main/resources/public/swagger-ui.js index 57f512a7..f3de3380 100644 --- a/mongodb/src/main/resources/public/swagger-ui.js +++ b/mongodb/src/main/resources/public/swagger-ui.js @@ -7949,7 +7949,7 @@ process.umask = function() { return 0; }; /*! * The buffer module from node.js, for the browser. * - * @author Feross Aboukhadijeh + * author Feross Aboukhadijeh * @license MIT */ diff --git a/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java b/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java index 32665148..8bb4869c 100644 --- a/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java +++ b/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java @@ -17,13 +17,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/16 10:34 - * @Description: 多数据源(在配置文件中自定义字段,在这里取出并创建不同的数据源) - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/16 10:34 + * Description: 多数据源(在配置文件中自定义字段,在这里取出并创建不同的数据源) + * Copyright(©) 2015 by xiaomo. **/ @SpringBootApplication diff --git a/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java b/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java index 8872f9ea..48c5c74b 100644 --- a/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java +++ b/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java @@ -14,13 +14,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/16 10:45 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/16 10:45 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @RestController diff --git a/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java b/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java index 823aa3c6..fbff2c15 100644 --- a/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java +++ b/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java @@ -6,13 +6,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/16 11:29 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/16 11:29 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ public class Sql { diff --git a/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java b/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java index a70780bc..a16c5dd6 100644 --- a/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java +++ b/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java b/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java index 0087b8eb..ff12bdef 100644 --- a/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java +++ b/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java @@ -15,13 +15,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/16 9:41 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/16 9:41 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @RestController diff --git a/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java b/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java index cd1873bb..ed3b93c8 100644 --- a/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java +++ b/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java @@ -14,13 +14,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: RabbitMq启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: RabbitMq启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/redis/src/main/java/info/xiaomo/redis/RedisMain.java b/redis/src/main/java/info/xiaomo/redis/RedisMain.java index 3e757186..d3ae1b8f 100644 --- a/redis/src/main/java/info/xiaomo/redis/RedisMain.java +++ b/redis/src/main/java/info/xiaomo/redis/RedisMain.java @@ -13,13 +13,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: Redis启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: Redis启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/redis/src/main/java/info/xiaomo/redis/controller/TestController.java b/redis/src/main/java/info/xiaomo/redis/controller/TestController.java index c8636fe4..eb3c28b1 100644 --- a/redis/src/main/java/info/xiaomo/redis/controller/TestController.java +++ b/redis/src/main/java/info/xiaomo/redis/controller/TestController.java @@ -14,12 +14,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/14 17:25 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/14 17:25 + * Copyright(©) 2015 by xiaomo. **/ @RestController diff --git a/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java b/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java index e5e243a1..ca55fd8c 100644 --- a/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java +++ b/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java @@ -11,13 +11,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/14 17:59 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/14 17:59 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ public interface CommonRedisDao { diff --git a/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java b/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java index ff793b25..d549f9f7 100644 --- a/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java +++ b/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java @@ -20,13 +20,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/14 18:00 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/14 18:00 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @Repository diff --git a/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java b/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java index e771be3f..3b388a26 100644 --- a/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java +++ b/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java @@ -13,13 +13,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: 任务启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: 任务启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/security/src/main/java/info/xiaomo/security/SecurityMain.java b/security/src/main/java/info/xiaomo/security/SecurityMain.java index 2062f0a4..69977aaf 100644 --- a/security/src/main/java/info/xiaomo/security/SecurityMain.java +++ b/security/src/main/java/info/xiaomo/security/SecurityMain.java @@ -18,13 +18,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: RabbitMq启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: RabbitMq启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/socket/src/main/java/info/xiaomo/chat/ChatMain.java b/socket/src/main/java/info/xiaomo/chat/ChatMain.java index 4ddabdd7..3e6f8b6c 100644 --- a/socket/src/main/java/info/xiaomo/chat/ChatMain.java +++ b/socket/src/main/java/info/xiaomo/chat/ChatMain.java @@ -14,13 +14,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: 后台管理启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: 后台管理启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java index d118e649..1d727dee 100644 --- a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java +++ b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java @@ -20,13 +20,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 16:36 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 16:36 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @ServerEndpoint("/websocket") diff --git a/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java b/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java index a43a8048..84806d26 100644 --- a/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java +++ b/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/12/1 15:38 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/12/1 15:38 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java b/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java index aae4dd91..706369d7 100644 --- a/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java +++ b/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/16 10:19 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/16 10:19 + * Copyright(©) 2015 by xiaomo. **/ @Controller diff --git a/website/src/main/java/info/xiaomo/website/XiaomoMain.java b/website/src/main/java/info/xiaomo/website/XiaomoMain.java index be04f471..e2be311a 100644 --- a/website/src/main/java/info/xiaomo/website/XiaomoMain.java +++ b/website/src/main/java/info/xiaomo/website/XiaomoMain.java @@ -17,13 +17,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 15:38 - * @Description: 后台管理启动器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 15:38 + * Description: 后台管理启动器 + * Copyright(©) 2015 by xiaomo. **/ @Configuration @EnableAutoConfiguration diff --git a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java index 54bef114..b767047c 100644 --- a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java @@ -32,13 +32,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 12:47 - * @Description: 后台用户控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 12:47 + * Description: 后台用户控制器 + * Copyright(©) 2015 by xiaomo. */ @Controller @RequestMapping("/adminUser") diff --git a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java index 56334cf0..025d3a64 100644 --- a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java +++ b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java @@ -21,13 +21,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1117:40 - * @Description: 更新日志控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1117:40 + * Description: 更新日志控制器 + * Copyright(©) 2015 by xiaomo. **/ @Controller @RequestMapping("/changeLog") diff --git a/website/src/main/java/info/xiaomo/website/controller/IndexController.java b/website/src/main/java/info/xiaomo/website/controller/IndexController.java index c02fc30c..e544e387 100644 --- a/website/src/main/java/info/xiaomo/website/controller/IndexController.java +++ b/website/src/main/java/info/xiaomo/website/controller/IndexController.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 10:53 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 10:53 + * Copyright(©) 2015 by xiaomo. **/ @Controller diff --git a/website/src/main/java/info/xiaomo/website/controller/LinkController.java b/website/src/main/java/info/xiaomo/website/controller/LinkController.java index 90f31d91..2e11dea9 100644 --- a/website/src/main/java/info/xiaomo/website/controller/LinkController.java +++ b/website/src/main/java/info/xiaomo/website/controller/LinkController.java @@ -21,13 +21,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:55 - * @Description: 友情连接控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:55 + * Description: 友情连接控制器 + * Copyright(©) 2015 by xiaomo. **/ @Controller @RequestMapping("/link") diff --git a/website/src/main/java/info/xiaomo/website/controller/MailController.java b/website/src/main/java/info/xiaomo/website/controller/MailController.java index 408e287f..f0da19dc 100644 --- a/website/src/main/java/info/xiaomo/website/controller/MailController.java +++ b/website/src/main/java/info/xiaomo/website/controller/MailController.java @@ -11,13 +11,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/14 11:06 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/14 11:06 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ @RestController diff --git a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java index 15fd51c6..b4035e95 100644 --- a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java +++ b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java @@ -21,13 +21,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:36 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:36 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ diff --git a/website/src/main/java/info/xiaomo/website/controller/UserController.java b/website/src/main/java/info/xiaomo/website/controller/UserController.java index 49aa75f0..a69012c5 100644 --- a/website/src/main/java/info/xiaomo/website/controller/UserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/UserController.java @@ -30,13 +30,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:51 - * @Description: 用户控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:51 + * Description: 用户控制器 + * Copyright(©) 2015 by xiaomo. **/ @Controller @RequestMapping("/user") diff --git a/website/src/main/java/info/xiaomo/website/controller/WebSetController.java b/website/src/main/java/info/xiaomo/website/controller/WebSetController.java index 0b0e2307..0b556b50 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WebSetController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WebSetController.java @@ -21,13 +21,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:21 - * @Description: 系统设置控制器 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:21 + * Description: 系统设置控制器 + * Copyright(©) 2015 by xiaomo. **/ @Controller @RequestMapping("/webSet") diff --git a/website/src/main/java/info/xiaomo/website/controller/WorksController.java b/website/src/main/java/info/xiaomo/website/controller/WorksController.java index 4358d39c..0ee3583d 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WorksController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WorksController.java @@ -21,13 +21,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:36 - * @Description: 用户实体类 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:36 + * Description: 用户实体类 + * Copyright(©) 2015 by xiaomo. **/ diff --git a/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java b/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java index ddb9b01d..c73c849c 100644 --- a/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:08 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:08 + * Copyright(©) 2015 by xiaomo. */ @Repository public interface AdminUserDao extends JpaRepository { diff --git a/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java b/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java index 34ae5207..552495c0 100644 --- a/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:52 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:52 + * Copyright(©) 2015 by xiaomo. **/ @Repository public interface ChangeLogDao extends JpaRepository { diff --git a/website/src/main/java/info/xiaomo/website/dao/LinkDao.java b/website/src/main/java/info/xiaomo/website/dao/LinkDao.java index 0de17db3..705e8541 100644 --- a/website/src/main/java/info/xiaomo/website/dao/LinkDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/LinkDao.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:52 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:52 + * Copyright(©) 2015 by xiaomo. **/ @Repository public interface LinkDao extends JpaRepository { diff --git a/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java b/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java index da05a5cc..566577fd 100644 --- a/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:08 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:08 + * Copyright(©) 2015 by xiaomo. */ @Repository public interface TechnologyDao extends JpaRepository { diff --git a/website/src/main/java/info/xiaomo/website/dao/UserDao.java b/website/src/main/java/info/xiaomo/website/dao/UserDao.java index 4b3975d4..485e005e 100644 --- a/website/src/main/java/info/xiaomo/website/dao/UserDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/UserDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/3 10:53 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/3 10:53 + * Copyright(©) 2015 by xiaomo. */ @Repository diff --git a/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java b/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java index 50ba9640..12b12370 100644 --- a/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java @@ -10,12 +10,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:26 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:26 + * Copyright(©) 2015 by xiaomo. **/ @Repository public interface WebSetDao extends JpaRepository { diff --git a/website/src/main/java/info/xiaomo/website/dao/WorksDao.java b/website/src/main/java/info/xiaomo/website/dao/WorksDao.java index 9335e4c1..7152be3d 100644 --- a/website/src/main/java/info/xiaomo/website/dao/WorksDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/WorksDao.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:08 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:08 + * Copyright(©) 2015 by xiaomo. */ @Repository public interface WorksDao extends JpaRepository { diff --git a/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java b/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java index d62b4a4a..323bd99c 100644 --- a/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java @@ -15,13 +15,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 20:46 - * @Description: 公共dao层 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 20:46 + * Description: 公共dao层 + * Copyright(©) 2015 by xiaomo. **/ @Repository @Transactional diff --git a/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java b/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java index f9faa48f..86cbd21d 100644 --- a/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java +++ b/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java @@ -13,12 +13,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 10:42 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 10:42 + * Copyright(©) 2015 by xiaomo. **/ public class LoginInterceptor implements HandlerInterceptor { diff --git a/website/src/main/java/info/xiaomo/website/model/AdminModel.java b/website/src/main/java/info/xiaomo/website/model/AdminModel.java index 852f944f..55f581dd 100644 --- a/website/src/main/java/info/xiaomo/website/model/AdminModel.java +++ b/website/src/main/java/info/xiaomo/website/model/AdminModel.java @@ -23,12 +23,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 12:39 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 12:39 + * Copyright(©) 2015 by xiaomo. */ @Entity @Table(name = "adminUser") diff --git a/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java b/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java index a0155068..9d592251 100644 --- a/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java +++ b/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java @@ -15,12 +15,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/517:17 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/517:17 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "changeLog") diff --git a/website/src/main/java/info/xiaomo/website/model/LinkModel.java b/website/src/main/java/info/xiaomo/website/model/LinkModel.java index 4bc3720e..f05a3565 100644 --- a/website/src/main/java/info/xiaomo/website/model/LinkModel.java +++ b/website/src/main/java/info/xiaomo/website/model/LinkModel.java @@ -15,12 +15,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:47 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:47 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "link") diff --git a/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java b/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java index f48aca59..45f53445 100644 --- a/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java +++ b/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java @@ -16,12 +16,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/517:17 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/517:17 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "systemSet") diff --git a/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java b/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java index 9353f6f7..a9421650 100644 --- a/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java +++ b/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java @@ -14,12 +14,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:27 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:27 + * Copyright(©) 2015 by xiaomo. **/ @Entity diff --git a/website/src/main/java/info/xiaomo/website/model/UserModel.java b/website/src/main/java/info/xiaomo/website/model/UserModel.java index 130d8d22..368c34fe 100644 --- a/website/src/main/java/info/xiaomo/website/model/UserModel.java +++ b/website/src/main/java/info/xiaomo/website/model/UserModel.java @@ -15,12 +15,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:36 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:36 + * Copyright(©) 2015 by xiaomo. **/ @Entity @Table(name = "user") diff --git a/website/src/main/java/info/xiaomo/website/model/WorksModel.java b/website/src/main/java/info/xiaomo/website/model/WorksModel.java index e3f3b1f4..610efd9e 100644 --- a/website/src/main/java/info/xiaomo/website/model/WorksModel.java +++ b/website/src/main/java/info/xiaomo/website/model/WorksModel.java @@ -14,12 +14,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:15 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:15 + * Copyright(©) 2015 by xiaomo. **/ // hibernate diff --git a/website/src/main/java/info/xiaomo/website/service/AdminUserService.java b/website/src/main/java/info/xiaomo/website/service/AdminUserService.java index 8a3b2a76..257ad36f 100644 --- a/website/src/main/java/info/xiaomo/website/service/AdminUserService.java +++ b/website/src/main/java/info/xiaomo/website/service/AdminUserService.java @@ -20,12 +20,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:04 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:04 + * Copyright(©) 2015 by xiaomo. */ public interface AdminUserService { diff --git a/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java b/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java index 28974a23..563d414e 100644 --- a/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java +++ b/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java @@ -11,12 +11,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:49 + * Copyright(©) 2015 by xiaomo. **/ public interface ChangeLogService { diff --git a/website/src/main/java/info/xiaomo/website/service/LinkService.java b/website/src/main/java/info/xiaomo/website/service/LinkService.java index a7d20e67..2bae53a7 100644 --- a/website/src/main/java/info/xiaomo/website/service/LinkService.java +++ b/website/src/main/java/info/xiaomo/website/service/LinkService.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1119:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1119:49 + * Copyright(©) 2015 by xiaomo. **/ public interface LinkService { diff --git a/website/src/main/java/info/xiaomo/website/service/TechnologyService.java b/website/src/main/java/info/xiaomo/website/service/TechnologyService.java index c9eb206f..39417fd4 100644 --- a/website/src/main/java/info/xiaomo/website/service/TechnologyService.java +++ b/website/src/main/java/info/xiaomo/website/service/TechnologyService.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:33 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:33 + * Copyright(©) 2015 by xiaomo. **/ public interface TechnologyService { diff --git a/website/src/main/java/info/xiaomo/website/service/UserService.java b/website/src/main/java/info/xiaomo/website/service/UserService.java index c5a672b4..a0cad76a 100644 --- a/website/src/main/java/info/xiaomo/website/service/UserService.java +++ b/website/src/main/java/info/xiaomo/website/service/UserService.java @@ -16,12 +16,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:45 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:45 + * Copyright(©) 2015 by xiaomo. **/ public interface UserService { diff --git a/website/src/main/java/info/xiaomo/website/service/WebSetService.java b/website/src/main/java/info/xiaomo/website/service/WebSetService.java index ab4c9d74..5360abe9 100644 --- a/website/src/main/java/info/xiaomo/website/service/WebSetService.java +++ b/website/src/main/java/info/xiaomo/website/service/WebSetService.java @@ -11,12 +11,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:23 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:23 + * Copyright(©) 2015 by xiaomo. **/ public interface WebSetService { diff --git a/website/src/main/java/info/xiaomo/website/service/WorksService.java b/website/src/main/java/info/xiaomo/website/service/WorksService.java index ace3f38c..dd974c3e 100644 --- a/website/src/main/java/info/xiaomo/website/service/WorksService.java +++ b/website/src/main/java/info/xiaomo/website/service/WorksService.java @@ -12,12 +12,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:33 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:33 + * Copyright(©) 2015 by xiaomo. **/ public interface WorksService { diff --git a/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java index 5696d093..c60291d6 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java @@ -27,13 +27,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 16/4/2 13:34 - * @Description: 后台用户serviceImpl - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 16/4/2 13:34 + * Description: 后台用户serviceImpl + * Copyright(©) 2015 by xiaomo. */ @Service public class AdminUserServiceImpl implements AdminUserService { diff --git a/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java index 95278ba1..f746de2e 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/11 19:49 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/11 19:49 + * Copyright(©) 2015 by xiaomo. **/ @Service public class ChangeLogServiceImpl implements ChangeLogService { diff --git a/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java index 33076a66..0a53ca16 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java @@ -18,12 +18,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/11 19:50 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/11 19:50 + * Copyright(©) 2015 by xiaomo. **/ @Service public class LinkServiceImpl implements LinkService { diff --git a/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java index 3dfd1b64..3f46ed85 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:34 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:34 + * Copyright(©) 2015 by xiaomo. **/ @Service diff --git a/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java index 99013b94..1103dec3 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java @@ -19,13 +19,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/1 17:46 - * @Description: 用户service实现 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/1 17:46 + * Description: 用户service实现 + * Copyright(©) 2015 by xiaomo. **/ @Service public class UserServiceImpl implements UserService { diff --git a/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java index d496bf8d..724675c2 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java @@ -15,12 +15,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/5/6 14:24 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/5/6 14:24 + * Copyright(©) 2015 by xiaomo. **/ @Service public class WebSetServiceImpl implements WebSetService { diff --git a/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java index 6294a2b6..ce45b061 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java @@ -17,12 +17,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/3 14:34 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/3 14:34 + * Copyright(©) 2015 by xiaomo. **/ @Service diff --git a/website/src/main/java/info/xiaomo/website/util/MailUtil.java b/website/src/main/java/info/xiaomo/website/util/MailUtil.java index 52537433..5621590b 100644 --- a/website/src/main/java/info/xiaomo/website/util/MailUtil.java +++ b/website/src/main/java/info/xiaomo/website/util/MailUtil.java @@ -23,13 +23,13 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/4/511:00 - * @Description: 发送邮件 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/4/511:00 + * Description: 发送邮件 + * Copyright(©) 2015 by xiaomo. **/ public class MailUtil { diff --git a/website/src/main/java/info/xiaomo/website/view/AdminUserView.java b/website/src/main/java/info/xiaomo/website/view/AdminUserView.java index 45b5cfb6..d77c6e33 100644 --- a/website/src/main/java/info/xiaomo/website/view/AdminUserView.java +++ b/website/src/main/java/info/xiaomo/website/view/AdminUserView.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 11:12 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 11:12 + * Copyright(©) 2015 by xiaomo. **/ public enum AdminUserView { diff --git a/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java b/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java index ee7273cf..21144eb7 100644 --- a/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java +++ b/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 11:12 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 11:12 + * Copyright(©) 2015 by xiaomo. **/ public enum ChangeLogView { diff --git a/website/src/main/java/info/xiaomo/website/view/LinkView.java b/website/src/main/java/info/xiaomo/website/view/LinkView.java index 9cf9cabb..b647553a 100644 --- a/website/src/main/java/info/xiaomo/website/view/LinkView.java +++ b/website/src/main/java/info/xiaomo/website/view/LinkView.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 11:12 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 11:12 + * Copyright(©) 2015 by xiaomo. **/ public enum LinkView { diff --git a/website/src/main/java/info/xiaomo/website/view/TechnologyView.java b/website/src/main/java/info/xiaomo/website/view/TechnologyView.java index 9d3f2eb6..7e225baa 100644 --- a/website/src/main/java/info/xiaomo/website/view/TechnologyView.java +++ b/website/src/main/java/info/xiaomo/website/view/TechnologyView.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 11:12 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 11:12 + * Copyright(©) 2015 by xiaomo. **/ public enum TechnologyView { diff --git a/website/src/main/java/info/xiaomo/website/view/UserView.java b/website/src/main/java/info/xiaomo/website/view/UserView.java index 1da481e2..92f02da8 100644 --- a/website/src/main/java/info/xiaomo/website/view/UserView.java +++ b/website/src/main/java/info/xiaomo/website/view/UserView.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 11:12 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 11:12 + * Copyright(©) 2015 by xiaomo. **/ public enum UserView { diff --git a/website/src/main/java/info/xiaomo/website/view/WorksView.java b/website/src/main/java/info/xiaomo/website/view/WorksView.java index 7cf0d160..6885b7f3 100644 --- a/website/src/main/java/info/xiaomo/website/view/WorksView.java +++ b/website/src/main/java/info/xiaomo/website/view/WorksView.java @@ -6,12 +6,12 @@ * Today the best performance as tomorrow newest starter! * Created by IntelliJ IDEA. * - * @author: xiaomo - * @github: https://github.com/qq83387856 - * @email: hupengbest@163.com - * @QQ_NO: 83387856 - * @Date: 2016/11/21 11:12 - * @Copyright(©) 2015 by xiaomo. + * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiaomo.info + + * Date: 2016/11/21 11:12 + * Copyright(©) 2015 by xiaomo. **/ public enum WorksView { From c68a9f2544a01616b2b0400c96ca60a99be31441 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 6 Apr 2017 10:57:20 +0800 Subject: [PATCH 002/221] update comments --- README.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e0f68977..75c8b697 100644 --- a/README.md +++ b/README.md @@ -5,28 +5,17 @@ # 三、本项目相关 -这个项目既然定位是个人站点,那么内容肯定是偏向于个人信息展示,以及服务自我和他人为目的。所以平时遇到好的技术大牛的博客、好的技术、正在研究的东西 -等等我都会收集起来。 +本项目主要是以不同的项目情景下使用的不同的技术而采用的多模块项目,用maven管理+spring boot驱动的接口项目。 # 四、其他说明 本人是一个热爱开源精神、追求新潮的开发者。习惯以github的issue驱动方式来组织我的项目,也希望感兴趣的朋友和我联系一起进步,共同开发感兴趣的开源项目。 当然我会将本项目的angular一直维护在最新的稳定状态。 -# 五、鸣谢 -1. @Alice([AlicePrincess](https://github.com/AlicePrincess)) -一个很聪明伶俐、多才多艺的萌妹子,在项目过程中遇到的很多问题都是她帮我解决掉的。 -2. @龙猫 [龙猫](http://zxcool.cn) -大长腿欧巴,P得一手好图,做得UI叼炸天。一个好的网站没有一个好的UI真是个灾难,没有他的帮忙我的网站就进行不下去。 -3. @[stackoverflow](http://stackoverflow.com/) -最优秀的技术问答社区,没有之一!善用此工具,事半功倍。 -4. @其他所有对我有帮助的人和事情。 -要感谢的人很多,一一列举相信各位看官也没什么兴趣。总之很感谢,能够在大家的帮助下不断进步。 - # 六、关于我 @[小莫](http://xiaomo.info):一个普通的技术开发者,技术过得去,还算勤勉!人在杭州,希望进网易和阿里让自己能够更快的进步,为公司贡献自己的力量。 # 八、问题反馈 -1. 欢迎提[issue](https://github.com/syoubaku/xiaomo-info-java/issues) +1. 欢迎提[issue](https://github.com/xiaomoinfo/xiaomo-api/issues) 2. QQ: 83387856 4. 个人主站: https://xiaomo.info From 5b687da3248f21a9e70333cb92019794b96e3877 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 6 Apr 2017 10:58:50 +0800 Subject: [PATCH 003/221] update comments --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 75c8b697..a67aa3fc 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ # 四、其他说明 本人是一个热爱开源精神、追求新潮的开发者。习惯以github的issue驱动方式来组织我的项目,也希望感兴趣的朋友和我联系一起进步,共同开发感兴趣的开源项目。 -当然我会将本项目的angular一直维护在最新的稳定状态。 # 六、关于我 @[小莫](http://xiaomo.info):一个普通的技术开发者,技术过得去,还算勤勉!人在杭州,希望进网易和阿里让自己能够更快的进步,为公司贡献自己的力量。 From 3ca723e8148812dfddc457ae539251cc70d178ec Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 6 Apr 2017 10:59:55 +0800 Subject: [PATCH 004/221] update comments --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a67aa3fc..cd9abe8b 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ # 七. gitignore不生效的原因和解决办法 无效的原因是:对应的目录或者文件已经被git跟踪,此时再加入.gitignore后就无效了 -解决办法: 执行 git rm -r --cached .idea 删掉git己经管理的idea文件 +解决办法: 执行 `git rm -r --cached .idea` 删掉git己经管理的idea文件 From fb1e40bca45d76410500cadcab9aa5d066a9364e Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 6 Apr 2017 11:00:49 +0800 Subject: [PATCH 005/221] update comments --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cd9abe8b..d2f88ad3 100644 --- a/README.md +++ b/README.md @@ -19,5 +19,8 @@ 4. 个人主站: https://xiaomo.info # 七. gitignore不生效的原因和解决办法 -无效的原因是:对应的目录或者文件已经被git跟踪,此时再加入.gitignore后就无效了 -解决办法: 执行 `git rm -r --cached .idea` 删掉git己经管理的idea文件 +无效的原因是:对应的目录或者文件已经被git跟踪,此时再加入.gitignore后就无效了 + +解决办法: 执行 +`git rm -r --cached .idea` +删掉git己经管理的idea文件 From 757d11df7b0ae9ed2550608e7d3a067404dd45a7 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 6 Apr 2017 11:01:41 +0800 Subject: [PATCH 006/221] update comments --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d2f88ad3..8577f3d3 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,24 @@ ![blog](https://image.xiaomo.info/blog/blog.png) -# 一、我的博客 +### 一、我的博客 虽然不知道为什么,但是还是要先给自己的博客打一波广告吧。上面记载着我在项目开发的过程中积累的点滴,如果有什么建议也可以在上面给我[留言](https://xiaomo.info/about/) -# 三、本项目相关 +### 二、本项目相关 本项目主要是以不同的项目情景下使用的不同的技术而采用的多模块项目,用maven管理+spring boot驱动的接口项目。 -# 四、其他说明 +### 三、其他说明 本人是一个热爱开源精神、追求新潮的开发者。习惯以github的issue驱动方式来组织我的项目,也希望感兴趣的朋友和我联系一起进步,共同开发感兴趣的开源项目。 -# 六、关于我 +### 四、关于我 @[小莫](http://xiaomo.info):一个普通的技术开发者,技术过得去,还算勤勉!人在杭州,希望进网易和阿里让自己能够更快的进步,为公司贡献自己的力量。 -# 八、问题反馈 +### 五、问题反馈 1. 欢迎提[issue](https://github.com/xiaomoinfo/xiaomo-api/issues) 2. QQ: 83387856 4. 个人主站: https://xiaomo.info -# 七. gitignore不生效的原因和解决办法 +### 六. gitignore不生效的原因和解决办法 无效的原因是:对应的目录或者文件已经被git跟踪,此时再加入.gitignore后就无效了 解决办法: 执行 From e22fba6e30faa5d1aa848b590f80187ef978310e Mon Sep 17 00:00:00 2001 From: xiaomo Date: Wed, 3 May 2017 17:14:30 +0800 Subject: [PATCH 007/221] github address --- api/src/main/java/info/xiaomo/api/ApiMain.java | 2 +- .../java/info/xiaomo/api/controller/AdminUserController.java | 2 +- .../java/info/xiaomo/api/controller/ChangeLogController.java | 2 +- .../main/java/info/xiaomo/api/controller/LinkController.java | 2 +- .../java/info/xiaomo/api/controller/TechnologyController.java | 2 +- .../main/java/info/xiaomo/api/controller/UserController.java | 2 +- .../main/java/info/xiaomo/api/controller/WebSetController.java | 2 +- .../main/java/info/xiaomo/api/controller/WorksController.java | 2 +- api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/LinkDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/UserDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/WebSetDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/WorksDao.java | 2 +- api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java | 2 +- api/src/main/java/info/xiaomo/api/model/AdminModel.java | 2 +- api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java | 2 +- api/src/main/java/info/xiaomo/api/model/LinkModel.java | 2 +- api/src/main/java/info/xiaomo/api/model/SystemSetModel.java | 2 +- api/src/main/java/info/xiaomo/api/model/TechnologyModel.java | 2 +- api/src/main/java/info/xiaomo/api/model/UserModel.java | 2 +- api/src/main/java/info/xiaomo/api/model/WorksModel.java | 2 +- api/src/main/java/info/xiaomo/api/service/AdminUserService.java | 2 +- api/src/main/java/info/xiaomo/api/service/ChangeLogService.java | 2 +- api/src/main/java/info/xiaomo/api/service/LinkService.java | 2 +- .../main/java/info/xiaomo/api/service/TechnologyService.java | 2 +- api/src/main/java/info/xiaomo/api/service/UserService.java | 2 +- api/src/main/java/info/xiaomo/api/service/WebSetService.java | 2 +- api/src/main/java/info/xiaomo/api/service/WorksService.java | 2 +- .../java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java | 2 +- .../java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java | 2 +- .../main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java | 2 +- .../info/xiaomo/api/service/impl/TechnologyServiceImpl.java | 2 +- .../main/java/info/xiaomo/api/service/impl/UserServiceImpl.java | 2 +- .../java/info/xiaomo/api/service/impl/WebSetServiceImpl.java | 2 +- .../java/info/xiaomo/api/service/impl/WorksServiceImpl.java | 2 +- .../src/main/java/info/xiaomo/application/ApplicationMain.java | 2 +- .../java/info/xiaomo/application/controller/UserController.java | 2 +- .../src/main/java/info/xiaomo/application/dao/UserDao.java | 2 +- .../src/main/java/info/xiaomo/application/model/UserModel.java | 2 +- .../main/java/info/xiaomo/application/service/UserService.java | 2 +- .../info/xiaomo/application/service/impl/UserServiceImpl.java | 2 +- application/src/test/java/Test11.java | 2 +- aries/src/main/java/info/xiaomo/aries/AriesMain.java | 2 +- .../main/java/info/xiaomo/aries/controller/UserController.java | 2 +- aries/src/main/java/info/xiaomo/aries/dao/UserDao.java | 2 +- aries/src/main/java/info/xiaomo/aries/model/UserModel.java | 2 +- aries/src/main/java/info/xiaomo/aries/service/UserService.java | 2 +- .../java/info/xiaomo/aries/service/impl/UserServiceImpl.java | 2 +- async/src/main/java/info/xiaomo/anysc/AsyncMain.java | 2 +- .../main/java/info/xiaomo/anysc/controller/TestController.java | 2 +- core/src/main/java/info/xiaomo/core/base/AuthOperate.java | 2 +- core/src/main/java/info/xiaomo/core/base/BaseController.java | 2 +- core/src/main/java/info/xiaomo/core/base/BaseDao.java | 2 +- core/src/main/java/info/xiaomo/core/base/BaseModel.java | 2 +- core/src/main/java/info/xiaomo/core/base/BaseService.java | 2 +- core/src/main/java/info/xiaomo/core/base/Result.java | 2 +- core/src/main/java/info/xiaomo/core/constant/Code.java | 2 +- core/src/main/java/info/xiaomo/core/constant/GenderType.java | 2 +- .../java/info/xiaomo/core/exception/UserNotFoundException.java | 2 +- core/src/main/java/info/xiaomo/core/field/LoginField.java | 2 +- core/src/main/java/info/xiaomo/core/filter/CORSFilter.java | 2 +- core/src/main/java/info/xiaomo/core/untils/AuthUtil.java | 2 +- core/src/main/java/info/xiaomo/core/untils/CastUtil.java | 2 +- core/src/main/java/info/xiaomo/core/untils/DownUtil.java | 2 +- .../main/java/info/xiaomo/core/untils/LunarCalendarUtil.java | 2 +- core/src/main/java/info/xiaomo/core/untils/MD5Util.java | 2 +- core/src/main/java/info/xiaomo/core/untils/MailUtil.java | 2 +- core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java | 2 +- crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java | 2 +- crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java | 2 +- .../src/main/java/info/xiaomo/crawler/model/MitamaModel.java | 2 +- .../src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java | 2 +- .../main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java | 2 +- .../main/java/info/xiaomo/crawler/service/ShikigamaService.java | 2 +- .../info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java | 2 +- .../main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java | 2 +- .../src/main/java/info/xiaomo/freemarker/FreemarkerMain.java | 2 +- .../info/xiaomo/freemarker/controller/FreemarkerController.java | 2 +- mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java | 2 +- .../info/xiaomo/mongodb/controller/MongoUserController.java | 2 +- mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java | 2 +- mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java | 2 +- .../main/java/info/xiaomo/mongodb/service/MongoUserService.java | 2 +- .../info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java | 2 +- .../java/info/xiaomo/multipleSource/MultipleSourceMain.java | 2 +- .../multipleSource/controller/MultipleSourceController.java | 2 +- .../src/main/java/info/xiaomo/multipleSource/sql/Sql.java | 2 +- mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java | 2 +- .../info/xiaomo/mybatis/controller/MybatisUserController.java | 2 +- rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java | 2 +- redis/src/main/java/info/xiaomo/redis/RedisMain.java | 2 +- .../main/java/info/xiaomo/redis/controller/TestController.java | 2 +- redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java | 2 +- .../java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java | 2 +- .../src/main/java/info/xiaomo/scheduled/ScheduledMain.java | 2 +- security/src/main/java/info/xiaomo/security/SecurityMain.java | 2 +- socket/src/main/java/info/xiaomo/chat/ChatMain.java | 2 +- socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java | 2 +- velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java | 2 +- .../info/xiaomo/velocity/controller/VelocityController.java | 2 +- website/src/main/java/info/xiaomo/website/XiaomoMain.java | 2 +- .../info/xiaomo/website/controller/AdminUserController.java | 2 +- .../info/xiaomo/website/controller/ChangeLogController.java | 2 +- .../java/info/xiaomo/website/controller/IndexController.java | 2 +- .../java/info/xiaomo/website/controller/LinkController.java | 2 +- .../java/info/xiaomo/website/controller/MailController.java | 2 +- .../info/xiaomo/website/controller/TechnologyController.java | 2 +- .../java/info/xiaomo/website/controller/UserController.java | 2 +- .../java/info/xiaomo/website/controller/WebSetController.java | 2 +- .../java/info/xiaomo/website/controller/WorksController.java | 2 +- website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java | 2 +- website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java | 2 +- website/src/main/java/info/xiaomo/website/dao/LinkDao.java | 2 +- .../src/main/java/info/xiaomo/website/dao/TechnologyDao.java | 2 +- website/src/main/java/info/xiaomo/website/dao/UserDao.java | 2 +- website/src/main/java/info/xiaomo/website/dao/WebSetDao.java | 2 +- website/src/main/java/info/xiaomo/website/dao/WorksDao.java | 2 +- .../src/main/java/info/xiaomo/website/dao/base/CommonDao.java | 2 +- .../java/info/xiaomo/website/interceptor/LoginInterceptor.java | 2 +- website/src/main/java/info/xiaomo/website/model/AdminModel.java | 2 +- .../src/main/java/info/xiaomo/website/model/ChangeLogModel.java | 2 +- website/src/main/java/info/xiaomo/website/model/LinkModel.java | 2 +- .../src/main/java/info/xiaomo/website/model/SystemSetModel.java | 2 +- .../main/java/info/xiaomo/website/model/TechnologyModel.java | 2 +- website/src/main/java/info/xiaomo/website/model/UserModel.java | 2 +- website/src/main/java/info/xiaomo/website/model/WorksModel.java | 2 +- .../main/java/info/xiaomo/website/service/AdminUserService.java | 2 +- .../main/java/info/xiaomo/website/service/ChangeLogService.java | 2 +- .../src/main/java/info/xiaomo/website/service/LinkService.java | 2 +- .../java/info/xiaomo/website/service/TechnologyService.java | 2 +- .../src/main/java/info/xiaomo/website/service/UserService.java | 2 +- .../main/java/info/xiaomo/website/service/WebSetService.java | 2 +- .../src/main/java/info/xiaomo/website/service/WorksService.java | 2 +- .../info/xiaomo/website/service/impl/AdminUserServiceImpl.java | 2 +- .../info/xiaomo/website/service/impl/ChangeLogServiceImpl.java | 2 +- .../java/info/xiaomo/website/service/impl/LinkServiceImpl.java | 2 +- .../info/xiaomo/website/service/impl/TechnologyServiceImpl.java | 2 +- .../java/info/xiaomo/website/service/impl/UserServiceImpl.java | 2 +- .../info/xiaomo/website/service/impl/WebSetServiceImpl.java | 2 +- .../java/info/xiaomo/website/service/impl/WorksServiceImpl.java | 2 +- website/src/main/java/info/xiaomo/website/util/MailUtil.java | 2 +- .../src/main/java/info/xiaomo/website/view/AdminUserView.java | 2 +- .../src/main/java/info/xiaomo/website/view/ChangeLogView.java | 2 +- website/src/main/java/info/xiaomo/website/view/LinkView.java | 2 +- .../src/main/java/info/xiaomo/website/view/TechnologyView.java | 2 +- website/src/main/java/info/xiaomo/website/view/UserView.java | 2 +- website/src/main/java/info/xiaomo/website/view/WorksView.java | 2 +- 149 files changed, 149 insertions(+), 149 deletions(-) diff --git a/api/src/main/java/info/xiaomo/api/ApiMain.java b/api/src/main/java/info/xiaomo/api/ApiMain.java index 94b62b55..9d941a5d 100644 --- a/api/src/main/java/info/xiaomo/api/ApiMain.java +++ b/api/src/main/java/info/xiaomo/api/ApiMain.java @@ -32,7 +32,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 * Description: 后台管理启动器 diff --git a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java index f21fe6e7..ba1ed110 100644 --- a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java @@ -31,7 +31,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 12:47 diff --git a/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java b/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java index 3a0455a0..6d32cda0 100644 --- a/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java +++ b/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java @@ -23,7 +23,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1117:40 diff --git a/api/src/main/java/info/xiaomo/api/controller/LinkController.java b/api/src/main/java/info/xiaomo/api/controller/LinkController.java index 228ed0bc..a4feeff8 100644 --- a/api/src/main/java/info/xiaomo/api/controller/LinkController.java +++ b/api/src/main/java/info/xiaomo/api/controller/LinkController.java @@ -23,7 +23,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:55 diff --git a/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java b/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java index ff5589af..ac45537c 100644 --- a/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java +++ b/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java @@ -23,7 +23,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:36 diff --git a/api/src/main/java/info/xiaomo/api/controller/UserController.java b/api/src/main/java/info/xiaomo/api/controller/UserController.java index b641a637..dd2506ec 100644 --- a/api/src/main/java/info/xiaomo/api/controller/UserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/UserController.java @@ -31,7 +31,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:51 diff --git a/api/src/main/java/info/xiaomo/api/controller/WebSetController.java b/api/src/main/java/info/xiaomo/api/controller/WebSetController.java index d9376f4b..86a41b78 100644 --- a/api/src/main/java/info/xiaomo/api/controller/WebSetController.java +++ b/api/src/main/java/info/xiaomo/api/controller/WebSetController.java @@ -21,7 +21,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:21 diff --git a/api/src/main/java/info/xiaomo/api/controller/WorksController.java b/api/src/main/java/info/xiaomo/api/controller/WorksController.java index 18ece45f..13bbe4ab 100644 --- a/api/src/main/java/info/xiaomo/api/controller/WorksController.java +++ b/api/src/main/java/info/xiaomo/api/controller/WorksController.java @@ -23,7 +23,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:36 diff --git a/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java b/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java index e754d725..29fa2f76 100644 --- a/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/AdminUserDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:08 diff --git a/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java b/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java index 326971c0..6523252f 100644 --- a/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/ChangeLogDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:52 diff --git a/api/src/main/java/info/xiaomo/api/dao/LinkDao.java b/api/src/main/java/info/xiaomo/api/dao/LinkDao.java index 6a8abb85..f66e74cf 100644 --- a/api/src/main/java/info/xiaomo/api/dao/LinkDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/LinkDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:52 diff --git a/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java b/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java index 6455d7ad..a9c23f69 100644 --- a/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/TechnologyDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:08 diff --git a/api/src/main/java/info/xiaomo/api/dao/UserDao.java b/api/src/main/java/info/xiaomo/api/dao/UserDao.java index 316e158b..17ad1ae5 100644 --- a/api/src/main/java/info/xiaomo/api/dao/UserDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/UserDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/3 10:53 diff --git a/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java b/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java index 6eada575..fae4e534 100644 --- a/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/WebSetDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:26 diff --git a/api/src/main/java/info/xiaomo/api/dao/WorksDao.java b/api/src/main/java/info/xiaomo/api/dao/WorksDao.java index d5c99ee7..e3b06ce7 100644 --- a/api/src/main/java/info/xiaomo/api/dao/WorksDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/WorksDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:08 diff --git a/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java b/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java index 1600a193..142236ab 100644 --- a/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java +++ b/api/src/main/java/info/xiaomo/api/dao/base/CommonDao.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 20:46 diff --git a/api/src/main/java/info/xiaomo/api/model/AdminModel.java b/api/src/main/java/info/xiaomo/api/model/AdminModel.java index 5d66e945..54c5d1d4 100644 --- a/api/src/main/java/info/xiaomo/api/model/AdminModel.java +++ b/api/src/main/java/info/xiaomo/api/model/AdminModel.java @@ -27,7 +27,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 12:39 diff --git a/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java b/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java index bb3540ac..d029c17d 100644 --- a/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java +++ b/api/src/main/java/info/xiaomo/api/model/ChangeLogModel.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/517:17 diff --git a/api/src/main/java/info/xiaomo/api/model/LinkModel.java b/api/src/main/java/info/xiaomo/api/model/LinkModel.java index 73a29028..d2d87e0a 100644 --- a/api/src/main/java/info/xiaomo/api/model/LinkModel.java +++ b/api/src/main/java/info/xiaomo/api/model/LinkModel.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:47 diff --git a/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java b/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java index c2becdae..21962301 100644 --- a/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java +++ b/api/src/main/java/info/xiaomo/api/model/SystemSetModel.java @@ -20,7 +20,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/517:17 diff --git a/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java b/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java index 4cd0ba4c..5774c195 100644 --- a/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java +++ b/api/src/main/java/info/xiaomo/api/model/TechnologyModel.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:27 diff --git a/api/src/main/java/info/xiaomo/api/model/UserModel.java b/api/src/main/java/info/xiaomo/api/model/UserModel.java index c967d041..b7079a56 100644 --- a/api/src/main/java/info/xiaomo/api/model/UserModel.java +++ b/api/src/main/java/info/xiaomo/api/model/UserModel.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:36 diff --git a/api/src/main/java/info/xiaomo/api/model/WorksModel.java b/api/src/main/java/info/xiaomo/api/model/WorksModel.java index acec64e7..080750a1 100644 --- a/api/src/main/java/info/xiaomo/api/model/WorksModel.java +++ b/api/src/main/java/info/xiaomo/api/model/WorksModel.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:15 diff --git a/api/src/main/java/info/xiaomo/api/service/AdminUserService.java b/api/src/main/java/info/xiaomo/api/service/AdminUserService.java index acd6d843..feb8aab5 100644 --- a/api/src/main/java/info/xiaomo/api/service/AdminUserService.java +++ b/api/src/main/java/info/xiaomo/api/service/AdminUserService.java @@ -21,7 +21,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:04 diff --git a/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java b/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java index 9b3d2660..9881646c 100644 --- a/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java +++ b/api/src/main/java/info/xiaomo/api/service/ChangeLogService.java @@ -12,7 +12,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:49 diff --git a/api/src/main/java/info/xiaomo/api/service/LinkService.java b/api/src/main/java/info/xiaomo/api/service/LinkService.java index f68f93f1..a506d672 100644 --- a/api/src/main/java/info/xiaomo/api/service/LinkService.java +++ b/api/src/main/java/info/xiaomo/api/service/LinkService.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:49 diff --git a/api/src/main/java/info/xiaomo/api/service/TechnologyService.java b/api/src/main/java/info/xiaomo/api/service/TechnologyService.java index 32159f23..751dbd38 100644 --- a/api/src/main/java/info/xiaomo/api/service/TechnologyService.java +++ b/api/src/main/java/info/xiaomo/api/service/TechnologyService.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:33 diff --git a/api/src/main/java/info/xiaomo/api/service/UserService.java b/api/src/main/java/info/xiaomo/api/service/UserService.java index 97d363c4..a708c346 100644 --- a/api/src/main/java/info/xiaomo/api/service/UserService.java +++ b/api/src/main/java/info/xiaomo/api/service/UserService.java @@ -17,7 +17,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:45 diff --git a/api/src/main/java/info/xiaomo/api/service/WebSetService.java b/api/src/main/java/info/xiaomo/api/service/WebSetService.java index 9b76a282..5635b8e5 100644 --- a/api/src/main/java/info/xiaomo/api/service/WebSetService.java +++ b/api/src/main/java/info/xiaomo/api/service/WebSetService.java @@ -12,7 +12,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:23 diff --git a/api/src/main/java/info/xiaomo/api/service/WorksService.java b/api/src/main/java/info/xiaomo/api/service/WorksService.java index 022bfb84..0f74fd11 100644 --- a/api/src/main/java/info/xiaomo/api/service/WorksService.java +++ b/api/src/main/java/info/xiaomo/api/service/WorksService.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:33 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java index 6824e737..86a6b25f 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/AdminUserServiceImpl.java @@ -28,7 +28,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:34 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java index a9df2fa6..203ef54d 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/ChangeLogServiceImpl.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/11 19:49 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java index b65b006f..65dd1e4b 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/LinkServiceImpl.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/11 19:50 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java index 978a9d9d..bf000171 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/TechnologyServiceImpl.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:34 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java index f069e7dd..ec4c6d37 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/UserServiceImpl.java @@ -20,7 +20,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:46 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java index c344b42d..748ff290 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/WebSetServiceImpl.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:24 diff --git a/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java b/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java index feab917c..daa5412d 100644 --- a/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java +++ b/api/src/main/java/info/xiaomo/api/service/impl/WorksServiceImpl.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:34 diff --git a/application/src/main/java/info/xiaomo/application/ApplicationMain.java b/application/src/main/java/info/xiaomo/application/ApplicationMain.java index db3b25ef..020602ec 100644 --- a/application/src/main/java/info/xiaomo/application/ApplicationMain.java +++ b/application/src/main/java/info/xiaomo/application/ApplicationMain.java @@ -32,7 +32,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/application/src/main/java/info/xiaomo/application/controller/UserController.java b/application/src/main/java/info/xiaomo/application/controller/UserController.java index 3ca8725e..ca9149ad 100644 --- a/application/src/main/java/info/xiaomo/application/controller/UserController.java +++ b/application/src/main/java/info/xiaomo/application/controller/UserController.java @@ -27,7 +27,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:51 diff --git a/application/src/main/java/info/xiaomo/application/dao/UserDao.java b/application/src/main/java/info/xiaomo/application/dao/UserDao.java index 10ffd9f3..aafb0887 100644 --- a/application/src/main/java/info/xiaomo/application/dao/UserDao.java +++ b/application/src/main/java/info/xiaomo/application/dao/UserDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/3 10:53 diff --git a/application/src/main/java/info/xiaomo/application/model/UserModel.java b/application/src/main/java/info/xiaomo/application/model/UserModel.java index 75c4c5ae..32e6c0a7 100644 --- a/application/src/main/java/info/xiaomo/application/model/UserModel.java +++ b/application/src/main/java/info/xiaomo/application/model/UserModel.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:36 diff --git a/application/src/main/java/info/xiaomo/application/service/UserService.java b/application/src/main/java/info/xiaomo/application/service/UserService.java index 440e28da..17e3d04a 100644 --- a/application/src/main/java/info/xiaomo/application/service/UserService.java +++ b/application/src/main/java/info/xiaomo/application/service/UserService.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:45 diff --git a/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java b/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java index 0749960c..c5ca10dd 100644 --- a/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java +++ b/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:46 diff --git a/application/src/test/java/Test11.java b/application/src/test/java/Test11.java index 9da972cb..a0799f4f 100644 --- a/application/src/test/java/Test11.java +++ b/application/src/test/java/Test11.java @@ -11,7 +11,7 @@ import static info.xiaomo.core.untils.ExcelUtil.getListData; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/13 18:33 */ @RunWith(SpringJUnit4ClassRunner.class) // SpringJUnit支持,由此引入Spring-Test框架支持! diff --git a/aries/src/main/java/info/xiaomo/aries/AriesMain.java b/aries/src/main/java/info/xiaomo/aries/AriesMain.java index 9f43cfb2..ab45e3ed 100644 --- a/aries/src/main/java/info/xiaomo/aries/AriesMain.java +++ b/aries/src/main/java/info/xiaomo/aries/AriesMain.java @@ -21,7 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:34 */ @Configuration diff --git a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java index 5088bcbe..e233c435 100644 --- a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java +++ b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java @@ -17,7 +17,7 @@ /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:40 */ @RequestMapping("/user") diff --git a/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java b/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java index bacac97b..1e0291b9 100644 --- a/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java +++ b/aries/src/main/java/info/xiaomo/aries/dao/UserDao.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseDao; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:39 */ public interface UserDao extends BaseDao { diff --git a/aries/src/main/java/info/xiaomo/aries/model/UserModel.java b/aries/src/main/java/info/xiaomo/aries/model/UserModel.java index 69ec05dd..0583011d 100644 --- a/aries/src/main/java/info/xiaomo/aries/model/UserModel.java +++ b/aries/src/main/java/info/xiaomo/aries/model/UserModel.java @@ -10,7 +10,7 @@ import javax.persistence.Table; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:40 */ @Entity diff --git a/aries/src/main/java/info/xiaomo/aries/service/UserService.java b/aries/src/main/java/info/xiaomo/aries/service/UserService.java index d40a7b76..10630f9b 100644 --- a/aries/src/main/java/info/xiaomo/aries/service/UserService.java +++ b/aries/src/main/java/info/xiaomo/aries/service/UserService.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseService; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:39 */ public interface UserService extends BaseService { diff --git a/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java b/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java index 547b868a..62bd9ae5 100644 --- a/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java +++ b/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java @@ -15,7 +15,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:39 */ diff --git a/async/src/main/java/info/xiaomo/anysc/AsyncMain.java b/async/src/main/java/info/xiaomo/anysc/AsyncMain.java index ad6625ed..a367d3cb 100644 --- a/async/src/main/java/info/xiaomo/anysc/AsyncMain.java +++ b/async/src/main/java/info/xiaomo/anysc/AsyncMain.java @@ -14,7 +14,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/async/src/main/java/info/xiaomo/anysc/controller/TestController.java b/async/src/main/java/info/xiaomo/anysc/controller/TestController.java index c3c3efe1..c6f424e1 100644 --- a/async/src/main/java/info/xiaomo/anysc/controller/TestController.java +++ b/async/src/main/java/info/xiaomo/anysc/controller/TestController.java @@ -17,7 +17,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/15 15:12 diff --git a/core/src/main/java/info/xiaomo/core/base/AuthOperate.java b/core/src/main/java/info/xiaomo/core/base/AuthOperate.java index 873c5686..78cc964c 100644 --- a/core/src/main/java/info/xiaomo/core/base/AuthOperate.java +++ b/core/src/main/java/info/xiaomo/core/base/AuthOperate.java @@ -5,7 +5,7 @@ import java.util.Date; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/13 9:51 */ public interface AuthOperate { diff --git a/core/src/main/java/info/xiaomo/core/base/BaseController.java b/core/src/main/java/info/xiaomo/core/base/BaseController.java index b163e736..a1b0b739 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseController.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseController.java @@ -10,7 +10,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:41 */ @RestController diff --git a/core/src/main/java/info/xiaomo/core/base/BaseDao.java b/core/src/main/java/info/xiaomo/core/base/BaseDao.java index b87d8074..00fdc512 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseDao.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseDao.java @@ -4,7 +4,7 @@ import org.springframework.stereotype.Repository; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/13 11:23 */ @Repository diff --git a/core/src/main/java/info/xiaomo/core/base/BaseModel.java b/core/src/main/java/info/xiaomo/core/base/BaseModel.java index c4b2034c..41de675a 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseModel.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseModel.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 20:37 diff --git a/core/src/main/java/info/xiaomo/core/base/BaseService.java b/core/src/main/java/info/xiaomo/core/base/BaseService.java index eda97bdb..d74d4fac 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseService.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseService.java @@ -6,7 +6,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/11 16:42 */ @Service diff --git a/core/src/main/java/info/xiaomo/core/base/Result.java b/core/src/main/java/info/xiaomo/core/base/Result.java index 83e3905f..04ae26c9 100644 --- a/core/src/main/java/info/xiaomo/core/base/Result.java +++ b/core/src/main/java/info/xiaomo/core/base/Result.java @@ -9,7 +9,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/10/31 15:25 diff --git a/core/src/main/java/info/xiaomo/core/constant/Code.java b/core/src/main/java/info/xiaomo/core/constant/Code.java index 878f0cbf..97260f6b 100644 --- a/core/src/main/java/info/xiaomo/core/constant/Code.java +++ b/core/src/main/java/info/xiaomo/core/constant/Code.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/10/29 10:59 diff --git a/core/src/main/java/info/xiaomo/core/constant/GenderType.java b/core/src/main/java/info/xiaomo/core/constant/GenderType.java index cc7cb46d..0a247664 100644 --- a/core/src/main/java/info/xiaomo/core/constant/GenderType.java +++ b/core/src/main/java/info/xiaomo/core/constant/GenderType.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/1/12 16:37 diff --git a/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java b/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java index f76f4709..277163ad 100644 --- a/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java +++ b/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/3 11:08 diff --git a/core/src/main/java/info/xiaomo/core/field/LoginField.java b/core/src/main/java/info/xiaomo/core/field/LoginField.java index fe0ead57..6de80592 100644 --- a/core/src/main/java/info/xiaomo/core/field/LoginField.java +++ b/core/src/main/java/info/xiaomo/core/field/LoginField.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info(83387856) * Date: 2016/1/8 13:16 * Description: QQ登录常量类 diff --git a/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java b/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java index 3a47953c..fd39f152 100644 --- a/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java +++ b/core/src/main/java/info/xiaomo/core/filter/CORSFilter.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1516:25 diff --git a/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java b/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java index fe689f7d..b1e95418 100644 --- a/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java @@ -9,7 +9,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * @email: xiaomo@xiaomo.info * Date: 2016/11/31 9:50 diff --git a/core/src/main/java/info/xiaomo/core/untils/CastUtil.java b/core/src/main/java/info/xiaomo/core/untils/CastUtil.java index 3df44b47..a95027e2 100644 --- a/core/src/main/java/info/xiaomo/core/untils/CastUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/CastUtil.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/22 14:55 diff --git a/core/src/main/java/info/xiaomo/core/untils/DownUtil.java b/core/src/main/java/info/xiaomo/core/untils/DownUtil.java index 643aad04..cb35a948 100644 --- a/core/src/main/java/info/xiaomo/core/untils/DownUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/DownUtil.java @@ -8,7 +8,7 @@ import java.net.URLConnection; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/26 13:25 */ public class DownUtil { diff --git a/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java b/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java index bdbf7187..2c151ebe 100644 --- a/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java @@ -5,7 +5,7 @@ import java.util.GregorianCalendar; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @version : 2017/1/14 9:59 */ diff --git a/core/src/main/java/info/xiaomo/core/untils/MD5Util.java b/core/src/main/java/info/xiaomo/core/untils/MD5Util.java index 27b4ae24..f93b2f76 100644 --- a/core/src/main/java/info/xiaomo/core/untils/MD5Util.java +++ b/core/src/main/java/info/xiaomo/core/untils/MD5Util.java @@ -17,7 +17,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/3 10:03 diff --git a/core/src/main/java/info/xiaomo/core/untils/MailUtil.java b/core/src/main/java/info/xiaomo/core/untils/MailUtil.java index f596b320..4507805c 100644 --- a/core/src/main/java/info/xiaomo/core/untils/MailUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/MailUtil.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/511:00 diff --git a/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java b/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java index 3bf56773..728b3ae4 100644 --- a/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java @@ -17,7 +17,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 15/9/6 16:05 diff --git a/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java b/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java index d86a8b03..5529b3e9 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java +++ b/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java @@ -14,7 +14,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java b/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java index 1db09f70..986b70c6 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java +++ b/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java @@ -4,7 +4,7 @@ import org.springframework.data.jpa.repository.JpaRepository; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 15:55 */ public interface ShikigamaDao extends JpaRepository { diff --git a/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java b/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java index f699d296..cff2b45b 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java +++ b/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseModel; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 18:06 * 御魂模型 */ diff --git a/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java b/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java index 8ad11cbe..64b7fa72 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java +++ b/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java @@ -7,7 +7,7 @@ import javax.persistence.Table; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 15:09 */ diff --git a/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java b/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java index 695b0fb0..64e193dd 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java +++ b/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java @@ -15,7 +15,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 15:59 */ @Component diff --git a/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java b/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java index acb9a9c5..210631bc 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java +++ b/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java @@ -5,7 +5,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 15:54 */ public interface ShikigamaService { diff --git a/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java b/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java index 04573f85..286c0889 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java +++ b/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java @@ -11,7 +11,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 15:54 */ @Service diff --git a/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java b/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java index f9d568f8..14a958a8 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java +++ b/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java @@ -11,7 +11,7 @@ import java.util.List; /** - * author 小莫 (https://xiaomo.info) (https://github.com/syoubaku) + * author 小莫 (https://xiaomo.info) (https://github.com/xiaomoinfo) * @created : 2016/12/24 15:05 * 阴阳师获取数据 */ diff --git a/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java b/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java index e3ea7bfe..28f946d6 100644 --- a/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java +++ b/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java b/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java index d23cc9b9..a816daeb 100644 --- a/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java +++ b/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/16 10:19 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java b/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java index 4fea6dbb..42dbc73a 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java @@ -28,7 +28,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java index 6e39b302..9cdc9c59 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/15 15:49 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java b/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java index 3748a3ab..a0a8f4a6 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/15 15:42 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java b/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java index 7e7ef866..ce16e131 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/15 15:39 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java b/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java index 742468f9..ec70212d 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/15 15:45 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java b/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java index 3c6a2b4a..0f034932 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/15 15:45 diff --git a/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java b/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java index 8bb4869c..68cf4a76 100644 --- a/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java +++ b/multipleSource/src/main/java/info/xiaomo/multipleSource/MultipleSourceMain.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/16 10:34 diff --git a/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java b/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java index 48c5c74b..f6f26bbd 100644 --- a/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java +++ b/multipleSource/src/main/java/info/xiaomo/multipleSource/controller/MultipleSourceController.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/16 10:45 diff --git a/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java b/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java index fbff2c15..292085a3 100644 --- a/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java +++ b/multipleSource/src/main/java/info/xiaomo/multipleSource/sql/Sql.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/16 11:29 diff --git a/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java b/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java index a16c5dd6..a73c4b10 100644 --- a/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java +++ b/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java b/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java index ff12bdef..1b544f7c 100644 --- a/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java +++ b/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/16 9:41 diff --git a/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java b/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java index ed3b93c8..a4b812aa 100644 --- a/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java +++ b/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/redis/src/main/java/info/xiaomo/redis/RedisMain.java b/redis/src/main/java/info/xiaomo/redis/RedisMain.java index d3ae1b8f..11a1eb97 100644 --- a/redis/src/main/java/info/xiaomo/redis/RedisMain.java +++ b/redis/src/main/java/info/xiaomo/redis/RedisMain.java @@ -14,7 +14,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/redis/src/main/java/info/xiaomo/redis/controller/TestController.java b/redis/src/main/java/info/xiaomo/redis/controller/TestController.java index eb3c28b1..dc295de6 100644 --- a/redis/src/main/java/info/xiaomo/redis/controller/TestController.java +++ b/redis/src/main/java/info/xiaomo/redis/controller/TestController.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/14 17:25 diff --git a/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java b/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java index ca55fd8c..241132ec 100644 --- a/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java +++ b/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java @@ -12,7 +12,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/14 17:59 diff --git a/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java b/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java index d549f9f7..902c570e 100644 --- a/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java +++ b/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java @@ -21,7 +21,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/14 18:00 diff --git a/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java b/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java index 3b388a26..0d282c7f 100644 --- a/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java +++ b/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java @@ -14,7 +14,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/security/src/main/java/info/xiaomo/security/SecurityMain.java b/security/src/main/java/info/xiaomo/security/SecurityMain.java index 69977aaf..bb3e2608 100644 --- a/security/src/main/java/info/xiaomo/security/SecurityMain.java +++ b/security/src/main/java/info/xiaomo/security/SecurityMain.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/socket/src/main/java/info/xiaomo/chat/ChatMain.java b/socket/src/main/java/info/xiaomo/chat/ChatMain.java index 3e6f8b6c..36c611fb 100644 --- a/socket/src/main/java/info/xiaomo/chat/ChatMain.java +++ b/socket/src/main/java/info/xiaomo/chat/ChatMain.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java index 1d727dee..2fabd31f 100644 --- a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java +++ b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java @@ -21,7 +21,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 16:36 diff --git a/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java b/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java index 84806d26..85c22900 100644 --- a/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java +++ b/velocity/src/main/java/info/xiaomo/velocity/VelocityMain.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/12/1 15:38 diff --git a/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java b/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java index 706369d7..f0096514 100644 --- a/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java +++ b/velocity/src/main/java/info/xiaomo/velocity/controller/VelocityController.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/16 10:19 diff --git a/website/src/main/java/info/xiaomo/website/XiaomoMain.java b/website/src/main/java/info/xiaomo/website/XiaomoMain.java index e2be311a..7824bcea 100644 --- a/website/src/main/java/info/xiaomo/website/XiaomoMain.java +++ b/website/src/main/java/info/xiaomo/website/XiaomoMain.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 15:38 diff --git a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java index b767047c..aa0a5c81 100644 --- a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java @@ -33,7 +33,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 12:47 diff --git a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java index 025d3a64..1885e5f2 100644 --- a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java +++ b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java @@ -22,7 +22,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1117:40 diff --git a/website/src/main/java/info/xiaomo/website/controller/IndexController.java b/website/src/main/java/info/xiaomo/website/controller/IndexController.java index e544e387..77f83d53 100644 --- a/website/src/main/java/info/xiaomo/website/controller/IndexController.java +++ b/website/src/main/java/info/xiaomo/website/controller/IndexController.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 10:53 diff --git a/website/src/main/java/info/xiaomo/website/controller/LinkController.java b/website/src/main/java/info/xiaomo/website/controller/LinkController.java index 2e11dea9..e63e7c10 100644 --- a/website/src/main/java/info/xiaomo/website/controller/LinkController.java +++ b/website/src/main/java/info/xiaomo/website/controller/LinkController.java @@ -22,7 +22,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:55 diff --git a/website/src/main/java/info/xiaomo/website/controller/MailController.java b/website/src/main/java/info/xiaomo/website/controller/MailController.java index f0da19dc..613ebac5 100644 --- a/website/src/main/java/info/xiaomo/website/controller/MailController.java +++ b/website/src/main/java/info/xiaomo/website/controller/MailController.java @@ -12,7 +12,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/14 11:06 diff --git a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java index b4035e95..47131665 100644 --- a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java +++ b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java @@ -22,7 +22,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:36 diff --git a/website/src/main/java/info/xiaomo/website/controller/UserController.java b/website/src/main/java/info/xiaomo/website/controller/UserController.java index a69012c5..64edcd87 100644 --- a/website/src/main/java/info/xiaomo/website/controller/UserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/UserController.java @@ -31,7 +31,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:51 diff --git a/website/src/main/java/info/xiaomo/website/controller/WebSetController.java b/website/src/main/java/info/xiaomo/website/controller/WebSetController.java index 0b556b50..b0dffb32 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WebSetController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WebSetController.java @@ -22,7 +22,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:21 diff --git a/website/src/main/java/info/xiaomo/website/controller/WorksController.java b/website/src/main/java/info/xiaomo/website/controller/WorksController.java index 0ee3583d..7f637f98 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WorksController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WorksController.java @@ -22,7 +22,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:36 diff --git a/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java b/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java index c73c849c..bd1a1265 100644 --- a/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:08 diff --git a/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java b/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java index 552495c0..c672f0f5 100644 --- a/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:52 diff --git a/website/src/main/java/info/xiaomo/website/dao/LinkDao.java b/website/src/main/java/info/xiaomo/website/dao/LinkDao.java index 705e8541..ece14977 100644 --- a/website/src/main/java/info/xiaomo/website/dao/LinkDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/LinkDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:52 diff --git a/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java b/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java index 566577fd..7e9e7f2f 100644 --- a/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:08 diff --git a/website/src/main/java/info/xiaomo/website/dao/UserDao.java b/website/src/main/java/info/xiaomo/website/dao/UserDao.java index 485e005e..f51c0e95 100644 --- a/website/src/main/java/info/xiaomo/website/dao/UserDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/UserDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/3 10:53 diff --git a/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java b/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java index 12b12370..431afc25 100644 --- a/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/WebSetDao.java @@ -11,7 +11,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:26 diff --git a/website/src/main/java/info/xiaomo/website/dao/WorksDao.java b/website/src/main/java/info/xiaomo/website/dao/WorksDao.java index 7152be3d..de35f6c8 100644 --- a/website/src/main/java/info/xiaomo/website/dao/WorksDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/WorksDao.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:08 diff --git a/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java b/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java index 323bd99c..2e2e0c23 100644 --- a/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 20:46 diff --git a/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java b/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java index 86cbd21d..1cb0f5ed 100644 --- a/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java +++ b/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java @@ -14,7 +14,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 10:42 diff --git a/website/src/main/java/info/xiaomo/website/model/AdminModel.java b/website/src/main/java/info/xiaomo/website/model/AdminModel.java index 55f581dd..54f441d2 100644 --- a/website/src/main/java/info/xiaomo/website/model/AdminModel.java +++ b/website/src/main/java/info/xiaomo/website/model/AdminModel.java @@ -24,7 +24,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 12:39 diff --git a/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java b/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java index 9d592251..239675e8 100644 --- a/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java +++ b/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/517:17 diff --git a/website/src/main/java/info/xiaomo/website/model/LinkModel.java b/website/src/main/java/info/xiaomo/website/model/LinkModel.java index f05a3565..b71f94aa 100644 --- a/website/src/main/java/info/xiaomo/website/model/LinkModel.java +++ b/website/src/main/java/info/xiaomo/website/model/LinkModel.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:47 diff --git a/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java b/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java index 45f53445..998ac4ee 100644 --- a/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java +++ b/website/src/main/java/info/xiaomo/website/model/SystemSetModel.java @@ -17,7 +17,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/517:17 diff --git a/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java b/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java index a9421650..5c114202 100644 --- a/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java +++ b/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:27 diff --git a/website/src/main/java/info/xiaomo/website/model/UserModel.java b/website/src/main/java/info/xiaomo/website/model/UserModel.java index 368c34fe..c0c7dcc1 100644 --- a/website/src/main/java/info/xiaomo/website/model/UserModel.java +++ b/website/src/main/java/info/xiaomo/website/model/UserModel.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:36 diff --git a/website/src/main/java/info/xiaomo/website/model/WorksModel.java b/website/src/main/java/info/xiaomo/website/model/WorksModel.java index 610efd9e..5e80e743 100644 --- a/website/src/main/java/info/xiaomo/website/model/WorksModel.java +++ b/website/src/main/java/info/xiaomo/website/model/WorksModel.java @@ -15,7 +15,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:15 diff --git a/website/src/main/java/info/xiaomo/website/service/AdminUserService.java b/website/src/main/java/info/xiaomo/website/service/AdminUserService.java index 257ad36f..799f6f80 100644 --- a/website/src/main/java/info/xiaomo/website/service/AdminUserService.java +++ b/website/src/main/java/info/xiaomo/website/service/AdminUserService.java @@ -21,7 +21,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:04 diff --git a/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java b/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java index 563d414e..0b94b0bb 100644 --- a/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java +++ b/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java @@ -12,7 +12,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:49 diff --git a/website/src/main/java/info/xiaomo/website/service/LinkService.java b/website/src/main/java/info/xiaomo/website/service/LinkService.java index 2bae53a7..13f69d65 100644 --- a/website/src/main/java/info/xiaomo/website/service/LinkService.java +++ b/website/src/main/java/info/xiaomo/website/service/LinkService.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1119:49 diff --git a/website/src/main/java/info/xiaomo/website/service/TechnologyService.java b/website/src/main/java/info/xiaomo/website/service/TechnologyService.java index 39417fd4..48a2bcbe 100644 --- a/website/src/main/java/info/xiaomo/website/service/TechnologyService.java +++ b/website/src/main/java/info/xiaomo/website/service/TechnologyService.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:33 diff --git a/website/src/main/java/info/xiaomo/website/service/UserService.java b/website/src/main/java/info/xiaomo/website/service/UserService.java index a0cad76a..0bdd8523 100644 --- a/website/src/main/java/info/xiaomo/website/service/UserService.java +++ b/website/src/main/java/info/xiaomo/website/service/UserService.java @@ -17,7 +17,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:45 diff --git a/website/src/main/java/info/xiaomo/website/service/WebSetService.java b/website/src/main/java/info/xiaomo/website/service/WebSetService.java index 5360abe9..a2190d06 100644 --- a/website/src/main/java/info/xiaomo/website/service/WebSetService.java +++ b/website/src/main/java/info/xiaomo/website/service/WebSetService.java @@ -12,7 +12,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:23 diff --git a/website/src/main/java/info/xiaomo/website/service/WorksService.java b/website/src/main/java/info/xiaomo/website/service/WorksService.java index dd974c3e..cfab69ea 100644 --- a/website/src/main/java/info/xiaomo/website/service/WorksService.java +++ b/website/src/main/java/info/xiaomo/website/service/WorksService.java @@ -13,7 +13,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:33 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java index c60291d6..64ad64de 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java @@ -28,7 +28,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 16/4/2 13:34 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java index f746de2e..f97bf25c 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/11 19:49 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java index 0a53ca16..98b8135b 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java @@ -19,7 +19,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/11 19:50 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java index 3f46ed85..c85c03e4 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:34 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java index 1103dec3..8a1b9cf5 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java @@ -20,7 +20,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/1 17:46 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java index 724675c2..d4f01794 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/WebSetServiceImpl.java @@ -16,7 +16,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/5/6 14:24 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java index ce45b061..7e5230d0 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java @@ -18,7 +18,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/3 14:34 diff --git a/website/src/main/java/info/xiaomo/website/util/MailUtil.java b/website/src/main/java/info/xiaomo/website/util/MailUtil.java index 5621590b..704fcb78 100644 --- a/website/src/main/java/info/xiaomo/website/util/MailUtil.java +++ b/website/src/main/java/info/xiaomo/website/util/MailUtil.java @@ -24,7 +24,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/4/511:00 diff --git a/website/src/main/java/info/xiaomo/website/view/AdminUserView.java b/website/src/main/java/info/xiaomo/website/view/AdminUserView.java index d77c6e33..df0a8adc 100644 --- a/website/src/main/java/info/xiaomo/website/view/AdminUserView.java +++ b/website/src/main/java/info/xiaomo/website/view/AdminUserView.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java b/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java index 21144eb7..0a51ef4c 100644 --- a/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java +++ b/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/LinkView.java b/website/src/main/java/info/xiaomo/website/view/LinkView.java index b647553a..3d02caff 100644 --- a/website/src/main/java/info/xiaomo/website/view/LinkView.java +++ b/website/src/main/java/info/xiaomo/website/view/LinkView.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/TechnologyView.java b/website/src/main/java/info/xiaomo/website/view/TechnologyView.java index 7e225baa..7b27a0ce 100644 --- a/website/src/main/java/info/xiaomo/website/view/TechnologyView.java +++ b/website/src/main/java/info/xiaomo/website/view/TechnologyView.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/UserView.java b/website/src/main/java/info/xiaomo/website/view/UserView.java index 92f02da8..c737b15c 100644 --- a/website/src/main/java/info/xiaomo/website/view/UserView.java +++ b/website/src/main/java/info/xiaomo/website/view/UserView.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/WorksView.java b/website/src/main/java/info/xiaomo/website/view/WorksView.java index 6885b7f3..eff3cfb1 100644 --- a/website/src/main/java/info/xiaomo/website/view/WorksView.java +++ b/website/src/main/java/info/xiaomo/website/view/WorksView.java @@ -7,7 +7,7 @@ * Created by IntelliJ IDEA. * * author: xiaomo - * github: https://github.com/syoubaku + * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info * Date: 2016/11/21 11:12 From 09201fb08cfa9e076add74318201006275a679d4 Mon Sep 17 00:00:00 2001 From: Peng Hu Date: Thu, 4 May 2017 17:24:10 +0800 Subject: [PATCH 008/221] Set theme jekyll-theme-architect --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..3397c9a4 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-architect \ No newline at end of file From 0300d865af6c84d15bc252368891cc09fa44e00e Mon Sep 17 00:00:00 2001 From: Peng Hu Date: Mon, 8 May 2017 09:04:28 +0800 Subject: [PATCH 009/221] Set theme jekyll-theme-cayman --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 3397c9a4..c4192631 100644 --- a/_config.yml +++ b/_config.yml @@ -1 +1 @@ -theme: jekyll-theme-architect \ No newline at end of file +theme: jekyll-theme-cayman \ No newline at end of file From 484ad34f1120d65b763d18e26721d40aaba59988 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Wed, 10 May 2017 16:21:37 +0800 Subject: [PATCH 010/221] =?UTF-8?q?=E5=B0=8F=E8=AF=B4=E9=98=85=E8=AF=BB?= =?UTF-8?q?=E5=99=A8=E5=90=8E=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiaomo/api/controller/AdminUserController.java | 2 +- pom.xml | 3 ++- {application => readerApplication}/.gitattributes | 0 {application => readerApplication}/.gitignore | 0 {application => readerApplication}/README.md | 0 {application => readerApplication}/pom.xml | 0 .../info/xiaomo/application/ApplicationMain.java | 0 .../application/controller/UserController.java | 0 .../java/info/xiaomo/application/dao/UserDao.java | 0 .../info/xiaomo/application/model/UserModel.java | 0 .../xiaomo/application/service/UserService.java | 0 .../application/service/impl/UserServiceImpl.java | 0 .../main/resources/config/application.properties | 0 .../src/main/resources/config/logback-dev.xml | 0 .../src/main/resources/public/css/print.css | 0 .../src/main/resources/public/css/reset.css | 0 .../src/main/resources/public/css/screen.css | 0 .../src/main/resources/public/css/style.css | 0 .../src/main/resources/public/css/typography.css | 0 .../main/resources/public/fonts/DroidSans-Bold.ttf | Bin .../src/main/resources/public/fonts/DroidSans.ttf | Bin .../src/main/resources/public/index.html | 0 .../src/main/resources/public/lang/ca.js | 0 .../src/main/resources/public/lang/el.js | 0 .../src/main/resources/public/lang/en.js | 0 .../src/main/resources/public/lang/es.js | 0 .../src/main/resources/public/lang/fr.js | 0 .../src/main/resources/public/lang/geo.js | 0 .../src/main/resources/public/lang/it.js | 0 .../src/main/resources/public/lang/ja.js | 0 .../src/main/resources/public/lang/ko-kr.js | 0 .../src/main/resources/public/lang/pl.js | 0 .../src/main/resources/public/lang/pt.js | 0 .../src/main/resources/public/lang/ru.js | 0 .../src/main/resources/public/lang/tr.js | 0 .../src/main/resources/public/lang/translator.js | 0 .../src/main/resources/public/lang/zh-cn.js | 0 .../src/main/resources/public/lib/backbone-min.js | 0 .../src/main/resources/public/lib/es5-shim.js | 0 .../main/resources/public/lib/handlebars-4.0.5.js | 0 .../resources/public/lib/highlight.9.1.0.pack.js | 0 .../public/lib/highlight.9.1.0.pack_extended.js | 0 .../main/resources/public/lib/jquery-1.8.0.min.js | 0 .../main/resources/public/lib/jquery.ba-bbq.min.js | 0 .../main/resources/public/lib/jquery.slideto.min.js | 0 .../main/resources/public/lib/jquery.wiggle.min.js | 0 .../src/main/resources/public/lib/js-yaml.min.js | 0 .../src/main/resources/public/lib/jsoneditor.min.js | 0 .../src/main/resources/public/lib/lodash.min.js | 0 .../src/main/resources/public/lib/marked.js | 0 .../resources/public/lib/object-assign-pollyfill.js | 0 .../main/resources/public/lib/sanitize-html.min.js | 0 .../src/main/resources/public/lib/swagger-oauth.js | 0 .../src/main/resources/public/o2c.html | 0 .../src/main/resources/public/swagger-ui.js | 0 .../src/main/resources/public/swagger-ui.min.js | 0 .../src/test/java/Test11.java | 0 57 files changed, 3 insertions(+), 2 deletions(-) rename {application => readerApplication}/.gitattributes (100%) rename {application => readerApplication}/.gitignore (100%) rename {application => readerApplication}/README.md (100%) rename {application => readerApplication}/pom.xml (100%) rename {application => readerApplication}/src/main/java/info/xiaomo/application/ApplicationMain.java (100%) rename {application => readerApplication}/src/main/java/info/xiaomo/application/controller/UserController.java (100%) rename {application => readerApplication}/src/main/java/info/xiaomo/application/dao/UserDao.java (100%) rename {application => readerApplication}/src/main/java/info/xiaomo/application/model/UserModel.java (100%) rename {application => readerApplication}/src/main/java/info/xiaomo/application/service/UserService.java (100%) rename {application => readerApplication}/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java (100%) rename {application => readerApplication}/src/main/resources/config/application.properties (100%) rename {application => readerApplication}/src/main/resources/config/logback-dev.xml (100%) rename {application => readerApplication}/src/main/resources/public/css/print.css (100%) rename {application => readerApplication}/src/main/resources/public/css/reset.css (100%) rename {application => readerApplication}/src/main/resources/public/css/screen.css (100%) rename {application => readerApplication}/src/main/resources/public/css/style.css (100%) rename {application => readerApplication}/src/main/resources/public/css/typography.css (100%) rename {application => readerApplication}/src/main/resources/public/fonts/DroidSans-Bold.ttf (100%) rename {application => readerApplication}/src/main/resources/public/fonts/DroidSans.ttf (100%) rename {application => readerApplication}/src/main/resources/public/index.html (100%) rename {application => readerApplication}/src/main/resources/public/lang/ca.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/el.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/en.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/es.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/fr.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/geo.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/it.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/ja.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/ko-kr.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/pl.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/pt.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/ru.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/tr.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/translator.js (100%) rename {application => readerApplication}/src/main/resources/public/lang/zh-cn.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/backbone-min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/es5-shim.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/handlebars-4.0.5.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/highlight.9.1.0.pack.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/jquery-1.8.0.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/jquery.ba-bbq.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/jquery.slideto.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/jquery.wiggle.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/js-yaml.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/jsoneditor.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/lodash.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/marked.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/object-assign-pollyfill.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/sanitize-html.min.js (100%) rename {application => readerApplication}/src/main/resources/public/lib/swagger-oauth.js (100%) rename {application => readerApplication}/src/main/resources/public/o2c.html (100%) rename {application => readerApplication}/src/main/resources/public/swagger-ui.js (100%) rename {application => readerApplication}/src/main/resources/public/swagger-ui.min.js (100%) rename {application => readerApplication}/src/test/java/Test11.java (100%) diff --git a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java index ba1ed110..368f9f93 100644 --- a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java @@ -73,7 +73,7 @@ public Result login(@PathVariable("userName") String userName, @PathVariable("pa if (!MD5Util.encode(password, adminModel.getSalt()).equals(adminModel.getPassword())) { return new Result(Code.AUTH_FAILED.getResultCode(), Code.AUTH_FAILED.getMessage()); } - return new Result(adminModel); + return new Result<>(adminModel); } diff --git a/pom.xml b/pom.xml index 73a14eb6..8aceab3e 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,8 @@ api crawler - application + + readerApplication aries pom diff --git a/application/.gitattributes b/readerApplication/.gitattributes similarity index 100% rename from application/.gitattributes rename to readerApplication/.gitattributes diff --git a/application/.gitignore b/readerApplication/.gitignore similarity index 100% rename from application/.gitignore rename to readerApplication/.gitignore diff --git a/application/README.md b/readerApplication/README.md similarity index 100% rename from application/README.md rename to readerApplication/README.md diff --git a/application/pom.xml b/readerApplication/pom.xml similarity index 100% rename from application/pom.xml rename to readerApplication/pom.xml diff --git a/application/src/main/java/info/xiaomo/application/ApplicationMain.java b/readerApplication/src/main/java/info/xiaomo/application/ApplicationMain.java similarity index 100% rename from application/src/main/java/info/xiaomo/application/ApplicationMain.java rename to readerApplication/src/main/java/info/xiaomo/application/ApplicationMain.java diff --git a/application/src/main/java/info/xiaomo/application/controller/UserController.java b/readerApplication/src/main/java/info/xiaomo/application/controller/UserController.java similarity index 100% rename from application/src/main/java/info/xiaomo/application/controller/UserController.java rename to readerApplication/src/main/java/info/xiaomo/application/controller/UserController.java diff --git a/application/src/main/java/info/xiaomo/application/dao/UserDao.java b/readerApplication/src/main/java/info/xiaomo/application/dao/UserDao.java similarity index 100% rename from application/src/main/java/info/xiaomo/application/dao/UserDao.java rename to readerApplication/src/main/java/info/xiaomo/application/dao/UserDao.java diff --git a/application/src/main/java/info/xiaomo/application/model/UserModel.java b/readerApplication/src/main/java/info/xiaomo/application/model/UserModel.java similarity index 100% rename from application/src/main/java/info/xiaomo/application/model/UserModel.java rename to readerApplication/src/main/java/info/xiaomo/application/model/UserModel.java diff --git a/application/src/main/java/info/xiaomo/application/service/UserService.java b/readerApplication/src/main/java/info/xiaomo/application/service/UserService.java similarity index 100% rename from application/src/main/java/info/xiaomo/application/service/UserService.java rename to readerApplication/src/main/java/info/xiaomo/application/service/UserService.java diff --git a/application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java b/readerApplication/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java similarity index 100% rename from application/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java rename to readerApplication/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java diff --git a/application/src/main/resources/config/application.properties b/readerApplication/src/main/resources/config/application.properties similarity index 100% rename from application/src/main/resources/config/application.properties rename to readerApplication/src/main/resources/config/application.properties diff --git a/application/src/main/resources/config/logback-dev.xml b/readerApplication/src/main/resources/config/logback-dev.xml similarity index 100% rename from application/src/main/resources/config/logback-dev.xml rename to readerApplication/src/main/resources/config/logback-dev.xml diff --git a/application/src/main/resources/public/css/print.css b/readerApplication/src/main/resources/public/css/print.css similarity index 100% rename from application/src/main/resources/public/css/print.css rename to readerApplication/src/main/resources/public/css/print.css diff --git a/application/src/main/resources/public/css/reset.css b/readerApplication/src/main/resources/public/css/reset.css similarity index 100% rename from application/src/main/resources/public/css/reset.css rename to readerApplication/src/main/resources/public/css/reset.css diff --git a/application/src/main/resources/public/css/screen.css b/readerApplication/src/main/resources/public/css/screen.css similarity index 100% rename from application/src/main/resources/public/css/screen.css rename to readerApplication/src/main/resources/public/css/screen.css diff --git a/application/src/main/resources/public/css/style.css b/readerApplication/src/main/resources/public/css/style.css similarity index 100% rename from application/src/main/resources/public/css/style.css rename to readerApplication/src/main/resources/public/css/style.css diff --git a/application/src/main/resources/public/css/typography.css b/readerApplication/src/main/resources/public/css/typography.css similarity index 100% rename from application/src/main/resources/public/css/typography.css rename to readerApplication/src/main/resources/public/css/typography.css diff --git a/application/src/main/resources/public/fonts/DroidSans-Bold.ttf b/readerApplication/src/main/resources/public/fonts/DroidSans-Bold.ttf similarity index 100% rename from application/src/main/resources/public/fonts/DroidSans-Bold.ttf rename to readerApplication/src/main/resources/public/fonts/DroidSans-Bold.ttf diff --git a/application/src/main/resources/public/fonts/DroidSans.ttf b/readerApplication/src/main/resources/public/fonts/DroidSans.ttf similarity index 100% rename from application/src/main/resources/public/fonts/DroidSans.ttf rename to readerApplication/src/main/resources/public/fonts/DroidSans.ttf diff --git a/application/src/main/resources/public/index.html b/readerApplication/src/main/resources/public/index.html similarity index 100% rename from application/src/main/resources/public/index.html rename to readerApplication/src/main/resources/public/index.html diff --git a/application/src/main/resources/public/lang/ca.js b/readerApplication/src/main/resources/public/lang/ca.js similarity index 100% rename from application/src/main/resources/public/lang/ca.js rename to readerApplication/src/main/resources/public/lang/ca.js diff --git a/application/src/main/resources/public/lang/el.js b/readerApplication/src/main/resources/public/lang/el.js similarity index 100% rename from application/src/main/resources/public/lang/el.js rename to readerApplication/src/main/resources/public/lang/el.js diff --git a/application/src/main/resources/public/lang/en.js b/readerApplication/src/main/resources/public/lang/en.js similarity index 100% rename from application/src/main/resources/public/lang/en.js rename to readerApplication/src/main/resources/public/lang/en.js diff --git a/application/src/main/resources/public/lang/es.js b/readerApplication/src/main/resources/public/lang/es.js similarity index 100% rename from application/src/main/resources/public/lang/es.js rename to readerApplication/src/main/resources/public/lang/es.js diff --git a/application/src/main/resources/public/lang/fr.js b/readerApplication/src/main/resources/public/lang/fr.js similarity index 100% rename from application/src/main/resources/public/lang/fr.js rename to readerApplication/src/main/resources/public/lang/fr.js diff --git a/application/src/main/resources/public/lang/geo.js b/readerApplication/src/main/resources/public/lang/geo.js similarity index 100% rename from application/src/main/resources/public/lang/geo.js rename to readerApplication/src/main/resources/public/lang/geo.js diff --git a/application/src/main/resources/public/lang/it.js b/readerApplication/src/main/resources/public/lang/it.js similarity index 100% rename from application/src/main/resources/public/lang/it.js rename to readerApplication/src/main/resources/public/lang/it.js diff --git a/application/src/main/resources/public/lang/ja.js b/readerApplication/src/main/resources/public/lang/ja.js similarity index 100% rename from application/src/main/resources/public/lang/ja.js rename to readerApplication/src/main/resources/public/lang/ja.js diff --git a/application/src/main/resources/public/lang/ko-kr.js b/readerApplication/src/main/resources/public/lang/ko-kr.js similarity index 100% rename from application/src/main/resources/public/lang/ko-kr.js rename to readerApplication/src/main/resources/public/lang/ko-kr.js diff --git a/application/src/main/resources/public/lang/pl.js b/readerApplication/src/main/resources/public/lang/pl.js similarity index 100% rename from application/src/main/resources/public/lang/pl.js rename to readerApplication/src/main/resources/public/lang/pl.js diff --git a/application/src/main/resources/public/lang/pt.js b/readerApplication/src/main/resources/public/lang/pt.js similarity index 100% rename from application/src/main/resources/public/lang/pt.js rename to readerApplication/src/main/resources/public/lang/pt.js diff --git a/application/src/main/resources/public/lang/ru.js b/readerApplication/src/main/resources/public/lang/ru.js similarity index 100% rename from application/src/main/resources/public/lang/ru.js rename to readerApplication/src/main/resources/public/lang/ru.js diff --git a/application/src/main/resources/public/lang/tr.js b/readerApplication/src/main/resources/public/lang/tr.js similarity index 100% rename from application/src/main/resources/public/lang/tr.js rename to readerApplication/src/main/resources/public/lang/tr.js diff --git a/application/src/main/resources/public/lang/translator.js b/readerApplication/src/main/resources/public/lang/translator.js similarity index 100% rename from application/src/main/resources/public/lang/translator.js rename to readerApplication/src/main/resources/public/lang/translator.js diff --git a/application/src/main/resources/public/lang/zh-cn.js b/readerApplication/src/main/resources/public/lang/zh-cn.js similarity index 100% rename from application/src/main/resources/public/lang/zh-cn.js rename to readerApplication/src/main/resources/public/lang/zh-cn.js diff --git a/application/src/main/resources/public/lib/backbone-min.js b/readerApplication/src/main/resources/public/lib/backbone-min.js similarity index 100% rename from application/src/main/resources/public/lib/backbone-min.js rename to readerApplication/src/main/resources/public/lib/backbone-min.js diff --git a/application/src/main/resources/public/lib/es5-shim.js b/readerApplication/src/main/resources/public/lib/es5-shim.js similarity index 100% rename from application/src/main/resources/public/lib/es5-shim.js rename to readerApplication/src/main/resources/public/lib/es5-shim.js diff --git a/application/src/main/resources/public/lib/handlebars-4.0.5.js b/readerApplication/src/main/resources/public/lib/handlebars-4.0.5.js similarity index 100% rename from application/src/main/resources/public/lib/handlebars-4.0.5.js rename to readerApplication/src/main/resources/public/lib/handlebars-4.0.5.js diff --git a/application/src/main/resources/public/lib/highlight.9.1.0.pack.js b/readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack.js similarity index 100% rename from application/src/main/resources/public/lib/highlight.9.1.0.pack.js rename to readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack.js diff --git a/application/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js b/readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js similarity index 100% rename from application/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js rename to readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js diff --git a/application/src/main/resources/public/lib/jquery-1.8.0.min.js b/readerApplication/src/main/resources/public/lib/jquery-1.8.0.min.js similarity index 100% rename from application/src/main/resources/public/lib/jquery-1.8.0.min.js rename to readerApplication/src/main/resources/public/lib/jquery-1.8.0.min.js diff --git a/application/src/main/resources/public/lib/jquery.ba-bbq.min.js b/readerApplication/src/main/resources/public/lib/jquery.ba-bbq.min.js similarity index 100% rename from application/src/main/resources/public/lib/jquery.ba-bbq.min.js rename to readerApplication/src/main/resources/public/lib/jquery.ba-bbq.min.js diff --git a/application/src/main/resources/public/lib/jquery.slideto.min.js b/readerApplication/src/main/resources/public/lib/jquery.slideto.min.js similarity index 100% rename from application/src/main/resources/public/lib/jquery.slideto.min.js rename to readerApplication/src/main/resources/public/lib/jquery.slideto.min.js diff --git a/application/src/main/resources/public/lib/jquery.wiggle.min.js b/readerApplication/src/main/resources/public/lib/jquery.wiggle.min.js similarity index 100% rename from application/src/main/resources/public/lib/jquery.wiggle.min.js rename to readerApplication/src/main/resources/public/lib/jquery.wiggle.min.js diff --git a/application/src/main/resources/public/lib/js-yaml.min.js b/readerApplication/src/main/resources/public/lib/js-yaml.min.js similarity index 100% rename from application/src/main/resources/public/lib/js-yaml.min.js rename to readerApplication/src/main/resources/public/lib/js-yaml.min.js diff --git a/application/src/main/resources/public/lib/jsoneditor.min.js b/readerApplication/src/main/resources/public/lib/jsoneditor.min.js similarity index 100% rename from application/src/main/resources/public/lib/jsoneditor.min.js rename to readerApplication/src/main/resources/public/lib/jsoneditor.min.js diff --git a/application/src/main/resources/public/lib/lodash.min.js b/readerApplication/src/main/resources/public/lib/lodash.min.js similarity index 100% rename from application/src/main/resources/public/lib/lodash.min.js rename to readerApplication/src/main/resources/public/lib/lodash.min.js diff --git a/application/src/main/resources/public/lib/marked.js b/readerApplication/src/main/resources/public/lib/marked.js similarity index 100% rename from application/src/main/resources/public/lib/marked.js rename to readerApplication/src/main/resources/public/lib/marked.js diff --git a/application/src/main/resources/public/lib/object-assign-pollyfill.js b/readerApplication/src/main/resources/public/lib/object-assign-pollyfill.js similarity index 100% rename from application/src/main/resources/public/lib/object-assign-pollyfill.js rename to readerApplication/src/main/resources/public/lib/object-assign-pollyfill.js diff --git a/application/src/main/resources/public/lib/sanitize-html.min.js b/readerApplication/src/main/resources/public/lib/sanitize-html.min.js similarity index 100% rename from application/src/main/resources/public/lib/sanitize-html.min.js rename to readerApplication/src/main/resources/public/lib/sanitize-html.min.js diff --git a/application/src/main/resources/public/lib/swagger-oauth.js b/readerApplication/src/main/resources/public/lib/swagger-oauth.js similarity index 100% rename from application/src/main/resources/public/lib/swagger-oauth.js rename to readerApplication/src/main/resources/public/lib/swagger-oauth.js diff --git a/application/src/main/resources/public/o2c.html b/readerApplication/src/main/resources/public/o2c.html similarity index 100% rename from application/src/main/resources/public/o2c.html rename to readerApplication/src/main/resources/public/o2c.html diff --git a/application/src/main/resources/public/swagger-ui.js b/readerApplication/src/main/resources/public/swagger-ui.js similarity index 100% rename from application/src/main/resources/public/swagger-ui.js rename to readerApplication/src/main/resources/public/swagger-ui.js diff --git a/application/src/main/resources/public/swagger-ui.min.js b/readerApplication/src/main/resources/public/swagger-ui.min.js similarity index 100% rename from application/src/main/resources/public/swagger-ui.min.js rename to readerApplication/src/main/resources/public/swagger-ui.min.js diff --git a/application/src/test/java/Test11.java b/readerApplication/src/test/java/Test11.java similarity index 100% rename from application/src/test/java/Test11.java rename to readerApplication/src/test/java/Test11.java From fb6c017d3754a0b0ffb9878ea5c225ba0e079fb7 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Wed, 10 May 2017 16:27:45 +0800 Subject: [PATCH 011/221] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApplicationMain.java => reader/ReaderMain.java} | 11 ++++------- .../controller/UserController.java | 6 +++--- .../xiaomo/{application => reader}/dao/UserDao.java | 4 ++-- .../{application => reader}/model/UserModel.java | 2 +- .../{application => reader}/service/UserService.java | 4 ++-- .../service/impl/UserServiceImpl.java | 8 ++++---- readerApplication/src/test/java/Test11.java | 4 ++-- 7 files changed, 18 insertions(+), 21 deletions(-) rename readerApplication/src/main/java/info/xiaomo/{application/ApplicationMain.java => reader/ReaderMain.java} (89%) rename readerApplication/src/main/java/info/xiaomo/{application => reader}/controller/UserController.java (98%) rename readerApplication/src/main/java/info/xiaomo/{application => reader}/dao/UserDao.java (90%) rename readerApplication/src/main/java/info/xiaomo/{application => reader}/model/UserModel.java (97%) rename readerApplication/src/main/java/info/xiaomo/{application => reader}/service/UserService.java (84%) rename readerApplication/src/main/java/info/xiaomo/{application => reader}/service/impl/UserServiceImpl.java (93%) diff --git a/readerApplication/src/main/java/info/xiaomo/application/ApplicationMain.java b/readerApplication/src/main/java/info/xiaomo/reader/ReaderMain.java similarity index 89% rename from readerApplication/src/main/java/info/xiaomo/application/ApplicationMain.java rename to readerApplication/src/main/java/info/xiaomo/reader/ReaderMain.java index 020602ec..1b92fe99 100644 --- a/readerApplication/src/main/java/info/xiaomo/application/ApplicationMain.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/ReaderMain.java @@ -1,16 +1,13 @@ -package info.xiaomo.application; +package info.xiaomo.reader; import io.swagger.annotations.ApiOperation; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.bind.annotation.RequestMapping; @@ -46,10 +43,10 @@ @EnableJpaRepositories("info.xiaomo.*.dao") @Controller @EnableSwagger2 -public class ApplicationMain { +public class ReaderMain { public static void main(String[] args) throws Exception { - SpringApplication.run(ApplicationMain.class, args); + SpringApplication.run(ReaderMain.class, args); } @@ -70,7 +67,7 @@ public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() - .apis(RequestHandlerSelectors.basePackage("info.xiaomo.application")) + .apis(RequestHandlerSelectors.basePackage("info.xiaomo.reader")) .paths(PathSelectors.any()) .build(); } diff --git a/readerApplication/src/main/java/info/xiaomo/application/controller/UserController.java b/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java similarity index 98% rename from readerApplication/src/main/java/info/xiaomo/application/controller/UserController.java rename to readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java index ca9149ad..dd64992f 100644 --- a/readerApplication/src/main/java/info/xiaomo/application/controller/UserController.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java @@ -1,7 +1,7 @@ -package info.xiaomo.application.controller; +package info.xiaomo.reader.controller; -import info.xiaomo.application.model.UserModel; -import info.xiaomo.application.service.UserService; +import info.xiaomo.reader.model.UserModel; +import info.xiaomo.reader.service.UserService; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.core.constant.Code; diff --git a/readerApplication/src/main/java/info/xiaomo/application/dao/UserDao.java b/readerApplication/src/main/java/info/xiaomo/reader/dao/UserDao.java similarity index 90% rename from readerApplication/src/main/java/info/xiaomo/application/dao/UserDao.java rename to readerApplication/src/main/java/info/xiaomo/reader/dao/UserDao.java index aafb0887..82d42a39 100644 --- a/readerApplication/src/main/java/info/xiaomo/application/dao/UserDao.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/dao/UserDao.java @@ -1,6 +1,6 @@ -package info.xiaomo.application.dao; +package info.xiaomo.reader.dao; -import info.xiaomo.application.model.UserModel; +import info.xiaomo.reader.model.UserModel; import info.xiaomo.core.base.BaseDao; import org.springframework.stereotype.Repository; diff --git a/readerApplication/src/main/java/info/xiaomo/application/model/UserModel.java b/readerApplication/src/main/java/info/xiaomo/reader/model/UserModel.java similarity index 97% rename from readerApplication/src/main/java/info/xiaomo/application/model/UserModel.java rename to readerApplication/src/main/java/info/xiaomo/reader/model/UserModel.java index 32e6c0a7..cf43ef1f 100644 --- a/readerApplication/src/main/java/info/xiaomo/application/model/UserModel.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/model/UserModel.java @@ -1,4 +1,4 @@ -package info.xiaomo.application.model; +package info.xiaomo.reader.model; import info.xiaomo.core.base.BaseModel; diff --git a/readerApplication/src/main/java/info/xiaomo/application/service/UserService.java b/readerApplication/src/main/java/info/xiaomo/reader/service/UserService.java similarity index 84% rename from readerApplication/src/main/java/info/xiaomo/application/service/UserService.java rename to readerApplication/src/main/java/info/xiaomo/reader/service/UserService.java index 17e3d04a..4c6ec26c 100644 --- a/readerApplication/src/main/java/info/xiaomo/application/service/UserService.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/service/UserService.java @@ -1,7 +1,7 @@ -package info.xiaomo.application.service; +package info.xiaomo.reader.service; -import info.xiaomo.application.model.UserModel; +import info.xiaomo.reader.model.UserModel; import info.xiaomo.core.base.BaseService; /** diff --git a/readerApplication/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java b/readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java similarity index 93% rename from readerApplication/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java rename to readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java index c5ca10dd..9525051c 100644 --- a/readerApplication/src/main/java/info/xiaomo/application/service/impl/UserServiceImpl.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java @@ -1,8 +1,8 @@ -package info.xiaomo.application.service.impl; +package info.xiaomo.reader.service.impl; -import info.xiaomo.application.dao.UserDao; -import info.xiaomo.application.model.UserModel; -import info.xiaomo.application.service.UserService; +import info.xiaomo.reader.dao.UserDao; +import info.xiaomo.reader.model.UserModel; +import info.xiaomo.reader.service.UserService; import info.xiaomo.core.exception.UserNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; diff --git a/readerApplication/src/test/java/Test11.java b/readerApplication/src/test/java/Test11.java index a0799f4f..a236580f 100644 --- a/readerApplication/src/test/java/Test11.java +++ b/readerApplication/src/test/java/Test11.java @@ -1,4 +1,4 @@ -import info.xiaomo.application.ApplicationMain; +import info.xiaomo.reader.ReaderMain; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.SpringApplicationConfiguration; @@ -15,7 +15,7 @@ * @version : 2017/1/13 18:33 */ @RunWith(SpringJUnit4ClassRunner.class) // SpringJUnit支持,由此引入Spring-Test框架支持! -@SpringApplicationConfiguration(classes = ApplicationMain.class) // 指定我们SpringBoot工程的Application启动类 +@SpringApplicationConfiguration(classes = ReaderMain.class) // 指定我们SpringBoot工程的Application启动类 @WebAppConfiguration // 由于是Web项目,Junit需要模拟ServletContext,因此我们需要给我们的测试类加上@WebAppConfiguration。 public class Test11 { From eb8fbba1947237cd534a30f29417171e0cbdaa98 Mon Sep 17 00:00:00 2001 From: Peng Hu Date: Wed, 10 May 2017 16:29:59 +0800 Subject: [PATCH 012/221] Set theme jekyll-theme-cayman From c4fa55b71db7bd81fd54fead6820bf26d27e1bc5 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Wed, 10 May 2017 16:38:31 +0800 Subject: [PATCH 013/221] =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 8aceab3e..5e37b03a 100644 --- a/pom.xml +++ b/pom.xml @@ -208,6 +208,8 @@ + + org.apache.maven.plugins maven-compiler-plugin @@ -218,6 +220,8 @@ ${project.build.sourceEncoding} + + org.apache.maven.plugins maven-surefire-plugin @@ -226,6 +230,8 @@ true + + maven-source-plugin 2.1 @@ -241,6 +247,7 @@ + \ No newline at end of file From 9bc6b38f63313f2c4c427159a7cef0c2d40c67a2 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Wed, 10 May 2017 17:32:31 +0800 Subject: [PATCH 014/221] =?UTF-8?q?=E5=AE=8C=E5=96=84core=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aries/controller/UserController.java | 6 +-- .../aries/service/impl/UserServiceImpl.java | 6 +-- .../info/xiaomo/core/base/BaseService.java | 6 +-- .../reader/controller/UserController.java | 4 +- .../reader/service/impl/UserServiceImpl.java | 42 ++++++++----------- 5 files changed, 28 insertions(+), 36 deletions(-) diff --git a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java index e233c435..fac3b986 100644 --- a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java +++ b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java @@ -67,7 +67,7 @@ public Result findByName(@PathVariable String name) { @ApiOperation(value = "根据名字删除数据", notes = "根据名字删除数据", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @Override public Result delByName(@PathVariable String name) { - boolean b = service.delByName(name); + boolean b = service.deleteByName(name); return new Result<>(b); } @@ -75,7 +75,7 @@ public Result delByName(@PathVariable String name) { @ApiOperation(value = "根据id删除数据", notes = "根据id删除数据", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @Override public Result delById(@PathVariable Long id) { - boolean b = service.delById(id); + boolean b = service.deleteById(id); return new Result<>(b); } @@ -100,7 +100,7 @@ public Result update(@RequestBody UserModel model) { @ApiOperation(value = "根据ids批量删除数据", notes = "根据ids批量删除数据", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @Override public Result delByIds(@PathVariable List ids) { - boolean b = service.delByIds(ids); + boolean b = service.deleteByIds(ids); return new Result<>(b); } diff --git a/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java b/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java index 62bd9ae5..fba22720 100644 --- a/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java +++ b/aries/src/main/java/info/xiaomo/aries/service/impl/UserServiceImpl.java @@ -51,7 +51,7 @@ public Page findAll(int start, int pageSize) { } @Override - public boolean delById(Long id) { + public boolean deleteById(Long id) { try { userDao.delete(id); } catch (Exception e) { @@ -61,7 +61,7 @@ public boolean delById(Long id) { } @Override - public boolean delByName(String name) { + public boolean deleteByName(String name) { return userDao.deleteByName(name); } @@ -99,7 +99,7 @@ public boolean update(UserModel model) { } @Override - public boolean delByIds(List ids) { + public boolean deleteByIds(List ids) { for (Long id : ids) { userDao.delete(id); } diff --git a/core/src/main/java/info/xiaomo/core/base/BaseService.java b/core/src/main/java/info/xiaomo/core/base/BaseService.java index d74d4fac..59407108 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseService.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseService.java @@ -20,13 +20,13 @@ public interface BaseService { Page findAll(int start, int pageSize); - boolean delById(Long id); + boolean deleteById(Long id); - boolean delByName(String name); + boolean deleteByName(String name); boolean add(T model); boolean update(T model); - boolean delByIds(List ids); + boolean deleteByIds(List ids); } diff --git a/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java b/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java index dd64992f..bac5f3f6 100644 --- a/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java @@ -211,7 +211,7 @@ public Result update(@RequestBody UserModel user) { */ @Override public Result delByIds(@PathVariable List ids) { - Boolean aBoolean = service.delByIds(ids); + Boolean aBoolean = service.deleteByIds(ids); return new Result<>(aBoolean); } @@ -256,7 +256,7 @@ public Result> findAll(@PathVariable int start, @PathVariable in @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path"), }) public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { - boolean userModel = service.delById(id); + boolean userModel = service.deleteById(id); if (!userModel) { return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); } diff --git a/readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java b/readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java index 9525051c..cf76b24b 100644 --- a/readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/service/impl/UserServiceImpl.java @@ -61,58 +61,50 @@ public UserModel updateUser(UserModel model) throws UserNotFoundException { } @Override - public Page findAll(int start, int pageSize) { - Sort sort = new Sort(Sort.Direction.DESC, "createTime"); - return dao.findAll(new PageRequest(start - 1, pageSize, sort)); + public UserModel findById(Long id) { + return null; } @Override - public boolean delById(Long id) { - return false; + public UserModel findByName(String name) { + return null; } @Override - public boolean delByName(String name) { - return false; + public List findAll() { + return null; } @Override - public boolean add(UserModel model) { - return false; + public Page findAll(int start, int pageSize) { + Sort sort = new Sort(Sort.Direction.DESC, "createTime"); + return dao.findAll(new PageRequest(start - 1, pageSize, sort)); } @Override - public boolean update(UserModel model) { + public boolean deleteById(Long id) { return false; } @Override - public boolean delByIds(List ids) { + public boolean deleteByName(String name) { return false; } @Override - public UserModel findById(Long id) { - return null; + public boolean add(UserModel model) { + return false; } @Override - public UserModel findByName(String name) { - return null; + public boolean update(UserModel model) { + return false; } @Override - public List findAll() { - return dao.findAll(); + public boolean deleteByIds(List ids) { + return false; } - public UserModel deleteUserById(Long id) throws UserNotFoundException { - UserModel userModel = dao.findOne(id); - if (userModel == null) { - throw new UserNotFoundException(); - } - dao.delete(userModel.getId()); - return userModel; - } } From 5f9c686f5f9f7b76a5cf8c45862aae4df115d41e Mon Sep 17 00:00:00 2001 From: xiaomo Date: Wed, 10 May 2017 17:34:22 +0800 Subject: [PATCH 015/221] =?UTF-8?q?=E5=AE=8C=E5=96=84core=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/AdminUserController.java | 18 ++++++------ .../api/controller/ChangeLogController.java | 14 +++++----- .../xiaomo/api/controller/LinkController.java | 16 +++++------ .../api/controller/TechnologyController.java | 14 +++++----- .../xiaomo/api/controller/UserController.java | 28 +++++++++---------- .../api/controller/WebSetController.java | 8 +++--- .../api/controller/WorksController.java | 14 +++++----- .../aries/controller/UserController.java | 4 +-- .../constant/{Code.java => CodeConst.java} | 8 +++--- .../{FileType.java => FileConst.java} | 4 +-- .../{GenderType.java => GenderConst.java} | 2 +- .../{Symbol.java => SymbolConst.java} | 2 +- ...r.java => CustomDateSerializerFilter.java} | 2 +- .../info/xiaomo/core/untils/FileUtil.java | 18 ++++++------ .../info/xiaomo/core/untils/TimeUtil.java | 14 +++++----- .../info/xiaomo/core/untils/TokenUtil.java | 7 ++--- .../controller/MongoUserController.java | 4 +-- .../reader/controller/UserController.java | 20 ++++++------- .../controller/AdminUserController.java | 18 ++++++------ .../controller/ChangeLogController.java | 14 +++++----- .../website/controller/LinkController.java | 14 +++++----- .../controller/TechnologyController.java | 14 +++++----- .../website/controller/UserController.java | 18 ++++++------ .../website/controller/WebSetController.java | 8 +++--- .../website/controller/WorksController.java | 14 +++++----- 25 files changed, 148 insertions(+), 149 deletions(-) rename core/src/main/java/info/xiaomo/core/constant/{Code.java => CodeConst.java} (90%) rename core/src/main/java/info/xiaomo/core/constant/{FileType.java => FileConst.java} (98%) rename core/src/main/java/info/xiaomo/core/constant/{GenderType.java => GenderConst.java} (94%) rename core/src/main/java/info/xiaomo/core/constant/{Symbol.java => SymbolConst.java} (96%) rename core/src/main/java/info/xiaomo/core/filter/{CustomDateSerializer.java => CustomDateSerializerFilter.java} (89%) diff --git a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java index 368f9f93..fa4740df 100644 --- a/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/AdminUserController.java @@ -2,7 +2,7 @@ import info.xiaomo.api.model.AdminModel; import info.xiaomo.api.service.AdminUserService; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.core.exception.UserNotFoundException; @@ -68,10 +68,10 @@ public AdminUserController(AdminUserService service) { public Result login(@PathVariable("userName") String userName, @PathVariable("password") String password) { AdminModel adminModel = service.findAdminUserByUserName(userName); if (adminModel == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } if (!MD5Util.encode(password, adminModel.getSalt()).equals(adminModel.getPassword())) { - return new Result(Code.AUTH_FAILED.getResultCode(), Code.AUTH_FAILED.getMessage()); + return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); } return new Result<>(adminModel); } @@ -91,7 +91,7 @@ public Result login(@PathVariable("userName") String userName, @PathVariable("pa public Result add(@RequestBody AdminModel model) { AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); if (adminModel != null) { - return new Result(Code.ADMIN_USER_REPEAT.getResultCode(), Code.ADMIN_USER_REPEAT.getMessage()); + return new Result(CodeConst.ADMIN_USER_REPEAT.getResultCode(), CodeConst.ADMIN_USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); model.setSalt(salt); @@ -118,7 +118,7 @@ public Result add(@RequestBody AdminModel model) { public Result findUserById(@PathVariable("id") Long id) { AdminModel adminModel = service.findAdminUserById(id); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(adminModel); } @@ -174,7 +174,7 @@ public Result findById(@PathVariable Long id) { public Result findByName(@PathVariable("userName") String userName) { AdminModel adminModel = service.findAdminUserByUserName(userName); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(adminModel); } @@ -249,7 +249,7 @@ public Result delByIds(@PathVariable List ids) { public Result changePassword(@RequestBody AdminModel model) throws UserNotFoundException { AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } String salt = RandomUtil.createSalt(); adminModel.setSalt(salt); @@ -297,7 +297,7 @@ public Result getAll() { public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { AdminModel adminModel = service.findAdminUserById(id); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.deleteAdminUserById(id); return new Result<>(adminModel); @@ -348,7 +348,7 @@ public Result update(@PathVariable("userName") String userName) throws UserNotFo public Result forbid(@PathVariable("id") Long id) throws UserNotFoundException { AdminModel model = service.findAdminUserById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } model = service.forbidAdminUserById(id); return new Result<>(model); diff --git a/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java b/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java index 6d32cda0..798d238c 100644 --- a/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java +++ b/api/src/main/java/info/xiaomo/api/controller/ChangeLogController.java @@ -2,7 +2,7 @@ import info.xiaomo.api.model.ChangeLogModel; import info.xiaomo.api.service.ChangeLogService; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import io.swagger.annotations.Api; @@ -56,7 +56,7 @@ public ChangeLogController(ChangeLogService service) { public Result findById(@PathVariable("id") Long id) { ChangeLogModel changeLogModel = service.findById(id); if (changeLogModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(changeLogModel); } @@ -74,7 +74,7 @@ public Result findById(@PathVariable("id") Long id) { public Result findByName( @PathVariable("name") String name) { ChangeLogModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -144,7 +144,7 @@ public Result delByIds(@PathVariable List ids) { public Result findAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -171,7 +171,7 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) public Result add(@RequestBody ChangeLogModel model) { ChangeLogModel changeLogModel = service.findByName(model.getName()); if (changeLogModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } changeLogModel = new ChangeLogModel(); changeLogModel.setName(model.getName()); @@ -191,7 +191,7 @@ public Result add(@RequestBody ChangeLogModel model) { public Result update(@RequestBody ChangeLogModel model) { ChangeLogModel changeLogModel = service.findByName(model.getName()); if (changeLogModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } changeLogModel.setName(model.getName()); changeLogModel.setOnlineTime(model.getOnlineTime()); @@ -211,7 +211,7 @@ public Result update(@RequestBody ChangeLogModel model) { public Result deleteById(@PathVariable("id") Long id) { ChangeLogModel changeLogModel = service.findById(id); if (changeLogModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } ChangeLogModel delModel = service.delete(id); return new Result<>(delModel); diff --git a/api/src/main/java/info/xiaomo/api/controller/LinkController.java b/api/src/main/java/info/xiaomo/api/controller/LinkController.java index a4feeff8..32e2cf65 100644 --- a/api/src/main/java/info/xiaomo/api/controller/LinkController.java +++ b/api/src/main/java/info/xiaomo/api/controller/LinkController.java @@ -2,7 +2,7 @@ import info.xiaomo.api.model.LinkModel; import info.xiaomo.api.service.LinkService; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import io.swagger.annotations.Api; @@ -56,7 +56,7 @@ public LinkController(LinkService service) { public Result findLinkById(@PathVariable("id") Long id) { LinkModel model = service.findById(id); if (model == null) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -75,7 +75,7 @@ public Result findLinkById(@PathVariable("id") Long id) { public Result findByName(@PathVariable("name") String name) { LinkModel model = service.findByName(name); if (model == null) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -146,7 +146,7 @@ public Result delByIds(@PathVariable List ids) { public Result findAll() { List pages = service.findAll(); if (pages == null || pages.size() == 0) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -186,7 +186,7 @@ public Result findById(@PathVariable Long id) { // public Result findAll(@RequestParam(value = "start", defaultValue = "1") int start, @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) { // Page pages = service.findAll(start, pageSize); // if (pages == null || pages.getSize() <= 0) { -// return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); +// return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); // } // return new Result<>(pages); // } @@ -202,7 +202,7 @@ public Result findById(@PathVariable Long id) { public Result add(@RequestBody LinkModel model) { LinkModel linkModel = service.findByName(model.getName()); if (linkModel != null) { - return new Result<>(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result<>(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } linkModel = new LinkModel(); linkModel.setName(model.getName()); @@ -221,7 +221,7 @@ public Result add(@RequestBody LinkModel model) { public Result update(@RequestBody LinkModel model) { LinkModel linkModel = service.findById(model.getId()); if (linkModel == null) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } linkModel.setName(model.getName()); linkModel.setUrl(model.getUrl()); @@ -243,7 +243,7 @@ public Result update(@RequestBody LinkModel model) { public Result delete(@PathVariable("id") Long id) { LinkModel LinkModel = service.findById(id); if (LinkModel == null) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } LinkModel delModel = service.delete(id); return new Result<>(delModel); diff --git a/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java b/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java index ac45537c..73f0d08f 100644 --- a/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java +++ b/api/src/main/java/info/xiaomo/api/controller/TechnologyController.java @@ -2,7 +2,7 @@ import info.xiaomo.api.model.TechnologyModel; import info.xiaomo.api.service.TechnologyService; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import io.swagger.annotations.Api; @@ -52,7 +52,7 @@ public TechnologyController(TechnologyService service) { public Result findById(@PathVariable Long id) { TechnologyModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -65,7 +65,7 @@ public Result findById(@PathVariable Long id) { public Result findByName(@PathVariable String name) { TechnologyModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -130,7 +130,7 @@ public Result delByIds(@PathVariable List ids) { public Result findAll() { List all = service.findAll(); if (all == null || all.isEmpty()) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(all); } @@ -153,7 +153,7 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) public Result add(@RequestBody TechnologyModel model) { TechnologyModel addModel = service.findByName(model.getName()); if (addModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } addModel = service.add(model); return new Result<>(addModel); @@ -164,7 +164,7 @@ public Result add(@RequestBody TechnologyModel model) { public Result update(@RequestBody TechnologyModel model) { TechnologyModel update = service.findById(model.getId()); if (update == null) { - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } update = service.update(model); return new Result<>(update); @@ -179,7 +179,7 @@ public Result update(@RequestBody TechnologyModel model) { public Result delete(@PathVariable Long id) { TechnologyModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.del(id); return new Result<>(model); diff --git a/api/src/main/java/info/xiaomo/api/controller/UserController.java b/api/src/main/java/info/xiaomo/api/controller/UserController.java index dd2506ec..a08662f2 100644 --- a/api/src/main/java/info/xiaomo/api/controller/UserController.java +++ b/api/src/main/java/info/xiaomo/api/controller/UserController.java @@ -2,8 +2,8 @@ import info.xiaomo.api.model.UserModel; import info.xiaomo.api.service.UserService; -import info.xiaomo.core.constant.Code; -import info.xiaomo.core.constant.GenderType; +import info.xiaomo.core.constant.CodeConst; +import info.xiaomo.core.constant.GenderConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.core.exception.UserNotFoundException; @@ -64,7 +64,7 @@ public UserController(UserService service) { public Result findUserById(@PathVariable("id") Long id) { UserModel userModel = service.findUserById(id); if (userModel == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result<>(userModel); } @@ -77,7 +77,7 @@ public Result findUserById(@PathVariable("id") Long id) { public Result addUser(@RequestBody UserModel user) { UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel != null) { - return new Result(Code.USER_REPEAT.getResultCode(), Code.USER_REPEAT.getMessage()); + return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); user.setPassword(MD5Util.encode(user.getPassword(), salt)); @@ -102,7 +102,7 @@ public Result register(@PathVariable("email") String email, @PathVariable("passw UserModel userModel = service.findUserByEmail(email); //邮箱被占用 if (userModel != null) { - return new Result(Code.USER_REPEAT.getResultCode(), Code.USER_REPEAT.getMessage()); + return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String redirectValidateUrl = MailUtil.redirectValidateUrl(email, password); MailUtil.send(email, "帐号激活邮件", redirectValidateUrl); @@ -125,11 +125,11 @@ public Result login(@PathVariable("email") String email, @PathVariable("password UserModel userModel = service.findUserByEmail(email); //找不到用户 if (userModel == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } //密码不正确 if (!MD5Util.encode(password, userModel.getSalt()).equals(userModel.getPassword())) { - return new Result(Code.AUTH_FAILED.getResultCode(), Code.AUTH_FAILED.getMessage()); + return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); } return new Result<>(userModel); } @@ -146,7 +146,7 @@ public Result login(@PathVariable("email") String email, @PathVariable("password public Result changePassword(@RequestBody UserModel user) throws UserNotFoundException { UserModel userByEmail = service.findUserByEmail(user.getEmail()); if (userByEmail == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } String salt = RandomUtil.createSalt(); userByEmail.setPassword(MD5Util.encode(user.getPassword(), salt)); @@ -167,7 +167,7 @@ public Result changePassword(@RequestBody UserModel user) throws UserNotFoundExc public Result update(@RequestBody UserModel user) throws UserNotFoundException { UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } userModel = new UserModel(); userModel.setEmail(user.getEmail()); @@ -190,7 +190,7 @@ public Result update(@RequestBody UserModel user) throws UserNotFoundException { public Result getAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -210,7 +210,7 @@ public Result getAll() { public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { UserModel userModel = service.deleteUserById(id); if (userModel == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result<>(userModel); } @@ -225,19 +225,19 @@ public Result validateEmail(@RequestBody UserModel user //数据访问层,通过email获取用户信息 UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel != null) { - return new Result(Code.USER_REPEAT.getResultCode(), Code.USER_REPEAT.getMessage()); + return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } //验证码是否过期 if (user.getRegisterTime() + TimeUtil.ONE_DAY_IN_MILLISECONDS * 2 < TimeUtil.getNowOfMills()) { LOGGER.info("用户{}使用己过期的激活码{}激活邮箱失败!", user.getEmail(), user.getEmail()); - return new Result(Code.TIME_PASSED.getResultCode(), Code.TIME_PASSED.getMessage()); + return new Result(CodeConst.TIME_PASSED.getResultCode(), CodeConst.TIME_PASSED.getMessage()); } //激活 String salt = RandomUtil.createSalt(); userModel = new UserModel(); userModel.setNickName(user.getNickName()); userModel.setEmail(user.getEmail()); - userModel.setGender(GenderType.secret); + userModel.setGender(GenderConst.secret); userModel.setValidateCode(MD5Util.encode(user.getEmail(), salt)); userModel.setPhone(0L); userModel.setSalt(salt); diff --git a/api/src/main/java/info/xiaomo/api/controller/WebSetController.java b/api/src/main/java/info/xiaomo/api/controller/WebSetController.java index 86a41b78..f59184a6 100644 --- a/api/src/main/java/info/xiaomo/api/controller/WebSetController.java +++ b/api/src/main/java/info/xiaomo/api/controller/WebSetController.java @@ -2,7 +2,7 @@ import info.xiaomo.api.model.SystemSetModel; import info.xiaomo.api.service.WebSetService; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import io.swagger.annotations.Api; @@ -50,7 +50,7 @@ public WebSetController(WebSetService service) { public Result findAll() { List list = service.findAll(); if (list.isEmpty() || list.size() == 0) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(list); @@ -155,7 +155,7 @@ public Result delByIds(@PathVariable List ids) { public Result update(@RequestBody SystemSetModel systemSetModel) { List all = service.findAll(); if (all.size() > 1) { - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } for (SystemSetModel setModel : all) { setModel.setSiteName(systemSetModel.getSiteName()); @@ -167,6 +167,6 @@ public Result update(@RequestBody SystemSetModel systemSetModel) { SystemSetModel add = service.update(setModel); return new Result(add); } - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } } diff --git a/api/src/main/java/info/xiaomo/api/controller/WorksController.java b/api/src/main/java/info/xiaomo/api/controller/WorksController.java index 13bbe4ab..e0f81a5c 100644 --- a/api/src/main/java/info/xiaomo/api/controller/WorksController.java +++ b/api/src/main/java/info/xiaomo/api/controller/WorksController.java @@ -2,7 +2,7 @@ import info.xiaomo.api.model.WorksModel; import info.xiaomo.api.service.WorksService; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import io.swagger.annotations.Api; @@ -53,7 +53,7 @@ public WorksController(WorksService service) { public Result findById(@PathVariable Long id) { WorksModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -63,7 +63,7 @@ public Result findById(@PathVariable Long id) { public Result findAll() { List all = service.findAll(); if (all == null || all.isEmpty()) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(all); } @@ -89,7 +89,7 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) public Result findByName(@PathVariable String name) { WorksModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -154,7 +154,7 @@ public Result delByIds(@PathVariable List ids) { public Result add(@RequestBody WorksModel model) { WorksModel addModel = service.findByName(model.getName()); if (addModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } addModel = service.add(model); return new Result<>(addModel); @@ -165,7 +165,7 @@ public Result add(@RequestBody WorksModel model) { public Result update(@RequestBody WorksModel model) { WorksModel worksModel = service.findById(model.getId()); if (worksModel == null) { - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } worksModel = service.update(worksModel); return new Result<>(worksModel); @@ -180,7 +180,7 @@ public Result update(@RequestBody WorksModel model) { public Result delete(@PathVariable Long id) { WorksModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.del(id); return new Result<>(model); diff --git a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java index fac3b986..c24b4b04 100644 --- a/aries/src/main/java/info/xiaomo/aries/controller/UserController.java +++ b/aries/src/main/java/info/xiaomo/aries/controller/UserController.java @@ -4,7 +4,7 @@ import info.xiaomo.aries.service.UserService; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.untils.MD5Util; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -111,7 +111,7 @@ public Result login(@PathVariable String name, @PathVariable String pas UserModel userModel = service.findByName(name); String md5Password = MD5Util.encode(password, userModel.getSalt()); if (!md5Password.equals(userModel.getPassword())) { - return new Result<>(Code.AUTH_FAILED.getResultCode(), Code.AUTH_FAILED.getMessage(), false); + return new Result<>(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage(), false); } return new Result<>(true); } diff --git a/core/src/main/java/info/xiaomo/core/constant/Code.java b/core/src/main/java/info/xiaomo/core/constant/CodeConst.java similarity index 90% rename from core/src/main/java/info/xiaomo/core/constant/Code.java rename to core/src/main/java/info/xiaomo/core/constant/CodeConst.java index 97260f6b..133fea5d 100644 --- a/core/src/main/java/info/xiaomo/core/constant/Code.java +++ b/core/src/main/java/info/xiaomo/core/constant/CodeConst.java @@ -14,7 +14,7 @@ * Description: 错误码 * Copyright(©) 2015 by xiaomo. */ -public enum Code { +public enum CodeConst { SUCCESS(200, "成功"), NOT_FOUNT(404, "找不到"), REPEAT(992, "数据重复"), @@ -30,15 +30,15 @@ public enum Code { private int resultCode; private String message; - Code(int resultCode) { + CodeConst(int resultCode) { this.resultCode = resultCode; } - Code(String message) { + CodeConst(String message) { this.message = message; } - Code(int resultCode, String message) { + CodeConst(int resultCode, String message) { this.resultCode = resultCode; this.message = message; } diff --git a/core/src/main/java/info/xiaomo/core/constant/FileType.java b/core/src/main/java/info/xiaomo/core/constant/FileConst.java similarity index 98% rename from core/src/main/java/info/xiaomo/core/constant/FileType.java rename to core/src/main/java/info/xiaomo/core/constant/FileConst.java index 0d716cb9..ddc052bd 100644 --- a/core/src/main/java/info/xiaomo/core/constant/FileType.java +++ b/core/src/main/java/info/xiaomo/core/constant/FileConst.java @@ -1,6 +1,6 @@ package info.xiaomo.core.constant; -public enum FileType { +public enum FileConst { /** * JEPG. */ @@ -219,7 +219,7 @@ public enum FileType { * * @param value */ - private FileType(String value) { + private FileConst(String value) { this.value = value; } diff --git a/core/src/main/java/info/xiaomo/core/constant/GenderType.java b/core/src/main/java/info/xiaomo/core/constant/GenderConst.java similarity index 94% rename from core/src/main/java/info/xiaomo/core/constant/GenderType.java rename to core/src/main/java/info/xiaomo/core/constant/GenderConst.java index 0a247664..735f82c4 100644 --- a/core/src/main/java/info/xiaomo/core/constant/GenderType.java +++ b/core/src/main/java/info/xiaomo/core/constant/GenderConst.java @@ -14,7 +14,7 @@ * Description: 性别 * Copyright(©) 2015 by xiaomo. **/ -public interface GenderType { +public interface GenderConst { int secret = 0; diff --git a/core/src/main/java/info/xiaomo/core/constant/Symbol.java b/core/src/main/java/info/xiaomo/core/constant/SymbolConst.java similarity index 96% rename from core/src/main/java/info/xiaomo/core/constant/Symbol.java rename to core/src/main/java/info/xiaomo/core/constant/SymbolConst.java index 6c38f33b..46be4f6a 100644 --- a/core/src/main/java/info/xiaomo/core/constant/Symbol.java +++ b/core/src/main/java/info/xiaomo/core/constant/SymbolConst.java @@ -1,6 +1,6 @@ package info.xiaomo.core.constant; -public class Symbol { +public class SymbolConst { public static final String JINHAO = "#"; public static final String AND = "&"; public static final String SHUXIAN = "\\|"; diff --git a/core/src/main/java/info/xiaomo/core/filter/CustomDateSerializer.java b/core/src/main/java/info/xiaomo/core/filter/CustomDateSerializerFilter.java similarity index 89% rename from core/src/main/java/info/xiaomo/core/filter/CustomDateSerializer.java rename to core/src/main/java/info/xiaomo/core/filter/CustomDateSerializerFilter.java index 60339915..8c58cadd 100644 --- a/core/src/main/java/info/xiaomo/core/filter/CustomDateSerializer.java +++ b/core/src/main/java/info/xiaomo/core/filter/CustomDateSerializerFilter.java @@ -9,7 +9,7 @@ import java.text.SimpleDateFormat; import java.util.Date; -public class CustomDateSerializer extends JsonSerializer { +public class CustomDateSerializerFilter extends JsonSerializer { @Override public void serialize(Date value, JsonGenerator jsonGenerator, SerializerProvider provider) throws IOException { diff --git a/core/src/main/java/info/xiaomo/core/untils/FileUtil.java b/core/src/main/java/info/xiaomo/core/untils/FileUtil.java index 3bed08f6..f9ebcefd 100644 --- a/core/src/main/java/info/xiaomo/core/untils/FileUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/FileUtil.java @@ -1,7 +1,7 @@ package info.xiaomo.core.untils; -import info.xiaomo.core.constant.FileType; -import info.xiaomo.core.constant.Symbol; +import info.xiaomo.core.constant.FileConst; +import info.xiaomo.core.constant.SymbolConst; import org.springframework.web.multipart.MultipartFile; import java.io.*; @@ -802,17 +802,17 @@ private static String getFile(String filePath) throws IOException { /** * @param filePath filePath - * @return FileType + * @return FileConst * @throws IOException */ - public static FileType getType(String filePath) throws IOException { + public static FileConst getType(String filePath) throws IOException { String fileHead = getFile(filePath); if (fileHead == null || fileHead.length() == 0) { return null; } fileHead = fileHead.toUpperCase(); - FileType[] fileTypes = FileType.values(); - for (FileType type : fileTypes) { + FileConst[] fileConsts = FileConst.values(); + for (FileConst type : fileConsts) { if (fileHead.startsWith(type.getValue())) { return type; } @@ -822,8 +822,8 @@ public static FileType getType(String filePath) throws IOException { public static String getNewFileName(String fileName, String email) { String FileType = FileUtil.getFileType(fileName); - String newName = email.split(Symbol.AT)[0]; - return (TimeUtil.getDateNow(TimeUtil.DATE_FORMAT_STRING) + Symbol.HENGXIAN + newName + Symbol.DIAN + FileType).toLowerCase(); + String newName = email.split(SymbolConst.AT)[0]; + return (TimeUtil.getDateNow(TimeUtil.DATE_FORMAT_STRING) + SymbolConst.HENGXIAN + newName + SymbolConst.DIAN + FileType).toLowerCase(); } public static boolean isImage(String imageName) { @@ -837,7 +837,7 @@ public static boolean isImage(String imageName) { public static void main(String args[]) throws Exception { System.out.println(TimeUtil.getDateNow(TimeUtil.DATE_FORMAT_STRING)); - System.out.println(getType("E:\\oscchina\\xiaomoBlogJava\\core\\src\\main\\java\\info\\xiaomo\\core\\constant\\GenderType.java")); + System.out.println(getType("E:\\oscchina\\xiaomoBlogJava\\core\\src\\main\\java\\info\\xiaomo\\core\\constant\\GenderConst.java")); } } diff --git a/core/src/main/java/info/xiaomo/core/untils/TimeUtil.java b/core/src/main/java/info/xiaomo/core/untils/TimeUtil.java index faa1da7c..4dbda3c8 100644 --- a/core/src/main/java/info/xiaomo/core/untils/TimeUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/TimeUtil.java @@ -1,7 +1,7 @@ package info.xiaomo.core.untils; -import info.xiaomo.core.constant.Symbol; +import info.xiaomo.core.constant.SymbolConst; import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.FastDateFormat; import org.slf4j.Logger; @@ -48,7 +48,7 @@ public class TimeUtil { public static final String YEAR = "yyyy"; public static final String MONTH = "MM"; public static final String DAY = "dd"; - public static final String DATE = MONTH + Symbol.HENGXIAN + DAY; + public static final String DATE = MONTH + SymbolConst.HENGXIAN + DAY; public static final String TIME_PATTERN = DATE_PATTERN_WITH_HENGXIAN + " HH:mm:ss"; public static final String DATE_PATTERN = " HH:mm:ss"; @@ -118,10 +118,10 @@ public static String date2Str(String pattern, Date aDate) { public static Date convertStringToDate(String datePattern, String strDate) { SimpleDateFormat df; Date date; - if (strDate.split(Symbol.HENGXIAN).length < 2) {//传入的时间是以 / 分割 - strDate = strDate.replace(Symbol.ZHENGXIEXIAN, Symbol.HENGXIAN); + if (strDate.split(SymbolConst.HENGXIAN).length < 2) {//传入的时间是以 / 分割 + strDate = strDate.replace(SymbolConst.ZHENGXIEXIAN, SymbolConst.HENGXIAN); } - if (strDate.split(Symbol.SPACE).length > 1) { + if (strDate.split(SymbolConst.SPACE).length > 1) { datePattern = TIME_PATTERN; } df = new SimpleDateFormat(datePattern); @@ -140,8 +140,8 @@ public static Date convertStringToDate(String datePattern, String strDate) { */ public static Date convertStringToDate(String strDate) { Date aDate; - if (strDate.split(Symbol.HENGXIAN).length < 2) {//传入的时间是以 / 分割 - strDate = strDate.replace(Symbol.ZHENGXIEXIAN, Symbol.HENGXIAN); + if (strDate.split(SymbolConst.HENGXIAN).length < 2) {//传入的时间是以 / 分割 + strDate = strDate.replace(SymbolConst.ZHENGXIEXIAN, SymbolConst.HENGXIAN); } aDate = convertStringToDate(DATE_PATTERN_WITH_HENGXIAN, strDate); return aDate; diff --git a/core/src/main/java/info/xiaomo/core/untils/TokenUtil.java b/core/src/main/java/info/xiaomo/core/untils/TokenUtil.java index be095862..1806057c 100644 --- a/core/src/main/java/info/xiaomo/core/untils/TokenUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/TokenUtil.java @@ -1,8 +1,7 @@ package info.xiaomo.core.untils; import com.alibaba.fastjson.JSONObject; -import info.xiaomo.core.constant.Symbol; -import org.apache.commons.lang3.RandomStringUtils; +import info.xiaomo.core.constant.SymbolConst; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -36,8 +35,8 @@ public static String getAccessToken(String string) { if (m2.find()) { accessToken = m2.group(1); } else { - String temp = string.split(Symbol.DENGHAO)[1]; - accessToken = temp.split(Symbol.AND)[0]; + String temp = string.split(SymbolConst.DENGHAO)[1]; + accessToken = temp.split(SymbolConst.AND)[0]; } } } diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java index 9cdc9c59..512d36aa 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java @@ -1,6 +1,6 @@ package info.xiaomo.mongodb.controller; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.Result; import info.xiaomo.mongodb.model.MongoUser; import info.xiaomo.mongodb.service.MongoUserService; @@ -54,7 +54,7 @@ public Result add(@RequestBody MongoUser user) { @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) public Result delete(@PathVariable("id") Long id) { service.delete(id); - return new Result(Code.SUCCESS.getResultCode(), Code.SUCCESS.getMessage()); + return new Result(CodeConst.SUCCESS.getResultCode(), CodeConst.SUCCESS.getMessage()); } } diff --git a/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java b/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java index bac5f3f6..d47d2b1f 100644 --- a/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java +++ b/readerApplication/src/main/java/info/xiaomo/reader/controller/UserController.java @@ -1,10 +1,10 @@ package info.xiaomo.reader.controller; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.reader.model.UserModel; import info.xiaomo.reader.service.UserService; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; -import info.xiaomo.core.constant.Code; import info.xiaomo.core.exception.UserNotFoundException; import info.xiaomo.core.untils.MD5Util; import info.xiaomo.core.untils.MailUtil; @@ -60,7 +60,7 @@ public UserController(UserService service) { public Result findById(@PathVariable("id") Long id) { UserModel userModel = service.findById(id); if (userModel == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result<>(userModel); } @@ -106,7 +106,7 @@ public Result delById(@PathVariable Long id) { public Result add(@RequestBody UserModel user) { UserModel userModel = service.findByName(user.getEmail()); if (userModel != null) { - return new Result<>(Code.USER_REPEAT.getResultCode(), Code.USER_REPEAT.getMessage()); + return new Result<>(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); user.setPassword(MD5Util.encode(user.getPassword(), salt)); @@ -130,7 +130,7 @@ public Result register(@PathVariable("email") String email, @PathVariabl UserModel userModel = service.findByName(email); //邮箱被占用 if (userModel != null) { - return new Result<>(Code.USER_REPEAT.getResultCode(), Code.USER_REPEAT.getMessage()); + return new Result<>(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String redirectValidateUrl = MailUtil.redirectValidateUrl(email, password); MailUtil.send(email, "帐号激活邮件", redirectValidateUrl); @@ -153,11 +153,11 @@ public Result login(@PathVariable("email") String email, @PathVariabl UserModel userModel = service.findByName(email); //找不到用户 if (userModel == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } //密码不正确 if (!MD5Util.encode(password, userModel.getSalt()).equals(userModel.getPassword())) { - return new Result<>(Code.AUTH_FAILED.getResultCode(), Code.AUTH_FAILED.getMessage()); + return new Result<>(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); } return new Result<>(userModel); } @@ -174,7 +174,7 @@ public Result login(@PathVariable("email") String email, @PathVariabl public Result changePassword(@RequestBody UserModel user) throws UserNotFoundException { UserModel userByEmail = service.findByName(user.getEmail()); if (userByEmail == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } String salt = RandomUtil.createSalt(); userByEmail.setPassword(MD5Util.encode(user.getPassword(), salt)); @@ -194,7 +194,7 @@ public Result changePassword(@RequestBody UserModel user) throws UserNo public Result update(@RequestBody UserModel user) { UserModel userModel = service.findByName(user.getEmail()); if (userModel == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } userModel = new UserModel(); userModel.setEmail(user.getEmail()); @@ -225,7 +225,7 @@ public Result delByIds(@PathVariable List ids) { public Result> findAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -258,7 +258,7 @@ public Result> findAll(@PathVariable int start, @PathVariable in public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { boolean userModel = service.deleteById(id); if (!userModel) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result<>(true); } diff --git a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java index aa0a5c81..9bd81035 100644 --- a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java @@ -1,6 +1,6 @@ package info.xiaomo.website.controller; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.core.exception.UserNotFoundException; @@ -60,10 +60,10 @@ public AdminUserController(AdminUserService service) { public Result login(@PathVariable("userName") String userName, @PathVariable("password") String password) { AdminModel adminModel = service.findAdminUserByUserName(userName); if (adminModel == null) { - return new Result(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } if (!MD5Util.encode(password, adminModel.getSalt()).equals(adminModel.getPassword())) { - return new Result(Code.AUTH_FAILED.getResultCode(), Code.AUTH_FAILED.getMessage()); + return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); } return new Result<>(adminModel); } @@ -78,7 +78,7 @@ public Result login(@PathVariable("userName") String userName, @PathVariable("pa public Result add(@RequestBody AdminModel model) { AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); if (adminModel != null) { - return new Result(Code.ADMIN_USER_REPEAT.getResultCode(), Code.ADMIN_USER_REPEAT.getMessage()); + return new Result(CodeConst.ADMIN_USER_REPEAT.getResultCode(), CodeConst.ADMIN_USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); model.setSalt(salt); @@ -97,7 +97,7 @@ public Result add(@RequestBody AdminModel model) { public Result findUserById(@PathVariable("id") Long id) { AdminModel adminModel = service.findAdminUserById(id); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(adminModel); } @@ -132,7 +132,7 @@ public Result findById(@PathVariable Long id) { public Result findByName(@PathVariable("userName") String userName) { AdminModel adminModel = service.findAdminUserByUserName(userName); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(adminModel); } @@ -203,7 +203,7 @@ public Result delByIds(@PathVariable List ids) { public Result changePassword(@RequestBody AdminModel model) throws UserNotFoundException { AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } String salt = RandomUtil.createSalt(); adminModel.setSalt(salt); @@ -238,7 +238,7 @@ public Result getAll() { public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { AdminModel adminModel = service.findAdminUserById(id); if (adminModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.deleteAdminUserById(id); return new Result<>(adminModel); @@ -273,7 +273,7 @@ public Result update(@PathVariable("userName") String userName) throws UserNotFo public Result forbid(@PathVariable("id") Long id) throws UserNotFoundException { AdminModel model = service.findAdminUserById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } model = service.forbidAdminUserById(id); return new Result<>(model); diff --git a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java index 1885e5f2..faf8fd8e 100644 --- a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java +++ b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java @@ -1,6 +1,6 @@ package info.xiaomo.website.controller; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.website.model.ChangeLogModel; @@ -50,7 +50,7 @@ public ChangeLogController(ChangeLogService service) { public Result findById(@PathVariable("id") Long id) { ChangeLogModel changeLogModel = service.findById(id); if (changeLogModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(changeLogModel); } @@ -64,7 +64,7 @@ public Result findById(@PathVariable("id") Long id) { public Result findByName(@PathVariable("name") String name) { ChangeLogModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -133,7 +133,7 @@ public Result delByIds(@PathVariable List ids) { public Result findAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -159,7 +159,7 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) public Result add(@RequestBody ChangeLogModel model) { ChangeLogModel changeLogModel = service.findByName(model.getName()); if (changeLogModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } changeLogModel = new ChangeLogModel(); changeLogModel.setName(model.getName()); @@ -178,7 +178,7 @@ public Result add(@RequestBody ChangeLogModel model) { public Result update(@RequestBody ChangeLogModel model) { ChangeLogModel changeLogModel = service.findByName(model.getName()); if (changeLogModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } changeLogModel.setName(model.getName()); changeLogModel.setOnlineTime(model.getOnlineTime()); @@ -194,7 +194,7 @@ public Result update(@RequestBody ChangeLogModel model) { public Result deleteById(@PathVariable("id") Long id) { ChangeLogModel changeLogModel = service.findById(id); if (changeLogModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } ChangeLogModel delModel = service.delete(id); return new Result<>(delModel); diff --git a/website/src/main/java/info/xiaomo/website/controller/LinkController.java b/website/src/main/java/info/xiaomo/website/controller/LinkController.java index e63e7c10..3683de3a 100644 --- a/website/src/main/java/info/xiaomo/website/controller/LinkController.java +++ b/website/src/main/java/info/xiaomo/website/controller/LinkController.java @@ -1,6 +1,6 @@ package info.xiaomo.website.controller; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.website.model.LinkModel; @@ -50,7 +50,7 @@ public LinkController(LinkService service) { public Result findLinkById(@PathVariable("id") Long id) { LinkModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -65,7 +65,7 @@ public Result findLinkById(@PathVariable("id") Long id) { public Result findByName(@PathVariable("name") String name) { LinkModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -135,7 +135,7 @@ public Result delByIds(@PathVariable List ids) { public Result findAll() { List pages = service.findAll(); if (pages == null || pages.size() == 0) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -172,7 +172,7 @@ public Result findById(@PathVariable Long id) { public Result add(@RequestBody LinkModel model) { LinkModel linkModel = service.findByName(model.getName()); if (linkModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } linkModel = new LinkModel(); linkModel.setName(model.getName()); @@ -190,7 +190,7 @@ public Result add(@RequestBody LinkModel model) { public Result update(@RequestBody LinkModel model) { LinkModel linkModel = service.findById(model.getId()); if (linkModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } linkModel.setName(model.getName()); linkModel.setUrl(model.getUrl()); @@ -208,7 +208,7 @@ public Result update(@RequestBody LinkModel model) { public Result delete(@PathVariable("id") Long id) { LinkModel LinkModel = service.findById(id); if (LinkModel == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } LinkModel delModel = service.delete(id); return new Result<>(delModel); diff --git a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java index 47131665..e56d727c 100644 --- a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java +++ b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java @@ -1,6 +1,6 @@ package info.xiaomo.website.controller; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.website.model.TechnologyModel; @@ -46,7 +46,7 @@ public TechnologyController(TechnologyService service) { public Result findById(@PathVariable Long id) { TechnologyModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -55,7 +55,7 @@ public Result findById(@PathVariable Long id) { public Result findByName(@PathVariable String name) { TechnologyModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -89,7 +89,7 @@ public Result delByIds(@PathVariable List ids) { public Result findAll() { List all = service.findAll(); if (all == null || all.isEmpty()) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(all); } @@ -104,7 +104,7 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) public Result add(@RequestBody TechnologyModel model) { TechnologyModel addModel = service.findByName(model.getName()); if (addModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } addModel = service.add(model); return new Result<>(addModel); @@ -114,7 +114,7 @@ public Result add(@RequestBody TechnologyModel model) { public Result update(@RequestBody TechnologyModel model) { TechnologyModel update = service.findById(model.getId()); if (update == null) { - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } update = service.update(model); return new Result<>(update); @@ -125,7 +125,7 @@ public Result update(@RequestBody TechnologyModel model) { public Result delete(@PathVariable Long id) { TechnologyModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.del(id); return new Result<>(model); diff --git a/website/src/main/java/info/xiaomo/website/controller/UserController.java b/website/src/main/java/info/xiaomo/website/controller/UserController.java index 64edcd87..3fec5bec 100644 --- a/website/src/main/java/info/xiaomo/website/controller/UserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/UserController.java @@ -3,8 +3,8 @@ import freemarker.template.Configuration; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; -import info.xiaomo.core.constant.Code; -import info.xiaomo.core.constant.GenderType; +import info.xiaomo.core.constant.CodeConst; +import info.xiaomo.core.constant.GenderConst; import info.xiaomo.core.exception.UserNotFoundException; import info.xiaomo.core.untils.MD5Util; import info.xiaomo.core.untils.RandomUtil; @@ -123,7 +123,7 @@ public String register(@RequestParam("email") String email, public Result changePassword(@RequestBody UserModel user) throws UserNotFoundException { UserModel userByEmail = service.findUserByEmail(user.getEmail()); if (userByEmail == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } String salt = RandomUtil.createSalt(); userByEmail.setPassword(MD5Util.encode(user.getPassword(), salt)); @@ -143,7 +143,7 @@ public Result changePassword(@RequestBody UserModel user) throws User public Result update(@RequestBody UserModel user) throws UserNotFoundException { UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } userModel = new UserModel(); userModel.setEmail(user.getEmail()); @@ -185,7 +185,7 @@ public String validateEmail( userModel = new UserModel(); userModel.setNickName(email); userModel.setEmail(email); - userModel.setGender(GenderType.secret); + userModel.setGender(GenderConst.secret); userModel.setPhone(0L); userModel.setSalt(salt); userModel.setAddress(""); @@ -223,7 +223,7 @@ public String logout(HttpSession session){ public Result findUserById(@PathVariable("id") Long id) { UserModel userModel = service.findUserById(id); if (userModel == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result<>(userModel); } @@ -235,7 +235,7 @@ public Result findUserById(@PathVariable("id") Long id) { public Result addUser(@RequestBody UserModel user) { UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel != null) { - return new Result<>(Code.USER_REPEAT.getResultCode(), Code.USER_REPEAT.getMessage()); + return new Result<>(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); user.setPassword(MD5Util.encode(user.getPassword(), salt)); @@ -254,7 +254,7 @@ public Result addUser(@RequestBody UserModel user) { public Result> getAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result<>(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result<>(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(pages); } @@ -270,7 +270,7 @@ public Result> getAll() { public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { UserModel userModel = service.deleteUserById(id); if (userModel == null) { - return new Result<>(Code.USER_NOT_FOUND.getResultCode(), Code.USER_NOT_FOUND.getMessage()); + return new Result<>(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result<>(userModel); } diff --git a/website/src/main/java/info/xiaomo/website/controller/WebSetController.java b/website/src/main/java/info/xiaomo/website/controller/WebSetController.java index b0dffb32..afed833d 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WebSetController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WebSetController.java @@ -1,6 +1,6 @@ package info.xiaomo.website.controller; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.website.model.SystemSetModel; @@ -49,7 +49,7 @@ public WebSetController(WebSetService service) { public Result findAll() { List list = service.findAll(); if (list.isEmpty() || list.size() == 0) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(list); @@ -154,7 +154,7 @@ public Result delByIds(@PathVariable List ids) { public Result update(@RequestBody SystemSetModel systemSetModel) { List all = service.findAll(); if (all.size() > 1) { - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } for (SystemSetModel setModel : all) { setModel.setSiteName(systemSetModel.getSiteName()); @@ -166,6 +166,6 @@ public Result update(@RequestBody SystemSetModel systemSetModel) { SystemSetModel add = service.update(setModel); return new Result<>(add); } - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } } diff --git a/website/src/main/java/info/xiaomo/website/controller/WorksController.java b/website/src/main/java/info/xiaomo/website/controller/WorksController.java index 7f637f98..ae0d206a 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WorksController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WorksController.java @@ -2,7 +2,7 @@ import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; -import info.xiaomo.core.constant.Code; +import info.xiaomo.core.constant.CodeConst; import info.xiaomo.website.model.WorksModel; import info.xiaomo.website.service.WorksService; import org.springframework.beans.factory.annotation.Autowired; @@ -47,7 +47,7 @@ public WorksController(WorksService service) { public Result findById(@PathVariable Long id) { WorksModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -56,7 +56,7 @@ public Result findById(@PathVariable Long id) { public Result findAll() { List all = service.findAll(); if (all == null || all.isEmpty()) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(all); } @@ -71,7 +71,7 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) public Result findByName(@PathVariable String name) { WorksModel model = service.findByName(name); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result<>(model); } @@ -105,7 +105,7 @@ public Result delByIds(@PathVariable List ids) { public Result add(@RequestBody WorksModel model) { WorksModel addModel = service.findByName(model.getName()); if (addModel != null) { - return new Result(Code.REPEAT.getResultCode(), Code.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } addModel = service.add(model); return new Result<>(addModel); @@ -115,7 +115,7 @@ public Result add(@RequestBody WorksModel model) { public Result update(@RequestBody WorksModel model) { WorksModel worksModel = service.findById(model.getId()); if (worksModel == null) { - return new Result(Code.CodeOR.getResultCode(), Code.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } worksModel = service.update(worksModel); return new Result<>(worksModel); @@ -126,7 +126,7 @@ public Result update(@RequestBody WorksModel model) { public Result delete(@PathVariable Long id) { WorksModel model = service.findById(id); if (model == null) { - return new Result(Code.NULL_DATA.getResultCode(), Code.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.del(id); return new Result<>(model); From 49b6dc980d0c51fcd3aeb83e06b0612454a94048 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Thu, 11 May 2017 18:05:37 +0800 Subject: [PATCH 016/221] =?UTF-8?q?=E6=95=B4=E7=90=86=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../info/xiaomo/core/untils/HtmlUtil.java | 159 ++++++++ .../info/xiaomo/core/untils/RandomUtil.java | 59 ++- .../java/info/xiaomo/core/untils/SqlUtil.java | 69 ++++ .../info/xiaomo/core/untils/StringUtil.java | 348 +++++++----------- 4 files changed, 404 insertions(+), 231 deletions(-) create mode 100644 core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java create mode 100644 core/src/main/java/info/xiaomo/core/untils/SqlUtil.java diff --git a/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java b/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java new file mode 100644 index 00000000..f33853b8 --- /dev/null +++ b/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java @@ -0,0 +1,159 @@ +package info.xiaomo.core.untils; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 把今天最好的表现当作明天最新的起点..~ + * いま 最高の表現 として 明日最新の始発..~ + * Today the best performance as tomorrow newest starter! + * Created by IntelliJ IDEA. + *

+ * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiamoo.info + * QQ_NO: 83387856 + * Date: 17/5/11 17:57 + * Description: + * Copyright(©) 2017 by xiaomo. + */ +public class HtmlUtil { + + + /** + * 是否包含有HTML标签 + * + * @param str 字符串 + * @return 是否包含html标签 + */ + public static boolean containsHTMLTag(String str) { + if (StringUtil.isBlank(str)) { + return false; + } + + String pattern = "<\\s*(\\S+)(\\s[^>]*)?>[\\s\\S]*<\\s*/\\1\\s*>"; + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(str); + return m.find(); + } + + /** + * 用于将字符串中的特殊字符转换成Web页中可以安全显示的字符串 + * 可对表单数据据进行处理对一些页面特殊字符进行处理如'<','>','"',''','&' + * + * @param strSrc 要进行替换操作的字符串 + * @return 替换特殊字符后的字符串 + * @since 1.0 + */ + + public static String htmlEncode(String strSrc) { + if (strSrc == null) + return ""; + char[] arr_cSrc = strSrc.toCharArray(); + StringBuilder buf = new StringBuilder(arr_cSrc.length); + char ch; + for (char anArr_cSrc : arr_cSrc) { + ch = anArr_cSrc; + + if (ch == '<') + buf.append("<"); + else if (ch == '>') + buf.append(">"); + else if (ch == '"') + buf.append("""); + else if (ch == '\'') + buf.append("'"); + else if (ch == '&') + buf.append("&"); + else + buf.append(ch); + } + + return buf.toString(); + } + + /** + * 用于将字符串中的特殊字符转换成Web页中可以安全显示的字符串 + * 可对表单数据据进行处理对一些页面特殊字符进行处理如'<','>','"',''','&' + * + * @param strSrc 要进行替换操作的字符串 + * @param quotes 为0时单引号和双引号都替换,为1时不替换单引号,为2时不替换双引号,为3时单引号和双引号都不替换 + * @return 替换特殊字符后的字符串 + * @since 1.0 + */ + public static String htmlEncode(String strSrc, int quotes) { + + if (strSrc == null) + return ""; + if (quotes == 0) { + return htmlEncode(strSrc); + } + + char[] arr_cSrc = strSrc.toCharArray(); + StringBuffer buf = new StringBuffer(arr_cSrc.length); + char ch; + + for (int i = 0; i < arr_cSrc.length; i++) { + ch = arr_cSrc[i]; + if (ch == '<') + buf.append("<"); + else if (ch == '>') + buf.append(">"); + else if (ch == '"' && quotes == 1) + buf.append("""); + else if (ch == '\'' && quotes == 2) + buf.append("'"); + else if (ch == '&') + buf.append("&"); + else + buf.append(ch); + } + + return buf.toString(); + } + + /** + * 和htmlEncode正好相反 + * + * @param strSrc 要进行转换的字符串 + * @return 转换后的字符串 + * @since 1.0 + */ + public static String htmlDecode(String strSrc) { + if (strSrc == null) + return ""; + strSrc = strSrc.replaceAll("<", "<"); + strSrc = strSrc.replaceAll(">", ">"); + strSrc = strSrc.replaceAll(""", "\""); + strSrc = strSrc.replaceAll("'", "'"); + strSrc = strSrc.replaceAll("&", "&"); + return strSrc; + } + + /** + * 去除html tag + * + * @param htmlStr html + * @return string + */ + public static String delHTMLTag(String htmlStr) { + String regEx_script = "]*?>[\\s\\S]*?<\\/script>"; //定义script的正则表达式 + String regEx_style = "]*?>[\\s\\S]*?<\\/style>"; //定义style的正则表达式 + String regEx_html = "<[^>]+>"; //定义HTML标签的正则表达式 + + Pattern p_script = Pattern.compile(regEx_script, Pattern.CASE_INSENSITIVE); + Matcher m_script = p_script.matcher(htmlStr); + htmlStr = m_script.replaceAll(""); //过滤script标签 + + Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE); + Matcher m_style = p_style.matcher(htmlStr); + htmlStr = m_style.replaceAll(""); //过滤style标签 + + Pattern p_html = Pattern.compile(regEx_html, Pattern.CASE_INSENSITIVE); + Matcher m_html = p_html.matcher(htmlStr); + htmlStr = m_html.replaceAll(""); //过滤html标签 + + return htmlStr.trim(); //返回文本字符串 + } + +} diff --git a/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java b/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java index e7ac17e6..9e1ad42d 100644 --- a/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/RandomUtil.java @@ -6,6 +6,7 @@ */ package info.xiaomo.core.untils; +import org.apache.commons.lang3.RandomStringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,7 +20,8 @@ */ public class RandomUtil { private static final Logger LOGGER = LoggerFactory.getLogger(RandomUtil.class); - + private static final String NUM_S = "0123456789"; + private static final String STR_S = "abcdefghijklmnopqrstuvwxyz0123456789"; /** * 随机产生min到max之间的一个整数值,包含min和max */ @@ -61,6 +63,34 @@ public static T randomElement(Collection collection) { return null; } + + /** + * 生成一个10位的tonken用于http cache(纯数字) + * + * @return String 返回类型(纯数字) + */ + public static String getTonken() { + return RandomStringUtils.random(10, NUM_S); + } + + /** + * 生成随机数 + * + * @return String 返回类型 + */ + public static String randomPwd(int count) { + return RandomStringUtils.random(count, STR_S); + } + + /** + * 生成随机数 + * + * @return String 返回类型 + */ + public static String randomPwd() { + return RandomStringUtils.random(10, STR_S); + } + /** * 从指定的元素数组中随机出一个元素 * @@ -121,19 +151,22 @@ public static int randomIndexByProb(int[] array) { return randomIndexByProb(list); } + /** + * 生成盐值 + * @return + */ public static String createSalt() { - String[] str = {"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"}; - int number = str.length; - //接收随机字符 - String text = ""; - Random random = new Random(); - //随机产生4个字符的字符串 - for (int i = 0; i < 10; i++) { - text += str[random.nextInt(number)]; - } - return text; + return randomPwd(10); + } + + + /** + * 生成盐值 + * @param count + * @return + */ + public static String createSalt(int count) { + return randomPwd(count); } public static void main(String[] args) { diff --git a/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java b/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java new file mode 100644 index 00000000..f4e55d9c --- /dev/null +++ b/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java @@ -0,0 +1,69 @@ +package info.xiaomo.core.untils; + +import org.apache.commons.lang3.StringUtils; + +import java.util.Arrays; +import java.util.StringTokenizer; + +/** + * 把今天最好的表现当作明天最新的起点..~ + * いま 最高の表現 として 明日最新の始発..~ + * Today the best performance as tomorrow newest starter! + * Created by IntelliJ IDEA. + *

+ * author: xiaomo + * github: https://github.com/syoubaku + * email: xiaomo@xiamoo.info + * QQ_NO: 83387856 + * Date: 17/5/11 17:56 + * Description: + * Copyright(©) 2017 by xiaomo. + */ +public class SqlUtil { + + + /** + * 功能描述: 生成sql占位符 ?,?,? + * + * @return String 返回类型 + */ + public static String sqlHolder(int size) { + String[] paras = new String[size]; + Arrays.fill(paras, "?"); + return StringUtils.join(paras, ','); + } + + /* + * + */ + private String delSQlString(String sql) { + StringBuilder delSql = new StringBuilder("in("); + StringTokenizer Tokenizer = new StringTokenizer(sql, "|"); + + // 标记本身等于分隔符的特殊情况 + delSql.append(Tokenizer.nextToken()); + while (Tokenizer.hasMoreTokens()) { + delSql.append(Tokenizer.nextToken()).append(","); + } + delSql = new StringBuilder(delSql.substring(0, delSql.length() - 1) + ")"); + return delSql.toString(); + } + + private String delNewSQlString(String sql) { + return "in (" + sql.replace('|', ',') + ")"; + } + + /** + * sql语句 处理 + * + * @param sql 要进行处理的sql语句 + * @param dbtype 数据库类型 + * @return 处理后的sql语句 + */ + public static String sql4DB(String sql, String dbtype) { + if (!dbtype.equalsIgnoreCase("oracle")) { + sql = StringUtil.toISO(sql); + } + return sql; + } +} diff --git a/core/src/main/java/info/xiaomo/core/untils/StringUtil.java b/core/src/main/java/info/xiaomo/core/untils/StringUtil.java index 7830d3e8..36386f9b 100644 --- a/core/src/main/java/info/xiaomo/core/untils/StringUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/StringUtil.java @@ -1,6 +1,5 @@ package info.xiaomo.core.untils; -import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; import javax.servlet.http.HttpServletRequest; @@ -12,17 +11,16 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; + /** * 对字符串的简单处理 - * + *

* author L.cm + * * @date 2013-6-6 下午5:08:06 */ public class StringUtil extends StringUtils { - private static final String NUM_S = "0123456789"; - private static final String STR_S = "abcdefghijklmnopqrstuvwxyz0123456789"; - private final static String[] hex = {"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0A", "0B", "0C", "0D", "0E", "0F", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1A", "1B", @@ -73,62 +71,99 @@ public class StringUtil extends StringUtils { 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F}; + /** - * 截取文字safe 中文 + * ip正则表达式 + */ + public static final String IP_REGEX = "([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\." + "(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}"; + + private static final char[] QUOTE_ENCODE = """.toCharArray(); + private static final char[] AMP_ENCODE = "&".toCharArray(); + private static final char[] LT_ENCODE = "<".toCharArray(); + private static final char[] GT_ENCODE = ">".toCharArray(); + + /** + * 是否是空字符串 * - * @return String 返回类型 + * @param str 字符串 + * @return 是否为空 */ - public static String subCn(String string, int length, String more) { - if (StringUtils.isNotEmpty(string)) { - char[] chars = string.toCharArray(); - if (chars.length > length) { - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < length; i++) { - sb.append(chars[i]); - } - sb.append(more); - return sb.toString(); - } + public static boolean isBlank(String str) { + if (str == null || str.trim().isEmpty()) { + return true; } - return string; + return false; } /** - * 生成一个10位的tonken用于http cache + * String数组转成int数组 * - * @return String 返回类型 + * @param numbers String[] + * @return List */ - public static String getTonken() { - return RandomStringUtils.random(10, NUM_S); + public static List strArrToIntList(String[] numbers) { + List intArr = new ArrayList<>(); + for (String number : numbers) { + intArr.add(Integer.parseInt(number)); + } + return intArr; } /** - * 生成随机数 + * String数组转成int数组 * - * @return String 返回类型 + * @param numbers String[] + * @return int[] */ - public static String randomPwd(int count) { - return RandomStringUtils.random(count, STR_S); + public static int[] strArrToIntArr(String[] numbers) { + int[] intArr = new int[numbers.length]; + for (int i = 0; i < numbers.length; i++) { + intArr[i] = Integer.parseInt(numbers[i]); + } + return intArr; } + /** + * 根据指定的分隔符将字符串转为int数组 + * + * @param source 字符串 + * @param split 分割符 + * @return int[] + */ + public static int[] strToIntArr(String source, String split) { + if (isBlank(source)) { + return new int[0]; + } + String[] numbers = source.split(split); + return strArrToIntArr(numbers); + } /** - * 百度获ip获取到的城市处理 供大众点评 + * 截取文字safe 中文 + * * @return String 返回类型 */ - public static String cityMatcher(String city) { - String regex = "(.+)[市|省|自治区]"; - Pattern pattern = Pattern.compile(regex); - Matcher matcher = pattern.matcher(city); - if (matcher.matches()) { - return matcher.group(1); - } else { - return null; + public static String subCn(String string, int length, String more) { + if (StringUtils.isNotEmpty(string)) { + char[] chars = string.toCharArray(); + if (chars.length > length) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + sb.append(chars[i]); + } + sb.append(more); + return sb.toString(); + } } + return string; } + + + /** * 字符串全角转半角 + * * @return String 返回类型 */ public static String togglecase(String string) { @@ -139,16 +174,6 @@ public static String togglecase(String string) { return sb.toString(); } - /** - * 功能描述: 生成sql占位符 ?,?,? - * - * @return String 返回类型 - */ - public static String sqlHolder(int size) { - String[] paras = new String[size]; - Arrays.fill(paras, "?"); - return StringUtils.join(paras, ','); - } /** * 计算文字长度-.-无中文问题 @@ -187,6 +212,8 @@ public static String replace(String s, Map map) { /** * 获取ip + * + * @return ip 如果返回null,说明是一个不合法的ip地址格式 */ public static String getIP(HttpServletRequest request) { String ip = request.getHeader("X-Requested-For"); @@ -208,6 +235,9 @@ public static String getIP(HttpServletRequest request) { if (StringUtils.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) { ip = request.getRemoteAddr(); } + if (!ip.matches(IP_REGEX)) { + return null; + } return ip; } @@ -312,30 +342,7 @@ public static String convertHtml(String input) { return returnString.toString(); } - /* - * - */ - private String delSQlString(String sql) { - String delSql = "in("; - StringTokenizer Tokenizer = new StringTokenizer(sql, "|"); - - // 标记本身等于分隔符的特殊情况 - delSql += Tokenizer.nextToken(); - while (Tokenizer.hasMoreTokens()) { - delSql += Tokenizer.nextToken() + ","; - } - delSql = delSql.substring(0, delSql.length() - 1) + ")"; - return delSql; - } - - private String delNewSQlString(String sql) { - return "in (" + sql.replace('|', ',') + ")"; - } - private static final char[] QUOTE_ENCODE = """.toCharArray(); - private static final char[] AMP_ENCODE = "&".toCharArray(); - private static final char[] LT_ENCODE = "<".toCharArray(); - private static final char[] GT_ENCODE = ">".toCharArray(); /** * This method takes a string which may contain HTML tags (ie, <b>, @@ -405,11 +412,61 @@ public static String filterString(String allstr) { */ public static String convertNumToMoney(int num) { NumberFormat formatc = NumberFormat.getCurrencyInstance(Locale.CHINA); - String strcurr = formatc.format(num); - System.out.println(strcurr); - return strcurr; + return formatc.format(num); + } + + + /** + * 数字的金额表达式 + * @param num 金额 + * @param inLocale 币种 + * @return 处理好的币种 + */ + public static String convertNumToMoney(int num,Locale inLocale) { + NumberFormat formatc = NumberFormat.getCurrencyInstance(inLocale); + return formatc.format(num); + } + + /** + * 格式化字符串,如果没有对应的参数则按照原样输出 + *

+ *

    + * 例如: + *
  • "获得{0}元宝,20"输出"获得20元宝"
  • + *
  • "{0}获得{1}元宝,XX"输出"XX获得{1}元宝"
  • + *
  • "{0}获得{1}元宝,XX,20"输出"XX获得20元宝"
  • + *
+ * + * @param str + * @param params + * @return + */ + public static String format(String str, Object... params) { + if (isBlank(str)) { + return str; + } + if (params == null || params.length == 0) { + return str; + } + Pattern p = Pattern.compile("\\{(\\d+)}"); + Matcher m = p.matcher(str); + StringBuffer sb = new StringBuffer(); + while (m.find()) { + String param = m.group(); + int index = Integer.parseInt(m.group(1)); + if (params.length > index) { + Object obj = params[index]; + if (obj != null) { + param = obj.toString(); + } + } + m.appendReplacement(sb, param); + } + m.appendTail(sb); + return sb.toString(); } + /** *
      * 例:
@@ -455,98 +512,7 @@ public static String replace(String strSrc, String strOld, String strNew) {
         return strSrc;
     }
 
-    /**
-     * 用于将字符串中的特殊字符转换成Web页中可以安全显示的字符串
-     * 可对表单数据据进行处理对一些页面特殊字符进行处理如'<','>','"',''','&'
-     *
-     * @param strSrc 要进行替换操作的字符串
-     * @return 替换特殊字符后的字符串
-     * @since 1.0
-     */
 
-    public static String htmlEncode(String strSrc) {
-        if (strSrc == null)
-            return "";
-        char[] arr_cSrc = strSrc.toCharArray();
-        StringBuilder buf = new StringBuilder(arr_cSrc.length);
-        char ch;
-        for (char anArr_cSrc : arr_cSrc) {
-            ch = anArr_cSrc;
-
-            if (ch == '<')
-                buf.append("<");
-            else if (ch == '>')
-                buf.append(">");
-            else if (ch == '"')
-                buf.append(""");
-            else if (ch == '\'')
-                buf.append("'");
-            else if (ch == '&')
-                buf.append("&");
-            else
-                buf.append(ch);
-        }
-
-        return buf.toString();
-    }
-
-    /**
-     * 用于将字符串中的特殊字符转换成Web页中可以安全显示的字符串
-     * 可对表单数据据进行处理对一些页面特殊字符进行处理如'<','>','"',''','&'
-     *
-     * @param strSrc 要进行替换操作的字符串
-     * @param quotes 为0时单引号和双引号都替换,为1时不替换单引号,为2时不替换双引号,为3时单引号和双引号都不替换
-     * @return 替换特殊字符后的字符串
-     * @since 1.0
-     */
-    public static String htmlEncode(String strSrc, int quotes) {
-
-        if (strSrc == null)
-            return "";
-        if (quotes == 0) {
-            return htmlEncode(strSrc);
-        }
-
-        char[] arr_cSrc = strSrc.toCharArray();
-        StringBuffer buf = new StringBuffer(arr_cSrc.length);
-        char ch;
-
-        for (int i = 0; i < arr_cSrc.length; i++) {
-            ch = arr_cSrc[i];
-            if (ch == '<')
-                buf.append("<");
-            else if (ch == '>')
-                buf.append(">");
-            else if (ch == '"' && quotes == 1)
-                buf.append(""");
-            else if (ch == '\'' && quotes == 2)
-                buf.append("'");
-            else if (ch == '&')
-                buf.append("&");
-            else
-                buf.append(ch);
-        }
-
-        return buf.toString();
-    }
-
-    /**
-     * 和htmlEncode正好相反
-     *
-     * @param strSrc 要进行转换的字符串
-     * @return 转换后的字符串
-     * @since 1.0
-     */
-    public static String htmlDecode(String strSrc) {
-        if (strSrc == null)
-            return "";
-        strSrc = strSrc.replaceAll("<", "<");
-        strSrc = strSrc.replaceAll(">", ">");
-        strSrc = strSrc.replaceAll(""", "\"");
-        strSrc = strSrc.replaceAll("'", "'");
-        strSrc = strSrc.replaceAll("&", "&");
-        return strSrc;
-    }
 
     /**
      * 在将数据存入数据库前转换
@@ -655,11 +621,9 @@ public static String UTF82ISO(String strVal) {
      *
      * @param str 要进行处理的字符串
      * @return 转换后的字符串
-     * @see fs_com.utils.CTools#toChinese
-     * @see fs_com.utils.CTools#null2Blank
      */
     public static String toChineseAndHtmlEncode(String str, int quotes) {
-        return htmlEncode(toChinese(str), quotes);
+        return HtmlUtil.htmlEncode(toChinese(str), quotes);
     }
 
     /**
@@ -734,11 +698,6 @@ public static String floatToString(float value) {
         return floatee.toString();
     }
 
-    /**
-     *int型变量转换成String型变量
-     *@param intVal 要进行转换的整数
-     *@return str 如果intVal不可以转换成String型数据,返回空值表示异常,否则返回转换后的值
-     */
     /**
      * int型变量转换成String型变量
      *
@@ -832,19 +791,6 @@ public static String null2SZero(String str) {
             return str;
     }
 
-    /**
-     * sql语句 处理
-     *
-     * @param sql    要进行处理的sql语句
-     * @param dbtype 数据库类型
-     * @return 处理后的sql语句
-     */
-    public static String sql4DB(String sql, String dbtype) {
-        if (!dbtype.equalsIgnoreCase("oracle")) {
-            sql = toISO(sql);
-        }
-        return sql;
-    }
 
     /**
      * 字符串从GBK编码转换为Unicode编码
@@ -1027,38 +973,4 @@ public static String decode(String s) {
         }
         return sbuf.toString();
     }
-
-    /**
-     * 去除html tag
-     * @param htmlStr
-     * @return
-     */
-    public static String delHTMLTag(String htmlStr){
-        String regEx_script="]*?>[\\s\\S]*?<\\/script>"; //定义script的正则表达式
-        String regEx_style="]*?>[\\s\\S]*?<\\/style>"; //定义style的正则表达式
-        String regEx_html="<[^>]+>"; //定义HTML标签的正则表达式
-
-        Pattern p_script=Pattern.compile(regEx_script,Pattern.CASE_INSENSITIVE);
-        Matcher m_script=p_script.matcher(htmlStr);
-        htmlStr=m_script.replaceAll(""); //过滤script标签
-
-        Pattern p_style=Pattern.compile(regEx_style,Pattern.CASE_INSENSITIVE);
-        Matcher m_style=p_style.matcher(htmlStr);
-        htmlStr=m_style.replaceAll(""); //过滤style标签
-
-        Pattern p_html=Pattern.compile(regEx_html,Pattern.CASE_INSENSITIVE);
-        Matcher m_html=p_html.matcher(htmlStr);
-        htmlStr=m_html.replaceAll(""); //过滤html标签
-
-        return htmlStr.trim(); //返回文本字符串
-    }
-
-
-
-    public static void main(String[] args) {
-        String stest = "一声笑傲江湖之曲1234 abcd[]()<+>,.~\"";
-        System.out.println(stest);
-        System.out.println(encode(stest));
-        System.out.println(decode(encode(stest)));
-    }
 }

From 0d46c283df9c3285305d1a636e50f91118a44e5e Mon Sep 17 00:00:00 2001
From: xiaomo 
Date: Wed, 28 Jun 2017 19:38:05 +0800
Subject: [PATCH 017/221] alpha

---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 5e37b03a..9cbcf67c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     4.0.0
     info.xiaomo
     xiaomo
-    1.0.0-SNAPSHOT
+    1.0.0-alpha
 
     
     

From eac815689d545a16120417d2d6dc3ec2835a6f34 Mon Sep 17 00:00:00 2001
From: xiaomo 
Date: Thu, 29 Jun 2017 10:02:39 +0800
Subject: [PATCH 018/221] snapshot

---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9cbcf67c..5e37b03a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     4.0.0
     info.xiaomo
     xiaomo
-    1.0.0-alpha
+    1.0.0-SNAPSHOT
 
     
     

From c9f1cd954a14707ccd0174681935083a7082f6be Mon Sep 17 00:00:00 2001
From: xiaomo 
Date: Mon, 3 Jul 2017 14:16:49 +0800
Subject: [PATCH 019/221] socket

---
 .../main/java/info/xiaomo/chat/socket/MyWebSocket.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java
index 2fabd31f..8646a549 100644
--- a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java
+++ b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java
@@ -1,6 +1,6 @@
 package info.xiaomo.chat.socket;
 
-import info.xiaomo.core.untils.StringUtil;
+import info.xiaomo.core.untils.HtmlUtil;
 import info.xiaomo.core.untils.TimeUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -19,11 +19,11 @@
  * いま 最高の表現 として 明日最新の始発..~
  * Today the best performance  as tomorrow newest starter!
  * Created by IntelliJ IDEA.
- *
+ * 

* author: xiaomo * github: https://github.com/xiaomoinfo * email: xiaomo@xiaomo.info - + *

* Date: 2016/11/3 16:36 * Description: 用户实体类 * Copyright(©) 2015 by xiaomo. @@ -97,7 +97,7 @@ public void onMessage(String message) throws IOException { for (MyWebSocket item : webSocketSet) { item.sendMessage(date + message); } - LOGGER.info("客户端消息:{}", StringUtil.delHTMLTag(message)); + LOGGER.info("客户端消息:{}", HtmlUtil.delHTMLTag(message)); } /** From 3ee8ea924c89bbc0061fb77daf2aea83b2384e33 Mon Sep 17 00:00:00 2001 From: xiaomo Date: Mon, 3 Jul 2017 14:26:15 +0800 Subject: [PATCH 020/221] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- socket/src/main/java/info/xiaomo/chat/ChatMain.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/socket/src/main/java/info/xiaomo/chat/ChatMain.java b/socket/src/main/java/info/xiaomo/chat/ChatMain.java index 36c611fb..5f736d79 100644 --- a/socket/src/main/java/info/xiaomo/chat/ChatMain.java +++ b/socket/src/main/java/info/xiaomo/chat/ChatMain.java @@ -3,6 +3,8 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @@ -23,7 +25,7 @@ * Copyright(©) 2015 by xiaomo. **/ @Configuration -@EnableAutoConfiguration +@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class}) @ComponentScan("info.xiaomo") @EntityScan("info.xiaomo.*.model") public class ChatMain { From b3db686312881fbe1cb0ec658007b04debceab2b Mon Sep 17 00:00:00 2001 From: xiaomo Date: Mon, 3 Jul 2017 14:31:18 +0800 Subject: [PATCH 021/221] cdn --- socket/src/main/resources/public/chat.html | 2 +- socket/src/main/resources/public/index.html | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/socket/src/main/resources/public/chat.html b/socket/src/main/resources/public/chat.html index 7a6622ea..5fbf3513 100644 --- a/socket/src/main/resources/public/chat.html +++ b/socket/src/main/resources/public/chat.html @@ -4,7 +4,7 @@ 在线聊天 - + ",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[r],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},e,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\s*\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}}); \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js b/readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js deleted file mode 100644 index 571c740b..00000000 --- a/readerApplication/src/main/resources/public/lib/highlight.9.1.0.pack_extended.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -(function () { - var configure, highlightBlock; - - configure = hljs.configure; - // "extending" hljs.configure method - hljs.configure = function _configure (options) { - var size = options.highlightSizeThreshold; - - // added highlightSizeThreshold option to set maximum size - // of processed string. Set to null if not a number - hljs.highlightSizeThreshold = size === +size ? size : null; - - configure.call(this, options); - }; - - highlightBlock = hljs.highlightBlock; - - // "extending" hljs.highlightBlock method - hljs.highlightBlock = function _highlightBlock (el) { - var innerHTML = el.innerHTML; - var size = hljs.highlightSizeThreshold; - - // check if highlightSizeThreshold is not set or element innerHTML - // is less than set option highlightSizeThreshold - if (size == null || size > innerHTML.length) { - // proceed with hljs.highlightBlock - highlightBlock.call(hljs, el); - } - }; - -})(); - diff --git a/readerApplication/src/main/resources/public/lib/jquery-1.8.0.min.js b/readerApplication/src/main/resources/public/lib/jquery-1.8.0.min.js deleted file mode 100644 index 066d72c7..00000000 --- a/readerApplication/src/main/resources/public/lib/jquery-1.8.0.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v@1.8.0 jquery.com | jquery.org/license */ -(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
t
",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="

",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;jq&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;ai){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="
",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="

",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/jquery.ba-bbq.min.js b/readerApplication/src/main/resources/public/lib/jquery.ba-bbq.min.js deleted file mode 100644 index bcbf2483..00000000 --- a/readerApplication/src/main/resources/public/lib/jquery.ba-bbq.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 - * http://benalman.com/projects/jquery-bbq-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/jquery.slideto.min.js b/readerApplication/src/main/resources/public/lib/jquery.slideto.min.js deleted file mode 100644 index ba32cff3..00000000 --- a/readerApplication/src/main/resources/public/lib/jquery.slideto.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); diff --git a/readerApplication/src/main/resources/public/lib/jquery.wiggle.min.js b/readerApplication/src/main/resources/public/lib/jquery.wiggle.min.js deleted file mode 100644 index 2adb0d6d..00000000 --- a/readerApplication/src/main/resources/public/lib/jquery.wiggle.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -jQuery Wiggle -Author: WonderGroup, Jordan Thomas -URL: http://labs.wondergroup.com/demos/mini-ui/index.html -License: MIT (http://en.wikipedia.org/wiki/MIT_License) -*/ -jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('
').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} -if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/js-yaml.min.js b/readerApplication/src/main/resources/public/lib/js-yaml.min.js deleted file mode 100644 index c3d07ada..00000000 --- a/readerApplication/src/main/resources/public/lib/js-yaml.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* js-yaml 3.4.6 https://github.com/nodeca/js-yaml */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.jsyaml=t()}}(function(){var t;return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;an;n+=1)r=o[n],t[r]=e[r];return t}function s(t,e){var n,i="";for(n=0;e>n;n+=1)i+=t;return i}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}e.exports.isNothing=i,e.exports.isObject=r,e.exports.toArray=o,e.exports.repeat=s,e.exports.isNegativeZero=c,e.exports.extend=a},{}],3:[function(t,e,n){"use strict";function i(t,e){var n,i,r,o,a,s,c;if(null===e)return{};for(n={},i=Object.keys(e),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=t.compiledTypeMap[a],c&&E.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(t){var e,n,i;if(e=t.toString(16).toUpperCase(),255>=t)n="x",i=2;else if(65535>=t)n="u",i=4;else{if(!(4294967295>=t))throw new O("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-e.length)+e}function o(t){this.schema=t.schema||S,this.indent=Math.max(1,t.indent||2),this.skipInvalid=t.skipInvalid||!1,this.flowLevel=j.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=i(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(t,e){for(var n,i=j.repeat(" ",e),r=0,o=-1,a="",s=t.length;s>r;)o=t.indexOf("\n",r),-1===o?(n=t.slice(r),r=s):(n=t.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(t,e){return"\n"+j.repeat(" ",t.indent*e)}function c(t,e){var n,i,r;for(n=0,i=t.implicitTypes.length;i>n;n+=1)if(r=t.implicitTypes[n],r.resolve(e))return!0;return!1}function u(t){this.source=t,this.result="",this.checkpoint=0}function l(t,e,n,i){var r,o,s,l,f,m,g,y,v,x,A,b,w,k,C,j,O,S,_,I,E;if(0===e.length)return void(t.dump="''");if(-1!==et.indexOf(e))return void(t.dump="'"+e+"'");for(r=!0,o=e.length?e.charCodeAt(0):0,s=M===o||M===e.charCodeAt(e.length-1),(K===o||W===o||G===o||z===o)&&(r=!1),s?(r=!1,l=!1,f=!1):(l=!i,f=!i),m=!0,g=new u(e),y=!1,v=0,x=0,A=t.indent*n,b=t.lineWidth,-1===b&&(b=9007199254740991),40>A?b-=A:b=40,k=0;k0&&(O=e.charCodeAt(k-1),O===M&&(f=!1,l=!1)),l&&(S=k-v,v=k,S>x&&(x=S))),w!==D&&(m=!1),g.takeUpTo(k),g.escapeChar())}if(r&&c(t,e)&&(r=!1),_="",(l||f)&&(I=0,e.charCodeAt(e.length-1)===N&&(I+=1,e.charCodeAt(e.length-2)===N&&(I+=1)),0===I?_="-":2===I&&(_="+")),f&&b>x&&(l=!1),y||(f=!1),r)t.dump=e;else if(m)t.dump="'"+e+"'";else if(l)E=p(e,b),t.dump=">"+_+"\n"+a(E,A);else if(f)_||(e=e.replace(/\n$/,"")),t.dump="|"+_+"\n"+a(e,A);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),t.dump='"'+g.result+'"'}}function p(t,e){var n,i="",r=0,o=t.length,a=/\n+$/.exec(t);for(a&&(o=a.index+1);o>r;)n=t.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(t.slice(r,o),e),r=o):(i&&(i+="\n\n"),i+=f(t.slice(r,n),e),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(t,e){if(""===t)return t;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,c=0,u=o.exec(t);u;)n=u.index,n-c>e&&(i=s!==c?s:n,a&&(a+="\n"),r=t.slice(c,i),a+=r,c=i+1),s=n+1,u=o.exec(t);return a&&(a+="\n"),a+=c!==s&&t.length-c>e?t.slice(c,s)+"\n"+t.slice(s+1):t.slice(c)}function h(t){return F!==t&&N!==t&&T!==t&&B!==t&&V!==t&&Z!==t&&J!==t&&X!==t&&U!==t&&Y!==t&&$!==t&&L!==t&&Q!==t&&R!==t&&P!==t&&D!==t&&q!==t&&H!==t&&!tt[t]&&!d(t)}function d(t){return!(t>=32&&126>=t||133===t||t>=160&&55295>=t||t>=57344&&65533>=t||t>=65536&&1114111>=t)}function m(t,e,n){var i,r,o="",a=t.tag;for(i=0,r=n.length;r>i;i+=1)A(t,e,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function g(t,e,n,i){var r,o,a="",c=t.tag;for(r=0,o=n.length;o>r;r+=1)A(t,e+1,n[r],!0,!0)&&(i&&0===r||(a+=s(t,e)),a+="- "+t.dump);t.tag=c,t.dump=a||"[]"}function y(t,e,n){var i,r,o,a,s,c="",u=t.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(t,e,o,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+": ",A(t,e,a,!1,!1)&&(s+=t.dump,c+=s));t.tag=u,t.dump="{"+c+"}"}function v(t,e,n,i){var r,o,a,c,u,l,p="",f=t.tag,h=Object.keys(n);if(t.sortKeys===!0)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new O("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(t,e)),a=h[r],c=n[a],A(t,e+1,a,!0,!0,!0)&&(u=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024,u&&(l+=t.dump&&N===t.dump.charCodeAt(0)?"?":"? "),l+=t.dump,u&&(l+=s(t,e)),A(t,e+1,c,!0,u)&&(l+=t.dump&&N===t.dump.charCodeAt(0)?":":": ",l+=t.dump,p+=l));t.tag=f,t.dump=p||"{}"}function x(t,e,n){var i,r,o,a,s,c;for(r=n?t.explicitTypes:t.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(t.tag=n?s.tag:"?",s.represent){if(c=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===I.call(s.represent))i=s.represent(e,c);else{if(!E.call(s.represent,c))throw new O("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](e,c)}t.dump=i}return!0}return!1}function A(t,e,n,i,r,o){t.tag=null,t.dump=n,x(t,n,!1)||x(t,n,!0);var a=I.call(t.dump);i&&(i=0>t.flowLevel||t.flowLevel>e);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=t.duplicates.indexOf(n),c=-1!==s),(null!==t.tag&&"?"!==t.tag||c||2!==t.indent&&e>0)&&(r=!1),c&&t.usedDuplicates[s])t.dump="*ref_"+s;else{if(u&&c&&!t.usedDuplicates[s]&&(t.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(t.dump).length?(v(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(y(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else if("[object Array]"===a)i&&0!==t.dump.length?(g(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(m(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else{if("[object String]"!==a){if(t.skipInvalid)return!1;throw new O("unacceptable kind of an object to dump "+a)}"?"!==t.tag&&l(t,t.dump,e,o)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function b(t,e){var n,i,r=[],o=[];for(w(t,r,o),n=0,i=o.length;i>n;n+=1)e.duplicates.push(r[o[n]]);e.usedDuplicates=new Array(i)}function w(t,e,n){var i,r,o;if(null!==t&&"object"==typeof t)if(r=e.indexOf(t),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(e.push(t),Array.isArray(t))for(r=0,o=t.length;o>r;r+=1)w(t[r],e,n);else for(i=Object.keys(t),r=0,o=i.length;o>r;r+=1)w(t[i[r]],e,n)}function k(t,e){e=e||{};var n=new o(e);return b(t,n),A(n,0,t,!0,!0)?n.dump+"\n":""}function C(t,e){return k(t,j.extend({schema:_},e))}var j=t("./common"),O=t("./exception"),S=t("./schema/default_full"),_=t("./schema/default_safe"),I=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=9,N=10,T=13,M=32,L=33,D=34,U=35,q=37,Y=38,P=39,$=42,B=44,K=45,H=58,R=62,W=63,G=64,V=91,Z=93,z=96,J=123,Q=124,X=125,tt={};tt[0]="\\0",tt[7]="\\a",tt[8]="\\b",tt[9]="\\t",tt[10]="\\n",tt[11]="\\v",tt[12]="\\f",tt[13]="\\r",tt[27]="\\e",tt[34]='\\"',tt[92]="\\\\",tt[133]="\\N",tt[160]="\\_",tt[8232]="\\L",tt[8233]="\\P";var et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(t){var e;if(t checkpoint"),e.position=t,e.checkpoint=this.checkpoint,e;return this.result+=this.source.slice(this.checkpoint,t),this.checkpoint=t,this},u.prototype.escapeChar=function(){var t,e;return t=this.source.charCodeAt(this.checkpoint),e=tt[t]||r(t),this.result+=e,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},e.exports.dump=k,e.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(t,e,n){"use strict";function i(t,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var r=t("inherit");r(i,Error),i.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},e.exports=i},{inherit:31}],5:[function(t,e,n){"use strict";function i(t){return 10===t||13===t}function r(t){return 9===t||32===t}function o(t){return 9===t||32===t||10===t||13===t}function a(t){return 44===t||91===t||93===t||123===t||125===t}function s(t){var e;return t>=48&&57>=t?t-48:(e=32|t,e>=97&&102>=e?e-97+10:-1)}function c(t){return 120===t?2:117===t?4:85===t?8:0}function u(t){return t>=48&&57>=t?t-48:-1}function l(t){return 48===t?"\x00":97===t?"":98===t?"\b":116===t?" ":9===t?" ":110===t?"\n":118===t?" ":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function p(t){return 65535>=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function f(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||H,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(t,e){return new $(e,new B(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function d(t,e){throw h(t,e)}function m(t,e){t.onWarning&&t.onWarning.call(null,h(t,e))}function g(t,e,n,i){var r,o,a,s;if(n>e){if(s=t.input.slice(e,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(t,"expected valid JSON character");else X.test(s)&&d(t,"the stream contains non-printable characters");t.result+=s}}function y(t,e,n){var i,r,o,a;for(P.isObject(n)||d(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;a>o;o+=1)r=i[o],R.call(e,r)||(e[r]=n[r])}function v(t,e,n,i,r){var o,a;if(i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(o=0,a=r.length;a>o;o+=1)y(t,e,r[o]);else y(t,e,r);else e[i]=r;return e}function x(t){var e;e=t.input.charCodeAt(t.position),10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):d(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function A(t,e,n){for(var o=0,a=t.input.charCodeAt(t.position);0!==a;){for(;r(a);)a=t.input.charCodeAt(++t.position);if(e&&35===a)do a=t.input.charCodeAt(++t.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(x(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==n&&0!==o&&t.lineIndent1&&(t.result+=P.repeat("\n",e-1))}function k(t,e,n){var s,c,u,l,p,f,h,d,m,y=t.kind,v=t.result;if(m=t.input.charCodeAt(t.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c)))return!1;for(t.kind="scalar",t.result="",u=l=t.position,p=!1;0!==m;){if(58===m){if(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=t.input.charCodeAt(t.position-1),o(s))break}else{if(t.position===t.lineStart&&b(t)||n&&a(m))break;if(i(m)){if(f=t.line,h=t.lineStart,d=t.lineIndent,A(t,!1,-1),t.lineIndent>=e){p=!0,m=t.input.charCodeAt(t.position);continue}t.position=l,t.line=f,t.lineStart=h,t.lineIndent=d;break}}p&&(g(t,u,l,!1),w(t,t.line-f),u=l=t.position,p=!1),r(m)||(l=t.position+1),m=t.input.charCodeAt(++t.position)}return g(t,u,l,!1),t.result?!0:(t.kind=y,t.result=v,!1)}function C(t,e){var n,r,o;if(n=t.input.charCodeAt(t.position),39!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(g(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),39!==n)return!0;r=o=t.position,t.position++}else i(n)?(g(t,r,o,!0),w(t,A(t,!1,e)),r=o=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);d(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){var n,r,o,a,u,l;if(l=t.input.charCodeAt(t.position),34!==l)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(l=t.input.charCodeAt(t.position));){if(34===l)return g(t,n,t.position,!0),t.position++,!0;if(92===l){if(g(t,n,t.position,!0),l=t.input.charCodeAt(++t.position),i(l))A(t,!1,e);else if(256>l&&rt[l])t.result+=ot[l],t.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=t.input.charCodeAt(++t.position),(u=s(l))>=0?a=(a<<4)+u:d(t,"expected hexadecimal character");t.result+=p(a),t.position++}else d(t,"unknown escape sequence");n=r=t.position}else i(l)?(g(t,n,r,!0),w(t,A(t,!1,e)),n=r=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}d(t,"unexpected end of the stream within a double quoted scalar")}function O(t,e){var n,i,r,a,s,c,u,l,p,f,h,m=!0,g=t.tag,y=t.anchor;if(h=t.input.charCodeAt(t.position),91===h)a=93,u=!1,i=[];else{if(123!==h)return!1;a=125,u=!0,i={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=i),h=t.input.charCodeAt(++t.position);0!==h;){if(A(t,!0,e),h=t.input.charCodeAt(t.position),h===a)return t.position++,t.tag=g,t.anchor=y,t.kind=u?"mapping":"sequence",t.result=i,!0;m||d(t,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===h&&(r=t.input.charCodeAt(t.position+1),o(r)&&(s=c=!0,t.position++,A(t,!0,e))),n=t.line,T(t,e,W,!1,!0),p=t.tag,l=t.result,A(t,!0,e),h=t.input.charCodeAt(t.position),!c&&t.line!==n||58!==h||(s=!0,h=t.input.charCodeAt(++t.position),A(t,!0,e),T(t,e,W,!1,!0),f=t.result),u?v(t,i,p,l,f):i.push(s?v(t,null,p,l,f):l),A(t,!0,e),h=t.input.charCodeAt(t.position),44===h?(m=!0,h=t.input.charCodeAt(++t.position)):m=!1}d(t,"unexpected end of the stream within a flow collection")}function S(t,e){var n,o,a,s,c=z,l=!1,p=e,f=0,h=!1;if(s=t.input.charCodeAt(t.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(t.kind="scalar",t.result="";0!==s;)if(s=t.input.charCodeAt(++t.position),43===s||45===s)z===c?c=43===s?Q:J:d(t,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(t,"repeat of an indentation width identifier"):(p=e+a-1,l=!0)}if(r(s)){do s=t.input.charCodeAt(++t.position);while(r(s));if(35===s)do s=t.input.charCodeAt(++t.position);while(!i(s)&&0!==s)}for(;0!==s;){for(x(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndentp&&(p=t.lineIndent),i(s))f++;else{if(t.lineIndente)&&0!==r)d(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(T(t,e,Z,!0,a)&&(g?h=t.result:m=t.result),g||(v(t,p,f,h,m),f=h=m=null),A(t,!0,-1),c=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==c)d(t,"bad indentation of a mapping entry");else if(t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndentc;c+=1)if(l=t.implicitTypes[c],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else R.call(t.typeMap,t.tag)?(l=t.typeMap[t.tag],null!==t.result&&l.kind!==t.kind&&d(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result)?(t.result=l.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):d(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):d(t,"unknown tag !<"+t.tag+">");return null!==t.tag||null!==t.anchor||g}function M(t){var e,n,a,s,c=t.position,u=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(s=t.input.charCodeAt(t.position))&&(A(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==s));){for(u=!0,s=t.input.charCodeAt(++t.position),e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),a=[],n.length<1&&d(t,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=t.input.charCodeAt(++t.position);if(35===s){do s=t.input.charCodeAt(++t.position);while(0!==s&&!i(s));break}if(i(s))break;for(e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(e,t.position))}0!==s&&x(t),R.call(st,n)?st[n](t,n,a):m(t,'unknown document directive "'+n+'"')}return A(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,A(t,!0,-1)):u&&d(t,"directives end mark is expected"),T(t,t.lineIndent-1,Z,!1,!0),A(t,!0,-1),t.checkLineBreaks&&tt.test(t.input.slice(c,t.position))&&m(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&b(t)?void(46===t.input.charCodeAt(t.position)&&(t.position+=3,A(t,!0,-1))):void(t.positioni;i+=1)e(o[i])}function U(t,e){var n=L(t,e);if(0===n.length)return void 0;if(1===n.length)return n[0];throw new $("expected a single document in the stream, but found more")}function q(t,e,n){D(t,e,P.extend({schema:K},n))}function Y(t,e){return U(t,P.extend({schema:K},e))}for(var P=t("./common"),$=t("./exception"),B=t("./mark"),K=t("./schema/default_safe"),H=t("./schema/default_full"),R=Object.prototype.hasOwnProperty,W=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,nt=/^(?:!|!!|![a-z\-]+!)$/i,it=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,rt=new Array(256),ot=new Array(256),at=0;256>at;at++)rt[at]=l(at)?1:0,ot[at]=l(at);var st={YAML:function(t,e,n){var i,r,o;null!==t.version&&d(t,"duplication of %YAML directive"),1!==n.length&&d(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=2>o,1!==o&&2!==o&&m(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&d(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],nt.test(i)||d(t,"ill-formed tag handle (first argument) of the TAG directive"),R.call(t.tagMap,i)&&d(t,'there is a previously declared suffix for "'+i+'" tag handle'),it.test(r)||d(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=r}};e.exports.loadAll=D,e.exports.load=U,e.exports.safeLoadAll=q,e.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(t,e,n){"use strict";function i(t,e,n,i,r){this.name=t,this.buffer=e,this.position=n,this.line=i,this.column=r}var r=t("./common");i.prototype.getSnippet=function(t,e){var n,i,o,a,s;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",i=this.position;i>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;ae/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",t)+n+s+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet(),e&&(n+=":\n"+e)),n},e.exports=i},{"./common":2}],7:[function(t,e,n){"use strict";function i(t,e,n){var r=[];return t.include.forEach(function(t){n=i(t,e,n)}),t[e].forEach(function(t){n.forEach(function(e,n){e.tag===t.tag&&r.push(n)}),n.push(t)}),n.filter(function(t,e){return-1===r.indexOf(e)})}function r(){function t(t){i[t.tag]=t}var e,n,i={};for(e=0,n=arguments.length;n>e;e+=1)arguments[e].forEach(t);return i}function o(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=t("./common"),s=t("./exception"),c=t("./type");o.DEFAULT=null,o.create=function(){var t,e;switch(arguments.length){case 1:t=o.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(t=a.toArray(t),e=a.toArray(e),!t.every(function(t){return t instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:t,explicit:e})},e.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./json")]})},{"../schema":7,"./json":12}],9:[function(t,e,n){"use strict";var i=t("../schema");e.exports=i.DEFAULT=new i({include:[t("./default_safe")],explicit:[t("../type/js/undefined"),t("../type/js/regexp"),t("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./core")],implicit:[t("../type/timestamp"),t("../type/merge")],explicit:[t("../type/binary"),t("../type/omap"),t("../type/pairs"),t("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({explicit:[t("../type/str"),t("../type/seq"),t("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./failsafe")],implicit:[t("../type/null"),t("../type/bool"),t("../type/int"),t("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(t,e,n){"use strict";function i(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function r(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===a.indexOf(e))throw new o('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=i(e.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var o=t("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];e.exports=r},{"./exception":4}],14:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=u;for(n=0;r>n;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(0>e)return!1;i+=6}return i%8===0}function r(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,c=[];for(e=0;r>e;e++)e%4===0&&e&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(t){var e,n,i="",r=0,o=t.length,a=u;for(e=0;o>e;e++)e%3===0&&e&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(t){return s&&s.isBuffer(t)}var s=t("buffer").Buffer,c=t("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i, -construct:r,predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}var a=t("../type");e.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(t,e,n){"use strict";function i(t){return null===t?!1:u.test(t)?!0:!1}function r(t){var e,n,i,r;return e=t.replace(/_/g,"").toLowerCase(),n="-"===e[0]?-1:1,r=[],0<="+-".indexOf(e[0])&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:0<=e.indexOf(":")?(e.split(":").forEach(function(t){r.unshift(parseFloat(t,10))}),e=0,i=1,r.forEach(function(t){e+=t*i,i*=60}),n*e):n*parseFloat(e,10)}function o(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(t))return"-0.0";return n=t.toString(10),l.test(n)?n.replace("e",".e"):n}function a(t){return"[object Number]"===Object.prototype.toString.call(t)&&(0!==t%1||s.isNegativeZero(t))}var s=t("../common"),c=t("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(t,e,n){"use strict";function i(t){return t>=48&&57>=t||t>=65&&70>=t||t>=97&&102>=t}function r(t){return t>=48&&55>=t}function o(t){return t>=48&&57>=t}function a(t){if(null===t)return!1;var e,n=t.length,a=0,s=!1;if(!n)return!1;if(e=t[a],("-"===e||"+"===e)&&(e=t[++a]),"0"===e){if(a+1===n)return!0;if(e=t[++a],"b"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if("0"!==e&&"1"!==e)return!1;s=!0}return s}if("x"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if(!i(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(!r(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(":"===e)break;if(!o(t.charCodeAt(a)))return!1;s=!0}return s?":"!==e?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(a)):!1}function s(t){var e,n,i=t,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),e=i[0],("-"===e||"+"===e)&&("-"===e&&(r=-1),i=i.slice(1),e=i[0]),"0"===i?0:"0"===e?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),i=0,n=1,o.forEach(function(t){i+=t*n,n*=60}),r*i):r*parseInt(i,10)}function c(t){return"[object Number]"===Object.prototype.toString.call(t)&&0===t%1&&!u.isNegativeZero(t)}var u=t("../common"),l=t("../type");e.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;try{var e="("+t+")",n=s.parse(e,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(i){return!1}}function r(t){var e,n="("+t+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(t){r.push(t.name)}),e=i.body[0].expression.body.range,new Function(r,n.slice(e[0]+1,e[1]-1))}function o(t){return t.toString()}function a(t){return"[object Function]"===Object.prototype.toString.call(t)}var s;try{s=t("esprima")}catch(c){"undefined"!=typeof window&&(s=window.esprima)}var u=t("../../type");e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13,esprima:"esprima"}],19:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),i="";if("/"===e[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==e[e.length-i.length-1])return!1;e=e.slice(1,e.length-i.length-1)}try{return!0}catch(r){return!1}}function r(t){var e=t,n=/\/([gim]*)$/.exec(t),i="";return"/"===e[0]&&(n&&(i=n[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function o(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function a(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(t,e,n){"use strict";function i(){return!0}function r(){return void 0}function o(){return""}function a(t){return"undefined"==typeof t}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},{"../type":13}],22:[function(t,e,n){"use strict";function i(t){return"<<"===t||null===t}var r=t("../type");e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function o(t){return null===t}var a=t("../type");e.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,c=[],u=t;for(e=0,n=u.length;n>e;e+=1){if(i=u[e],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(t){return null!==t?t:[]}var o=t("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,s=t;for(o=new Array(s.length),e=0,n=s.length;n>e;e+=1){if(i=s[e],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[e]=[r[0],i[r[0]]]}return!0}function r(t){if(null===t)return[];var e,n,i,r,o,a=t;for(o=new Array(a.length),e=0,n=a.length;n>e;e+=1)i=a[e],r=Object.keys(i),o[e]=[r[0],i[r[0]]];return o}var o=t("../type"),a=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},{"../type":13}],27:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n=t;for(e in n)if(a.call(n,e)&&null!==n[e])return!1;return!0}function r(t){return null!==t?t:{}}var o=t("../type"),a=Object.prototype.hasOwnProperty;e.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},{"../type":13}],29:[function(t,e,n){"use strict";function i(t){return null===t?!1:null===s.exec(t)?!1:!0}function r(t){var e,n,i,r,o,a,c,u,l,p,f=0,h=null;if(e=s.exec(t),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],a=+e[5],c=+e[6],e[7]){for(f=e[7].slice(0,3);f.length<3;)f+="0";f=+f}return e[9]&&(u=+e[10],l=+(e[11]||0),h=6e4*(60*u+l),"-"===e[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,c,f)),h&&p.setTime(p.getTime()-h),p}function o(t){return t.toISOString()}var a=t("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(t,e,n){},{}],31:[function(t,e,n){e.exports=t("./lib/inherit")},{"./lib/inherit":32}],32:[function(e,n,i){!function(e){function r(t){var e=f(t);if(v)for(var n,i=0;n=b[i++];)t.hasOwnProperty(n)&&e.push(n);return e}function o(t,e,n){for(var i,o,a=r(n),s=0,u=a.length;u>s;)"__self"!==(i=a[s++])&&(o=n[i],g(o)&&(!c||o.toString().indexOf(".__base")>-1)?e[i]=function(n,i){var r=t[n]?t[n]:"__constructor"===n?e.__self.__parent:y;return function(){var t=this.__base;this.__base=r;var e=i.apply(this,arguments);return this.__base=t,e}}(i,o):e[i]=o)}function a(t,e){for(var n,i=1;n=t[i++];)e?g(n)?s.self(e,n.prototype,n):s.self(e,n):e=g(n)?s(t[0],n.prototype,n):s(t[0],n);return e||t[0]}function s(){var t=arguments,e=m(t[0]),n=e||g(t[0]),i=n?e?a(t[0]):t[0]:u,r=t[n?1:0]||{},s=t[n?2:1],c=r.__constructor||n&&i.prototype.__constructor?function(){return this.__constructor.apply(this,arguments)}:n?function(){return i.apply(this,arguments)}:function(){};if(!n)return c.prototype=r,c.prototype.__self=c.prototype.constructor=c,h(c,s);h(c,i),c.__parent=i;var l=i.prototype,f=c.prototype=p(l);return f.__self=f.constructor=c,r&&o(l,f,r),s&&o(i,c,s),c}var c=function(){"_"}.toString().indexOf("_")>-1,u=function(){},l=Object.prototype.hasOwnProperty,p=Object.create||function(t){var e=function(){};return e.prototype=t,new e},f=Object.keys||function(t){var e=[];for(var n in t)l.call(t,n)&&e.push(n);return e},h=function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);return t},d=Object.prototype.toString,m=Array.isArray||function(t){return"[object Array]"===d.call(t)},g=function(t){return"[object Function]"===d.call(t)},y=function(){},v=!0,x={toString:""};for(var A in x)x.hasOwnProperty(A)&&(v=!1);var b=v?["toString","valueOf"]:null;s.self=function(){var t=arguments,e=m(t[0]),n=e?a(t[0],t[0][0]):t[0],i=t[1],r=t[2],s=n.prototype;return i&&o(s,s,i),r&&o(n,n,r),n};var w=!0;"object"==typeof i&&(n.exports=s,w=!1),"object"==typeof modules&&(modules.define("inherit",function(t){t(s)}),w=!1),"function"==typeof t&&(t(function(t,e,n){n.exports=s}),w=!1),w&&(e.inherit=s)}(this)},{}],"/":[function(t,e,n){"use strict";var i=t("./lib/js-yaml.js");e.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); diff --git a/readerApplication/src/main/resources/public/lib/jsoneditor.min.js b/readerApplication/src/main/resources/public/lib/jsoneditor.min.js deleted file mode 100644 index 343397f9..00000000 --- a/readerApplication/src/main/resources/public/lib/jsoneditor.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! JSON Editor v0.7.22 - JSON Schema -> HTML Editor - * By Jeremy Dorn - https://github.com/jdorn/json-editor/ - * Released under the MIT license - * - * Date: 2015-08-12 - */ -!function(){var a;!function(){var b=!1,c=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return a=function(){},a.extend=function(a){function d(){!b&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;b=!0;var f=new this;b=!1;for(var g in a)f[g]="function"==typeof a[g]&&"function"==typeof e[g]&&c.test(a[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,a[g]):a[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d},a}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c0&&a.length-1 in a){for(c=0;c=g&&!h&&(h=!0,b())})}},d.send()}}),g||b()},expandRefs:function(a){for(a=c({},a);a.$ref;){var b=a.$ref;delete a.$ref,this.refs[b]||(b=decodeURIComponent(b)),a=this.extendSchemas(a,this.refs[b])}return a},expandSchema:function(a){var b,e=this,f=c({},a);if("object"==typeof a.type&&(Array.isArray(a.type)?d(a.type,function(b,c){"object"==typeof c&&(a.type[b]=e.expandSchema(c))}):a.type=e.expandSchema(a.type)),"object"==typeof a.disallow&&(Array.isArray(a.disallow)?d(a.disallow,function(b,c){"object"==typeof c&&(a.disallow[b]=e.expandSchema(c))}):a.disallow=e.expandSchema(a.disallow)),a.anyOf&&d(a.anyOf,function(b,c){a.anyOf[b]=e.expandSchema(c)}),a.dependencies&&d(a.dependencies,function(b,c){"object"!=typeof c||Array.isArray(c)||(a.dependencies[b]=e.expandSchema(c))}),a.not&&(a.not=this.expandSchema(a.not)),a.allOf){for(b=0;b=a.maximum?k.push({path:e,property:"maximum",message:this.translate("error_maximum_excl",[a.maximum])}):!a.exclusiveMaximum&&b>a.maximum&&k.push({path:e,property:"maximum",message:this.translate("error_maximum_incl",[a.maximum])})),a.hasOwnProperty("minimum")&&(a.exclusiveMinimum&&b<=a.minimum?k.push({path:e,property:"minimum",message:this.translate("error_minimum_excl",[a.minimum])}):!a.exclusiveMinimum&&ba.maxLength&&k.push({path:e,property:"maxLength",message:this.translate("error_maxLength",[a.maxLength])}),a.minLength&&(b+"").lengtha.maxItems&&k.push({path:e,property:"maxItems",message:this.translate("error_maxItems",[a.maxItems])}),a.minItems&&b.lengtha.maxProperties&&k.push({path:e,property:"maxProperties",message:this.translate("error_maxProperties",[a.maxProperties])})}if(a.minProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g=0){b=this.theme.getBlockLinkHolder(),c=this.theme.getBlockLink(),c.setAttribute("target","_blank");var h=document.createElement(e);h.setAttribute("controls","controls"),this.theme.createMediaLink(b,c,h),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.textContent=a.rel||d,h.setAttribute("src",d)})}else b=this.theme.getBlockLink(),b.setAttribute("target","_blank"),b.textContent=a.rel,this.link_watchers.push(function(c){var d=f(c);b.setAttribute("href",d),b.textContent=a.rel||d});return b},refreshWatchedFieldValues:function(){if(this.watched_values){var a={},b=!1,c=this;if(this.watched){var d,e;for(var f in this.watched)this.watched.hasOwnProperty(f)&&(e=c.jsoneditor.getEditor(this.watched[f]),d=e?e.getValue():null,c.watched_values[f]!==d&&(b=!0),a[f]=d)}return a.self=this.getValue(),this.watched_values.self!==a.self&&(b=!0),this.watched_values=a,b}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var a=0;a-1:this.jsoneditor.options.required_by_default?!0:!1},getDisplayText:function(a){var b=[],c={};d(a,function(a,b){b.title&&(c[b.title]=c[b.title]||0,c[b.title]++),b.description&&(c[b.description]=c[b.description]||0,c[b.description]++),b.format&&(c[b.format]=c[b.format]||0,c[b.format]++),b.type&&(c[b.type]=c[b.type]||0,c[b.type]++)}),d(a,function(a,d){var e;e="string"==typeof d?d:d.title&&c[d.title]<=1?d.title:d.format&&c[d.format]<=1?d.format:d.type&&c[d.type]<=1?d.type:d.description&&c[d.description]<=1?d.descripton:d.title?d.title:d.format?d.format:d.type?d.type:d.description?d.description:JSON.stringify(d).length<50?JSON.stringify(d):"type",b.push(e)});var e={};return d(b,function(a,d){e[d]=e[d]||0,e[d]++,c[d]>1&&(b[a]=d+" "+e[d])}),b},getOption:function(a){try{throw"getOption is deprecated"}catch(b){window.console.error(b)}return this.options[a]},showValidationErrors:function(a){}}),f.defaults.editors["null"]=f.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),f.defaults.editors.string=f.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(a,b,c){if((!this.template||c)&&(null===a||"undefined"==typeof a?a="":"object"==typeof a?a=JSON.stringify(a):"string"!=typeof a&&(a=""+a),a!==this.serialized)){var d=this.sanitize(a);if(this.input.value!==d){this.input.value=d,this.sceditor_instance?this.sceditor_instance.val(d):this.epiceditor?this.epiceditor.importFile(null,d):this.ace_editor&&this.ace_editor.setValue(d);var e=c||this.getValue()!==a;this.refreshValue(),b?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(e)}}},getNumColumns:function(){var a,b=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return a="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(b,a))},build:function(){var a=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var b=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,b+1),d=1;this.schema.multipleOf&&(b%this.schema.multipleOf&&(b=Math.ceil(b/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),d=this.schema.multipleOf),this.input=this.theme.getRangeInput(b,c,d)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),a.schema.template)return void(this.value=a.value);var c=this.value,d=a.sanitize(c);c!==d&&(this.value=d),a.is_dirty=!0,a.refreshValue(),a.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(a){if(a){var b,c=a.offsetHeight;if(a.offsetHeight100);)b++,c++,a.style.height=c+"px";else{for(b=0;a.offsetHeight>=a.scrollHeight+3&&!(b>100);)b++,c--,a.style.height=c+"px";a.style.height=c+1+"px"}}},this.input.addEventListener("keyup",function(b){a.adjust_height(this)}),this.input.addEventListener("change",function(b){a.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){a.input.parentNode&&a.afterInputReady(),a.adjust_height&&a.adjust_height(a.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var a,b=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)a=c({},{plugins:"html"===b.input_type?"xhtml":"bbcode",emoticonsEnabled:!1,width:"100%",height:300},f.plugins.sceditor,b.options.sceditor_options||{}),window.jQuery(b.input).sceditor(a),b.sceditor_instance=window.jQuery(b.input).sceditor("instance"),b.sceditor_instance.blur(function(){var a=window.jQuery("
"+b.sceditor_instance.val()+"
");window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",a).remove(),b.input.value=a.html(),b.value=b.input.value,b.is_dirty=!0,b.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",a=c({},f.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(a).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var a=b.epiceditor.exportFile();b.input.value=a,b.value=a,b.is_dirty=!0,b.onChange(!0); -});else if(window.ace){var d=this.input_type;("cpp"===d||"c++"===d||"c"===d)&&(d="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),f.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+f.plugins.ace.theme),d=window.ace.require("ace/mode/"+d),d&&this.ace_editor.getSession().setMode(new d.Mode),this.ace_editor.on("change",function(){var a=b.ace_editor.getValue();b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInputReady(b.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(a){return a},onWatchedFieldChange:function(){var a;this.template&&(a=this.getWatchedFieldValues(),this.setValue(this.template(a),!1,!0)),this._super()},showValidationErrors:function(a){var b=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var c=[];d(a,function(a,d){d.path===b.path&&c.push(d.message)}),c.length?this.theme.addInputError(this.input,c.join(". ")+"."):this.theme.removeInputError(this.input)}}),f.defaults.editors.number=f.defaults.editors.string.extend({sanitize:function(a){return(a+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),f.defaults.editors.integer=f.defaults.editors.number.extend({sanitize:function(a){return a+="",a.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),f.defaults.editors.object=f.AbstractEditor.extend({getDefault:function(){return c({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].register()},unregister:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].disable()},layoutEditors:function(){var a,b,c=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(a,b){var d=c.editors[a].schema.propertyOrder,e=c.editors[b].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e});var e;if("grid"===this.format){var f=[];for(d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){for(var e=!1,g=d.options.hidden?0:d.options.grid_columns||d.getNumColumns(),h=d.options.hidden?0:d.container.offsetHeight,i=0;ih)&&(e=i);e===!1&&(f.push({width:0,minh:999999,maxh:0,editors:[]}),e=f.length-1),f[e].editors.push({key:b,width:g,height:h}),f[e].width+=g,f[e].minh=Math.min(f[e].minh,h),f[e].maxh=Math.max(f[e].maxh,h)}}),a=0;af[a].editors[g].width&&(g=b),f[a].editors[b].width*=12/f[a].width,f[a].editors[b].width=Math.floor(f[a].editors[b].width),h+=f[a].editors[b].width;12>h&&(f[a].editors[g].width+=12-h),f[a].width=12}if(this.layout===JSON.stringify(f))return!1;for(this.layout=JSON.stringify(f),e=document.createElement("div"),a=0;a=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(a in this.cached_editors)this.cached_editors.hasOwnProperty(a)&&(this.addPropertyCheckbox(a),this.isRequired(this.cached_editors[a])&&a in this.editors&&(this.addproperty_checkboxes[a].disabled=!0),"undefined"!=typeof this.schema.minProperties&&d<=this.schema.minProperties?(this.addproperty_checkboxes[a].disabled=this.addproperty_checkboxes[a].checked,this.addproperty_checkboxes[a].checked||(e=!0)):a in this.editors?(e=!0,c=!0):b||this.schema.properties.hasOwnProperty(a)?(this.addproperty_checkboxes[a].disabled=!1,e=!0):this.addproperty_checkboxes[a].disabled=!0);this.canHaveAdditionalProperties()&&(e=!0);for(a in this.schema.properties)this.schema.properties.hasOwnProperty(a)&&(this.cached_editors[a]||(e=!0,this.addPropertyCheckbox(a)));e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(a){return"boolean"==typeof a.schema.required?a.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(a.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},setValue:function(a,b){var c=this;a=a||{},("object"!=typeof a||Array.isArray(a))&&(a={}),d(this.cached_editors,function(d,e){"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";this.options.table_row&&(c.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),d(this.editors,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.array=f.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var a=0;a=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?c({},this.schema.additionalItems):void 0:c({},this.schema.items[a]):this.schema.items?c({},this.schema.items):{}},getItemInfo:function(a){var b=this.getItemSchema(a);this.item_info=this.item_info||{};var c=JSON.stringify(b);return"undefined"!=typeof this.item_info[c]?this.item_info[c]:(b=this.jsoneditor.expandRefs(b),this.item_info[c]={title:b.title||"item","default":b["default"],width:12,child_editors:b.properties||b.items},this.item_info[c])},getElementEditor:function(a){var b=this.getItemInfo(a),c=this.getItemSchema(a);c=this.jsoneditor.expandRefs(c),c.title=b.title+" "+(a+1);var d,e=this.jsoneditor.getEditorClass(c);d=this.tabs_holder?this.theme.getTabContent():b.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(d);var f=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:c,container:d,path:this.path+"."+a,parent:this,required:!0});return f.preBuild(),f.build(),f.postBuild(),f.title_controls||(f.array_controls=this.theme.getButtonHolder(),d.appendChild(f.array_controls)),f},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(a){if(this.rows){var b=this;d(this.rows,function(c,d){a&&(d.tab&&d.tab.parentNode&&d.tab.parentNode.removeChild(d.tab),b.destroyRow(d,!0),b.row_cache[c]=null),b.rows[c]=null}),b.rows=[],a&&(b.row_cache=[])}},destroyRow:function(a,b){var c=a.container;b?(a.destroy(),c.parentNode&&c.parentNode.removeChild(c),a.tab&&a.tab.parentNode&&a.tab.parentNode.removeChild(a.tab)):(a.tab&&(a.tab.style.display="none"),c.style.display="none",a.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(a){var b=this;d(this.rows,function(c,d){d.tab&&(a?d.tab_text.textContent=d.getHeaderText():d.tab===b.active_tab?(b.theme.markTabActive(d.tab),d.container.style.display=""):(b.theme.markTabInactive(d.tab),d.container.style.display="none"))})},setValue:function(a,b){a=a||[],Array.isArray(a)||(a=[a]);var c=JSON.stringify(a);if(c!==this.serialized){if(this.schema.minItems)for(;a.lengththis.getMax()&&(a=a.slice(0,this.getMax()));var e=this;d(a,function(a,c){e.rows[a]?e.rows[a].setValue(c,b):e.row_cache[a]?(e.rows[a]=e.row_cache[a],e.rows[a].setValue(c,b),e.rows[a].container.style.display="",e.rows[a].tab&&(e.rows[a].tab.style.display=""),e.rows[a].register()):e.addRow(c,b)});for(var f=a.length;f=this.rows.length;d(this.rows,function(a,c){c.movedown_button&&(a===b.rows.length-1?c.movedown_button.style.display="none":c.movedown_button.style.display=""),c.delete_button&&(e?c.delete_button.style.display="none":c.delete_button.style.display=""),b.value[a]=c.getValue()});var f=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",e||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0)):e||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",f=!0):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",f=!0),!this.collapsed&&f?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(a,b){var c=this,e=this.rows.length;c.rows[e]=this.getElementEditor(e),c.row_cache[e]=c.rows[e],c.tabs_holder&&(c.rows[e].tab_text=document.createElement("span"),c.rows[e].tab_text.textContent=c.rows[e].getHeaderText(),c.rows[e].tab=c.theme.getTab(c.rows[e].tab_text),c.rows[e].tab.addEventListener("click",function(a){c.active_tab=c.rows[e].tab,c.refreshTabs(),a.preventDefault(),a.stopPropagation()}),c.theme.addTab(c.tabs_holder,c.rows[e].tab));var f=c.rows[e].title_controls||c.rows[e].array_controls;c.hide_delete_buttons||(c.rows[e].delete_button=this.getButton(c.getItemTitle(),"delete","Delete "+c.getItemTitle()),c.rows[e].delete_button.className+=" delete",c.rows[e].delete_button.setAttribute("data-i",e),c.rows[e].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),e=c.getValue(),f=[],g=null;d(e,function(a,d){return a===b?void(c.rows[a].tab===c.active_tab&&(c.rows[a+1]?g=c.rows[a].tab:a&&(g=c.rows[a-1].tab))):void f.push(d)}),c.setValue(f),g&&(c.active_tab=g,c.refreshTabs()),c.onChange(!0)}),f&&f.appendChild(c.rows[e].delete_button)),e&&!c.hide_move_buttons&&(c.rows[e].moveup_button=this.getButton("","moveup","Move up"),c.rows[e].moveup_button.className+=" moveup",c.rows[e].moveup_button.setAttribute("data-i",e),c.rows[e].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i");if(!(0>=b)){var d=c.getValue(),e=d[b-1];d[b-1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b-1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].moveup_button)),c.hide_move_buttons||(c.rows[e].movedown_button=this.getButton("","movedown","Move down"),c.rows[e].movedown_button.className+=" movedown",c.rows[e].movedown_button.setAttribute("data-i",e),c.rows[e].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),d=c.getValue();if(!(b>=d.length-1)){var e=d[b+1];d[b+1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b+1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].movedown_button)),a&&c.rows[e].setValue(a,b),c.refreshTabs()},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button);var b=a.row_holder.style.display,c=a.controls.style.display;this.toggle_button.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel&&(a.panel.style.display=""),a.row_holder.style.display=b,a.tabs_holder&&(a.tabs_holder.style.display=""),a.controls.style.display=c,a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.row_holder.style.display="none",a.tabs_holder&&(a.tabs_holder.style.display="none"),a.controls.style.display="none",a.panel&&(a.panel.style.display="none"),a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.rows.length;a.row_cache[c]?(a.rows[c]=a.row_cache[c],a.rows[c].setValue(a.rows[c].getDefault()),a.rows[c].container.style.display="",a.rows[c].tab&&(a.rows[c].tab.style.display=""),a.rows[c].register()):a.addRow(),a.active_tab=a.rows[c].tab,a.refreshTabs(),a.refreshValue(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()), -this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue(),d=null;a.rows.length>1&&a.rows[a.rows.length-1].tab===a.active_tab&&(d=a.rows[a.rows.length-2].tab),c.pop(),a.setValue(c),d&&(a.active_tab=d,a.refreshTabs()),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button),a.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";d(this.rows,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.table=f.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var a=0;athis.schema.maxItems&&(a=a.slice(0,this.schema.maxItems));var c=JSON.stringify(a);if(c!==this.serialized){var e=!1,f=this;d(a,function(a,b){f.rows[a]?f.rows[a].setValue(b):(f.addRow(b),e=!0)});for(var g=a.length;g=this.rows.length,c=!1;d(this.rows,function(d,e){e.movedown_button&&(d===a.rows.length-1?e.movedown_button.style.display="none":(c=!0,e.movedown_button.style.display="")),e.delete_button&&(b?e.delete_button.style.display="none":(c=!0,e.delete_button.style.display="")),e.moveup_button&&(c=!0)}),d(this.rows,function(a,b){c?b.controls_cell.style.display="":b.controls_cell.style.display="none"}),c?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var e=!1;this.value.length?1===this.value.length||this.hide_delete_buttons?(this.table.style.display="",this.remove_all_rows_button.style.display="none",b||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0)):(this.table.style.display="",b||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",e=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",e=!0),e?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var a=this;this.value=[],d(this.rows,function(b,c){a.value[b]=c.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(a){var b=this,c=this.rows.length;b.rows[c]=this.getElementEditor(c);var e=b.rows[c].table_controls;this.hide_delete_buttons||(b.rows[c].delete_button=this.getButton("","delete","Delete"),b.rows[c].delete_button.className+=" delete",b.rows[c].delete_button.setAttribute("data-i",c),b.rows[c].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),e=b.getValue(),f=[];d(e,function(a,b){a!==c&&f.push(b)}),b.setValue(f),b.onChange(!0)}),e.appendChild(b.rows[c].delete_button)),c&&!this.hide_move_buttons&&(b.rows[c].moveup_button=this.getButton("","moveup","Move up"),b.rows[c].moveup_button.className+=" moveup",b.rows[c].moveup_button.setAttribute("data-i",c),b.rows[c].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i");if(!(0>=c)){var d=b.getValue(),e=d[c-1];d[c-1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].moveup_button)),this.hide_move_buttons||(b.rows[c].movedown_button=this.getButton("","movedown","Move down"),b.rows[c].movedown_button.className+=" movedown",b.rows[c].movedown_button.setAttribute("data-i",c),b.rows[c].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),d=b.getValue();if(!(c>=d.length-1)){var e=d[c+1];d[c+1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].movedown_button)),a&&b.rows[c].setValue(a)},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel.style.display="",a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.panel.style.display="none",a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.addRow(),a.refreshValue(),a.refreshRowButtons(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue();c.pop(),a.setValue(c),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button)}}),f.defaults.editors.multiple=f.AbstractEditor.extend({register:function(){if(this.editors){for(var a=0;anull";if("object"==typeof a){var c="";return d(a,function(d,e){var f=b.getHTML(e);Array.isArray(a)||(f="
"+d+": "+f+"
"),c+="
  • "+f+"
  • "}),c=Array.isArray(a)?"
      "+c+"
    ":"
      "+c+"
    "}return"boolean"==typeof a?a?"true":"false":"string"==typeof a?a.replace(/&/g,"&").replace(//g,">"):a},setValue:function(a){this.value!==a&&(this.value=a,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),f.defaults.editors.select=f.AbstractEditor.extend({setValue:function(a,b){a=this.typecast(a||"");var c=a;this.enum_values.indexOf(c)<0&&(c=this.enum_values[0]),this.value!==c&&(this.input.value=this.enum_options[this.enum_values.indexOf(c)],this.select2&&this.select2.select2("val",this.input.value),this.value=c,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var a=this.getTitle().length,b=0;b2||this.enum_options.length&&this.enumSource)){var a=c({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){b.input.value=b.select2.select2("val"),b.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;eType: "+a+", Size: "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===a.substr(0,5)){this.preview.innerHTML+="
    ";var b=document.createElement("img");b.style.maxWidth="100%",b.style.maxHeight="100px",b.src=this.value,this.preview.appendChild(b)}}else this.preview.innerHTML="Invalid data URI"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.upload=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.preview_value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}var b=this.schema.description;b||(b=""),this.preview=this.theme.getFormInputDescription(b),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var a=this,b=this.preview_value.match(/^data:([^;,]+)[;,]/);b&&(b=b[1]),b||(b="unknown");var c=this.uploader.files[0];if(this.preview.innerHTML="Type: "+b+", Size: "+c.size+" bytes","image"===b.substr(0,5)){this.preview.innerHTML+="
    ";var d=document.createElement("img");d.style.maxWidth="100%",d.style.maxHeight="100px",d.src=this.preview_value, -this.preview.appendChild(d)}this.preview.innerHTML+="
    ";var e=this.getButton("Upload","upload","Upload");this.preview.appendChild(e),e.addEventListener("click",function(b){b.preventDefault(),e.setAttribute("disabled","disabled"),a.theme.removeInputError(a.uploader),a.theme.getProgressBar&&(a.progressBar=a.theme.getProgressBar(),a.preview.appendChild(a.progressBar)),a.jsoneditor.options.upload(a.path,c,{success:function(b){a.setValue(b),a.parent?a.parent.onChildEditorChange(a):a.jsoneditor.onChange(),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},failure:function(b){a.theme.addInputError(a.uploader,b),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},updateProgress:function(b){a.progressBar&&(b?a.theme.updateProgressBar(a.progressBar,b):a.theme.updateProgressBarUnknown(a.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.checkbox=f.AbstractEditor.extend({setValue:function(a,b){this.value=!!a,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var a=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.value=this.checked,a.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}});var g=function(){var a=document.documentElement;return a.matches?"matches":a.webkitMatchesSelector?"webkitMatchesSelector":a.mozMatchesSelector?"mozMatchesSelector":a.msMatchesSelector?"msMatchesSelector":a.oMatchesSelector?"oMatchesSelector":void 0}();f.AbstractTheme=a.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.cssFloat="right",a.style.marginLeft="10px",a},getModal:function(){var a=document.createElement("div");return a.style.backgroundColor="white",a.style.border="1px solid black",a.style.boxShadow="3px 3px black",a.style.position="absolute",a.style.zIndex="10",a.style.display="none",a},getGridContainer:function(){var a=document.createElement("div");return a},getGridRow:function(){var a=document.createElement("div");return a.className="row",a},getGridColumn:function(){var a=document.createElement("div");return a},setGridColumnSize:function(a,b){},getLink:function(a){var b=document.createElement("a");return b.setAttribute("href","#"),b.appendChild(document.createTextNode(a)),b},disableHeader:function(a){a.style.color="#ccc"},disableLabel:function(a){a.style.color="#ccc"},enableHeader:function(a){a.style.color=""},enableLabel:function(a){a.style.color=""},getFormInputLabel:function(a){var b=document.createElement("label");return b.appendChild(document.createTextNode(a)),b},getCheckboxLabel:function(a){var b=this.getFormInputLabel(a);return b.style.fontWeight="normal",b},getHeader:function(a,b){var c=document.createElement("h3");return"string"==typeof a?c.textContent=a:c.appendChild(a),b&&(c.className+=" required"),c},getCheckbox:function(){var a=this.getFormInputField("checkbox");return a.style.display="inline-block",a.style.width="auto",a},getMultiCheckboxHolder:function(a,b,c){var d=document.createElement("div");b&&(b.style.display="block",d.appendChild(b));for(var e in a)a.hasOwnProperty(e)&&(a[e].style.display="inline-block",a[e].style.marginRight="20px",d.appendChild(a[e]));return c&&d.appendChild(c),d},getSelectInput:function(a){var b=document.createElement("select");return a&&this.setSelectOptions(b,a),b},getSwitcher:function(a){var b=this.getSelectInput(a);return b.style.backgroundColor="transparent",b.style.display="inline-block",b.style.fontStyle="italic",b.style.fontWeight="normal",b.style.height="auto",b.style.marginBottom=0,b.style.marginLeft="5px",b.style.padding="0 0 0 3px",b.style.width="auto",b},getSwitcherOptions:function(a){return a.getElementsByTagName("option")},setSwitcherOptions:function(a,b,c){this.setSelectOptions(a,b,c)},setSelectOptions:function(a,b,c){c=c||[],a.innerHTML="";for(var d=0;d'),a.errmsg=a.parentNode.getElementsByClassName("error")[0]),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.group.className=a.group.className.replace(/ error/g,""),a.errmsg.style.display="none")},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("span");return b.className="meter",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.firstChild.style.width="100%")}}),f.defaults.themes.foundation3=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c},getTabHolder:function(){var a=document.createElement("div");return a.className="row",a.innerHTML="
    ",a},setGridColumnSize:function(a,b){var c=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];a.className="columns "+c[b]},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation4=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},setGridColumnSize:function(a,b){a.className="columns large-"+b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c}}),f.defaults.themes.foundation5=f.defaults.themes.foundation.extend({getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},setGridColumnSize:function(a,b){a.className="columns medium-"+b},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className=d.className.replace(/\s*small/g,"")+" tiny",d},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="
    ",a},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.html=f.AbstractTheme.extend({getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="block",c.style.marginBottom="3px",c.style.fontWeight="bold",b&&(c.className+=" required"),c},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8em",b.style.margin=0,b.style.display="inline-block",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=this._super();return a.style.border="1px solid #ddd",a.style.padding="5px",a.style.margin="5px",a.style.borderRadius="3px",a},getChildEditorHolder:function(){var a=this._super();return a.style.marginBottom="8px",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.fontSize=".8em",a.style.verticalAlign="middle",a},getTable:function(){var a=this._super();return a.style.borderBottom="1px solid #ccc",a.style.marginBottom="5px",a},addInputError:function(a,b){if(a.style.borderColor="red",a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),a.errmsg.style=a.errmsg.style||{},a.errmsg.style.color="red",c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.defaults.themes.jqueryui=f.AbstractTheme.extend({getTable:function(){var a=this._super();return a.setAttribute("cellpadding",5),a.setAttribute("cellspacing",0),a},getTableHeaderCell:function(a){var b=this._super(a);return b.className="ui-state-active",b.style.fontWeight="bold",b},getTableCell:function(){var a=this._super();return a.className="ui-widget-content",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a.style.fontSize=".6em",a.style.display="inline-block",a},getFormInputDescription:function(a){var b=this.getDescription(a);return b.style.marginLeft="10px",b.style.display="inline-block",b},getFormControl:function(a,b,c){var d=this._super(a,b,c);return"checkbox"===b.type?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d},getDescription:function(a){var b=document.createElement("span");return b.style.fontSize=".8em",b.style.fontStyle="italic",b.textContent=a,b},getButtonHolder:function(){var a=document.createElement("div");return a.className="ui-buttonset",a.style.fontSize=".7em",a},getFormInputLabel:function(a,b){var c=document.createElement("label");return c.style.fontWeight="bold",c.style.display="block",b&&(c.className+=" required"),c.textContent=a,c},getButton:function(a,b,c){var d=document.createElement("button");d.className="ui-button ui-widget ui-state-default ui-corner-all",b&&!a?(d.className+=" ui-button-icon-only",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):b?(d.className+=" ui-button-text-icon-primary",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):d.className+=" ui-button-text-only";var e=document.createElement("span");return e.className="ui-button-text",e.textContent=a||c||".",d.appendChild(e),d.setAttribute("title",c),d},setButtonText:function(a,b,c,d){a.innerHTML="",a.className="ui-button ui-widget ui-state-default ui-corner-all",c&&!b?(a.className+=" ui-button-icon-only",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):c?(a.className+=" ui-button-text-icon-primary",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):a.className+=" ui-button-text-only";var e=document.createElement("span");e.className="ui-button-text",e.textContent=b||d||".",a.appendChild(e),a.setAttribute("title",d)},getIndentedPanel:function(){var a=document.createElement("div");return a.className="ui-widget-content ui-corner-all",a.style.padding="1em 1.4em",a.style.marginBottom="20px",a},afterInputReady:function(a){a.controls||(a.controls=this.closest(a,".form-control"))},addInputError:function(a,b){a.controls&&(a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("div"),a.errmsg.className="ui-state-error",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none")},markTabActive:function(a){a.className=a.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(a){a.className=a.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),f.AbstractIconLib=a.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(a){return this.mapping[a]?this.icon_prefix+this.mapping[a]:null},getIcon:function(a){var b=this.getIconClass(a);if(!b)return null;var c=document.createElement("i");return c.className=b,c}}),f.defaults.iconlibs.bootstrap2=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.bootstrap3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),f.defaults.iconlibs.fontawesome3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.fontawesome4=f.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),f.defaults.iconlibs.foundation2=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),f.defaults.iconlibs.foundation3=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),f.defaults.iconlibs.jqueryui=f.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),f.defaults.templates["default"]=function(){return{compile:function(a){var b=a.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),c=b&&b.length;if(!c)return function(){return a};for(var d=[],e=function(a){var c,e=b[a].replace(/[{}]+/g,"").trim().split("."),f=e.length;if(f>1){var g;c=function(b){for(g=b,a=0;f>a&&(g=g[e[a]],g);a++);return g}}else e=e[0],c=function(a){return a[e]};d.push({s:b[a],r:c})},f=0;c>f;f++)e(f);return function(b){var e,g=a+"";for(f=0;c>f;f++)e=d[f],g=g.replace(e.s,e.r(b));return g}}}},f.defaults.templates.ejs=function(){return window.EJS?{compile:function(a){var b=new window.EJS({text:a});return function(a){return b.render(a)}}}:!1},f.defaults.templates.handlebars=function(){return window.Handlebars},f.defaults.templates.hogan=function(){return window.Hogan?{compile:function(a){var b=window.Hogan.compile(a);return function(a){return b.render(a)}}}:!1},f.defaults.templates.markup=function(){return window.Mark&&window.Mark.up?{compile:function(a){return function(b){return window.Mark.up(a,b)}}}:!1},f.defaults.templates.mustache=function(){return window.Mustache?{compile:function(a){return function(b){return window.Mustache.render(a,b)}}}:!1},f.defaults.templates.swig=function(){return window.swig},f.defaults.templates.underscore=function(){return window._?{compile:function(a){return function(b){return window._.template(a,b)}}}:!1},f.defaults.theme="html",f.defaults.template="default",f.defaults.options={},f.defaults.translate=function(a,b){var c=f.defaults.languages[f.defaults.language];if(!c)throw"Unknown language "+f.defaults.language;var d=c[a]||f.defaults.languages[f.defaults.default_language][a];if("undefined"==typeof d)throw"Unknown translate string "+a;if(b)for(var e=0;e=0?"multiselect":void 0}),f.defaults.resolvers.unshift(function(a){return a.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var a=window.jQuery||window.Zepto;a.jsoneditor=f.defaults,a.fn.jsoneditor=function(a){var b=this,c=this.data("jsoneditor");if("value"===a){if(!c)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return c.getValue();c.setValue(arguments[1])}else{if("validate"===a){if(!c)throw"Must initialize jsoneditor before validating";return arguments.length>1?c.validate(arguments[1]):c.validate()}"destroy"===a?c&&(c.destroy(),this.data("jsoneditor",null)):(c&&c.destroy(),c=new f(this.get(0),a),this.data("jsoneditor",c),c.on("change",function(){b.trigger("change")}),c.on("ready",function(){b.trigger("ready")}))}return this}}}(),window.JSONEditor=f}(); \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/lodash.min.js b/readerApplication/src/main/resources/public/lib/lodash.min.js deleted file mode 100644 index 05870d1c..00000000 --- a/readerApplication/src/main/resources/public/lib/lodash.min.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @license - * lodash 3.10.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash compat -o ./lodash.js` - */ -;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n); -}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r=F&&mu&&hu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++oi(t,a,0)&&u.push(a);return u}function lt(n,t){var r=true;return zu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t,r,e){var u=e,o=u;return zu(n,function(n,i,f){ -i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,o=n)}),o}function pt(n,t){var r=[];return zu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function _t(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++ut&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=De(u);++e=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function Ft(n,t){var r=0;return zu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=jr(),o=n.length,i=u===r,f=i&&o>=F,a=f&&mu&&hu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++eu(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Nt(n,t){for(var r=-1,e=t.length,u=De(e);++r>>1,i=n[o];(r?i<=t:iu?w:o,u=1);++e=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++uarguments.length;return typeof e=="function"&&o===w&&Wo(r)?n(r,e,u,i):Ct(r,br(e,o,4),u,i,t)}}function hr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,x=m,j=De(m);x--;)j[x]=arguments[x];if(e&&(j=qt(j,e,u)),o&&(j=Kt(j,o,i)),_||y){var x=l.placeholder,k=v(j,x),m=m-k.length;if(mt?0:t)):[]}function Vr(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1), -t=e-(+t||0),St(n,0,0>t?0:t)):[]}function Zr(n){return n?n[0]:w}function Yr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=zt(n,t),er?ju(u+r,0):r||0,typeof n=="string"||!Wo(n)&&Ae(n)?r<=u&&-1t?0:+t||0,e);++r=n&&(t=w),r}}function le(n,t,r){function e(t,r){r&&cu(r),a=p=h=w,t&&(_=wo(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(wo()-l);0>=n||n>t?e(h,a):p=_u(u,n)}function o(){e(g,p)}function i(){if(f=arguments,l=wo(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=cu(a)),_=l,c=n.apply(s,f)):a||(a=_u(o,e))}return i&&p?p=cu(p):p||t===v||(p=_u(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Xe(T); -if(t=0>t?0:+t||0,true===r)var y=true,g=false;else de(r)&&(y=!!r.leading,v="maxWait"in r&&ju(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&cu(p),a&&cu(a),_=0,a=p=h=w},i}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new Xe(T);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function pe(n,t){if(typeof n!="function")throw new Xe(T);return t=ju(t===w?n.length-1:+t||0,0), -function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),o=De(u);++et}function _e(n){return h(n)&&Sr(n)&&eu.call(n,"callee")&&!pu.call(n,"callee")}function ve(n,t,r,e){return e=(r=typeof r=="function"?Dt(r,e,3):w)?r(n,t):w,e===w?wt(n,t,r):!!e}function ge(n){return h(n)&&typeof n.message=="string"&&ou.call(n)==q; -}function ye(n){return de(n)&&ou.call(n)==K}function de(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function me(n){return null==n?false:ye(n)?fu.test(ru.call(n)):h(n)&&(Gn(n)?fu:In).test(n)}function we(n){return typeof n=="number"||h(n)&&ou.call(n)==V}function xe(n){var t;if(!h(n)||ou.call(n)!=Z||Gn(n)||_e(n)||!(eu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return Nn.support.ownLast?(vt(n,function(n,t,e){return r=eu.call(e,t),false}),false!==r):(vt(n,function(n,t){ -r=t}),r===w||eu.call(n,r))}function be(n){return de(n)&&ou.call(n)==Y}function Ae(n){return typeof n=="string"||h(n)&&ou.call(n)==G}function je(n){return h(n)&&Lr(n.length)&&!!Fn[ou.call(n)]}function ke(n,t){return nt||!n||!bu(t))return r;do t%2&&(r+=n),t=wu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function Fe(n,t,r){return r&&$r(n,t,r)&&(t=w),n=u(n),n.match(t||Un)||[]}function Le(n,t,r){return r&&$r(n,t,r)&&(t=w),h(n)?Te(n):it(n,t)}function Ne(n){return n}function Te(n){return At(ft(n,true))}function Pe(n,t,r){if(null==r){var e=de(t),u=e?Ko(t):w;((u=u&&u.length?dt(t,u):w)?u.length:e)||(u=false, -r=t,t=n,n=this)}u||(u=dt(t,Ko(t)));var o=true,e=-1,i=ye(n),f=u.length;false===r?o=false:de(r)&&"chain"in r&&(o=r.chain);for(;++e=$)return r}else n=0;return qu(r,e)}}(),Yu=pe(function(n,t){return h(n)&&Sr(n)?ct(n,_t(t,false,true)):[]}),Gu=er(),Ju=er(true),Xu=pe(function(n){for(var t=n.length,e=t,u=De(l),o=jr(),i=o===r,f=[];e--;){var a=n[e]=Sr(a=n[e])?a:[];u[e]=i&&120<=a.length&&mu&&hu?new Dn(e&&a):null; -}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Hu=pe(function(t,r){r=_t(r);var e=ut(t,r);return Rt(t,r.sort(n)),e}),Qu=yr(),no=yr(true),to=pe(function(n){return Lt(_t(n,false,true))}),ro=pe(function(n,t){return Sr(n)?ct(n,t):[]}),eo=pe(Hr),uo=pe(function(n){var t=n.length,r=2--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&$r(n,t,r)&&(t=w),t=n&&null==t?n.length:ju(+t||0,0),dr(n,E,w,w,w,w,t)},Nn.assign=Lo,Nn.at=io,Nn.before=ce,Nn.bind=xo,Nn.bindAll=bo,Nn.bindKey=Ao,Nn.callback=Le,Nn.chain=te,Nn.chunk=function(n,t,r){t=(r?$r(n,t,r):null==t)?1:ju(wu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=De(du(e/t));rr&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;rt?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),false,true):[]; -},Nn.takeWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Xe(T);return false===r?e=false:de(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=re,Nn.times=function(n,t,r){if(n=wu(n),1>n||!bu(n))return[];var e=-1,u=De(ku(n,4294967295));for(t=Dt(t,r,1);++ee?u[e]=t(e):t(e);return u},Nn.toArray=Oe, -Nn.toPlainObject=Ie,Nn.transform=function(n,t,r,e){var u=Wo(n)||je(n);return t=br(t,e,4),null==r&&(u||de(n)?(e=n.constructor,r=u?Wo(n)?new e:[]:Pu(ye(e)?e.prototype:w)):r={}),(u?Kn:gt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=to,Nn.uniq=Xr,Nn.unzip=Hr,Nn.unzipWith=Qr,Nn.values=Se,Nn.valuesIn=function(n){return Nt(n,Ee(n))},Nn.where=function(n,t){return ue(n,At(t))},Nn.without=ro,Nn.wrap=function(n,t){return t=null==t?Ne:t,dr(t,I,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++nr?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&xn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=ee,Nn.find=ao,Nn.findIndex=Gu,Nn.findKey=Po,Nn.findLast=co, -Nn.findLastIndex=Ju,Nn.findLastKey=zo,Nn.findWhere=function(n,t){return ao(n,At(t))},Nn.first=Zr,Nn.floor=ii,Nn.get=function(n,t,r){return n=null==n?w:mt(n,Mr(t),t+""),n===w?r:n},Nn.gt=he,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=eu.call(n,t);if(!r&&!Wr(t)){if(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),null==n)return false;t=Gr(t),r=eu.call(n,t)}return r||Lr(n.length)&&Ur(t,n.length)&&(Wo(n)||_e(n)||Ae(n))},Nn.identity=Ne,Nn.includes=oe,Nn.indexOf=Yr,Nn.inRange=function(n,t,r){ -return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=ku(t,r)&&nr?ju(e+r,0):ku(r||0,e-1))+1;else if(r)return u=zt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1; -if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=ke,Nn.lte=function(n,t){return n<=t},Nn.max=fi,Nn.min=ai,Nn.noConflict=function(){return Yn._=iu,this},Nn.noop=ze,Nn.now=wo,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return er?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&$r(n,t,r)&&(t=w),t=br(t,r,3),1==t.length){n=Wo(n)?n:Br(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=Ft(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&$r(n,t,r)&&(t=r=w),n=u(n),t=rt(et({},r||t),e,tt),r=rt(et({},t.imports),e.imports,tt); -var o,i,f=Ko(r),a=Nt(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ge((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Sn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"), -l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=ri(function(){return Ke(f,p+"return "+l).apply(w,a)}),t.source=l,ge(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?$r(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n; -},Nn.trunc=function(n,t,r){r&&$r(n,t,r)&&(t=w);var e=S;if(r=U,null!=t)if(de(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(be(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ge(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o), --1u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Kn(["filter","map","takeWhile"],function(n,t){ -var r=t+1,e=r!=N;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:br(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?At:Be;zn.prototype[n]=function(n){ -return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Ne)},zn.prototype.reject=function(n,t){return n=br(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Cu); -},gt(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){var t=e?[1]:arguments,o=this.__chain__,i=this.__wrapped__,f=!!this.__actions__.length,a=i instanceof zn,c=t[0],l=a||Wo(i);l&&r&&typeof c=="function"&&1!=c.length&&(a=l=false);var s=function(n){return e&&o?u(n,1)[0]:u.apply(w,Hn([n],t))},c={func:re,args:[s],thisArg:w},f=a&&!f;return e&&!o?f?(i=i.clone(),i.__actions__.push(c), -n.call(i)):u.call(w,this.value())[0]:!e&&l?(i=f?i:new zn(this),i=n.apply(i,t),i.__actions__.push(c),new Pn(i,o)):this.thru(s)})}),Kn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?tu:He)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=!Tu.spliceObjects&&/^(?:pop|shift|splice)$/.test(n),u=/^(?:join|pop|replace|shift)$/.test(n),o=e?function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n}:t;Nn.prototype[n]=function(){ -var n=arguments;return u&&!this.__chain__?o.apply(this.value(),n):this[r](function(t){return o.apply(t,n)})}}),gt(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Fu[e]||(Fu[e]=[])).push({name:t,func:r})}}),Fu[hr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__), -n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,a=-1,c=f.length;++a"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,xn=RegExp(wn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,In=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Sn=/['\n\r\u2028\u2029\\]/g,Un=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Wn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Fn={}; -Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[z]=Fn[B]=Fn[J]=Fn[D]=Fn[M]=Fn[q]=Fn[K]=Fn["[object Map]"]=Fn[V]=Fn[Z]=Fn[Y]=Fn["[object Set]"]=Fn[G]=Fn["[object WeakMap]"]=false;var Ln={};Ln[z]=Ln[B]=Ln[J]=Ln[D]=Ln[M]=Ln[X]=Ln[H]=Ln[Q]=Ln[nn]=Ln[tn]=Ln[V]=Ln[Z]=Ln[Y]=Ln[G]=Ln[rn]=Ln[en]=Ln[un]=Ln[on]=true,Ln[q]=Ln[K]=Ln["[object Map]"]=Ln["[object Set]"]=Ln["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a", -"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y", -"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Pn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\", -"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Kn=zn[typeof self]&&self&&self.Object&&self,Vn=zn[typeof window]&&window&&window.Object&&window,Zn=qn&&qn.exports===Mn&&Mn,Yn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Vn!==(this&&this.window)&&Vn||Kn||this,Gn=function(){try{Object({toString:0}+"")}catch(n){return function(){return false}}return function(n){ -return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Jn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Jn, define(function(){return Jn})):Mn&&qn?Zn?(qn.exports=Jn)._=Jn:Mn._=Jn:Yn._=Jn}).call(this); \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/marked.js b/readerApplication/src/main/resources/public/lib/marked.js deleted file mode 100644 index c2a678d5..00000000 --- a/readerApplication/src/main/resources/public/lib/marked.js +++ /dev/null @@ -1,1272 +0,0 @@ -/** - * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked - */ - -;(function() { - -/** - * Block-Level Grammar - */ - -var block = { - newline: /^\n+/, - code: /^( {4}[^\n]+\n*)+/, - fences: noop, - hr: /^( *[-*_]){3,} *(?:\n+|$)/, - heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, - nptable: noop, - lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, - blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, - list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, - def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, - table: noop, - paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, - text: /^[^\n]+/ -}; - -block.bullet = /(?:[*+-]|\d+\.)/; -block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; -block.item = replace(block.item, 'gm') - (/bull/g, block.bullet) - (); - -block.list = replace(block.list) - (/bull/g, block.bullet) - ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') - ('def', '\\n+(?=' + block.def.source + ')') - (); - -block.blockquote = replace(block.blockquote) - ('def', block.def) - (); - -block._tag = '(?!(?:' - + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' - + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' - + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; - -block.html = replace(block.html) - ('comment', //) - ('closed', /<(tag)[\s\S]+?<\/\1>/) - ('closing', /])*?>/) - (/tag/g, block._tag) - (); - -block.paragraph = replace(block.paragraph) - ('hr', block.hr) - ('heading', block.heading) - ('lheading', block.lheading) - ('blockquote', block.blockquote) - ('tag', '<' + block._tag) - ('def', block.def) - (); - -/** - * Normal Block Grammar - */ - -block.normal = merge({}, block); - -/** - * GFM Block Grammar - */ - -block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, - paragraph: /^/ -}); - -block.gfm.paragraph = replace(block.paragraph) - ('(?!', '(?!' - + block.gfm.fences.source.replace('\\1', '\\2') + '|' - + block.list.source.replace('\\1', '\\3') + '|') - (); - -/** - * GFM + Tables Block Grammar - */ - -block.tables = merge({}, block.gfm, { - nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, - table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ -}); - -/** - * Block Lexer - */ - -function Lexer(options) { - this.tokens = []; - this.tokens.links = {}; - this.options = options || marked.defaults; - this.rules = block.normal; - - if (this.options.gfm) { - if (this.options.tables) { - this.rules = block.tables; - } else { - this.rules = block.gfm; - } - } -} - -/** - * Expose Block Rules - */ - -Lexer.rules = block; - -/** - * Static Lex Method - */ - -Lexer.lex = function(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); -}; - -/** - * Preprocessing - */ - -Lexer.prototype.lex = function(src) { - src = src - .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); - - return this.token(src, true); -}; - -/** - * Lexing - */ - -Lexer.prototype.token = function(src, top, bq) { - var src = src.replace(/^ +$/gm, '') - , next - , loose - , cap - , bull - , b - , item - , space - , i - , l; - - while (src) { - // newline - if (cap = this.rules.newline.exec(src)) { - src = src.substring(cap[0].length); - if (cap[0].length > 1) { - this.tokens.push({ - type: 'space' - }); - } - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - cap = cap[0].replace(/^ {4}/gm, ''); - this.tokens.push({ - type: 'code', - text: !this.options.pedantic - ? cap.replace(/\n+$/, '') - : cap - }); - continue; - } - - // fences (gfm) - if (cap = this.rules.fences.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'code', - lang: cap[2], - text: cap[3] - }); - continue; - } - - // heading - if (cap = this.rules.heading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[1].length, - text: cap[2] - }); - continue; - } - - // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i].split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // lheading - if (cap = this.rules.lheading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[2] === '=' ? 1 : 2, - text: cap[1] - }); - continue; - } - - // hr - if (cap = this.rules.hr.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'hr' - }); - continue; - } - - // blockquote - if (cap = this.rules.blockquote.exec(src)) { - src = src.substring(cap[0].length); - - this.tokens.push({ - type: 'blockquote_start' - }); - - cap = cap[0].replace(/^ *> ?/gm, ''); - - // Pass `top` to keep the current - // "toplevel" state. This is exactly - // how markdown.pl works. - this.token(cap, top, true); - - this.tokens.push({ - type: 'blockquote_end' - }); - - continue; - } - - // list - if (cap = this.rules.list.exec(src)) { - src = src.substring(cap[0].length); - bull = cap[2]; - - this.tokens.push({ - type: 'list_start', - ordered: bull.length > 1 - }); - - // Get each top-level item. - cap = cap[0].match(this.rules.item); - - next = false; - l = cap.length; - i = 0; - - for (; i < l; i++) { - item = cap[i]; - - // Remove the list item's bullet - // so it is seen as the next token. - space = item.length; - item = item.replace(/^ *([*+-]|\d+\.) +/, ''); - - // Outdent whatever the - // list item contains. Hacky. - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic - ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') - : item.replace(/^ {1,4}/gm, ''); - } - - // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - if (this.options.smartLists && i !== l - 1) { - b = block.bullet.exec(cap[i + 1])[0]; - if (bull !== b && !(bull.length > 1 && b.length > 1)) { - src = cap.slice(i + 1).join('\n') + src; - i = l - 1; - } - } - - // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - loose = next || /\n\n(?!\s*$)/.test(item); - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - this.tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start' - }); - - // Recurse. - this.token(item, false, bq); - - this.tokens.push({ - type: 'list_item_end' - }); - } - - this.tokens.push({ - type: 'list_end' - }); - - continue; - } - - // html - if (cap = this.rules.html.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', - pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style', - text: cap[0] - }); - continue; - } - - // def - if ((!bq && top) && (cap = this.rules.def.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.links[cap[1].toLowerCase()] = { - href: cap[2], - title: cap[3] - }; - continue; - } - - // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i] - .replace(/^ *\| *| *\| *$/g, '') - .split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'paragraph', - text: cap[1].charAt(cap[1].length - 1) === '\n' - ? cap[1].slice(0, -1) - : cap[1] - }); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - // Top-level should never reach here. - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'text', - text: cap[0] - }); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return this.tokens; -}; - -/** - * Inline-Level Grammar - */ - -var inline = { - escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, - autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, - url: noop, - tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, - link: /^!?\[(inside)\]\(href\)/, - reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, - nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, - strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, - br: /^ {2,}\n(?!\s*$)/, - del: noop, - text: /^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/; - -inline.link = replace(inline.link) - ('inside', inline._inside) - ('href', inline._href) - (); - -inline.reflink = replace(inline.reflink) - ('inside', inline._inside) - (); - -/** - * Normal Inline Grammar - */ - -inline.normal = merge({}, inline); - -/** - * Pedantic Inline Grammar - */ - -inline.pedantic = merge({}, inline.normal, { - strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ -}); - -/** - * GFM Inline Grammar - */ - -inline.gfm = merge({}, inline.normal, { - escape: replace(inline.escape)('])', '~|])')(), - url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, - del: /^~~(?=\S)([\s\S]*?\S)~~/, - text: replace(inline.text) - (']|', '~]|') - ('|', '|https?://|') - () -}); - -/** - * GFM + Line Breaks Inline Grammar - */ - -inline.breaks = merge({}, inline.gfm, { - br: replace(inline.br)('{2,}', '*')(), - text: replace(inline.gfm.text)('{2,}', '*')() -}); - -/** - * Inline Lexer & Compiler - */ - -function InlineLexer(links, options) { - this.options = options || marked.defaults; - this.links = links; - this.rules = inline.normal; - this.renderer = this.options.renderer || new Renderer; - this.renderer.options = this.options; - - if (!this.links) { - throw new - Error('Tokens array requires a `links` property.'); - } - - if (this.options.gfm) { - if (this.options.breaks) { - this.rules = inline.breaks; - } else { - this.rules = inline.gfm; - } - } else if (this.options.pedantic) { - this.rules = inline.pedantic; - } -} - -/** - * Expose Inline Rules - */ - -InlineLexer.rules = inline; - -/** - * Static Lexing/Compiling Method - */ - -InlineLexer.output = function(src, links, options) { - var inline = new InlineLexer(links, options); - return inline.output(src); -}; - -/** - * Lexing/Compiling - */ - -InlineLexer.prototype.output = function(src) { - var out = '' - , link - , text - , href - , cap; - - while (src) { - // escape - if (cap = this.rules.escape.exec(src)) { - src = src.substring(cap[0].length); - out += cap[1]; - continue; - } - - // autolink - if (cap = this.rules.autolink.exec(src)) { - src = src.substring(cap[0].length); - if (cap[2] === '@') { - text = cap[1].charAt(6) === ':' - ? this.mangle(cap[1].substring(7)) - : this.mangle(cap[1]); - href = this.mangle('mailto:') + text; - } else { - text = escape(cap[1]); - href = text; - } - out += this.renderer.link(href, null, text); - continue; - } - - // url (gfm) - if (!this.inLink && (cap = this.rules.url.exec(src))) { - src = src.substring(cap[0].length); - text = escape(cap[1]); - href = text; - out += this.renderer.link(href, null, text); - continue; - } - - // tag - if (cap = this.rules.tag.exec(src)) { - if (!this.inLink && /^/i.test(cap[0])) { - this.inLink = false; - } - src = src.substring(cap[0].length); - out += this.options.sanitize - ? escape(cap[0]) - : cap[0]; - continue; - } - - // link - if (cap = this.rules.link.exec(src)) { - src = src.substring(cap[0].length); - this.inLink = true; - out += this.outputLink(cap, { - href: cap[2], - title: cap[3] - }); - this.inLink = false; - continue; - } - - // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { - src = src.substring(cap[0].length); - link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = this.links[link.toLowerCase()]; - if (!link || !link.href) { - out += cap[0].charAt(0); - src = cap[0].substring(1) + src; - continue; - } - this.inLink = true; - out += this.outputLink(cap, link); - this.inLink = false; - continue; - } - - // strong - if (cap = this.rules.strong.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.strong(this.output(cap[2] || cap[1])); - continue; - } - - // em - if (cap = this.rules.em.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.em(this.output(cap[2] || cap[1])); - continue; - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.codespan(escape(cap[2], true)); - continue; - } - - // br - if (cap = this.rules.br.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.br(); - continue; - } - - // del (gfm) - if (cap = this.rules.del.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.del(this.output(cap[1])); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - src = src.substring(cap[0].length); - out += escape(this.smartypants(cap[0])); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return out; -}; - -/** - * Compile Link - */ - -InlineLexer.prototype.outputLink = function(cap, link) { - var href = escape(link.href) - , title = link.title ? escape(link.title) : null; - - return cap[0].charAt(0) !== '!' - ? this.renderer.link(href, title, this.output(cap[1])) - : this.renderer.image(href, title, escape(cap[1])); -}; - -/** - * Smartypants Transformations - */ - -InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) return text; - return text - // em-dashes - .replace(/--/g, '\u2014') - // opening singles - .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') - // closing singles & apostrophes - .replace(/'/g, '\u2019') - // opening doubles - .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') - // closing doubles - .replace(/"/g, '\u201d') - // ellipses - .replace(/\.{3}/g, '\u2026'); -}; - -/** - * Mangle Links - */ - -InlineLexer.prototype.mangle = function(text) { - var out = '' - , l = text.length - , i = 0 - , ch; - - for (; i < l; i++) { - ch = text.charCodeAt(i); - if (Math.random() > 0.5) { - ch = 'x' + ch.toString(16); - } - out += '&#' + ch + ';'; - } - - return out; -}; - -/** - * Renderer - */ - -function Renderer(options) { - this.options = options || {}; -} - -Renderer.prototype.code = function(code, lang, escaped) { - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '
    '
    -      + (escaped ? code : escape(code, true))
    -      + '\n
    '; - } - - return '
    '
    -    + (escaped ? code : escape(code, true))
    -    + '\n
    \n'; -}; - -Renderer.prototype.blockquote = function(quote) { - return '
    \n' + quote + '
    \n'; -}; - -Renderer.prototype.html = function(html) { - return html; -}; - -Renderer.prototype.heading = function(text, level, raw) { - return '' - + text - + '\n'; -}; - -Renderer.prototype.hr = function() { - return this.options.xhtml ? '
    \n' : '
    \n'; -}; - -Renderer.prototype.list = function(body, ordered) { - var type = ordered ? 'ol' : 'ul'; - return '<' + type + '>\n' + body + '\n'; -}; - -Renderer.prototype.listitem = function(text) { - return '
  • ' + text + '
  • \n'; -}; - -Renderer.prototype.paragraph = function(text) { - return '

    ' + text + '

    \n'; -}; - -Renderer.prototype.table = function(header, body) { - return '
    \n' - + '\n' - + header - + '\n' - + '\n' - + body - + '\n' - + '
    \n'; -}; - -Renderer.prototype.tablerow = function(content) { - return '\n' + content + '\n'; -}; - -Renderer.prototype.tablecell = function(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align - ? '<' + type + ' style="text-align:' + flags.align + '">' - : '<' + type + '>'; - return tag + content + '\n'; -}; - -// span level renderer -Renderer.prototype.strong = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.em = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.codespan = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.br = function() { - return this.options.xhtml ? '
    ' : '
    '; -}; - -Renderer.prototype.del = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.link = function(href, title, text) { - if (this.options.sanitize) { - try { - var prot = decodeURIComponent(unescape(href)) - .replace(/[^\w:]/g, '') - .toLowerCase(); - } catch (e) { - return ''; - } - if (prot.indexOf('javascript:') === 0) { - return ''; - } - } - var out = '
    '; - return out; -}; - -Renderer.prototype.image = function(href, title, text) { - var out = '' + text + '' : '>'; - return out; -}; - -/** - * Parsing & Compiling - */ - -function Parser(options) { - this.tokens = []; - this.token = null; - this.options = options || marked.defaults; - this.options.renderer = this.options.renderer || new Renderer; - this.renderer = this.options.renderer; - this.renderer.options = this.options; -} - -/** - * Static Parse Method - */ - -Parser.parse = function(src, options, renderer) { - var parser = new Parser(options, renderer); - return parser.parse(src); -}; - -/** - * Parse Loop - */ - -Parser.prototype.parse = function(src) { - this.inline = new InlineLexer(src.links, this.options, this.renderer); - this.tokens = src.reverse(); - - var out = ''; - while (this.next()) { - out += this.tok(); - } - - return out; -}; - -/** - * Next Token - */ - -Parser.prototype.next = function() { - return this.token = this.tokens.pop(); -}; - -/** - * Preview Next Token - */ - -Parser.prototype.peek = function() { - return this.tokens[this.tokens.length - 1] || 0; -}; - -/** - * Parse Text Tokens - */ - -Parser.prototype.parseText = function() { - var body = this.token.text; - - while (this.peek().type === 'text') { - body += '\n' + this.next().text; - } - - return this.inline.output(body); -}; - -/** - * Parse Current Token - */ - -Parser.prototype.tok = function() { - switch (this.token.type) { - case 'space': { - return ''; - } - case 'hr': { - return this.renderer.hr(); - } - case 'heading': { - return this.renderer.heading( - this.inline.output(this.token.text), - this.token.depth, - this.token.text); - } - case 'code': { - return this.renderer.code(this.token.text, - this.token.lang, - this.token.escaped); - } - case 'table': { - var header = '' - , body = '' - , i - , row - , cell - , flags - , j; - - // header - cell = ''; - for (i = 0; i < this.token.header.length; i++) { - flags = { header: true, align: this.token.align[i] }; - cell += this.renderer.tablecell( - this.inline.output(this.token.header[i]), - { header: true, align: this.token.align[i] } - ); - } - header += this.renderer.tablerow(cell); - - for (i = 0; i < this.token.cells.length; i++) { - row = this.token.cells[i]; - - cell = ''; - for (j = 0; j < row.length; j++) { - cell += this.renderer.tablecell( - this.inline.output(row[j]), - { header: false, align: this.token.align[j] } - ); - } - - body += this.renderer.tablerow(cell); - } - return this.renderer.table(header, body); - } - case 'blockquote_start': { - var body = ''; - - while (this.next().type !== 'blockquote_end') { - body += this.tok(); - } - - return this.renderer.blockquote(body); - } - case 'list_start': { - var body = '' - , ordered = this.token.ordered; - - while (this.next().type !== 'list_end') { - body += this.tok(); - } - - return this.renderer.list(body, ordered); - } - case 'list_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.token.type === 'text' - ? this.parseText() - : this.tok(); - } - - return this.renderer.listitem(body); - } - case 'loose_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.tok(); - } - - return this.renderer.listitem(body); - } - case 'html': { - var html = !this.token.pre && !this.options.pedantic - ? this.inline.output(this.token.text) - : this.token.text; - return this.renderer.html(html); - } - case 'paragraph': { - return this.renderer.paragraph(this.inline.output(this.token.text)); - } - case 'text': { - return this.renderer.paragraph(this.parseText()); - } - } -}; - -/** - * Helpers - */ - -function escape(html, encode) { - return html - .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); -} - -function unescape(html) { - return html.replace(/&([#\w]+);/g, function(_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' - ? String.fromCharCode(parseInt(n.substring(2), 16)) - : String.fromCharCode(+n.substring(1)); - } - return ''; - }); -} - -function replace(regex, opt) { - regex = regex.source; - opt = opt || ''; - return function self(name, val) { - if (!name) return new RegExp(regex, opt); - val = val.source || val; - val = val.replace(/(^|[^\[])\^/g, '$1'); - regex = regex.replace(name, val); - return self; - }; -} - -function noop() {} -noop.exec = noop; - -function merge(obj) { - var i = 1 - , target - , key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; -} - - -/** - * Marked - */ - -function marked(src, opt, callback) { - if (callback || typeof opt === 'function') { - if (!callback) { - callback = opt; - opt = null; - } - - opt = merge({}, marked.defaults, opt || {}); - - var highlight = opt.highlight - , tokens - , pending - , i = 0; - - try { - tokens = Lexer.lex(src, opt) - } catch (e) { - return callback(e); - } - - pending = tokens.length; - - var done = function(err) { - if (err) { - opt.highlight = highlight; - return callback(err); - } - - var out; - - try { - out = Parser.parse(tokens, opt); - } catch (e) { - err = e; - } - - opt.highlight = highlight; - - return err - ? callback(err) - : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - - if (!pending) return done(); - - for (; i < tokens.length; i++) { - (function(token) { - if (token.type !== 'code') { - return --pending || done(); - } - return highlight(token.text, token.lang, function(err, code) { - if (err) return done(err); - if (code == null || code === token.text) { - return --pending || done(); - } - token.text = code; - token.escaped = true; - --pending || done(); - }); - })(tokens[i]); - } - - return; - } - try { - if (opt) opt = merge({}, marked.defaults, opt); - return Parser.parse(Lexer.lex(src, opt), opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/chjj/marked.'; - if ((opt || marked.defaults).silent) { - return '

    An error occured:

    '
    -        + escape(e.message + '', true)
    -        + '
    '; - } - throw e; - } -} - -/** - * Options - */ - -marked.options = -marked.setOptions = function(opt) { - merge(marked.defaults, opt); - return marked; -}; - -marked.defaults = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: false, - smartLists: false, - silent: false, - highlight: null, - langPrefix: 'lang-', - smartypants: false, - headerPrefix: '', - renderer: new Renderer, - xhtml: false -}; - -/** - * Expose - */ - -marked.Parser = Parser; -marked.parser = Parser.parse; - -marked.Renderer = Renderer; - -marked.Lexer = Lexer; -marked.lexer = Lexer.lex; - -marked.InlineLexer = InlineLexer; -marked.inlineLexer = InlineLexer.output; - -marked.parse = marked; - -if (typeof module !== 'undefined' && typeof exports === 'object') { - module.exports = marked; -} else if (typeof define === 'function' && define.amd) { - define(function() { return marked; }); -} else { - this.marked = marked; -} - -}).call(function() { - return this || (typeof window !== 'undefined' ? window : global); -}()); \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/lib/object-assign-pollyfill.js b/readerApplication/src/main/resources/public/lib/object-assign-pollyfill.js deleted file mode 100644 index 51799207..00000000 --- a/readerApplication/src/main/resources/public/lib/object-assign-pollyfill.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.assign != 'function') { - (function () { - Object.assign = function (target) { - 'use strict'; - if (target === undefined || target === null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - for (var index = 1; index < arguments.length; index++) { - var source = arguments[index]; - if (source !== undefined && source !== null) { - for (var nextKey in source) { - if (Object.prototype.hasOwnProperty.call(source, nextKey)) { - output[nextKey] = source[nextKey]; - } - } - } - } - return output; - }; - })(); -} diff --git a/readerApplication/src/main/resources/public/lib/sanitize-html.min.js b/readerApplication/src/main/resources/public/lib/sanitize-html.min.js deleted file mode 100644 index 3e3b48d6..00000000 --- a/readerApplication/src/main/resources/public/lib/sanitize-html.min.js +++ /dev/null @@ -1,6 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sanitizeHtml=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0){globRegex.push(quoteRegexp(name).replace(/\\\*/g,".*"))}else{allowedAttributesMap[tag].push(name)}});allowedAttributesGlobMap[tag]=new RegExp("^("+globRegex.join("|")+")$")})}var allowedClassesMap={};each(options.allowedClasses,function(classes,tag){if(allowedAttributesMap){if(!has(allowedAttributesMap,tag)){allowedAttributesMap[tag]=[]}allowedAttributesMap[tag].push("class")}allowedClassesMap[tag]=classes});var transformTagsMap={};var transformTagsAll;each(options.transformTags,function(transform,tag){var transFun;if(typeof transform==="function"){transFun=transform}else if(typeof transform==="string"){transFun=sanitizeHtml.simpleTransform(transform)}if(tag==="*"){transformTagsAll=transFun}else{transformTagsMap[tag]=transFun}});var depth=0;var stack=[];var skipMap={};var transformMap={};var skipText=false;var skipTextDepth=0;var parser=new htmlparser.Parser({onopentag:function(name,attribs){if(skipText){skipTextDepth++;return}var frame=new Frame(name,attribs);stack.push(frame);var skip=false;var hasText=frame.text?true:false;var transformedTag;if(has(transformTagsMap,name)){transformedTag=transformTagsMap[name](name,attribs);frame.attribs=attribs=transformedTag.attribs;if(transformedTag.text!==undefined){frame.innerText=transformedTag.text}if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(transformTagsAll){transformedTag=transformTagsAll(name,attribs);frame.attribs=attribs=transformedTag.attribs;if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(options.allowedTags&&options.allowedTags.indexOf(name)===-1){skip=true;if(nonTextTagsArray.indexOf(name)!==-1){skipText=true;skipTextDepth=1}skipMap[depth]=true}depth++;if(skip){return}result+="<"+name;if(!allowedAttributesMap||has(allowedAttributesMap,name)||allowedAttributesMap["*"]){each(attribs,function(value,a){if(!allowedAttributesMap||has(allowedAttributesMap,name)&&allowedAttributesMap[name].indexOf(a)!==-1||allowedAttributesMap["*"]&&allowedAttributesMap["*"].indexOf(a)!==-1||has(allowedAttributesGlobMap,name)&&allowedAttributesGlobMap[name].test(a)||allowedAttributesGlobMap["*"]&&allowedAttributesGlobMap["*"].test(a)){if(a==="href"||a==="src"){if(naughtyHref(name,value)){delete frame.attribs[a];return}}if(a==="class"){value=filterClasses(value,allowedClassesMap[name]);if(!value.length){delete frame.attribs[a];return}}result+=" "+a;if(value.length){result+='="'+escapeHtml(value)+'"'}}else{delete frame.attribs[a]}})}if(options.selfClosing.indexOf(name)!==-1){result+=" />"}else{result+=">";if(frame.innerText&&!hasText&&!options.textFilter){result+=frame.innerText}}},ontext:function(text){if(skipText){return}var lastFrame=stack[stack.length-1];var tag;if(lastFrame){tag=lastFrame.tag;text=lastFrame.innerText!==undefined?lastFrame.innerText:text}if(tag==="script"||tag==="style"){result+=text}else{var escaped=escapeHtml(text);if(options.textFilter){result+=options.textFilter(escaped)}else{result+=escaped}}if(stack.length){var frame=stack[stack.length-1];frame.text+=text}},onclosetag:function(name){if(skipText){skipTextDepth--;if(!skipTextDepth){skipText=false}else{return}}var frame=stack.pop();if(!frame){return}skipText=false;depth--;if(skipMap[depth]){delete skipMap[depth];frame.updateParentNodeText();return}if(transformMap[depth]){name=transformMap[depth];delete transformMap[depth]}if(options.exclusiveFilter&&options.exclusiveFilter(frame)){result=result.substr(0,frame.tagPosition);return}frame.updateParentNodeText();if(options.selfClosing.indexOf(name)!==-1){return}result+=""}},options.parser);parser.write(html);parser.end();return result;function escapeHtml(s){if(typeof s!=="string"){s=s+""}return s.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""")}function naughtyHref(name,href){href=href.replace(/[\x00-\x20]+/g,"");href=href.replace(/<\!\-\-.*?\-\-\>/g,"");var matches=href.match(/^([a-zA-Z]+)\:/);if(!matches){return false}var scheme=matches[1].toLowerCase();if(has(options.allowedSchemesByTag,name)){return options.allowedSchemesByTag[name].indexOf(scheme)===-1}return!options.allowedSchemes||options.allowedSchemes.indexOf(scheme)===-1}function filterClasses(classes,allowed){if(!allowed){return classes}classes=classes.split(/\s+/);return classes.filter(function(clss){return allowed.indexOf(clss)!==-1}).join(" ")}}var htmlParserDefaults={decodeEntities:true};sanitizeHtml.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}};sanitizeHtml.simpleTransform=function(newTagName,newAttribs,merge){merge=merge===undefined?true:merge;newAttribs=newAttribs||{};return function(tagName,attribs){var attrib;if(merge){for(attrib in newAttribs){attribs[attrib]=newAttribs[attrib]}}else{attribs=newAttribs}return{tagName:newTagName,attribs:attribs}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(require,module,exports){"use strict";exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;function init(){var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}placeHolders=b64[len-2]==="="?2:b64[len-1]==="="?1:0;arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++iMAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:5}],5:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length); -var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(require,module,exports){var ElementType=require("domelementtype");var entities=require("entities");var booleanAttributes={__proto__:null,allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,hidden:true,ismap:true,loop:true,multiple:true,muted:true,open:true,readonly:true,required:true,reversed:true,scoped:true,seamless:true,selected:true,typemustmatch:true};var unencodedElements={__proto__:null,style:true,script:true,xmp:true,iframe:true,noembed:true,noframes:true,plaintext:true,noscript:true};function formatAttrs(attributes,opts){if(!attributes)return;var output="",value;for(var key in attributes){value=attributes[key];if(output){output+=" "}if(!value&&booleanAttributes[key]){output+=key}else{output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"'}}return output}var singleTag={__proto__:null,area:true,base:true,basefont:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};var render=module.exports=function(dom,opts){if(!Array.isArray(dom)&&!dom.cheerio)dom=[dom];opts=opts||{};var output="";for(var i=0;i"}else{tag+=">";if(elem.children){tag+=render(elem.children,opts)}if(!singleTag[elem.name]||opts.xmlMode){tag+=""}}return tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";if(opts.decodeEntities&&!(elem.parent&&elem.parent.name in unencodedElements)){data=entities.encodeXML(data)}return data}function renderCdata(elem){return""}function renderComment(elem){return""}},{domelementtype:8,entities:20}],8:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],9:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],10:[function(require,module,exports){var ElementType=require("domelementtype");var re_whitespace=/\s+/g;var NodePrototype=require("./lib/node");var ElementPrototype=require("./lib/element");function DomHandler(callback,options,elementCB){if(typeof callback==="object"){elementCB=options;options=callback;callback=null}else if(typeof options==="function"){elementCB=options;options=defaultOpts}this._callback=callback;this._options=options||defaultOpts;this._elementCB=elementCB;this.dom=[];this._done=false;this._tagStack=[];this._parser=this._parser||null}var defaultOpts={normalizeWhitespace:false,withStartIndices:false};DomHandler.prototype.onparserinit=function(parser){this._parser=parser};DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)};DomHandler.prototype.onend=function(){if(this._done)return;this._done=true;this._parser=null;this._handleCallback(null)};DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if(typeof this._callback==="function"){this._callback(error,this.dom)}else{if(error)throw error}};DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();if(this._elementCB)this._elementCB(elem)};DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1];var siblings=parent?parent.children:this.dom;var previousSibling=siblings[siblings.length-1];element.next=null;if(this._options.withStartIndices){element.startIndex=this._parser.startIndex}if(this._options.withDomLvl1){element.__proto__=element.type==="tag"?ElementPrototype:NodePrototype}if(previousSibling){element.prev=previousSibling;previousSibling.next=element}else{element.prev=null}siblings.push(element);element.parent=parent||null};DomHandler.prototype.onopentag=function(name,attribs){var element={type:name==="script"?ElementType.Script:name==="style"?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.ontext=function(data){var normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;var lastTag;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(normalize){data=data.replace(re_whitespace," ")}this._addDomElement({data:data,type:ElementType.Text})}}};DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment){lastTag.data+=data;return}var element={data:data,type:ElementType.Comment};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncdatastart=function(){var element={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()};DomHandler.prototype.onprocessinginstruction=function(name,data){this._addDomElement({name:name,data:data,type:ElementType.Directive})};module.exports=DomHandler},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(require,module,exports){var NodePrototype=require("./node");var ElementPrototype=module.exports=Object.create(NodePrototype);var domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{"./node":12}],12:[function(require,module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}};var domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};var nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{}],13:[function(require,module,exports){var DomUtils=module.exports;[require("./lib/stringify"),require("./lib/traversal"),require("./lib/manipulation"),require("./lib/querying"),require("./lib/legacy"),require("./lib/helpers")].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(require,module,exports){exports.removeSubsets=function(nodes){var idx=nodes.length,node,ancestor,replace;while(--idx>-1){node=ancestor=nodes[idx];nodes[idx]=null;replace=true;while(ancestor){if(nodes.indexOf(ancestor)>-1){replace=false;nodes.splice(idx,1);break}ancestor=ancestor.parent}if(replace){nodes[idx]=node}}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16};var comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var aParents=[];var bParents=[];var current,sharedParent,siblings,aSibling,bSibling,idx;if(nodeA===nodeB){return 0}current=nodeA;while(current){aParents.unshift(current);current=current.parent}current=nodeB;while(current){bParents.unshift(current);current=current.parent}idx=0;while(aParents[idx]===bParents[idx]){idx++}if(idx===0){return POSITION.DISCONNECTED}sharedParent=aParents[idx-1];siblings=sharedParent.children;aSibling=aParents[idx];bSibling=bParents[idx];if(siblings.indexOf(aSibling)>siblings.indexOf(bSibling)){if(sharedParent===nodeB){return POSITION.FOLLOWING|POSITION.CONTAINED_BY}return POSITION.FOLLOWING}else{if(sharedParent===nodeA){return POSITION.PRECEDING|POSITION.CONTAINS}return POSITION.PRECEDING}};exports.uniqueSort=function(nodes){var idx=nodes.length,node,position;nodes=nodes.slice();while(--idx>-1){node=nodes[idx];position=nodes.indexOf(node);if(position>-1&&position0){childs=find(test,childs,recurse,limit);result=result.concat(childs);limit-=childs.length;if(limit<=0)break}}return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i0){elem=findOne(test,elems[i].children)}}return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i0&&existsOne(test,elems[i].children))){return true}}return false}function findAll(test,elems){var result=[];for(var i=0,j=elems.length;i0){result=result.concat(findAll(test,elems[i].children))}}return result}},{domelementtype:9}],18:[function(require,module,exports){var ElementType=require("domelementtype"),getOuterHTML=require("dom-serializer"),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText};function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){if(Array.isArray(elem))return elem.map(getText).join("");if(isTag(elem)||elem.type===ElementType.CDATA)return getText(elem.children);if(elem.type===ElementType.Text)return elem.data;return""}},{"dom-serializer":7,domelementtype:9}],19:[function(require,module,exports){var getChildren=exports.getChildren=function(elem){return elem.children};var getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]};exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]};exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)};exports.getName=function(elem){return elem.name}},{}],20:[function(require,module,exports){var encode=require("./lib/encode.js"),decode=require("./lib/decode.js");exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)};exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)};exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)};exports.encodeXML=encode.XML;exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML;exports.decodeXML=exports.decodeXMLStrict=decode.XML;exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML;exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict;exports.escape=encode.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(require,module,exports){var entityMap=require("../maps/entities.json"),legacyMap=require("../maps/legacy.json"),xmlMap=require("../maps/xml.json"),decodeCodePoint=require("./decode_codepoint.js");var decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap);function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}var decodeHTML=function(){var legacy=Object.keys(legacyMap).sort(sorter);var keys=Object.keys(entityMap).sort(sorter);for(var i=0,j=0;i=55296&&codePoint<=57343||codePoint>1114111){return"�"}if(codePoint in decodeMap){codePoint=decodeMap[codePoint]}var output="";if(codePoint>65535){codePoint-=65536;output+=String.fromCharCode(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}output+=String.fromCharCode(codePoint);return output}},{"../maps/decode.json":24}],23:[function(require,module,exports){var inverseXML=getInverseObj(require("../maps/xml.json")),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(require("../maps/entities.json")),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){inverse[obj[name]]="&"+name+";";return inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];Object.keys(inverse).forEach(function(k){if(k.length===1){single.push("\\"+k)}else{multiple.push(k)}});multiple.unshift("["+single.join("")+"]");return new RegExp(multiple.join("|"),"g")}var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){var high=c.charCodeAt(0);var low=c.charCodeAt(1);var codePoint=(high-55296)*1024+low-56320+65536;return"&#x"+codePoint.toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}var re_xmlChars=getInverseReplacer(inverseXML);function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}exports.escape=escapeXML},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(require,module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],26:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},{}],27:[function(require,module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1); -}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],29:[function(require,module,exports){module.exports=CollectingHandler;function CollectingHandler(cbs){this._cbs=cbs||{};this.events=[]}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;CollectingHandler.prototype[name]=function(){this.events.push([name]);if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;CollectingHandler.prototype[name]=function(a){this.events.push([name,a]);if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]);if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}});CollectingHandler.prototype.onreset=function(){this.events=[];if(this._cbs.onreset)this._cbs.onreset()};CollectingHandler.prototype.restart=function(){if(this._cbs.onreset)this._cbs.onreset();for(var i=0,len=this.events.length;i0;this._cbs.onclosetag(this._stack[--i]));}if(this._cbs.onend)this._cbs.onend()};Parser.prototype.reset=function(){if(this._cbs.onreset)this._cbs.onreset();this._tokenizer.reset();this._tagname="";this._attribname="";this._attribs=null;this._stack=[];if(this._cbs.onparserinit)this._cbs.onparserinit(this)};Parser.prototype.parseComplete=function(data){this.reset();this.end(data)};Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)};Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)};Parser.prototype.pause=function(){this._tokenizer.pause()};Parser.prototype.resume=function(){this._tokenizer.resume()};Parser.prototype.parseChunk=Parser.prototype.write;Parser.prototype.done=Parser.prototype.end;module.exports=Parser},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(require,module,exports){module.exports=ProxyHandler;function ProxyHandler(cbs){this._cbs=cbs||{}}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;ProxyHandler.prototype[name]=function(){if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;ProxyHandler.prototype[name]=function(a){if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;ProxyHandler.prototype[name]=function(a,b){if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}})},{"./":36}],33:[function(require,module,exports){module.exports=Stream;var Parser=require("./WritableStream.js");function Stream(options){Parser.call(this,new Cbs(this),options)}require("inherits")(Stream,Parser);Stream.prototype.readable=true;function Cbs(scope){this.scope=scope}var EVENTS=require("../").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){Cbs.prototype["on"+name]=function(){this.scope.emit(name)}}else if(EVENTS[name]===1){Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)}}else if(EVENTS[name]===2){Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}else{throw Error("wrong number of arguments!")}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(require,module,exports){module.exports=Tokenizer;var decodeCodePoint=require("entities/lib/decode_codepoint.js"),entityMap=require("entities/maps/entities.json"),legacyMap=require("entities/maps/legacy.json"),xmlMap=require("entities/maps/xml.json"),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;function whitespace(c){return c===" "||c==="\n"||c==="\t"||c==="\f"||c==="\r"}function characterState(char,SUCCESS){return function(c){if(c===char)this._state=SUCCESS}}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();if(upper===lower){return function(c){if(c===lower){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}else{return function(c){if(c===lower||c===upper){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){if(c===lower||c===upper){this._state=NEXT_STATE}else{this._state=IN_TAG_NAME;this._index--}}}function Tokenizer(options,cbs){this._state=TEXT;this._buffer="";this._sectionStart=0;this._index=0;this._bufferOffset=0;this._baseState=TEXT;this._special=SPECIAL_NONE;this._cbs=cbs;this._running=true;this._ended=false;this._xmlMode=!!(options&&options.xmlMode);this._decodeEntities=!!(options&&options.decodeEntities)}Tokenizer.prototype._stateText=function(c){if(c==="<"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._state=BEFORE_TAG_NAME;this._sectionStart=this._index}else if(this._decodeEntities&&this._special===SPECIAL_NONE&&c==="&"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._baseState=TEXT;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeTagName=function(c){if(c==="/"){this._state=BEFORE_CLOSING_TAG_NAME}else if(c==="<"){this._cbs.ontext(this._getSection());this._sectionStart=this._index}else if(c===">"||this._special!==SPECIAL_NONE||whitespace(c)){this._state=TEXT}else if(c==="!"){this._state=BEFORE_DECLARATION;this._sectionStart=this._index+1}else if(c==="?"){this._state=IN_PROCESSING_INSTRUCTION;this._sectionStart=this._index+1}else{this._state=!this._xmlMode&&(c==="s"||c==="S")?BEFORE_SPECIAL:IN_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInTagName=function(c){if(c==="/"||c===">"||whitespace(c)){this._emitToken("onopentagname");this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateBeforeCloseingTagName=function(c){if(whitespace(c));else if(c===">"){this._state=TEXT}else if(this._special!==SPECIAL_NONE){if(c==="s"||c==="S"){this._state=BEFORE_SPECIAL_END}else{this._state=TEXT;this._index--}}else{this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInCloseingTagName=function(c){if(c===">"||whitespace(c)){this._emitToken("onclosetag");this._state=AFTER_CLOSING_TAG_NAME;this._index--}};Tokenizer.prototype._stateAfterCloseingTagName=function(c){if(c===">"){this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeAttributeName=function(c){if(c===">"){this._cbs.onopentagend();this._state=TEXT;this._sectionStart=this._index+1}else if(c==="/"){this._state=IN_SELF_CLOSING_TAG}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInSelfClosingTag=function(c){if(c===">"){this._cbs.onselfclosingtag();this._state=TEXT;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateInAttributeName=function(c){if(c==="="||c==="/"||c===">"||whitespace(c)){this._cbs.onattribname(this._getSection());this._sectionStart=-1;this._state=AFTER_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateAfterAttributeName=function(c){if(c==="="){this._state=BEFORE_ATTRIBUTE_VALUE}else if(c==="/"||c===">"){this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(!whitespace(c)){this._cbs.onattribend();this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeAttributeValue=function(c){if(c==='"'){this._state=IN_ATTRIBUTE_VALUE_DQ;this._sectionStart=this._index+1}else if(c==="'"){this._state=IN_ATTRIBUTE_VALUE_SQ;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_VALUE_NQ;this._sectionStart=this._index;this._index--}};Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){if(c==='"'){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){if(c==="'"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){if(whitespace(c)||c===">"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state=c==="["?BEFORE_CDATA_1:c==="-"?BEFORE_COMMENT:IN_DECLARATION};Tokenizer.prototype._stateInDeclaration=function(c){if(c===">"){this._cbs.ondeclaration(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateInProcessingInstruction=function(c){if(c===">"){this._cbs.onprocessinginstruction(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeComment=function(c){if(c==="-"){this._state=IN_COMMENT;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION}};Tokenizer.prototype._stateInComment=function(c){if(c==="-")this._state=AFTER_COMMENT_1};Tokenizer.prototype._stateAfterComment1=function(c){if(c==="-"){this._state=AFTER_COMMENT_2}else{this._state=IN_COMMENT}};Tokenizer.prototype._stateAfterComment2=function(c){if(c===">"){this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="-"){this._state=IN_COMMENT}};Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata6=function(c){if(c==="["){this._state=IN_CDATA;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION;this._index--}};Tokenizer.prototype._stateInCdata=function(c){if(c==="]")this._state=AFTER_CDATA_1};Tokenizer.prototype._stateAfterCdata1=characterState("]",AFTER_CDATA_2);Tokenizer.prototype._stateAfterCdata2=function(c){if(c===">"){this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="]"){this._state=IN_CDATA}};Tokenizer.prototype._stateBeforeSpecial=function(c){if(c==="c"||c==="C"){this._state=BEFORE_SCRIPT_1}else if(c==="t"||c==="T"){this._state=BEFORE_STYLE_1}else{this._state=IN_TAG_NAME;this._index--}};Tokenizer.prototype._stateBeforeSpecialEnd=function(c){if(this._special===SPECIAL_SCRIPT&&(c==="c"||c==="C")){this._state=AFTER_SCRIPT_1}else if(this._special===SPECIAL_STYLE&&(c==="t"||c==="T")){this._state=AFTER_STYLE_1}else this._state=TEXT};Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2);Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3);Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4);Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5);Tokenizer.prototype._stateBeforeScript5=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_SCRIPT}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT);Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT);Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT);Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT);Tokenizer.prototype._stateAfterScript5=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-6;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2);Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3);Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4);Tokenizer.prototype._stateBeforeStyle4=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_STYLE}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT);Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT);Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT);Tokenizer.prototype._stateAfterStyle4=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-5;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY);Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY);Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16)limit=6;while(limit>=2){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity)){this._emitPartial(legacyMap[entity]);this._sectionStart+=limit+1;return}else{limit--}}};Tokenizer.prototype._stateInNamedEntity=function(c){if(c===";"){this._parseNamedEntityStrict();if(this._sectionStart+1"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")){if(this._xmlMode);else if(this._sectionStart+1===this._index);else if(this._baseState!==TEXT){if(c!=="="){this._parseNamedEntityStrict()}}else{this._parseLegacyEntity()}this._state=this._baseState;this._index--}};Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index);var parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed));this._sectionStart=this._index}else{this._sectionStart--}this._state=this._baseState};Tokenizer.prototype._stateInNumericEntity=function(c){if(c===";"){this._decodeNumericEntity(2,10);this._sectionStart++}else if(c<"0"||c>"9"){if(!this._xmlMode){this._decodeNumericEntity(2,10)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._stateInHexEntity=function(c){if(c===";"){this._decodeNumericEntity(3,16);this._sectionStart++}else if((c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")){if(!this._xmlMode){this._decodeNumericEntity(3,16)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._cleanup=function(){if(this._sectionStart<0){this._buffer="";this._index=0;this._bufferOffset+=this._index}else if(this._running){if(this._state===TEXT){if(this._sectionStart!==this._index){this._cbs.ontext(this._buffer.substr(this._sectionStart))}this._buffer="";this._bufferOffset+=this._index;this._index=0}else if(this._sectionStart===this._index){this._buffer="";this._bufferOffset+=this._index;this._index=0}else{this._buffer=this._buffer.substr(this._sectionStart);this._index-=this._sectionStart;this._bufferOffset+=this._sectionStart}this._sectionStart=0}};Tokenizer.prototype.write=function(chunk){if(this._ended)this._cbs.onerror(Error(".write() after done!"));this._buffer+=chunk;this._parse()};Tokenizer.prototype._parse=function(){while(this._index>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],38:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],39:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],40:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],41:[function(require,module,exports){(function(process){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){module.exports=nextTick}else{module.exports=process.nextTick}function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function"){throw new TypeError('"callback" argument must be a function')}var len=arguments.length;var args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function afterTickOne(){fn.call(null,arg1)});case 3:return process.nextTick(function afterTickTwo(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function afterTickThree(){fn.call(null,arg1,arg2,arg3)});default:args=new Array(len-1);i=0;while(i1){for(var i=1;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var _i=0;_i=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream;(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}var Duplex;function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function writableStateGetBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var Duplex;function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){ -state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:5,"buffer-shims":4}],50:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(require,module,exports){(function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(require,module,exports){module.exports=function(string){return string.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:5}],57:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],58:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i', - '
    Select OAuth2.0 Scopes
    ', - '
    ', - '

    Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.', - 'Learn how to use', - '

    ', - '

    ' + appName + ' API requires the following scopes. Select which ones you want to grant to Swagger UI.

    ', - '
      ', - '
    ', - '

    ', - '
    ', - '
    ', - ''].join('')); - $(document.body).append(popupDialog); - - //TODO: only display applicable scopes (will need to pass them into handleLogin) - popup = popupDialog.find('ul.api-popup-scopes').empty(); - for (i = 0; i < scopes.length; i ++) { - scope = scopes[i]; - str = '
  • ' + '
  • '; - popup.append(str); - } - - var $win = $(window), - dw = $win.width(), - dh = $win.height(), - st = $win.scrollTop(), - dlgWd = popupDialog.outerWidth(), - dlgHt = popupDialog.outerHeight(), - top = (dh -dlgHt)/2 + st, - left = (dw - dlgWd)/2; - - popupDialog.css({ - top: (top < 0? 0 : top) + 'px', - left: (left < 0? 0 : left) + 'px' - }); - - popupDialog.find('button.api-popup-cancel').click(function() { - popupMask.hide(); - popupDialog.hide(); - popupDialog.empty(); - popupDialog = []; - }); - - $('button.api-popup-authbtn').unbind(); - popupDialog.find('button.api-popup-authbtn').click(function() { - popupMask.hide(); - popupDialog.hide(); - - var authSchemes = window.swaggerUi.api.authSchemes; - var host = window.location; - var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/")); - var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html'; - var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl; - var url = null; - var scopes = []; - var o = popup.find('input:checked'); - var OAuthSchemeKeys = []; - var state; - for(k =0; k < o.length; k++) { - var scope = $(o[k]).attr('scope'); - if (scopes.indexOf(scope) === -1) - scopes.push(scope); - var OAuthSchemeKey = $(o[k]).attr('oauthtype'); - if (OAuthSchemeKeys.indexOf(OAuthSchemeKey) === -1) - OAuthSchemeKeys.push(OAuthSchemeKey); - } - - //TODO: merge not replace if scheme is different from any existing - //(needs to be aware of schemes to do so correctly) - window.enabledScopes=scopes; - - for (var key in authSchemes) { - if (authSchemes.hasOwnProperty(key) && OAuthSchemeKeys.indexOf(key) != -1) { //only look at keys that match this scope. - var flow = authSchemes[key].flow; - - if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) { - var dets = authSchemes[key]; - url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code'); - window.swaggerUi.tokenName = dets.tokenName || 'access_token'; - window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null); - state = key; - } - else if(authSchemes[key].type === 'oauth2' && flow && (flow === 'application')) { - var dets = authSchemes[key]; - window.swaggerUi.tokenName = dets.tokenName || 'access_token'; - clientCredentialsFlow(scopes, dets.tokenUrl, key); - return; - } - else if(authSchemes[key].grantTypes) { - // 1.2 support - var o = authSchemes[key].grantTypes; - for(var t in o) { - if(o.hasOwnProperty(t) && t === 'implicit') { - var dets = o[t]; - var ep = dets.loginEndpoint.url; - url = dets.loginEndpoint.url + '?response_type=token'; - window.swaggerUi.tokenName = dets.tokenName; - } - else if (o.hasOwnProperty(t) && t === 'accessCode') { - var dets = o[t]; - var ep = dets.tokenRequestEndpoint.url; - url = dets.tokenRequestEndpoint.url + '?response_type=code'; - window.swaggerUi.tokenName = dets.tokenName; - } - } - } - } - } - - redirect_uri = redirectUrl; - - url += '&redirect_uri=' + encodeURIComponent(redirectUrl); - url += '&realm=' + encodeURIComponent(realm); - url += '&client_id=' + encodeURIComponent(clientId); - url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator)); - url += '&state=' + encodeURIComponent(state); - for (var key in additionalQueryStringParams) { - url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]); - } - - window.open(url); - }); - - popupMask.show(); - popupDialog.show(); - -} - - -function handleLogout() { - for(key in window.swaggerUi.api.clientAuthorizations.authz){ - window.swaggerUi.api.clientAuthorizations.remove(key) - } - window.enabledScopes = null; - $('.api-ic.ic-on').addClass('ic-off'); - $('.api-ic.ic-on').removeClass('ic-on'); - - // set the info box - $('.api-ic.ic-warning').addClass('ic-error'); - $('.api-ic.ic-warning').removeClass('ic-warning'); -} - -function initOAuth(opts) { - var o = (opts||{}); - var errors = []; - - appName = (o.appName||errors.push('missing appName')); - popupMask = (o.popupMask||$('#api-common-mask')); - popupDialog = (o.popupDialog||$('.api-popup-dialog')); - clientId = (o.clientId||errors.push('missing client id')); - clientSecret = (o.clientSecret||null); - realm = (o.realm||errors.push('missing realm')); - scopeSeparator = (o.scopeSeparator||' '); - additionalQueryStringParams = (o.additionalQueryStringParams||{}); - - if(errors.length > 0){ - log('auth unable initialize oauth: ' + errors); - return; - } - - $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); - $('.api-ic').unbind(); - $('.api-ic').click(function(s) { - if($(s.target).hasClass('ic-off')) - handleLogin(); - else { - handleLogout(); - } - false; - }); -} - -function clientCredentialsFlow(scopes, tokenUrl, OAuthSchemeKey) { - var params = { - 'client_id': clientId, - 'client_secret': clientSecret, - 'scope': scopes.join(' '), - 'grant_type': 'client_credentials' - }; - $.ajax( - { - url : tokenUrl, - type: "POST", - data: params, - success:function(data, textStatus, jqXHR) - { - onOAuthComplete(data,OAuthSchemeKey); - }, - error: function(jqXHR, textStatus, errorThrown) - { - onOAuthComplete(""); - } - }); - - } - -window.processOAuthCode = function processOAuthCode(data) { - var OAuthSchemeKey = data.state; - - // redirect_uri is required in auth code flow - // see https://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.1.3 - var host = window.location; - var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/")); - var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html'; - var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl; - - var params = { - 'client_id': clientId, - 'code': data.code, - 'grant_type': 'authorization_code', - 'redirect_uri': redirectUrl - }; - - if (clientSecret) { - params.client_secret = clientSecret; - } - - $.ajax( - { - url : window.swaggerUi.tokenUrl, - type: "POST", - data: params, - success:function(data, textStatus, jqXHR) - { - onOAuthComplete(data, OAuthSchemeKey); - }, - error: function(jqXHR, textStatus, errorThrown) - { - onOAuthComplete(""); - } - }); -}; - -window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) { - if(token) { - if(token.error) { - var checkbox = $('input[type=checkbox],.secured'); - checkbox.each(function(pos){ - checkbox[pos].checked = false; - }); - alert(token.error); - } - else { - var b = token[window.swaggerUi.tokenName]; - if (!OAuthSchemeKey){ - OAuthSchemeKey = token.state; - } - if(b){ - // if all roles are satisfied - var o = null; - $.each($('.auth .api-ic .api_information_panel'), function(k, v) { - var children = v; - if(children && children.childNodes) { - var requiredScopes = []; - $.each((children.childNodes), function (k1, v1){ - var inner = v1.innerHTML; - if(inner) - requiredScopes.push(inner); - }); - var diff = []; - for(var i=0; i < requiredScopes.length; i++) { - var s = requiredScopes[i]; - if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) { - diff.push(s); - } - } - if(diff.length > 0){ - o = v.parentNode.parentNode; - $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off'); - $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on'); - - // sorry, not all scopes are satisfied - $(o).find('.api-ic').addClass('ic-warning'); - $(o).find('.api-ic').removeClass('ic-error'); - } - else { - o = v.parentNode.parentNode; - $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on'); - $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off'); - - // all scopes are satisfied - $(o).find('.api-ic').addClass('ic-info'); - $(o).find('.api-ic').removeClass('ic-warning'); - $(o).find('.api-ic').removeClass('ic-error'); - } - } - }); - window.swaggerUi.api.clientAuthorizations.add(window.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header')); - window.swaggerUi.load(); - } - } - } -}; diff --git a/readerApplication/src/main/resources/public/o2c.html b/readerApplication/src/main/resources/public/o2c.html deleted file mode 100644 index b592ec0d..00000000 --- a/readerApplication/src/main/resources/public/o2c.html +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/readerApplication/src/main/resources/public/swagger-ui.js b/readerApplication/src/main/resources/public/swagger-ui.js deleted file mode 100644 index f3de3380..00000000 --- a/readerApplication/src/main/resources/public/swagger-ui.js +++ /dev/null @@ -1,25062 +0,0 @@ -/** - * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API - * @version v2.2.6 - * @link http://swagger.io - * @license Apache-2.0 - */ -(function(){/* jshint ignore:start */ - {(function() { - var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; -templates['apikey_auth'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return " " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n"; -},"3":function(container,depth0,helpers,partials,data) { - return " \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
    \n

    Api key authorization

    \n
    " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "
    \n
    \n
    \n name:\n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n
    \n
    \n in:\n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0["in"] : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n
    \n
    \n value:\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") - + "
    \n
    \n
    \n"; -},"useData":true}); -templates['auth_button'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "Authorize\n"; -},"useData":true}); -templates['auth_button_operation'] = template({"1":function(container,depth0,helpers,partials,data) { - return " authorize__btn_operation_login\n"; -},"3":function(container,depth0,helpers,partials,data) { - return " authorize__btn_operation_logout\n"; -},"5":function(container,depth0,helpers,partials,data) { - var stack1; - - return "
      \n" - + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    \n"; -},"6":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
  • " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "
  • \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    \n"; -},"useData":true}); -templates['auth_view'] = template({"1":function(container,depth0,helpers,partials,data) { - return " \n"; -},"3":function(container,depth0,helpers,partials,data) { - return " \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
    \n\n
    \n
    \n" - + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isAuthorized : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    \n\n
    \n"; -},"useData":true}); -templates['basic_auth'] = template({"1":function(container,depth0,helpers,partials,data) { - return " - authorized"; -},"3":function(container,depth0,helpers,partials,data) { - var stack1; - - return " " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.username : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n"; -},"5":function(container,depth0,helpers,partials,data) { - return " \n"; -},"7":function(container,depth0,helpers,partials,data) { - return "
    \n password:\n \n
    \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
    \n

    Basic authentication" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "

    \n
    \n
    " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "
    \n
    \n username:\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") - + "
    \n" - + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    \n
    \n"; -},"useData":true}); -templates['content_type'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n"; -},"4":function(container,depth0,helpers,partials,data) { - return " \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n"; -},"useData":true}); -templates['main'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
    " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "
    \n
    " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.externalDocs : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + " " - + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n"; -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "

    " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "

    \n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n"; -},"4":function(container,depth0,helpers,partials,data) { - var stack1; - - return ""; -},"6":function(container,depth0,helpers,partials,data) { - var stack1; - - return "
    Created by
    " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "
    "; -},"8":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return ""; -},"10":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return ""; -},"12":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return ""; -},"14":function(container,depth0,helpers,partials,data) { - var stack1; - - return " , api version: " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n "; -},"16":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
    \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.info : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
    \n
    \n
    \n\n
      \n\n
      \n

      [ base url: " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.basePath : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "]\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "

      \n
      \n
      \n"; -},"useData":true}); -templates['oauth2'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
    • \n \n
      \n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + " \n
    • \n"; -},"2":function(container,depth0,helpers,partials,data) { - var stack1; - - return " (" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + ")\n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
      \n

      Select OAuth2.0 Scopes

      \n

      " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "

      \n

      Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n Learn how to use\n

      \n

      " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.appName : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + " API requires the following scopes. Select which ones you want to grant to Swagger UI.

      \n

      Authorization URL: " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.authorizationUrl : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "

      \n

      flow: " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.flow : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "

      \n
        \n" - + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
      \n
      "; -},"useData":true}); -templates['operation'] = template({"1":function(container,depth0,helpers,partials,data) { - return "deprecated"; -},"3":function(container,depth0,helpers,partials,data) { - return "

      Warning: Deprecated

      \n"; -},"5":function(container,depth0,helpers,partials,data) { - var stack1; - - return "

      Implementation Notes

      \n
      " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "
      \n"; -},"7":function(container,depth0,helpers,partials,data) { - return "
      \n"; -},"9":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
      \n

      Response Class (Status " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.successCode : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + ")

      \n " - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.successDescription : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n

      \n
      \n
      \n
      \n"; -},"10":function(container,depth0,helpers,partials,data) { - var stack1; - - return "
      " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.successDescription : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "
      "; -},"12":function(container,depth0,helpers,partials,data) { - var stack1; - - return "

      Headers

      \n \n \n \n \n \n \n \n \n \n \n" - + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + " \n
      HeaderDescriptionTypeOther
      \n"; -},"13":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n " - + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) - + "\n " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.other : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n \n"; -},"15":function(container,depth0,helpers,partials,data) { - return "

      Parameters

      \n \n \n \n \n \n \n \n \n \n \n \n\n \n
      ParameterValueDescriptionParameter TypeData Type
      \n"; -},"17":function(container,depth0,helpers,partials,data) { - return "
      \n

      Response Messages

      \n \n \n \n \n \n \n \n \n \n \n \n
      HTTP Status CodeReasonResponse ModelHeaders
      \n"; -},"19":function(container,depth0,helpers,partials,data) { - return ""; -},"21":function(container,depth0,helpers,partials,data) { - return "
      \n \n \n \n
      \n"; -},"23":function(container,depth0,helpers,partials,data) { - return "

      Request Headers

      \n
      \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3=container.escapeExpression; - - return " \n"; -},"useData":true}); -templates['param'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n
      \n"; -},"4":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); -},"5":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
      \n \n
      \n
      \n"; -},"7":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n
      \n
      \n
      \n"; -},"9":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : ""); -},"10":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); -},"11":function(container,depth0,helpers,partials,data) { - return ""; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") - + "\n\n" - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n \n\n"; -},"useData":true}); -templates['param_list'] = template({"1":function(container,depth0,helpers,partials,data) { - return " required"; -},"3":function(container,depth0,helpers,partials,data) { - return " multiple=\"multiple\""; -},"5":function(container,depth0,helpers,partials,data) { - return " required "; -},"7":function(container,depth0,helpers,partials,data) { - var stack1; - - return " \n"; -},"8":function(container,depth0,helpers,partials,data) { - return " selected=\"\" "; -},"10":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n \n\n"; -},"11":function(container,depth0,helpers,partials,data) { - return " selected=\"\" "; -},"13":function(container,depth0,helpers,partials,data) { - return " (default) "; -},"15":function(container,depth0,helpers,partials,data) { - return ""; -},"17":function(container,depth0,helpers,partials,data) { - return ""; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n \n\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "") - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n"; -},"useData":true}); -templates['param_readonly'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n
      \n"; -},"3":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); -},"4":function(container,depth0,helpers,partials,data) { - var stack1; - - return " " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n"; -},"6":function(container,depth0,helpers,partials,data) { - return " (empty)\n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n"; -},"useData":true}); -templates['param_readonly_required'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n"; -},"3":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); -},"4":function(container,depth0,helpers,partials,data) { - var stack1; - - return " " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n"; -},"6":function(container,depth0,helpers,partials,data) { - return " (empty)\n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n"; -},"useData":true}); -templates['param_required'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n"; -},"4":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); -},"5":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "
      \n \n
      \n
      \n"; -},"7":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n
      \n
      \n
      \n"; -},"9":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : ""); -},"10":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n"; -},"12":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); -},"13":function(container,depth0,helpers,partials,data) { - return ""; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") - + "\n\n " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n"; -},"useData":true}); -templates['parameter_content_type'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.consumes : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n"; -},"4":function(container,depth0,helpers,partials,data) { - return " \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "\n\n"; -},"useData":true}); -templates['popup'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var helper; - - return "
      \n
      " - + container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"title","hash":{},"data":data}) : helper))) - + "
      \n
      \n

      \n
      \n \n
      \n
      \n
      "; -},"useData":true}); -templates['resource'] = template({"1":function(container,depth0,helpers,partials,data) { - return " : "; -},"3":function(container,depth0,helpers,partials,data) { - var stack1; - - return "
    • \n Raw\n
    • \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, buffer = - "
      \n

      \n " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + " "; - stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : alias2),(options={"name":"summary","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(alias1,options) : helper)); - if (!helpers.summary) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} - if (stack1 != null) { buffer += stack1; } - return buffer + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.summary : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n

      \n
        \n
      • \n Show/Hide\n
      • \n
      • \n \n List Operations\n \n
      • \n
      • \n \n Expand Operations\n \n
      • \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
      \n
      \n\n"; -},"useData":true}); -templates['response_content_type'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n"; -},"4":function(container,depth0,helpers,partials,data) { - return " \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return "\n\n"; -},"useData":true}); -templates['signature'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "\n
      \n\n
      \n\n
      \n
      \n " - + container.escapeExpression((helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.signature : depth0),{"name":"sanitize","hash":{},"data":data})) - + "\n
      \n\n
      \n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
      \n
      \n"; -},"2":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
      \n
      "
      -    + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
      -    + "
      \n " - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n
      \n"; -},"3":function(container,depth0,helpers,partials,data) { - return ""; -},"5":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}; - - return "
      \n
      "
      -    + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
      -    + "
      \n " - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n
      \n"; -},"7":function(container,depth0,helpers,partials,data) { - var stack1; - - return " " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.signature : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1; - - return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.sampleJSON : depth0),"||",(depth0 != null ? depth0.sampleXML : depth0),{"name":"ifCond","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); -},"useData":true}); -templates['status_code'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return " \n " - + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) - + "\n " - + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") - + "\n " - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n \n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; - - return "" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.code : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n" - + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.message : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") - + "\n\n\n \n \n" - + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + " \n
      \n"; -},"useData":true}); -})();} - /* jshint ignore:end */ -'use strict'; - - -$(function() { - - // Helper function for vertically aligning DOM elements - // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/ - $.fn.vAlign = function() { - return this.each(function(){ - var ah = $(this).height(); - var ph = $(this).parent().height(); - var mh = (ph - ah) / 2; - $(this).css('margin-top', mh); - }); - }; - - $.fn.stretchFormtasticInputWidthToParent = function() { - return this.each(function(){ - var p_width = $(this).closest("form").innerWidth(); - var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10); - var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10); - $(this).css('width', p_width - p_padding - this_padding); - }); - }; - - $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent(); - - // Vertically center these paragraphs - // Parent may need a min-height for this to work.. - $('ul.downplayed li div.content p').vAlign(); - - // When a sandbox form is submitted.. - $("form.sandbox").submit(function(){ - - var error_free = true; - - // Cycle through the forms required inputs - $(this).find("input.required").each(function() { - - // Remove any existing error styles from the input - $(this).removeClass('error'); - - // Tack the error style on if the input is empty.. - if ($(this).val() === '') { - $(this).addClass('error'); - $(this).wiggle(); - error_free = false; - } - - }); - - return error_free; - }); - -}); - -function clippyCopiedCallback() { - $('#api_key_copied').fadeIn().delay(1000).fadeOut(); - - // var b = $("#clippy_tooltip_" + a); - // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() { - // b.attr("title", "copy to clipboard") - // }, - // 500)) -} - -// Logging function that accounts for browsers that don't have window.console -function log(){ - log.history = log.history || []; - log.history.push(arguments); - if(this.console){ - console.log( Array.prototype.slice.call(arguments)[0] ); - } -} - -// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) -if (Function.prototype.bind && console && typeof console.log === "object") { - [ - "log","info","warn","error","assert","dir","clear","profile","profileEnd" - ].forEach(function (method) { - console[method] = this.bind(console[method], console); - }, Function.prototype.call); -} - -window.Docs = { - - shebang: function() { - - // If shebang has an operation nickname in it.. - // e.g. /docs/#!/words/get_search - var fragments = $.param.fragment().split('/'); - fragments.shift(); // get rid of the bang - - switch (fragments.length) { - case 1: - if (fragments[0].length > 0) { // prevent matching "#/" - // Expand all operations for the resource and scroll to it - var dom_id = 'resource_' + fragments[0]; - - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - } - break; - case 2: - // Refer to the endpoint DOM element, e.g. #words_get_search - - // Expand Resource - Docs.expandEndpointListForResource(fragments[0]); - $("#"+dom_id).slideto({highlight: false}); - - // Expand operation - var li_dom_id = fragments.join('_'); - var li_content_dom_id = li_dom_id + "_content"; - - - Docs.expandOperation($('#'+li_content_dom_id)); - $('#'+li_dom_id).slideto({highlight: false}); - break; - } - }, - - toggleEndpointListForResource: function(resource) { - var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints'); - if (elem.is(':visible')) { - $.bbq.pushState('#/', 2); - Docs.collapseEndpointListForResource(resource); - } else { - $.bbq.pushState('#/' + resource, 2); - Docs.expandEndpointListForResource(resource); - } - }, - - // Expand resource - expandEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideDown(); - return; - } - - $('li#resource_' + resource).addClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideDown(); - }, - - // Collapse resource and mark as explicitly closed - collapseEndpointListForResource: function(resource) { - var resource = Docs.escapeResourceName(resource); - if (resource == '') { - $('.resource ul.endpoints').slideUp(); - return; - } - - $('li#resource_' + resource).removeClass('active'); - - var elem = $('li#resource_' + resource + ' ul.endpoints'); - elem.slideUp(); - }, - - expandOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); - - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideDown(); - return; - } - - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.expandOperation($(this)); - }); - }, - - collapseOperationsForResource: function(resource) { - // Make sure the resource container is open.. - Docs.expandEndpointListForResource(resource); - - if (resource == '') { - $('.resource ul.endpoints li.operation div.content').slideUp(); - return; - } - - $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() { - Docs.collapseOperation($(this)); - }); - }, - - escapeResourceName: function(resource) { - return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&"); - }, - - expandOperation: function(elem) { - elem.slideDown(); - }, - - collapseOperation: function(elem) { - elem.slideUp(); - } -}; - -/*! - * https://github.com/es-shims/es5-shim - * @license es5-shim Copyright 2009-2015 by contributors, MIT License - * see https://github.com/es-shims/es5-shim/blob/master/LICENSE - */ - -// vim: ts=4 sts=4 sw=4 expandtab - -// Add semicolon to prevent IIFE from being passed as argument to concatenated code. -// UMD (Universal Module Definition) -// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js -(function (root, factory) { - 'use strict'; - - /* global define, exports, module */ - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(factory); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like enviroments that support module.exports, - // like Node. - module.exports = factory(); - } else { - // Browser globals (root is window) - root.returnExports = factory(); - } -}(this, function () { - /** - * Brings an environment as close to ECMAScript 5 compliance - * as is possible with the facilities of erstwhile engines. - * - * Annotated ES5: http://es5.github.com/ (specific links below) - * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf - * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ - */ - - // Shortcut to an often accessed properties, in order to avoid multiple - // dereference that costs universally. This also holds a reference to known-good - // functions. - var $Array = Array; - var ArrayPrototype = $Array.prototype; - var $Object = Object; - var ObjectPrototype = $Object.prototype; - var $Function = Function; - var FunctionPrototype = $Function.prototype; - var $String = String; - var StringPrototype = $String.prototype; - var $Number = Number; - var NumberPrototype = $Number.prototype; - var array_slice = ArrayPrototype.slice; - var array_splice = ArrayPrototype.splice; - var array_push = ArrayPrototype.push; - var array_unshift = ArrayPrototype.unshift; - var array_concat = ArrayPrototype.concat; - var array_join = ArrayPrototype.join; - var call = FunctionPrototype.call; - var apply = FunctionPrototype.apply; - var max = Math.max; - var min = Math.min; - - // Having a toString local variable name breaks in Opera so use to_string. - var to_string = ObjectPrototype.toString; - - /* global Symbol */ - /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ - var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; - - var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; }; - var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; }; - /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ - - /* inlined from http://npmjs.com/define-properties */ - var supportsDescriptors = $Object.defineProperty && (function () { - try { - var obj = {}; - $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is ES3 */ - return false; - } - }()); - var defineProperties = (function (has) { - // Define configurable, writable, and non-enumerable props - // if they don't exist. - var defineProperty; - if (supportsDescriptors) { - defineProperty = function (object, name, method, forceAssign) { - if (!forceAssign && (name in object)) { - return; - } - $Object.defineProperty(object, name, { - configurable: true, - enumerable: false, - writable: true, - value: method - }); - }; - } else { - defineProperty = function (object, name, method, forceAssign) { - if (!forceAssign && (name in object)) { - return; - } - object[name] = method; - }; - } - return function defineProperties(object, map, forceAssign) { - for (var name in map) { - if (has.call(map, name)) { - defineProperty(object, name, map[name], forceAssign); - } - } - }; - }(ObjectPrototype.hasOwnProperty)); - - // - // Util - // ====== - // - - /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ - var isPrimitive = function isPrimitive(input) { - var type = typeof input; - return input === null || (type !== 'object' && type !== 'function'); - }; - - var isActualNaN = $Number.isNaN || function isActualNaN(x) { - return x !== x; - }; - - var ES = { - // ES5 9.4 - // http://es5.github.com/#x9.4 - // http://jsperf.com/to-integer - /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ - ToInteger: function ToInteger(num) { - var n = +num; - if (isActualNaN(n)) { - n = 0; - } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - return n; - }, - - /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ - ToPrimitive: function ToPrimitive(input) { - var val, valueOf, toStr; - if (isPrimitive(input)) { - return input; - } - valueOf = input.valueOf; - if (isCallable(valueOf)) { - val = valueOf.call(input); - if (isPrimitive(val)) { - return val; - } - } - toStr = input.toString; - if (isCallable(toStr)) { - val = toStr.call(input); - if (isPrimitive(val)) { - return val; - } - } - throw new TypeError(); - }, - - // ES5 9.9 - // http://es5.github.com/#x9.9 - /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ - ToObject: function (o) { - if (o == null) { // this matches both null and undefined - throw new TypeError("can't convert " + o + ' to object'); - } - return $Object(o); - }, - - /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ - ToUint32: function ToUint32(x) { - return x >>> 0; - } - }; - - // - // Function - // ======== - // - - // ES-5 15.3.4.5 - // http://es5.github.com/#x15.3.4.5 - - var Empty = function Empty() {}; - - defineProperties(FunctionPrototype, { - bind: function bind(that) { // .length is 1 - // 1. Let Target be the this value. - var target = this; - // 2. If IsCallable(Target) is false, throw a TypeError exception. - if (!isCallable(target)) { - throw new TypeError('Function.prototype.bind called on incompatible ' + target); - } - // 3. Let A be a new (possibly empty) internal list of all of the - // argument values provided after thisArg (arg1, arg2 etc), in order. - // XXX slicedArgs will stand in for "A" if used - var args = array_slice.call(arguments, 1); // for normal call - // 4. Let F be a new native ECMAScript object. - // 11. Set the [[Prototype]] internal property of F to the standard - // built-in Function prototype object as specified in 15.3.3.1. - // 12. Set the [[Call]] internal property of F as described in - // 15.3.4.5.1. - // 13. Set the [[Construct]] internal property of F as described in - // 15.3.4.5.2. - // 14. Set the [[HasInstance]] internal property of F as described in - // 15.3.4.5.3. - var bound; - var binder = function () { - - if (this instanceof bound) { - // 15.3.4.5.2 [[Construct]] - // When the [[Construct]] internal method of a function object, - // F that was created using the bind function is called with a - // list of arguments ExtraArgs, the following steps are taken: - // 1. Let target be the value of F's [[TargetFunction]] - // internal property. - // 2. If target has no [[Construct]] internal method, a - // TypeError exception is thrown. - // 3. Let boundArgs be the value of F's [[BoundArgs]] internal - // property. - // 4. Let args be a new list containing the same values as the - // list boundArgs in the same order followed by the same - // values as the list ExtraArgs in the same order. - // 5. Return the result of calling the [[Construct]] internal - // method of target providing args as the arguments. - - var result = apply.call( - target, - this, - array_concat.call(args, array_slice.call(arguments)) - ); - if ($Object(result) === result) { - return result; - } - return this; - - } else { - // 15.3.4.5.1 [[Call]] - // When the [[Call]] internal method of a function object, F, - // which was created using the bind function is called with a - // this value and a list of arguments ExtraArgs, the following - // steps are taken: - // 1. Let boundArgs be the value of F's [[BoundArgs]] internal - // property. - // 2. Let boundThis be the value of F's [[BoundThis]] internal - // property. - // 3. Let target be the value of F's [[TargetFunction]] internal - // property. - // 4. Let args be a new list containing the same values as the - // list boundArgs in the same order followed by the same - // values as the list ExtraArgs in the same order. - // 5. Return the result of calling the [[Call]] internal method - // of target providing boundThis as the this value and - // providing args as the arguments. - - // equiv: target.call(this, ...boundArgs, ...args) - return apply.call( - target, - that, - array_concat.call(args, array_slice.call(arguments)) - ); - - } - - }; - - // 15. If the [[Class]] internal property of Target is "Function", then - // a. Let L be the length property of Target minus the length of A. - // b. Set the length own property of F to either 0 or L, whichever is - // larger. - // 16. Else set the length own property of F to 0. - - var boundLength = max(0, target.length - args.length); - - // 17. Set the attributes of the length own property of F to the values - // specified in 15.3.5.1. - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - array_push.call(boundArgs, '$' + i); - } - - // XXX Build a dynamic function with desired amount of arguments is the only - // way to set the length property of a function. - // In environments where Content Security Policies enabled (Chrome extensions, - // for ex.) all use of eval or Function costructor throws an exception. - // However in all of these environments Function.prototype.bind exists - // and so this code will never be executed. - bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder); - - if (target.prototype) { - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - // Clean up dangling references. - Empty.prototype = null; - } - - // TODO - // 18. Set the [[Extensible]] internal property of F to true. - - // TODO - // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). - // 20. Call the [[DefineOwnProperty]] internal method of F with - // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: - // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and - // false. - // 21. Call the [[DefineOwnProperty]] internal method of F with - // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, - // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, - // and false. - - // TODO - // NOTE Function objects created using Function.prototype.bind do not - // have a prototype property or the [[Code]], [[FormalParameters]], and - // [[Scope]] internal properties. - // XXX can't delete prototype in pure-js. - - // 22. Return F. - return bound; - } - }); - - // _Please note: Shortcuts are defined after `Function.prototype.bind` as we - // use it in defining shortcuts. - var owns = call.bind(ObjectPrototype.hasOwnProperty); - var toStr = call.bind(ObjectPrototype.toString); - var arraySlice = call.bind(array_slice); - var arraySliceApply = apply.bind(array_slice); - var strSlice = call.bind(StringPrototype.slice); - var strSplit = call.bind(StringPrototype.split); - var strIndexOf = call.bind(StringPrototype.indexOf); - var pushCall = call.bind(array_push); - var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); - var arraySort = call.bind(ArrayPrototype.sort); - - // - // Array - // ===== - // - - var isArray = $Array.isArray || function isArray(obj) { - return toStr(obj) === '[object Array]'; - }; - - // ES5 15.4.4.12 - // http://es5.github.com/#x15.4.4.13 - // Return len+argCount. - // [bugfix, ielt8] - // IE < 8 bug: [].unshift(0) === undefined but should be "1" - var hasUnshiftReturnValueBug = [].unshift(0) !== 1; - defineProperties(ArrayPrototype, { - unshift: function () { - array_unshift.apply(this, arguments); - return this.length; - } - }, hasUnshiftReturnValueBug); - - // ES5 15.4.3.2 - // http://es5.github.com/#x15.4.3.2 - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray - defineProperties($Array, { isArray: isArray }); - - // The IsCallable() check in the Array functions - // has been replaced with a strict check on the - // internal class of the object to trap cases where - // the provided function was actually a regular - // expression literal, which in V8 and - // JavaScriptCore is a typeof "function". Only in - // V8 are regular expression literals permitted as - // reduce parameters, so it is desirable in the - // general case for the shim to match the more - // strict and common behavior of rejecting regular - // expressions. - - // ES5 15.4.4.18 - // http://es5.github.com/#x15.4.4.18 - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach - - // Check failure of by-index access of string characters (IE < 9) - // and failure of `0 in boxedString` (Rhino) - var boxedString = $Object('a'); - var splitString = boxedString[0] !== 'a' || !(0 in boxedString); - - var properlyBoxesContext = function properlyBoxed(method) { - // Check node 0.6.21 bug where third parameter is not boxed - var properlyBoxesNonStrict = true; - var properlyBoxesStrict = true; - var threwException = false; - if (method) { - try { - method.call('foo', function (_, __, context) { - if (typeof context !== 'object') { - properlyBoxesNonStrict = false; - } - }); - - method.call([1], function () { - 'use strict'; - - properlyBoxesStrict = typeof this === 'string'; - }, 'x'); - } catch (e) { - threwException = true; - } - } - return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; - }; - - defineProperties(ArrayPrototype, { - forEach: function forEach(callbackfn/*, thisArg*/) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var i = -1; - var length = ES.ToUint32(self.length); - var T; - if (arguments.length > 1) { - T = arguments[1]; - } - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.forEach callback must be a function'); - } - - while (++i < length) { - if (i in self) { - // Invoke the callback function with call, passing arguments: - // context, property value, property key, thisArg object - if (typeof T === 'undefined') { - callbackfn(self[i], i, object); - } else { - callbackfn.call(T, self[i], i, object); - } - } - } - } - }, !properlyBoxesContext(ArrayPrototype.forEach)); - - // ES5 15.4.4.19 - // http://es5.github.com/#x15.4.4.19 - // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - defineProperties(ArrayPrototype, { - map: function map(callbackfn/*, thisArg*/) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var length = ES.ToUint32(self.length); - var result = $Array(length); - var T; - if (arguments.length > 1) { - T = arguments[1]; - } - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.map callback must be a function'); - } - - for (var i = 0; i < length; i++) { - if (i in self) { - if (typeof T === 'undefined') { - result[i] = callbackfn(self[i], i, object); - } else { - result[i] = callbackfn.call(T, self[i], i, object); - } - } - } - return result; - } - }, !properlyBoxesContext(ArrayPrototype.map)); - - // ES5 15.4.4.20 - // http://es5.github.com/#x15.4.4.20 - // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter - defineProperties(ArrayPrototype, { - filter: function filter(callbackfn/*, thisArg*/) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var length = ES.ToUint32(self.length); - var result = []; - var value; - var T; - if (arguments.length > 1) { - T = arguments[1]; - } - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.filter callback must be a function'); - } - - for (var i = 0; i < length; i++) { - if (i in self) { - value = self[i]; - if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) { - pushCall(result, value); - } - } - } - return result; - } - }, !properlyBoxesContext(ArrayPrototype.filter)); - - // ES5 15.4.4.16 - // http://es5.github.com/#x15.4.4.16 - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every - defineProperties(ArrayPrototype, { - every: function every(callbackfn/*, thisArg*/) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var length = ES.ToUint32(self.length); - var T; - if (arguments.length > 1) { - T = arguments[1]; - } - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.every callback must be a function'); - } - - for (var i = 0; i < length; i++) { - if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { - return false; - } - } - return true; - } - }, !properlyBoxesContext(ArrayPrototype.every)); - - // ES5 15.4.4.17 - // http://es5.github.com/#x15.4.4.17 - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some - defineProperties(ArrayPrototype, { - some: function some(callbackfn/*, thisArg */) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var length = ES.ToUint32(self.length); - var T; - if (arguments.length > 1) { - T = arguments[1]; - } - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.some callback must be a function'); - } - - for (var i = 0; i < length; i++) { - if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { - return true; - } - } - return false; - } - }, !properlyBoxesContext(ArrayPrototype.some)); - - // ES5 15.4.4.21 - // http://es5.github.com/#x15.4.4.21 - // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce - var reduceCoercesToObject = false; - if (ArrayPrototype.reduce) { - reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { - return list; - }) === 'object'; - } - defineProperties(ArrayPrototype, { - reduce: function reduce(callbackfn/*, initialValue*/) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var length = ES.ToUint32(self.length); - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.reduce callback must be a function'); - } - - // no value to return if no initial value and an empty array - if (length === 0 && arguments.length === 1) { - throw new TypeError('reduce of empty array with no initial value'); - } - - var i = 0; - var result; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= length) { - throw new TypeError('reduce of empty array with no initial value'); - } - } while (true); - } - - for (; i < length; i++) { - if (i in self) { - result = callbackfn(result, self[i], i, object); - } - } - - return result; - } - }, !reduceCoercesToObject); - - // ES5 15.4.4.22 - // http://es5.github.com/#x15.4.4.22 - // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight - var reduceRightCoercesToObject = false; - if (ArrayPrototype.reduceRight) { - reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { - return list; - }) === 'object'; - } - defineProperties(ArrayPrototype, { - reduceRight: function reduceRight(callbackfn/*, initial*/) { - var object = ES.ToObject(this); - var self = splitString && isString(this) ? strSplit(this, '') : object; - var length = ES.ToUint32(self.length); - - // If no callback function or if callback is not a callable function - if (!isCallable(callbackfn)) { - throw new TypeError('Array.prototype.reduceRight callback must be a function'); - } - - // no value to return if no initial value, empty array - if (length === 0 && arguments.length === 1) { - throw new TypeError('reduceRight of empty array with no initial value'); - } - - var result; - var i = length - 1; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i--]; - break; - } - - // if array contains no values, no initial value to return - if (--i < 0) { - throw new TypeError('reduceRight of empty array with no initial value'); - } - } while (true); - } - - if (i < 0) { - return result; - } - - do { - if (i in self) { - result = callbackfn(result, self[i], i, object); - } - } while (i--); - - return result; - } - }, !reduceRightCoercesToObject); - - // ES5 15.4.4.14 - // http://es5.github.com/#x15.4.4.14 - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf - var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; - defineProperties(ArrayPrototype, { - indexOf: function indexOf(searchElement/*, fromIndex */) { - var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); - var length = ES.ToUint32(self.length); - - if (length === 0) { - return -1; - } - - var i = 0; - if (arguments.length > 1) { - i = ES.ToInteger(arguments[1]); - } - - // handle negative indices - i = i >= 0 ? i : max(0, length + i); - for (; i < length; i++) { - if (i in self && self[i] === searchElement) { - return i; - } - } - return -1; - } - }, hasFirefox2IndexOfBug); - - // ES5 15.4.4.15 - // http://es5.github.com/#x15.4.4.15 - // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf - var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; - defineProperties(ArrayPrototype, { - lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) { - var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); - var length = ES.ToUint32(self.length); - - if (length === 0) { - return -1; - } - var i = length - 1; - if (arguments.length > 1) { - i = min(i, ES.ToInteger(arguments[1])); - } - // handle negative indices - i = i >= 0 ? i : length - Math.abs(i); - for (; i >= 0; i--) { - if (i in self && searchElement === self[i]) { - return i; - } - } - return -1; - } - }, hasFirefox2LastIndexOfBug); - - // ES5 15.4.4.12 - // http://es5.github.com/#x15.4.4.12 - var spliceNoopReturnsEmptyArray = (function () { - var a = [1, 2]; - var result = a.splice(); - return a.length === 2 && isArray(result) && result.length === 0; - }()); - defineProperties(ArrayPrototype, { - // Safari 5.0 bug where .splice() returns undefined - splice: function splice(start, deleteCount) { - if (arguments.length === 0) { - return []; - } else { - return array_splice.apply(this, arguments); - } - } - }, !spliceNoopReturnsEmptyArray); - - var spliceWorksWithEmptyObject = (function () { - var obj = {}; - ArrayPrototype.splice.call(obj, 0, 0, 1); - return obj.length === 1; - }()); - defineProperties(ArrayPrototype, { - splice: function splice(start, deleteCount) { - if (arguments.length === 0) { - return []; - } - var args = arguments; - this.length = max(ES.ToInteger(this.length), 0); - if (arguments.length > 0 && typeof deleteCount !== 'number') { - args = arraySlice(arguments); - if (args.length < 2) { - pushCall(args, this.length - start); - } else { - args[1] = ES.ToInteger(deleteCount); - } - } - return array_splice.apply(this, args); - } - }, !spliceWorksWithEmptyObject); - var spliceWorksWithLargeSparseArrays = (function () { - // Per https://github.com/es-shims/es5-shim/issues/295 - // Safari 7/8 breaks with sparse arrays of size 1e5 or greater - var arr = new $Array(1e5); - // note: the index MUST be 8 or larger or the test will false pass - arr[8] = 'x'; - arr.splice(1, 1); - // note: this test must be defined *after* the indexOf shim - // per https://github.com/es-shims/es5-shim/issues/313 - return arr.indexOf('x') === 7; - }()); - var spliceWorksWithSmallSparseArrays = (function () { - // Per https://github.com/es-shims/es5-shim/issues/295 - // Opera 12.15 breaks on this, no idea why. - var n = 256; - var arr = []; - arr[n] = 'a'; - arr.splice(n + 1, 0, 'b'); - return arr[n] === 'a'; - }()); - defineProperties(ArrayPrototype, { - splice: function splice(start, deleteCount) { - var O = ES.ToObject(this); - var A = []; - var len = ES.ToUint32(O.length); - var relativeStart = ES.ToInteger(start); - var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len); - var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); - - var k = 0; - var from; - while (k < actualDeleteCount) { - from = $String(actualStart + k); - if (owns(O, from)) { - A[k] = O[from]; - } - k += 1; - } - - var items = arraySlice(arguments, 2); - var itemCount = items.length; - var to; - if (itemCount < actualDeleteCount) { - k = actualStart; - var maxK = len - actualDeleteCount; - while (k < maxK) { - from = $String(k + actualDeleteCount); - to = $String(k + itemCount); - if (owns(O, from)) { - O[to] = O[from]; - } else { - delete O[to]; - } - k += 1; - } - k = len; - var minK = len - actualDeleteCount + itemCount; - while (k > minK) { - delete O[k - 1]; - k -= 1; - } - } else if (itemCount > actualDeleteCount) { - k = len - actualDeleteCount; - while (k > actualStart) { - from = $String(k + actualDeleteCount - 1); - to = $String(k + itemCount - 1); - if (owns(O, from)) { - O[to] = O[from]; - } else { - delete O[to]; - } - k -= 1; - } - } - k = actualStart; - for (var i = 0; i < items.length; ++i) { - O[k] = items[i]; - k += 1; - } - O.length = len - actualDeleteCount + itemCount; - - return A; - } - }, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays); - - var originalJoin = ArrayPrototype.join; - var hasStringJoinBug; - try { - hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; - } catch (e) { - hasStringJoinBug = true; - } - if (hasStringJoinBug) { - defineProperties(ArrayPrototype, { - join: function join(separator) { - var sep = typeof separator === 'undefined' ? ',' : separator; - return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); - } - }, hasStringJoinBug); - } - - var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; - if (hasJoinUndefinedBug) { - defineProperties(ArrayPrototype, { - join: function join(separator) { - var sep = typeof separator === 'undefined' ? ',' : separator; - return originalJoin.call(this, sep); - } - }, hasJoinUndefinedBug); - } - - var pushShim = function push(item) { - var O = ES.ToObject(this); - var n = ES.ToUint32(O.length); - var i = 0; - while (i < arguments.length) { - O[n + i] = arguments[i]; - i += 1; - } - O.length = n + i; - return n + i; - }; - - var pushIsNotGeneric = (function () { - var obj = {}; - var result = Array.prototype.push.call(obj, undefined); - return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); - }()); - defineProperties(ArrayPrototype, { - push: function push(item) { - if (isArray(this)) { - return array_push.apply(this, arguments); - } - return pushShim.apply(this, arguments); - } - }, pushIsNotGeneric); - - // This fixes a very weird bug in Opera 10.6 when pushing `undefined - var pushUndefinedIsWeird = (function () { - var arr = []; - var result = arr.push(undefined); - return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); - }()); - defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); - - // ES5 15.2.3.14 - // http://es5.github.io/#x15.4.4.10 - // Fix boxed string bug - defineProperties(ArrayPrototype, { - slice: function (start, end) { - var arr = isString(this) ? strSplit(this, '') : this; - return arraySliceApply(arr, arguments); - } - }, splitString); - - var sortIgnoresNonFunctions = (function () { - try { - [1, 2].sort(null); - [1, 2].sort({}); - return true; - } catch (e) {} - return false; - }()); - var sortThrowsOnRegex = (function () { - // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` - try { - [1, 2].sort(/a/); - return false; - } catch (e) {} - return true; - }()); - var sortIgnoresUndefined = (function () { - // applies in IE 8, for one. - try { - [1, 2].sort(undefined); - return true; - } catch (e) {} - return false; - }()); - defineProperties(ArrayPrototype, { - sort: function sort(compareFn) { - if (typeof compareFn === 'undefined') { - return arraySort(this); - } - if (!isCallable(compareFn)) { - throw new TypeError('Array.prototype.sort callback must be a function'); - } - return arraySort(this, compareFn); - } - }, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex); - - // - // Object - // ====== - // - - // ES5 15.2.3.14 - // http://es5.github.com/#x15.2.3.14 - - // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString'); - var hasProtoEnumBug = isEnum(function () {}, 'prototype'); - var hasStringEnumBug = !owns('x', '0'); - var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; - }; - var blacklistedKeys = { - $window: true, - $console: true, - $parent: true, - $self: true, - $frame: true, - $frames: true, - $frameElement: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $external: true - }; - var hasAutomationEqualityBug = (function () { - /* globals window */ - if (typeof window === 'undefined') { - return false; - } - for (var k in window) { - try { - if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') { - equalsConstructorPrototype(window[k]); - } - } catch (e) { - return true; - } - } - return false; - }()); - var equalsConstructorPrototypeIfNotBuggy = function (object) { - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(object); - } - try { - return equalsConstructorPrototype(object); - } catch (e) { - return false; - } - }; - var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - var dontEnumsLength = dontEnums.length; - - // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js - // can be replaced with require('is-arguments') if we ever use a build process instead - var isStandardArguments = function isArguments(value) { - return toStr(value) === '[object Arguments]'; - }; - var isLegacyArguments = function isArguments(value) { - return value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - !isArray(value) && - isCallable(value.callee); - }; - var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; - - defineProperties($Object, { - keys: function keys(object) { - var isFn = isCallable(object); - var isArgs = isArguments(object); - var isObject = object !== null && typeof object === 'object'; - var isStr = isObject && isString(object); - - if (!isObject && !isFn && !isArgs) { - throw new TypeError('Object.keys called on a non-object'); - } - - var theKeys = []; - var skipProto = hasProtoEnumBug && isFn; - if ((isStr && hasStringEnumBug) || isArgs) { - for (var i = 0; i < object.length; ++i) { - pushCall(theKeys, $String(i)); - } - } - - if (!isArgs) { - for (var name in object) { - if (!(skipProto && name === 'prototype') && owns(object, name)) { - pushCall(theKeys, $String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - for (var j = 0; j < dontEnumsLength; j++) { - var dontEnum = dontEnums[j]; - if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { - pushCall(theKeys, dontEnum); - } - } - } - return theKeys; - } - }); - - var keysWorksWithArguments = $Object.keys && (function () { - // Safari 5.0 bug - return $Object.keys(arguments).length === 2; - }(1, 2)); - var keysHasArgumentsLengthBug = $Object.keys && (function () { - var argKeys = $Object.keys(arguments); - return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; - }(1)); - var originalKeys = $Object.keys; - defineProperties($Object, { - keys: function keys(object) { - if (isArguments(object)) { - return originalKeys(arraySlice(object)); - } else { - return originalKeys(object); - } - } - }, !keysWorksWithArguments || keysHasArgumentsLengthBug); - - // - // Date - // ==== - // - - var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; - var aNegativeTestDate = new Date(-1509842289600292); - var aPositiveTestDate = new Date(1449662400000); - var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; - var hasToDateStringFormatBug; - var hasToStringFormatBug; - var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); - if (timeZoneOffset < -720) { - hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; - hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); - } else { - hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; - hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); - } - - var originalGetFullYear = call.bind(Date.prototype.getFullYear); - var originalGetMonth = call.bind(Date.prototype.getMonth); - var originalGetDate = call.bind(Date.prototype.getDate); - var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); - var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); - var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); - var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); - var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); - var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); - var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); - var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); - var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - var daysInMonth = function daysInMonth(month, year) { - return originalGetDate(new Date(year, month, 0)); - }; - - defineProperties(Date.prototype, { - getFullYear: function getFullYear() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var year = originalGetFullYear(this); - if (year < 0 && originalGetMonth(this) > 11) { - return year + 1; - } - return year; - }, - getMonth: function getMonth() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var year = originalGetFullYear(this); - var month = originalGetMonth(this); - if (year < 0 && month > 11) { - return 0; - } - return month; - }, - getDate: function getDate() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var year = originalGetFullYear(this); - var month = originalGetMonth(this); - var date = originalGetDate(this); - if (year < 0 && month > 11) { - if (month === 12) { - return date; - } - var days = daysInMonth(0, year + 1); - return (days - date) + 1; - } - return date; - }, - getUTCFullYear: function getUTCFullYear() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var year = originalGetUTCFullYear(this); - if (year < 0 && originalGetUTCMonth(this) > 11) { - return year + 1; - } - return year; - }, - getUTCMonth: function getUTCMonth() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var year = originalGetUTCFullYear(this); - var month = originalGetUTCMonth(this); - if (year < 0 && month > 11) { - return 0; - } - return month; - }, - getUTCDate: function getUTCDate() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var year = originalGetUTCFullYear(this); - var month = originalGetUTCMonth(this); - var date = originalGetUTCDate(this); - if (year < 0 && month > 11) { - if (month === 12) { - return date; - } - var days = daysInMonth(0, year + 1); - return (days - date) + 1; - } - return date; - } - }, hasNegativeMonthYearBug); - - defineProperties(Date.prototype, { - toUTCString: function toUTCString() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var day = originalGetUTCDay(this); - var date = originalGetUTCDate(this); - var month = originalGetUTCMonth(this); - var year = originalGetUTCFullYear(this); - var hour = originalGetUTCHours(this); - var minute = originalGetUTCMinutes(this); - var second = originalGetUTCSeconds(this); - return dayName[day] + ', ' + - (date < 10 ? '0' + date : date) + ' ' + - monthName[month] + ' ' + - year + ' ' + - (hour < 10 ? '0' + hour : hour) + ':' + - (minute < 10 ? '0' + minute : minute) + ':' + - (second < 10 ? '0' + second : second) + ' GMT'; - } - }, hasNegativeMonthYearBug || hasToUTCStringFormatBug); - - // Opera 12 has `,` - defineProperties(Date.prototype, { - toDateString: function toDateString() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var day = this.getDay(); - var date = this.getDate(); - var month = this.getMonth(); - var year = this.getFullYear(); - return dayName[day] + ' ' + - monthName[month] + ' ' + - (date < 10 ? '0' + date : date) + ' ' + - year; - } - }, hasNegativeMonthYearBug || hasToDateStringFormatBug); - - // can't use defineProperties here because of toString enumeration issue in IE <= 8 - if (hasNegativeMonthYearBug || hasToStringFormatBug) { - Date.prototype.toString = function toString() { - if (!this || !(this instanceof Date)) { - throw new TypeError('this is not a Date object.'); - } - var day = this.getDay(); - var date = this.getDate(); - var month = this.getMonth(); - var year = this.getFullYear(); - var hour = this.getHours(); - var minute = this.getMinutes(); - var second = this.getSeconds(); - var timezoneOffset = this.getTimezoneOffset(); - var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); - var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); - return dayName[day] + ' ' + - monthName[month] + ' ' + - (date < 10 ? '0' + date : date) + ' ' + - year + ' ' + - (hour < 10 ? '0' + hour : hour) + ':' + - (minute < 10 ? '0' + minute : minute) + ':' + - (second < 10 ? '0' + second : second) + ' GMT' + - (timezoneOffset > 0 ? '-' : '+') + - (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + - (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset); - }; - if (supportsDescriptors) { - $Object.defineProperty(Date.prototype, 'toString', { - configurable: true, - enumerable: false, - writable: true - }); - } - } - - // ES5 15.9.5.43 - // http://es5.github.com/#x15.9.5.43 - // This function returns a String value represent the instance in time - // represented by this Date object. The format of the String is the Date Time - // string format defined in 15.9.1.15. All fields are present in the String. - // The time zone is always UTC, denoted by the suffix Z. If the time value of - // this object is not a finite Number a RangeError exception is thrown. - var negativeDate = -62198755200000; - var negativeYearString = '-000001'; - var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; - var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; - - var getTime = call.bind(Date.prototype.getTime); - - defineProperties(Date.prototype, { - toISOString: function toISOString() { - if (!isFinite(this) || !isFinite(getTime(this))) { - // Adope Photoshop requires the second check. - throw new RangeError('Date.prototype.toISOString called on non-finite value.'); - } - - var year = originalGetUTCFullYear(this); - - var month = originalGetUTCMonth(this); - // see https://github.com/es-shims/es5-shim/issues/111 - year += Math.floor(month / 12); - month = (month % 12 + 12) % 12; - - // the date time string format is specified in 15.9.1.15. - var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)]; - year = ( - (year < 0 ? '-' : (year > 9999 ? '+' : '')) + - strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6) - ); - - for (var i = 0; i < result.length; ++i) { - // pad months, days, hours, minutes, and seconds to have two digits. - result[i] = strSlice('00' + result[i], -2); - } - // pad milliseconds to have three digits. - return ( - year + '-' + arraySlice(result, 0, 2).join('-') + - 'T' + arraySlice(result, 2).join(':') + '.' + - strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z' - ); - } - }, hasNegativeDateBug || hasSafari51DateBug); - - // ES5 15.9.5.44 - // http://es5.github.com/#x15.9.5.44 - // This function provides a String representation of a Date object for use by - // JSON.stringify (15.12.3). - var dateToJSONIsSupported = (function () { - try { - return Date.prototype.toJSON && - new Date(NaN).toJSON() === null && - new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && - Date.prototype.toJSON.call({ // generic - toISOString: function () { return true; } - }); - } catch (e) { - return false; - } - }()); - if (!dateToJSONIsSupported) { - Date.prototype.toJSON = function toJSON(key) { - // When the toJSON method is called with argument key, the following - // steps are taken: - - // 1. Let O be the result of calling ToObject, giving it the this - // value as its argument. - // 2. Let tv be ES.ToPrimitive(O, hint Number). - var O = $Object(this); - var tv = ES.ToPrimitive(O); - // 3. If tv is a Number and is not finite, return null. - if (typeof tv === 'number' && !isFinite(tv)) { - return null; - } - // 4. Let toISO be the result of calling the [[Get]] internal method of - // O with argument "toISOString". - var toISO = O.toISOString; - // 5. If IsCallable(toISO) is false, throw a TypeError exception. - if (!isCallable(toISO)) { - throw new TypeError('toISOString property is not callable'); - } - // 6. Return the result of calling the [[Call]] internal method of - // toISO with O as the this value and an empty argument list. - return toISO.call(O); - - // NOTE 1 The argument is ignored. - - // NOTE 2 The toJSON function is intentionally generic; it does not - // require that its this value be a Date object. Therefore, it can be - // transferred to other kinds of objects for use as a method. However, - // it does require that any such object have a toISOString method. An - // object is free to use the argument key to filter its - // stringification. - }; - } - - // ES5 15.9.4.2 - // http://es5.github.com/#x15.9.4.2 - // based on work shared by Daniel Friesen (dantman) - // http://gist.github.com/303249 - var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; - var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); - var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); - if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { - // XXX global assignment won't work in embeddings that use - // an alternate object for the context. - /* global Date: true */ - /* eslint-disable no-undef */ - var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; - var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime()); - /* eslint-disable no-implicit-globals */ - Date = (function (NativeDate) { - /* eslint-enable no-implicit-globals */ - /* eslint-enable no-undef */ - // Date.length === 7 - var DateShim = function Date(Y, M, D, h, m, s, ms) { - var length = arguments.length; - var date; - if (this instanceof NativeDate) { - var seconds = s; - var millis = ms; - if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { - // work around a Safari 8/9 bug where it treats the seconds as signed - var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; - var sToShift = Math.floor(msToShift / 1e3); - seconds += sToShift; - millis -= sToShift * 1e3; - } - date = length === 1 && $String(Y) === Y ? // isString(Y) - // We explicitly pass it through parse: - new NativeDate(DateShim.parse(Y)) : - // We have to manually make calls depending on argument - // length here - length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) : - length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) : - length >= 5 ? new NativeDate(Y, M, D, h, m) : - length >= 4 ? new NativeDate(Y, M, D, h) : - length >= 3 ? new NativeDate(Y, M, D) : - length >= 2 ? new NativeDate(Y, M) : - length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) : - new NativeDate(); - } else { - date = NativeDate.apply(this, arguments); - } - if (!isPrimitive(date)) { - // Prevent mixups with unfixed Date object - defineProperties(date, { constructor: DateShim }, true); - } - return date; - }; - - // 15.9.1.15 Date Time String Format. - var isoDateExpression = new RegExp('^' + - '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + - // 6-digit extended year - '(?:-(\\d{2})' + // optional month capture - '(?:-(\\d{2})' + // optional day capture - '(?:' + // capture hours:minutes:seconds.milliseconds - 'T(\\d{2})' + // hours capture - ':(\\d{2})' + // minutes capture - '(?:' + // optional :seconds.milliseconds - ':(\\d{2})' + // seconds capture - '(?:(\\.\\d{1,}))?' + // milliseconds capture - ')?' + - '(' + // capture UTC offset component - 'Z|' + // UTC capture - '(?:' + // offset specifier +/-hours:minutes - '([-+])' + // sign capture - '(\\d{2})' + // hours offset capture - ':(\\d{2})' + // minutes offset capture - ')' + - ')?)?)?)?' + - '$'); - - var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; - - var dayFromMonth = function dayFromMonth(year, month) { - var t = month > 1 ? 1 : 0; - return ( - months[month] + - Math.floor((year - 1969 + t) / 4) - - Math.floor((year - 1901 + t) / 100) + - Math.floor((year - 1601 + t) / 400) + - 365 * (year - 1970) - ); - }; - - var toUTC = function toUTC(t) { - var s = 0; - var ms = t; - if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { - // work around a Safari 8/9 bug where it treats the seconds as signed - var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; - var sToShift = Math.floor(msToShift / 1e3); - s += sToShift; - ms -= sToShift * 1e3; - } - return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); - }; - - // Copy any custom methods a 3rd party library may have added - for (var key in NativeDate) { - if (owns(NativeDate, key)) { - DateShim[key] = NativeDate[key]; - } - } - - // Copy "native" methods explicitly; they may be non-enumerable - defineProperties(DateShim, { - now: NativeDate.now, - UTC: NativeDate.UTC - }, true); - DateShim.prototype = NativeDate.prototype; - defineProperties(DateShim.prototype, { - constructor: DateShim - }, true); - - // Upgrade Date.parse to handle simplified ISO 8601 strings - var parseShim = function parse(string) { - var match = isoDateExpression.exec(string); - if (match) { - // parse months, days, hours, minutes, seconds, and milliseconds - // provide default values if necessary - // parse the UTC offset component - var year = $Number(match[1]), - month = $Number(match[2] || 1) - 1, - day = $Number(match[3] || 1) - 1, - hour = $Number(match[4] || 0), - minute = $Number(match[5] || 0), - second = $Number(match[6] || 0), - millisecond = Math.floor($Number(match[7] || 0) * 1000), - // When time zone is missed, local offset should be used - // (ES 5.1 bug) - // see https://bugs.ecmascript.org/show_bug.cgi?id=112 - isLocalTime = Boolean(match[4] && !match[8]), - signOffset = match[9] === '-' ? 1 : -1, - hourOffset = $Number(match[10] || 0), - minuteOffset = $Number(match[11] || 0), - result; - var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; - if ( - hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && - minute < 60 && second < 60 && millisecond < 1000 && - month > -1 && month < 12 && hourOffset < 24 && - minuteOffset < 60 && // detect invalid offsets - day > -1 && - day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month)) - ) { - result = ( - (dayFromMonth(year, month) + day) * 24 + - hour + - hourOffset * signOffset - ) * 60; - result = ( - (result + minute + minuteOffset * signOffset) * 60 + - second - ) * 1000 + millisecond; - if (isLocalTime) { - result = toUTC(result); - } - if (-8.64e15 <= result && result <= 8.64e15) { - return result; - } - } - return NaN; - } - return NativeDate.parse.apply(this, arguments); - }; - defineProperties(DateShim, { parse: parseShim }); - - return DateShim; - }(Date)); - /* global Date: false */ - } - - // ES5 15.9.4.4 - // http://es5.github.com/#x15.9.4.4 - if (!Date.now) { - Date.now = function now() { - return new Date().getTime(); - }; - } - - // - // Number - // ====== - // - - // ES5.1 15.7.4.5 - // http://es5.github.com/#x15.7.4.5 - var hasToFixedBugs = NumberPrototype.toFixed && ( - (0.00008).toFixed(3) !== '0.000' || - (0.9).toFixed(0) !== '1' || - (1.255).toFixed(2) !== '1.25' || - (1000000000000000128).toFixed(0) !== '1000000000000000128' - ); - - var toFixedHelpers = { - base: 1e7, - size: 6, - data: [0, 0, 0, 0, 0, 0], - multiply: function multiply(n, c) { - var i = -1; - var c2 = c; - while (++i < toFixedHelpers.size) { - c2 += n * toFixedHelpers.data[i]; - toFixedHelpers.data[i] = c2 % toFixedHelpers.base; - c2 = Math.floor(c2 / toFixedHelpers.base); - } - }, - divide: function divide(n) { - var i = toFixedHelpers.size; - var c = 0; - while (--i >= 0) { - c += toFixedHelpers.data[i]; - toFixedHelpers.data[i] = Math.floor(c / n); - c = (c % n) * toFixedHelpers.base; - } - }, - numToString: function numToString() { - var i = toFixedHelpers.size; - var s = ''; - while (--i >= 0) { - if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { - var t = $String(toFixedHelpers.data[i]); - if (s === '') { - s = t; - } else { - s += strSlice('0000000', 0, 7 - t.length) + t; - } - } - } - return s; - }, - pow: function pow(x, n, acc) { - return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc))); - }, - log: function log(x) { - var n = 0; - var x2 = x; - while (x2 >= 4096) { - n += 12; - x2 /= 4096; - } - while (x2 >= 2) { - n += 1; - x2 /= 2; - } - return n; - } - }; - - var toFixedShim = function toFixed(fractionDigits) { - var f, x, s, m, e, z, j, k; - - // Test for NaN and round fractionDigits down - f = $Number(fractionDigits); - f = isActualNaN(f) ? 0 : Math.floor(f); - - if (f < 0 || f > 20) { - throw new RangeError('Number.toFixed called with invalid number of decimals'); - } - - x = $Number(this); - - if (isActualNaN(x)) { - return 'NaN'; - } - - // If it is too big or small, return the string value of the number - if (x <= -1e21 || x >= 1e21) { - return $String(x); - } - - s = ''; - - if (x < 0) { - s = '-'; - x = -x; - } - - m = '0'; - - if (x > 1e-21) { - // 1e-21 < x < 1e21 - // -70 < log2(x) < 70 - e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; - z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1)); - z *= 0x10000000000000; // Math.pow(2, 52); - e = 52 - e; - - // -18 < e < 122 - // x = z / 2 ^ e - if (e > 0) { - toFixedHelpers.multiply(0, z); - j = f; - - while (j >= 7) { - toFixedHelpers.multiply(1e7, 0); - j -= 7; - } - - toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); - j = e - 1; - - while (j >= 23) { - toFixedHelpers.divide(1 << 23); - j -= 23; - } - - toFixedHelpers.divide(1 << j); - toFixedHelpers.multiply(1, 1); - toFixedHelpers.divide(2); - m = toFixedHelpers.numToString(); - } else { - toFixedHelpers.multiply(0, z); - toFixedHelpers.multiply(1 << (-e), 0); - m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); - } - } - - if (f > 0) { - k = m.length; - - if (k <= f) { - m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; - } else { - m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); - } - } else { - m = s + m; - } - - return m; - }; - defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); - - var hasToPrecisionUndefinedBug = (function () { - try { - return 1.0.toPrecision(undefined) === '1'; - } catch (e) { - return true; - } - }()); - var originalToPrecision = NumberPrototype.toPrecision; - defineProperties(NumberPrototype, { - toPrecision: function toPrecision(precision) { - return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision); - } - }, hasToPrecisionUndefinedBug); - - // - // String - // ====== - // - - // ES5 15.5.4.14 - // http://es5.github.com/#x15.5.4.14 - - // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] - // Many browsers do not split properly with regular expressions or they - // do not perform the split correctly under obscure conditions. - // See http://blog.stevenlevithan.com/archives/cross-browser-split - // I've tested in many browsers and this seems to cover the deviant ones: - // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] - // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] - // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not - // [undefined, "t", undefined, "e", ...] - // ''.split(/.?/) should be [], not [""] - // '.'.split(/()()/) should be ["."], not ["", "", "."] - - if ( - 'ab'.split(/(?:ab)*/).length !== 2 || - '.'.split(/(.?)(.?)/).length !== 4 || - 'tesst'.split(/(s)*/)[1] === 't' || - 'test'.split(/(?:)/, -1).length !== 4 || - ''.split(/.?/).length || - '.'.split(/()()/).length > 1 - ) { - (function () { - var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group - var maxSafe32BitInt = Math.pow(2, 32) - 1; - - StringPrototype.split = function (separator, limit) { - var string = String(this); - if (typeof separator === 'undefined' && limit === 0) { - return []; - } - - // If `separator` is not a regex, use native split - if (!isRegex(separator)) { - return strSplit(this, separator, limit); - } - - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + // in ES6 - (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 - lastLastIndex = 0, - // Make `global` and avoid `lastIndex` issues by working with a copy - separator2, match, lastIndex, lastLength; - var separatorCopy = new RegExp(separator.source, flags + 'g'); - if (!compliantExecNpcg) { - // Doesn't need flags gy, but they don't hurt - separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); - } - /* Values for `limit`, per the spec: - * If undefined: 4294967295 // maxSafe32BitInt - * If 0, Infinity, or NaN: 0 - * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; - * If negative number: 4294967296 - Math.floor(Math.abs(limit)) - * If other: Type-convert, then use the above rules - */ - var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); - match = separatorCopy.exec(string); - while (match) { - // `separatorCopy.lastIndex` is not reliable cross-browser - lastIndex = match.index + match[0].length; - if (lastIndex > lastLastIndex) { - pushCall(output, strSlice(string, lastLastIndex, match.index)); - // Fix browsers whose `exec` methods don't consistently return `undefined` for - // nonparticipating capturing groups - if (!compliantExecNpcg && match.length > 1) { - /* eslint-disable no-loop-func */ - match[0].replace(separator2, function () { - for (var i = 1; i < arguments.length - 2; i++) { - if (typeof arguments[i] === 'undefined') { - match[i] = void 0; - } - } - }); - /* eslint-enable no-loop-func */ - } - if (match.length > 1 && match.index < string.length) { - array_push.apply(output, arraySlice(match, 1)); - } - lastLength = match[0].length; - lastLastIndex = lastIndex; - if (output.length >= splitLimit) { - break; - } - } - if (separatorCopy.lastIndex === match.index) { - separatorCopy.lastIndex++; // Avoid an infinite loop - } - match = separatorCopy.exec(string); - } - if (lastLastIndex === string.length) { - if (lastLength || !separatorCopy.test('')) { - pushCall(output, ''); - } - } else { - pushCall(output, strSlice(string, lastLastIndex)); - } - return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; - }; - }()); - - // [bugfix, chrome] - // If separator is undefined, then the result array contains just one String, - // which is the this value (converted to a String). If limit is not undefined, - // then the output array is truncated so that it contains no more than limit - // elements. - // "0".split(undefined, 0) -> [] - } else if ('0'.split(void 0, 0).length) { - StringPrototype.split = function split(separator, limit) { - if (typeof separator === 'undefined' && limit === 0) { - return []; - } - return strSplit(this, separator, limit); - }; - } - - var str_replace = StringPrototype.replace; - var replaceReportsGroupsCorrectly = (function () { - var groups = []; - 'x'.replace(/x(.)?/g, function (match, group) { - pushCall(groups, group); - }); - return groups.length === 1 && typeof groups[0] === 'undefined'; - }()); - - if (!replaceReportsGroupsCorrectly) { - StringPrototype.replace = function replace(searchValue, replaceValue) { - var isFn = isCallable(replaceValue); - var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source); - if (!isFn || !hasCapturingGroups) { - return str_replace.call(this, searchValue, replaceValue); - } else { - var wrappedReplaceValue = function (match) { - var length = arguments.length; - var originalLastIndex = searchValue.lastIndex; - searchValue.lastIndex = 0; - var args = searchValue.exec(match) || []; - searchValue.lastIndex = originalLastIndex; - pushCall(args, arguments[length - 2], arguments[length - 1]); - return replaceValue.apply(this, args); - }; - return str_replace.call(this, searchValue, wrappedReplaceValue); - } - }; - } - - // ECMA-262, 3rd B.2.3 - // Not an ECMAScript standard, although ECMAScript 3rd Edition has a - // non-normative section suggesting uniform semantics and it should be - // normalized across all browsers - // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE - var string_substr = StringPrototype.substr; - var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; - defineProperties(StringPrototype, { - substr: function substr(start, length) { - var normalizedStart = start; - if (start < 0) { - normalizedStart = max(this.length + start, 0); - } - return string_substr.call(this, normalizedStart, length); - } - }, hasNegativeSubstrBug); - - // ES5 15.5.4.20 - // whitespace from: http://es5.github.io/#x15.5.4.20 - var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + - '\u2029\uFEFF'; - var zeroWidth = '\u200b'; - var wsRegexChars = '[' + ws + ']'; - var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); - var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); - var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); - defineProperties(StringPrototype, { - // http://blog.stevenlevithan.com/archives/faster-trim-javascript - // http://perfectionkills.com/whitespace-deviations/ - trim: function trim() { - if (typeof this === 'undefined' || this === null) { - throw new TypeError("can't convert " + this + ' to object'); - } - return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); - } - }, hasTrimWhitespaceBug); - var trim = call.bind(String.prototype.trim); - - var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; - defineProperties(StringPrototype, { - lastIndexOf: function lastIndexOf(searchString) { - if (typeof this === 'undefined' || this === null) { - throw new TypeError("can't convert " + this + ' to object'); - } - var S = $String(this); - var searchStr = $String(searchString); - var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; - var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); - var start = min(max(pos, 0), S.length); - var searchLen = searchStr.length; - var k = start + searchLen; - while (k > 0) { - k = max(0, k - searchLen); - var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); - if (index !== -1) { - return k + index; - } - } - return -1; - } - }, hasLastIndexBug); - - var originalLastIndexOf = StringPrototype.lastIndexOf; - defineProperties(StringPrototype, { - lastIndexOf: function lastIndexOf(searchString) { - return originalLastIndexOf.apply(this, arguments); - } - }, StringPrototype.lastIndexOf.length !== 1); - - // ES-5 15.1.2.2 - /* eslint-disable radix */ - if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { - /* eslint-enable radix */ - /* global parseInt: true */ - parseInt = (function (origParseInt) { - var hexRegex = /^[\-+]?0[xX]/; - return function parseInt(str, radix) { - var string = trim(String(str)); - var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); - return origParseInt(string, defaultedRadix); - }; - }(parseInt)); - } - - // https://es5.github.io/#x15.1.2.3 - if (1 / parseFloat('-0') !== -Infinity) { - /* global parseFloat: true */ - parseFloat = (function (origParseFloat) { - return function parseFloat(string) { - var inputString = trim(String(string)); - var result = origParseFloat(inputString); - return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; - }; - }(parseFloat)); - } - - if (String(new RangeError('test')) !== 'RangeError: test') { - var errorToStringShim = function toString() { - if (typeof this === 'undefined' || this === null) { - throw new TypeError("can't convert " + this + ' to object'); - } - var name = this.name; - if (typeof name === 'undefined') { - name = 'Error'; - } else if (typeof name !== 'string') { - name = $String(name); - } - var msg = this.message; - if (typeof msg === 'undefined') { - msg = ''; - } else if (typeof msg !== 'string') { - msg = $String(msg); - } - if (!name) { - return msg; - } - if (!msg) { - return name; - } - return name + ': ' + msg; - }; - // can't use defineProperties here because of toString enumeration issue in IE <= 8 - Error.prototype.toString = errorToStringShim; - } - - if (supportsDescriptors) { - var ensureNonEnumerable = function (obj, prop) { - if (isEnum(obj, prop)) { - var desc = Object.getOwnPropertyDescriptor(obj, prop); - if (desc.configurable) { - desc.enumerable = false; - Object.defineProperty(obj, prop, desc); - } - } - }; - ensureNonEnumerable(Error.prototype, 'message'); - if (Error.prototype.message !== '') { - Error.prototype.message = ''; - } - ensureNonEnumerable(Error.prototype, 'name'); - } - - if (String(/a/mig) !== '/a/gim') { - var regexToString = function toString() { - var str = '/' + this.source + '/'; - if (this.global) { - str += 'g'; - } - if (this.ignoreCase) { - str += 'i'; - } - if (this.multiline) { - str += 'm'; - } - return str; - }; - // can't use defineProperties here because of toString enumeration issue in IE <= 8 - RegExp.prototype.toString = regexToString; - } -})); - -'use strict'; -/*jslint eqeq: true*/ - -Handlebars.registerHelper('sanitize', function (text) { - var result; - - if (text === undefined) { return ''; } - - result = sanitizeHtml(text, { - allowedTags: [ 'div', 'span', 'b', 'i', 'em', 'strong', 'a' ], - allowedAttributes: { - 'div': [ 'class' ], - 'span': [ 'class' ], - 'a': [ 'href' ] - } - }); - - return new Handlebars.SafeString(result); -}); - -Handlebars.registerHelper('renderTextParam', function(param) { - var result, type = 'text', idAtt = ''; - var paramType = param.type || param.schema && param.schema.type || ''; - var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple; - var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; - var name = Handlebars.Utils.escapeExpression(param.name); - var valueId = Handlebars.Utils.escapeExpression(param.valueId); - paramType = Handlebars.Utils.escapeExpression(paramType); - - var dataVendorExtensions = Object.keys(param).filter(function(property) { - // filter X-data- properties - return property.match(/^X-data-/i) !== null; - }).reduce(function(result, property) { - // remove X- from property name, so it results in html attributes like data-foo='bar' - return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\''; - }, ''); - - if(param.format && param.format === 'password') { - type = 'password'; - } - - if(valueId) { - idAtt = ' id=\'' + valueId + '\''; - } - - if (defaultValue) { - defaultValue = sanitizeHtml(defaultValue); - } else { - defaultValue = ''; - } - - if(isArray) { - result = ''; - } else { - var parameterClass = 'parameter'; - if(param.required) { - parameterClass += ' required'; - } - result = ''; - } - return new Handlebars.SafeString(result); -}); - -Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) { - - switch (operator) { - case '==': - return (v1 == v2) ? options.fn(this) : options.inverse(this); - case '===': - return (v1 === v2) ? options.fn(this) : options.inverse(this); - case '<': - return (v1 < v2) ? options.fn(this) : options.inverse(this); - case '<=': - return (v1 <= v2) ? options.fn(this) : options.inverse(this); - case '>': - return (v1 > v2) ? options.fn(this) : options.inverse(this); - case '>=': - return (v1 >= v2) ? options.fn(this) : options.inverse(this); - case '&&': - return (v1 && v2) ? options.fn(this) : options.inverse(this); - case '||': - return (v1 || v2) ? options.fn(this) : options.inverse(this); - default: - return options.inverse(this); - } -}); - -Handlebars.registerHelper('escape', function (value) { - var text = Handlebars.Utils.escapeExpression(value); - - return new Handlebars.SafeString(text); -}); - -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sanitizeHtml=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o=0){globRegex.push(quoteRegexp(name).replace(/\\\*/g,".*"))}else{allowedAttributesMap[tag].push(name)}});allowedAttributesGlobMap[tag]=new RegExp("^("+globRegex.join("|")+")$")})}var allowedClassesMap={};each(options.allowedClasses,function(classes,tag){if(allowedAttributesMap){if(!has(allowedAttributesMap,tag)){allowedAttributesMap[tag]=[]}allowedAttributesMap[tag].push("class")}allowedClassesMap[tag]=classes});var transformTagsMap={};var transformTagsAll;each(options.transformTags,function(transform,tag){var transFun;if(typeof transform==="function"){transFun=transform}else if(typeof transform==="string"){transFun=sanitizeHtml.simpleTransform(transform)}if(tag==="*"){transformTagsAll=transFun}else{transformTagsMap[tag]=transFun}});var depth=0;var stack=[];var skipMap={};var transformMap={};var skipText=false;var skipTextDepth=0;var parser=new htmlparser.Parser({onopentag:function(name,attribs){if(skipText){skipTextDepth++;return}var frame=new Frame(name,attribs);stack.push(frame);var skip=false;var hasText=frame.text?true:false;var transformedTag;if(has(transformTagsMap,name)){transformedTag=transformTagsMap[name](name,attribs);frame.attribs=attribs=transformedTag.attribs;if(transformedTag.text!==undefined){frame.innerText=transformedTag.text}if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(transformTagsAll){transformedTag=transformTagsAll(name,attribs);frame.attribs=attribs=transformedTag.attribs;if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(options.allowedTags&&options.allowedTags.indexOf(name)===-1){skip=true;if(nonTextTagsArray.indexOf(name)!==-1){skipText=true;skipTextDepth=1}skipMap[depth]=true}depth++;if(skip){return}result+="<"+name;if(!allowedAttributesMap||has(allowedAttributesMap,name)||allowedAttributesMap["*"]){each(attribs,function(value,a){if(!allowedAttributesMap||has(allowedAttributesMap,name)&&allowedAttributesMap[name].indexOf(a)!==-1||allowedAttributesMap["*"]&&allowedAttributesMap["*"].indexOf(a)!==-1||has(allowedAttributesGlobMap,name)&&allowedAttributesGlobMap[name].test(a)||allowedAttributesGlobMap["*"]&&allowedAttributesGlobMap["*"].test(a)){if(a==="href"||a==="src"){if(naughtyHref(name,value)){delete frame.attribs[a];return}}if(a==="class"){value=filterClasses(value,allowedClassesMap[name]);if(!value.length){delete frame.attribs[a];return}}result+=" "+a;if(value.length){result+='="'+escapeHtml(value)+'"'}}else{delete frame.attribs[a]}})}if(options.selfClosing.indexOf(name)!==-1){result+=" />"}else{result+=">";if(frame.innerText&&!hasText&&!options.textFilter){result+=frame.innerText}}},ontext:function(text){if(skipText){return}var lastFrame=stack[stack.length-1];var tag;if(lastFrame){tag=lastFrame.tag;text=lastFrame.innerText!==undefined?lastFrame.innerText:text}if(tag==="script"||tag==="style"){result+=text}else{var escaped=escapeHtml(text);if(options.textFilter){result+=options.textFilter(escaped)}else{result+=escaped}}if(stack.length){var frame=stack[stack.length-1];frame.text+=text}},onclosetag:function(name){if(skipText){skipTextDepth--;if(!skipTextDepth){skipText=false}else{return}}var frame=stack.pop();if(!frame){return}skipText=false;depth--;if(skipMap[depth]){delete skipMap[depth];frame.updateParentNodeText();return}if(transformMap[depth]){name=transformMap[depth];delete transformMap[depth]}if(options.exclusiveFilter&&options.exclusiveFilter(frame)){result=result.substr(0,frame.tagPosition);return}frame.updateParentNodeText();if(options.selfClosing.indexOf(name)!==-1){return}result+=""}},options.parser);parser.write(html);parser.end();return result;function escapeHtml(s){if(typeof s!=="string"){s=s+""}return s.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""")}function naughtyHref(name,href){href=href.replace(/[\x00-\x20]+/g,"");href=href.replace(/<\!\-\-.*?\-\-\>/g,"");var matches=href.match(/^([a-zA-Z]+)\:/);if(!matches){return false}var scheme=matches[1].toLowerCase();if(has(options.allowedSchemesByTag,name)){return options.allowedSchemesByTag[name].indexOf(scheme)===-1}return!options.allowedSchemes||options.allowedSchemes.indexOf(scheme)===-1}function filterClasses(classes,allowed){if(!allowed){return classes}classes=classes.split(/\s+/);return classes.filter(function(clss){return allowed.indexOf(clss)!==-1}).join(" ")}}var htmlParserDefaults={decodeEntities:true};sanitizeHtml.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}};sanitizeHtml.simpleTransform=function(newTagName,newAttribs,merge){merge=merge===undefined?true:merge;newAttribs=newAttribs||{};return function(tagName,attribs){var attrib;if(merge){for(attrib in newAttribs){attribs[attrib]=newAttribs[attrib]}}else{attribs=newAttribs}return{tagName:newTagName,attribs:attribs}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(require,module,exports){"use strict";exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;function init(){var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0){throw new Error("Invalid string. Length must be a multiple of 4")}placeHolders=b64[len-2]==="="?2:b64[len-1]==="="?1:0;arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++iMAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:5}],5:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length); -var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(require,module,exports){var ElementType=require("domelementtype");var entities=require("entities");var booleanAttributes={__proto__:null,allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,hidden:true,ismap:true,loop:true,multiple:true,muted:true,open:true,readonly:true,required:true,reversed:true,scoped:true,seamless:true,selected:true,typemustmatch:true};var unencodedElements={__proto__:null,style:true,script:true,xmp:true,iframe:true,noembed:true,noframes:true,plaintext:true,noscript:true};function formatAttrs(attributes,opts){if(!attributes)return;var output="",value;for(var key in attributes){value=attributes[key];if(output){output+=" "}if(!value&&booleanAttributes[key]){output+=key}else{output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"'}}return output}var singleTag={__proto__:null,area:true,base:true,basefont:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};var render=module.exports=function(dom,opts){if(!Array.isArray(dom)&&!dom.cheerio)dom=[dom];opts=opts||{};var output="";for(var i=0;i"}else{tag+=">";if(elem.children){tag+=render(elem.children,opts)}if(!singleTag[elem.name]||opts.xmlMode){tag+=""}}return tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";if(opts.decodeEntities&&!(elem.parent&&elem.parent.name in unencodedElements)){data=entities.encodeXML(data)}return data}function renderCdata(elem){return""}function renderComment(elem){return""}},{domelementtype:8,entities:20}],8:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],9:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],10:[function(require,module,exports){var ElementType=require("domelementtype");var re_whitespace=/\s+/g;var NodePrototype=require("./lib/node");var ElementPrototype=require("./lib/element");function DomHandler(callback,options,elementCB){if(typeof callback==="object"){elementCB=options;options=callback;callback=null}else if(typeof options==="function"){elementCB=options;options=defaultOpts}this._callback=callback;this._options=options||defaultOpts;this._elementCB=elementCB;this.dom=[];this._done=false;this._tagStack=[];this._parser=this._parser||null}var defaultOpts={normalizeWhitespace:false,withStartIndices:false};DomHandler.prototype.onparserinit=function(parser){this._parser=parser};DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)};DomHandler.prototype.onend=function(){if(this._done)return;this._done=true;this._parser=null;this._handleCallback(null)};DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if(typeof this._callback==="function"){this._callback(error,this.dom)}else{if(error)throw error}};DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();if(this._elementCB)this._elementCB(elem)};DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1];var siblings=parent?parent.children:this.dom;var previousSibling=siblings[siblings.length-1];element.next=null;if(this._options.withStartIndices){element.startIndex=this._parser.startIndex}if(this._options.withDomLvl1){element.__proto__=element.type==="tag"?ElementPrototype:NodePrototype}if(previousSibling){element.prev=previousSibling;previousSibling.next=element}else{element.prev=null}siblings.push(element);element.parent=parent||null};DomHandler.prototype.onopentag=function(name,attribs){var element={type:name==="script"?ElementType.Script:name==="style"?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.ontext=function(data){var normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;var lastTag;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(normalize){data=data.replace(re_whitespace," ")}this._addDomElement({data:data,type:ElementType.Text})}}};DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment){lastTag.data+=data;return}var element={data:data,type:ElementType.Comment};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncdatastart=function(){var element={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()};DomHandler.prototype.onprocessinginstruction=function(name,data){this._addDomElement({name:name,data:data,type:ElementType.Directive})};module.exports=DomHandler},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(require,module,exports){var NodePrototype=require("./node");var ElementPrototype=module.exports=Object.create(NodePrototype);var domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{"./node":12}],12:[function(require,module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}};var domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};var nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{}],13:[function(require,module,exports){var DomUtils=module.exports;[require("./lib/stringify"),require("./lib/traversal"),require("./lib/manipulation"),require("./lib/querying"),require("./lib/legacy"),require("./lib/helpers")].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(require,module,exports){exports.removeSubsets=function(nodes){var idx=nodes.length,node,ancestor,replace;while(--idx>-1){node=ancestor=nodes[idx];nodes[idx]=null;replace=true;while(ancestor){if(nodes.indexOf(ancestor)>-1){replace=false;nodes.splice(idx,1);break}ancestor=ancestor.parent}if(replace){nodes[idx]=node}}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16};var comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var aParents=[];var bParents=[];var current,sharedParent,siblings,aSibling,bSibling,idx;if(nodeA===nodeB){return 0}current=nodeA;while(current){aParents.unshift(current);current=current.parent}current=nodeB;while(current){bParents.unshift(current);current=current.parent}idx=0;while(aParents[idx]===bParents[idx]){idx++}if(idx===0){return POSITION.DISCONNECTED}sharedParent=aParents[idx-1];siblings=sharedParent.children;aSibling=aParents[idx];bSibling=bParents[idx];if(siblings.indexOf(aSibling)>siblings.indexOf(bSibling)){if(sharedParent===nodeB){return POSITION.FOLLOWING|POSITION.CONTAINED_BY}return POSITION.FOLLOWING}else{if(sharedParent===nodeA){return POSITION.PRECEDING|POSITION.CONTAINS}return POSITION.PRECEDING}};exports.uniqueSort=function(nodes){var idx=nodes.length,node,position;nodes=nodes.slice();while(--idx>-1){node=nodes[idx];position=nodes.indexOf(node);if(position>-1&&position0){childs=find(test,childs,recurse,limit);result=result.concat(childs);limit-=childs.length;if(limit<=0)break}}return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i0){elem=findOne(test,elems[i].children)}}return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i0&&existsOne(test,elems[i].children))){return true}}return false}function findAll(test,elems){var result=[];for(var i=0,j=elems.length;i0){result=result.concat(findAll(test,elems[i].children))}}return result}},{domelementtype:9}],18:[function(require,module,exports){var ElementType=require("domelementtype"),getOuterHTML=require("dom-serializer"),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText};function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){if(Array.isArray(elem))return elem.map(getText).join("");if(isTag(elem)||elem.type===ElementType.CDATA)return getText(elem.children);if(elem.type===ElementType.Text)return elem.data;return""}},{"dom-serializer":7,domelementtype:9}],19:[function(require,module,exports){var getChildren=exports.getChildren=function(elem){return elem.children};var getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]};exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]};exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)};exports.getName=function(elem){return elem.name}},{}],20:[function(require,module,exports){var encode=require("./lib/encode.js"),decode=require("./lib/decode.js");exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)};exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)};exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)};exports.encodeXML=encode.XML;exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML;exports.decodeXML=exports.decodeXMLStrict=decode.XML;exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML;exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict;exports.escape=encode.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(require,module,exports){var entityMap=require("../maps/entities.json"),legacyMap=require("../maps/legacy.json"),xmlMap=require("../maps/xml.json"),decodeCodePoint=require("./decode_codepoint.js");var decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap);function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}var decodeHTML=function(){var legacy=Object.keys(legacyMap).sort(sorter);var keys=Object.keys(entityMap).sort(sorter);for(var i=0,j=0;i=55296&&codePoint<=57343||codePoint>1114111){return"�"}if(codePoint in decodeMap){codePoint=decodeMap[codePoint]}var output="";if(codePoint>65535){codePoint-=65536;output+=String.fromCharCode(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}output+=String.fromCharCode(codePoint);return output}},{"../maps/decode.json":24}],23:[function(require,module,exports){var inverseXML=getInverseObj(require("../maps/xml.json")),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(require("../maps/entities.json")),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){inverse[obj[name]]="&"+name+";";return inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];Object.keys(inverse).forEach(function(k){if(k.length===1){single.push("\\"+k)}else{multiple.push(k)}});multiple.unshift("["+single.join("")+"]");return new RegExp(multiple.join("|"),"g")}var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){var high=c.charCodeAt(0);var low=c.charCodeAt(1);var codePoint=(high-55296)*1024+low-56320+65536;return"&#x"+codePoint.toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}var re_xmlChars=getInverseReplacer(inverseXML);function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}exports.escape=escapeXML},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(require,module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],26:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},{}],27:[function(require,module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1); -}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],29:[function(require,module,exports){module.exports=CollectingHandler;function CollectingHandler(cbs){this._cbs=cbs||{};this.events=[]}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;CollectingHandler.prototype[name]=function(){this.events.push([name]);if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;CollectingHandler.prototype[name]=function(a){this.events.push([name,a]);if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]);if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}});CollectingHandler.prototype.onreset=function(){this.events=[];if(this._cbs.onreset)this._cbs.onreset()};CollectingHandler.prototype.restart=function(){if(this._cbs.onreset)this._cbs.onreset();for(var i=0,len=this.events.length;i0;this._cbs.onclosetag(this._stack[--i]));}if(this._cbs.onend)this._cbs.onend()};Parser.prototype.reset=function(){if(this._cbs.onreset)this._cbs.onreset();this._tokenizer.reset();this._tagname="";this._attribname="";this._attribs=null;this._stack=[];if(this._cbs.onparserinit)this._cbs.onparserinit(this)};Parser.prototype.parseComplete=function(data){this.reset();this.end(data)};Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)};Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)};Parser.prototype.pause=function(){this._tokenizer.pause()};Parser.prototype.resume=function(){this._tokenizer.resume()};Parser.prototype.parseChunk=Parser.prototype.write;Parser.prototype.done=Parser.prototype.end;module.exports=Parser},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(require,module,exports){module.exports=ProxyHandler;function ProxyHandler(cbs){this._cbs=cbs||{}}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;ProxyHandler.prototype[name]=function(){if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;ProxyHandler.prototype[name]=function(a){if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;ProxyHandler.prototype[name]=function(a,b){if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}})},{"./":36}],33:[function(require,module,exports){module.exports=Stream;var Parser=require("./WritableStream.js");function Stream(options){Parser.call(this,new Cbs(this),options)}require("inherits")(Stream,Parser);Stream.prototype.readable=true;function Cbs(scope){this.scope=scope}var EVENTS=require("../").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){Cbs.prototype["on"+name]=function(){this.scope.emit(name)}}else if(EVENTS[name]===1){Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)}}else if(EVENTS[name]===2){Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}else{throw Error("wrong number of arguments!")}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(require,module,exports){module.exports=Tokenizer;var decodeCodePoint=require("entities/lib/decode_codepoint.js"),entityMap=require("entities/maps/entities.json"),legacyMap=require("entities/maps/legacy.json"),xmlMap=require("entities/maps/xml.json"),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;function whitespace(c){return c===" "||c==="\n"||c==="\t"||c==="\f"||c==="\r"}function characterState(char,SUCCESS){return function(c){if(c===char)this._state=SUCCESS}}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();if(upper===lower){return function(c){if(c===lower){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}else{return function(c){if(c===lower||c===upper){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){if(c===lower||c===upper){this._state=NEXT_STATE}else{this._state=IN_TAG_NAME;this._index--}}}function Tokenizer(options,cbs){this._state=TEXT;this._buffer="";this._sectionStart=0;this._index=0;this._bufferOffset=0;this._baseState=TEXT;this._special=SPECIAL_NONE;this._cbs=cbs;this._running=true;this._ended=false;this._xmlMode=!!(options&&options.xmlMode);this._decodeEntities=!!(options&&options.decodeEntities)}Tokenizer.prototype._stateText=function(c){if(c==="<"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._state=BEFORE_TAG_NAME;this._sectionStart=this._index}else if(this._decodeEntities&&this._special===SPECIAL_NONE&&c==="&"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._baseState=TEXT;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeTagName=function(c){if(c==="/"){this._state=BEFORE_CLOSING_TAG_NAME}else if(c==="<"){this._cbs.ontext(this._getSection());this._sectionStart=this._index}else if(c===">"||this._special!==SPECIAL_NONE||whitespace(c)){this._state=TEXT}else if(c==="!"){this._state=BEFORE_DECLARATION;this._sectionStart=this._index+1}else if(c==="?"){this._state=IN_PROCESSING_INSTRUCTION;this._sectionStart=this._index+1}else{this._state=!this._xmlMode&&(c==="s"||c==="S")?BEFORE_SPECIAL:IN_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInTagName=function(c){if(c==="/"||c===">"||whitespace(c)){this._emitToken("onopentagname");this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateBeforeCloseingTagName=function(c){if(whitespace(c));else if(c===">"){this._state=TEXT}else if(this._special!==SPECIAL_NONE){if(c==="s"||c==="S"){this._state=BEFORE_SPECIAL_END}else{this._state=TEXT;this._index--}}else{this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInCloseingTagName=function(c){if(c===">"||whitespace(c)){this._emitToken("onclosetag");this._state=AFTER_CLOSING_TAG_NAME;this._index--}};Tokenizer.prototype._stateAfterCloseingTagName=function(c){if(c===">"){this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeAttributeName=function(c){if(c===">"){this._cbs.onopentagend();this._state=TEXT;this._sectionStart=this._index+1}else if(c==="/"){this._state=IN_SELF_CLOSING_TAG}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInSelfClosingTag=function(c){if(c===">"){this._cbs.onselfclosingtag();this._state=TEXT;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateInAttributeName=function(c){if(c==="="||c==="/"||c===">"||whitespace(c)){this._cbs.onattribname(this._getSection());this._sectionStart=-1;this._state=AFTER_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateAfterAttributeName=function(c){if(c==="="){this._state=BEFORE_ATTRIBUTE_VALUE}else if(c==="/"||c===">"){this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(!whitespace(c)){this._cbs.onattribend();this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeAttributeValue=function(c){if(c==='"'){this._state=IN_ATTRIBUTE_VALUE_DQ;this._sectionStart=this._index+1}else if(c==="'"){this._state=IN_ATTRIBUTE_VALUE_SQ;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_VALUE_NQ;this._sectionStart=this._index;this._index--}};Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){if(c==='"'){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){if(c==="'"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){if(whitespace(c)||c===">"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state=c==="["?BEFORE_CDATA_1:c==="-"?BEFORE_COMMENT:IN_DECLARATION};Tokenizer.prototype._stateInDeclaration=function(c){if(c===">"){this._cbs.ondeclaration(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateInProcessingInstruction=function(c){if(c===">"){this._cbs.onprocessinginstruction(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeComment=function(c){if(c==="-"){this._state=IN_COMMENT;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION}};Tokenizer.prototype._stateInComment=function(c){if(c==="-")this._state=AFTER_COMMENT_1};Tokenizer.prototype._stateAfterComment1=function(c){if(c==="-"){this._state=AFTER_COMMENT_2}else{this._state=IN_COMMENT}};Tokenizer.prototype._stateAfterComment2=function(c){if(c===">"){this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="-"){this._state=IN_COMMENT}};Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata6=function(c){if(c==="["){this._state=IN_CDATA;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION;this._index--}};Tokenizer.prototype._stateInCdata=function(c){if(c==="]")this._state=AFTER_CDATA_1};Tokenizer.prototype._stateAfterCdata1=characterState("]",AFTER_CDATA_2);Tokenizer.prototype._stateAfterCdata2=function(c){if(c===">"){this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="]"){this._state=IN_CDATA}};Tokenizer.prototype._stateBeforeSpecial=function(c){if(c==="c"||c==="C"){this._state=BEFORE_SCRIPT_1}else if(c==="t"||c==="T"){this._state=BEFORE_STYLE_1}else{this._state=IN_TAG_NAME;this._index--}};Tokenizer.prototype._stateBeforeSpecialEnd=function(c){if(this._special===SPECIAL_SCRIPT&&(c==="c"||c==="C")){this._state=AFTER_SCRIPT_1}else if(this._special===SPECIAL_STYLE&&(c==="t"||c==="T")){this._state=AFTER_STYLE_1}else this._state=TEXT};Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2);Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3);Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4);Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5);Tokenizer.prototype._stateBeforeScript5=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_SCRIPT}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT);Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT);Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT);Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT);Tokenizer.prototype._stateAfterScript5=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-6;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2);Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3);Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4);Tokenizer.prototype._stateBeforeStyle4=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_STYLE}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT);Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT);Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT);Tokenizer.prototype._stateAfterStyle4=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-5;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY);Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY);Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16)limit=6;while(limit>=2){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity)){this._emitPartial(legacyMap[entity]);this._sectionStart+=limit+1;return}else{limit--}}};Tokenizer.prototype._stateInNamedEntity=function(c){if(c===";"){this._parseNamedEntityStrict();if(this._sectionStart+1"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")){if(this._xmlMode);else if(this._sectionStart+1===this._index);else if(this._baseState!==TEXT){if(c!=="="){this._parseNamedEntityStrict()}}else{this._parseLegacyEntity()}this._state=this._baseState;this._index--}};Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index);var parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed));this._sectionStart=this._index}else{this._sectionStart--}this._state=this._baseState};Tokenizer.prototype._stateInNumericEntity=function(c){if(c===";"){this._decodeNumericEntity(2,10);this._sectionStart++}else if(c<"0"||c>"9"){if(!this._xmlMode){this._decodeNumericEntity(2,10)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._stateInHexEntity=function(c){if(c===";"){this._decodeNumericEntity(3,16);this._sectionStart++}else if((c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")){if(!this._xmlMode){this._decodeNumericEntity(3,16)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._cleanup=function(){if(this._sectionStart<0){this._buffer="";this._index=0;this._bufferOffset+=this._index}else if(this._running){if(this._state===TEXT){if(this._sectionStart!==this._index){this._cbs.ontext(this._buffer.substr(this._sectionStart))}this._buffer="";this._bufferOffset+=this._index;this._index=0}else if(this._sectionStart===this._index){this._buffer="";this._bufferOffset+=this._index;this._index=0}else{this._buffer=this._buffer.substr(this._sectionStart);this._index-=this._sectionStart;this._bufferOffset+=this._sectionStart}this._sectionStart=0}};Tokenizer.prototype.write=function(chunk){if(this._ended)this._cbs.onerror(Error(".write() after done!"));this._buffer+=chunk;this._parse()};Tokenizer.prototype._parse=function(){while(this._index>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],38:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],39:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],40:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],41:[function(require,module,exports){(function(process){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){module.exports=nextTick}else{module.exports=process.nextTick}function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function"){throw new TypeError('"callback" argument must be a function')}var len=arguments.length;var args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function afterTickOne(){fn.call(null,arg1)});case 3:return process.nextTick(function afterTickTwo(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function afterTickThree(){fn.call(null,arg1,arg2,arg3)});default:args=new Array(len-1);i=0;while(i1){for(var i=1;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var _i=0;_i=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream;(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}var Duplex;function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function writableStateGetBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var Duplex;function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){ -state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:5,"buffer-shims":4}],50:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(require,module,exports){(function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(require,module,exports){module.exports=function(string){return string.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:5}],57:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],58:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i 0) { - qp = obj.url.substring(obj.url.indexOf('?') + 1); - var parts = qp.split('&'); - if(parts && parts.length > 0) { - for(var i = 0; i < parts.length; i++) { - var kv = parts[i].split('='); - if(kv && kv.length > 0) { - if (kv[0] === this.name) { - // skip it - return false; - } - } - } - } - } - - if (obj.url.indexOf('?') > 0) { - obj.url = obj.url + '&' + this.name + '=' + this.value; - } else { - obj.url = obj.url + '?' + this.name + '=' + this.value; - } - - return true; - } else if (this.type === 'header') { - if(typeof obj.headers[this.name] === 'undefined') { - obj.headers[this.name] = this.value; - } - - return true; - } -}; - -var CookieAuthorization = module.exports.CookieAuthorization = function (cookie) { - this.cookie = cookie; -}; - -CookieAuthorization.prototype.apply = function (obj) { - obj.cookieJar = obj.cookieJar || new CookieJar(); - obj.cookieJar.setCookie(this.cookie); - - return true; -}; - -/** - * Password Authorization is a basic auth implementation - */ -var PasswordAuthorization = module.exports.PasswordAuthorization = function (username, password) { - if (arguments.length === 3) { - helpers.log('PasswordAuthorization: the \'name\' argument has been removed, pass only username and password'); - username = arguments[1]; - password = arguments[2]; - } - this.username = username; - this.password = password; -}; - -PasswordAuthorization.prototype.apply = function (obj) { - if(typeof obj.headers.Authorization === 'undefined') { - obj.headers.Authorization = 'Basic ' + btoa(this.username + ':' + this.password); - } - - return true; -}; - -},{"./helpers":4,"btoa":13,"cookiejar":18,"lodash-compat/collection/each":52,"lodash-compat/collection/includes":55,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144}],3:[function(require,module,exports){ -'use strict'; - -var _ = { - bind: require('lodash-compat/function/bind'), - cloneDeep: require('lodash-compat/lang/cloneDeep'), - find: require('lodash-compat/collection/find'), - forEach: require('lodash-compat/collection/forEach'), - indexOf: require('lodash-compat/array/indexOf'), - isArray: require('lodash-compat/lang/isArray'), - isObject: require('lodash-compat/lang/isObject'), - isFunction: require('lodash-compat/lang/isFunction'), - isPlainObject: require('lodash-compat/lang/isPlainObject'), - isUndefined: require('lodash-compat/lang/isUndefined') -}; -var auth = require('./auth'); -var helpers = require('./helpers'); -var Model = require('./types/model'); -var Operation = require('./types/operation'); -var OperationGroup = require('./types/operationGroup'); -var Resolver = require('./resolver'); -var SwaggerHttp = require('./http'); -var SwaggerSpecConverter = require('./spec-converter'); -var Q = require('q'); - -// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the -// following usage: 'client.{tagName}' -var reservedClientTags = [ - 'apis', - 'authorizationScheme', - 'authorizations', - 'basePath', - 'build', - 'buildFrom1_1Spec', - 'buildFrom1_2Spec', - 'buildFromSpec', - 'clientAuthorizations', - 'convertInfo', - 'debug', - 'defaultErrorCallback', - 'defaultSuccessCallback', - 'enableCookies', - 'fail', - 'failure', - 'finish', - 'help', - 'host', - 'idFromOp', - 'info', - 'initialize', - 'isBuilt', - 'isValid', - 'modelPropertyMacro', - 'models', - 'modelsArray', - 'options', - 'parameterMacro', - 'parseUri', - 'progress', - 'resourceCount', - 'sampleModels', - 'selfReflect', - 'setConsolidatedModels', - 'spec', - 'supportedSubmitMethods', - 'swaggerRequestHeaders', - 'tagFromLabel', - 'title', - 'url', - 'useJQuery', - 'jqueryAjaxCache' -]; -// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the -// following usage: 'client.apis.{tagName}' -var reservedApiTags = [ - 'apis', - 'asCurl', - 'description', - 'externalDocs', - 'help', - 'label', - 'name', - 'operation', - 'operations', - 'operationsArray', - 'path', - 'tag' -]; -var supportedOperationMethods = ['delete', 'get', 'head', 'options', 'patch', 'post', 'put']; -var SwaggerClient = module.exports = function (url, options) { - this.authorizations = null; - this.authorizationScheme = null; - this.basePath = null; - this.debug = false; - this.enableCookies = false; - this.info = null; - this.isBuilt = false; - this.isValid = false; - this.modelsArray = []; - this.resourceCount = 0; - this.url = null; - this.useJQuery = false; - this.jqueryAjaxCache = false; - this.swaggerObject = {}; - this.deferredClient = undefined; - - this.clientAuthorizations = new auth.SwaggerAuthorizations(); - - if (typeof url !== 'undefined') { - return this.initialize(url, options); - } else { - return this; - } -}; - -SwaggerClient.prototype.initialize = function (url, options) { - this.models = {}; - this.sampleModels = {}; - - if (typeof url === 'string') { - this.url = url; - } else if (_.isObject(url)) { - options = url; - this.url = options.url; - } - - if(this.url && this.url.indexOf('http:') === -1 && this.url.indexOf('https:') === -1) { - // no protocol, so we can only use window if it exists - if(typeof(window) !== 'undefined' && window && window.location) { - this.url = window.location.origin + this.url; - } - } - - options = options || {}; - this.clientAuthorizations.add(options.authorizations); - this.swaggerRequestHeaders = options.swaggerRequestHeaders || 'application/json;charset=utf-8,*/*'; - this.defaultSuccessCallback = options.defaultSuccessCallback || null; - this.defaultErrorCallback = options.defaultErrorCallback || null; - this.modelPropertyMacro = options.modelPropertyMacro || null; - this.connectionAgent = options.connectionAgent || null; - this.parameterMacro = options.parameterMacro || null; - this.usePromise = options.usePromise || null; - - // operation request timeout default - this.timeout = options.timeout || null; - // default to request timeout when not specified - this.fetchSpecTimeout = typeof options.fetchSpecTimeout !== 'undefined' ? - options.fetchSpecTimeout : options.timeout || null; - - if(this.usePromise) { - this.deferredClient = Q.defer(); - } - - if (typeof options.success === 'function') { - this.success = options.success; - } - if (options.useJQuery) { - this.useJQuery = options.useJQuery; - } - - if (options.jqueryAjaxCache) { - this.jqueryAjaxCache = options.jqueryAjaxCache; - } - - if (options.enableCookies) { - this.enableCookies = options.enableCookies; - } - - this.options = options || {}; - - // maybe don't need this? - this.options.timeout = this.timeout; - this.options.fetchSpecTimeout = this.fetchSpecTimeout; - - this.supportedSubmitMethods = options.supportedSubmitMethods || []; - this.failure = options.failure || function (err) { throw err; }; - this.progress = options.progress || function () {}; - this.spec = _.cloneDeep(options.spec); // Clone so we do not alter the provided document - - if (options.scheme) { - this.scheme = options.scheme; - } - - if (this.usePromise || typeof options.success === 'function') { - this.ready = true; - return this.build(); - } -}; - -SwaggerClient.prototype.build = function (mock) { - if (this.isBuilt) { - return this; - } - - var self = this; - - if (this.spec) { - this.progress('fetching resource list; Please wait.'); - } else { - this.progress('fetching resource list: ' + this.url + '; Please wait.'); - } - - var obj = { - useJQuery: this.useJQuery, - jqueryAjaxCache: this.jqueryAjaxCache, - connectionAgent: this.connectionAgent, - url: this.url, - method: 'get', - headers: { - accept: this.swaggerRequestHeaders - }, - on: { - error: function (response) { - if (self.url.substring(0, 4) !== 'http') { - return self.fail('Please specify the protocol for ' + self.url); - } else if (response.errObj && (response.errObj.code === 'ECONNABORTED' || response.errObj.message.indexOf('timeout') !== -1)) { - return self.fail('Request timed out after ' + self.fetchSpecTimeout + 'ms'); - } else if (response.status === 0) { - return self.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); - } else if (response.status === 404) { - return self.fail('Can\'t read swagger JSON from ' + self.url); - } else { - return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url); - } - }, - response: function (resp) { - - var responseObj = resp.obj; - if(!responseObj) { - return self.fail('failed to parse JSON/YAML response'); - } - - self.swaggerVersion = responseObj.swaggerVersion; - self.swaggerObject = responseObj; - - if (responseObj.swagger && parseInt(responseObj.swagger) === 2) { - self.swaggerVersion = responseObj.swagger; - - new Resolver().resolve(responseObj, self.url, self.buildFromSpec, self); - - self.isValid = true; - } else { - var converter = new SwaggerSpecConverter(); - self.oldSwaggerObject = self.swaggerObject; - - converter.setDocumentationLocation(self.url); - converter.convert(responseObj, self.clientAuthorizations, self.options, function(spec) { - self.swaggerObject = spec; - new Resolver().resolve(spec, self.url, self.buildFromSpec, self); - self.isValid = true; - }); - } - } - } - }; - - // only set timeout when specified - if (this.fetchSpecTimeout) { - obj.timeout = this.fetchSpecTimeout; - } - - if (this.spec) { - self.swaggerObject = this.spec; - setTimeout(function () { - new Resolver().resolve(self.spec, self.url, self.buildFromSpec, self); - }, 10); - } else { - this.clientAuthorizations.apply(obj); - - if (mock) { - return obj; - } - - new SwaggerHttp().execute(obj, this.options); - } - - return (this.usePromise) ? this.deferredClient.promise : this; -}; - -SwaggerClient.prototype.buildFromSpec = function (response) { - if (this.isBuilt) { - return this; - } - - this.apis = {}; - this.apisArray = []; - this.basePath = response.basePath || ''; - this.consumes = response.consumes; - this.host = response.host || ''; - this.info = response.info || {}; - this.produces = response.produces; - this.schemes = response.schemes || []; - this.securityDefinitions = _.cloneDeep(response.securityDefinitions); - this.security = response.security; - this.title = response.title || ''; - - var key, definedTags = {}, k, location, self = this, i; - - if (response.externalDocs) { - this.externalDocs = response.externalDocs; - } - - // legacy support - this.authSchemes = this.securityDefinitions; - - if(this.securityDefinitions) { - for(key in this.securityDefinitions) { - var securityDefinition = this.securityDefinitions[key]; - securityDefinition.vendorExtensions = {}; - for(var ext in securityDefinition) { - helpers.extractExtensions(ext, securityDefinition); - if (ext === 'scopes') { - var scopes = securityDefinition[ext]; - if(typeof scopes === 'object') { - scopes.vendorExtensions = {}; - for (var s in scopes) { - helpers.extractExtensions(s, scopes); - } - } - } - } - } - } - - if (Array.isArray(response.tags)) { - definedTags = {}; - - for (k = 0; k < response.tags.length; k++) { - var t = _.cloneDeep(response.tags[k]); - definedTags[t.name] = t; - for(i in t) { - if(i === 'externalDocs' && typeof t[i] === 'object') { - for(var j in t[i]) { - helpers.extractExtensions(j, t[i]); - } - } - helpers.extractExtensions(i, t); - } - } - } - - - if (typeof this.url === 'string') { - location = this.parseUri(this.url); - if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) { - if(typeof window !== 'undefined') { - // use the window scheme - this.scheme = window.location.protocol.replace(':',''); - } - else { - this.scheme = location.scheme || 'http'; - } - } else if (typeof this.scheme === 'undefined') { - if(typeof window !== 'undefined') { - var scheme = window.location.protocol.replace(':',''); - if(scheme === 'https' && this.schemes.indexOf(scheme) === -1) { - // can't call http from https served page in a browser! - helpers.log('Cannot call a http server from https inside a browser!'); - this.scheme = 'http'; - } - else if(this.schemes.indexOf(scheme) !== -1) { - this.scheme = scheme; - } - else { - if(this.schemes.indexOf('https') !== -1) { - this.scheme = 'https'; - } - else { - this.scheme = 'http'; - } - } - } - else { - this.scheme = this.schemes[0] || location.scheme; - } - } - - if (typeof this.host === 'undefined' || this.host === '') { - this.host = location.host; - - if (location.port) { - this.host = this.host + ':' + location.port; - } - } - } - else { - if (typeof this.schemes === 'undefined' || this.schemes.length === 0) { - this.scheme = 'http'; - } - else if (typeof this.scheme === 'undefined') { - this.scheme = this.schemes[0]; - } - } - - this.definitions = response.definitions; - - for (key in this.definitions) { - var model = new Model(key, this.definitions[key], this.models, this.modelPropertyMacro); - - if (model) { - this.models[key] = model; - } - } - - // get paths, create functions for each operationId - - // Bind help to 'client.apis' - self.apis.help = _.bind(self.help, self); - - _.forEach(response.paths, function (pathObj, path) { - // Only process a path if it's an object - if (!_.isPlainObject(pathObj)) { - return; - } - - _.forEach(supportedOperationMethods, function (method) { - var operation = pathObj[method]; - - if (_.isUndefined(operation)) { - // Operation does not exist - return; - } else if (!_.isPlainObject(operation)) { - // Operation exists but it is not an Operation Object. Since this is invalid, log it. - helpers.log('The \'' + method + '\' operation for \'' + path + '\' path is not an Operation Object'); - - return; - } - - var tags = operation.tags; - - if (_.isUndefined(tags) || !_.isArray(tags) || tags.length === 0) { - tags = operation.tags = [ 'default' ]; - } - - var operationId = self.idFromOp(path, method, operation); - - var operationObject = new Operation(self, - operation.scheme, - operationId, - method, - path, - operation, - self.definitions, - self.models, - self.clientAuthorizations); - - operationObject.vendorExtensions = {}; - for(i in operation) { - helpers.extractExtensions(i, operationObject, operation[i]); - } - operationObject.externalDocs = operation.externalDocs; - if(operationObject.externalDocs) { - operationObject.externalDocs = _.cloneDeep(operationObject.externalDocs); - operationObject.externalDocs.vendorExtensions = {}; - for(i in operationObject.externalDocs) { - helpers.extractExtensions(i, operationObject.externalDocs); - } - } - - // bind self operation's execute command to the api - _.forEach(tags, function (tag) { - var clientProperty = _.indexOf(reservedClientTags, tag) > -1 ? '_' + tag : tag; - var apiProperty = _.indexOf(reservedApiTags, tag) > -1 ? '_' + tag : tag; - var operationGroup = self[clientProperty]; - - if (clientProperty !== tag) { - helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient function/property name. Use \'client.' + - clientProperty + '\' or \'client.apis.' + tag + '\' instead of \'client.' + tag + '\'.'); - } - - if (apiProperty !== tag) { - helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient operation function/property name. Use ' + - '\'client.apis.' + apiProperty + '\' instead of \'client.apis.' + tag + '\'.'); - } - - if (_.indexOf(reservedApiTags, operationId) > -1) { - helpers.log('The \'' + operationId + '\' operationId conflicts with a SwaggerClient operation ' + - 'function/property name. Use \'client.apis.' + apiProperty + '._' + operationId + - '\' instead of \'client.apis.' + apiProperty + '.' + operationId + '\'.'); - - operationId = '_' + operationId; - operationObject.nickname = operationId; // So 'client.apis.[tag].operationId.help() works properly - } - - if (_.isUndefined(operationGroup)) { - operationGroup = self[clientProperty] = self.apis[apiProperty] = {}; - - operationGroup.operations = {}; - operationGroup.label = apiProperty; - operationGroup.apis = {}; - - var tagDef = definedTags[tag]; - - if (!_.isUndefined(tagDef)) { - operationGroup.description = tagDef.description; - operationGroup.externalDocs = tagDef.externalDocs; - operationGroup.vendorExtensions = tagDef.vendorExtensions; - } - - self[clientProperty].help = _.bind(self.help, operationGroup); - self.apisArray.push(new OperationGroup(tag, operationGroup.description, operationGroup.externalDocs, operationObject)); - } - - operationId = self.makeUniqueOperationId(operationId, self.apis[apiProperty]); - - // Bind tag help - if (!_.isFunction(operationGroup.help)) { - operationGroup.help = _.bind(self.help, operationGroup); - } - - // bind to the apis object - self.apis[apiProperty][operationId] = operationGroup[operationId] = _.bind(operationObject.execute, - operationObject); - self.apis[apiProperty][operationId].help = operationGroup[operationId].help = _.bind(operationObject.help, - operationObject); - self.apis[apiProperty][operationId].asCurl = operationGroup[operationId].asCurl = _.bind(operationObject.asCurl, - operationObject); - - operationGroup.apis[operationId] = operationGroup.operations[operationId] = operationObject; - - // legacy UI feature - var api = _.find(self.apisArray, function (api) { - return api.tag === tag; - }); - - if (api) { - api.operationsArray.push(operationObject); - } - }); - }); - }); - - // sort the apisArray according to the tags - var sortedApis = []; - _.forEach(Object.keys(definedTags), function (tag) { - var pos; - for(pos in self.apisArray) { - var _api = self.apisArray[pos]; - if(_api && tag === _api.name) { - sortedApis.push(_api); - self.apisArray[pos] = null; - } - } - }); - // add anything left - _.forEach(self.apisArray, function (api) { - if(api) { - sortedApis.push(api); - } - }); - self.apisArray = sortedApis; - - _.forEach(response.definitions, function (definitionObj, definition) { - definitionObj.id = definition.toLowerCase(); - definitionObj.name = definition; - self.modelsArray.push(definitionObj); - }); - - this.isBuilt = true; - - if (this.usePromise) { - this.isValid = true; - this.isBuilt = true; - this.deferredClient.resolve(this); - - return this.deferredClient.promise; - } - - if (this.success) { - this.success(); - } - - return this; -}; - -SwaggerClient.prototype.makeUniqueOperationId = function(operationId, api) { - var count = 0; - var name = operationId; - - // make unique across this operation group - while(true) { - var matched = false; - _.forEach(api.operations, function (operation) { - if(operation.nickname === name) { - matched = true; - } - }); - if(!matched) { - return name; - } - name = operationId + '_' + count; - count ++; - } - - return operationId; -}; - -SwaggerClient.prototype.parseUri = function (uri) { - var urlParseRE = /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/; - var parts = urlParseRE.exec(uri); - - return { - scheme: parts[4] ? parts[4].replace(':','') : undefined, - host: parts[11], - port: parts[12], - path: parts[15] - }; -}; - -SwaggerClient.prototype.help = function (dontPrint) { - var output = ''; - - if (this instanceof SwaggerClient) { - _.forEach(this.apis, function (api, name) { - if (_.isPlainObject(api)) { - output += 'operations for the \'' + name + '\' tag\n'; - - _.forEach(api.operations, function (operation, name) { - output += ' * ' + name + ': ' + operation.summary + '\n'; - }); - } - }); - } else if (this instanceof OperationGroup || _.isPlainObject(this)) { - output += 'operations for the \'' + this.label + '\' tag\n'; - - _.forEach(this.apis, function (operation, name) { - output += ' * ' + name + ': ' + operation.summary + '\n'; - }); - } - - if (dontPrint) { - return output; - } else { - helpers.log(output); - - return output; - } -}; - -SwaggerClient.prototype.tagFromLabel = function (label) { - return label; -}; - -SwaggerClient.prototype.idFromOp = function (path, httpMethod, op) { - if(!op || !op.operationId) { - op = op || {}; - op.operationId = httpMethod + '_' + path; - } - var opId = op.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_') || (path.substring(1) + '_' + httpMethod); - - opId = opId.replace(/((_){2,})/g, '_'); - opId = opId.replace(/^(_)*/g, ''); - opId = opId.replace(/([_])*$/g, ''); - - return opId; -}; - -SwaggerClient.prototype.setHost = function (host) { - this.host = host; - - if(this.apis) { - _.forEach(this.apis, function(api) { - if(api.operations) { - _.forEach(api.operations, function(operation) { - operation.host = host; - }); - } - }); - } -}; - -SwaggerClient.prototype.setBasePath = function (basePath) { - this.basePath = basePath; - - if(this.apis) { - _.forEach(this.apis, function(api) { - if(api.operations) { - _.forEach(api.operations, function(operation) { - operation.basePath = basePath; - }); - } - }); - } -}; - -SwaggerClient.prototype.setSchemes = function (schemes) { - this.schemes = schemes; - - if(schemes && schemes.length > 0) { - if(this.apis) { - _.forEach(this.apis, function (api) { - if (api.operations) { - _.forEach(api.operations, function (operation) { - operation.scheme = schemes[0]; - }); - } - }); - } - } -}; - -SwaggerClient.prototype.fail = function (message) { - if (this.usePromise) { - this.deferredClient.reject(message); - return this.deferredClient.promise; - } else { - if (this.failure) { - this.failure(message); - } - else { - this.failure(message); - } - } -}; - -},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":49,"lodash-compat/collection/find":53,"lodash-compat/collection/forEach":54,"lodash-compat/function/bind":58,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isFunction":142,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"q":157}],4:[function(require,module,exports){ -(function (process){ -'use strict'; - -var _ = { - isPlainObject: require('lodash-compat/lang/isPlainObject'), - indexOf: require('lodash-compat/array/indexOf') -}; - -module.exports.__bind = function (fn, me) { - return function(){ - return fn.apply(me, arguments); - }; -}; - -var log = module.exports.log = function() { - // Only log if available and we're not testing - if (console && process.env.NODE_ENV !== 'test') { - console.log(Array.prototype.slice.call(arguments)[0]); - } -}; - -module.exports.fail = function (message) { - log(message); -}; - -module.exports.optionHtml = function (label, value) { - return '' + label + ':' + value + ''; -}; - -var resolveSchema = module.exports.resolveSchema = function (schema) { - if (_.isPlainObject(schema.schema)) { - schema = resolveSchema(schema.schema); - } - - return schema; -}; - -module.exports.simpleRef = function (name) { - if (typeof name === 'undefined') { - return null; - } - - if (name.indexOf('#/definitions/') === 0) { - return name.substring('#/definitions/'.length); - } else { - return name; - } -}; - -/** - * helper to remove extensions and add them to an object - * - * @param keyname - * @param obj - */ -module.exports.extractExtensions = function (keyname, obj, value) { - if(!keyname || !obj) { - return; - } - - if (typeof keyname === 'string' && keyname.indexOf('x-') === 0) { - obj.vendorExtensions = obj.vendorExtensions || {}; - if(value) { - obj.vendorExtensions[keyname] = value; - } - else { - obj.vendorExtensions[keyname] = obj[keyname]; - } - } -}; -}).call(this,require('_process')); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIF8gPSB7XG4gIGlzUGxhaW5PYmplY3Q6IHJlcXVpcmUoJ2xvZGFzaC1jb21wYXQvbGFuZy9pc1BsYWluT2JqZWN0JyksXG4gIGluZGV4T2Y6IHJlcXVpcmUoJ2xvZGFzaC1jb21wYXQvYXJyYXkvaW5kZXhPZicpXG59O1xuXG5tb2R1bGUuZXhwb3J0cy5fX2JpbmQgPSBmdW5jdGlvbiAoZm4sIG1lKSB7XG4gIHJldHVybiBmdW5jdGlvbigpe1xuICAgIHJldHVybiBmbi5hcHBseShtZSwgYXJndW1lbnRzKTtcbiAgfTtcbn07XG5cbnZhciBsb2cgPSBtb2R1bGUuZXhwb3J0cy5sb2cgPSBmdW5jdGlvbigpIHtcbiAgLy8gT25seSBsb2cgaWYgYXZhaWxhYmxlIGFuZCB3ZSdyZSBub3QgdGVzdGluZ1xuICBpZiAoY29uc29sZSAmJiBwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Rlc3QnKSB7XG4gICAgY29uc29sZS5sb2coQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKVswXSk7XG4gIH1cbn07XG5cbm1vZHVsZS5leHBvcnRzLmZhaWwgPSBmdW5jdGlvbiAobWVzc2FnZSkge1xuICBsb2cobWVzc2FnZSk7XG59O1xuXG5tb2R1bGUuZXhwb3J0cy5vcHRpb25IdG1sID0gZnVuY3Rpb24gKGxhYmVsLCB2YWx1ZSkge1xuICByZXR1cm4gJzx0cj48dGQgY2xhc3M9XCJvcHRpb25OYW1lXCI+JyArIGxhYmVsICsgJzo8L3RkPjx0ZD4nICsgdmFsdWUgKyAnPC90ZD48L3RyPic7XG59O1xuXG52YXIgcmVzb2x2ZVNjaGVtYSA9IG1vZHVsZS5leHBvcnRzLnJlc29sdmVTY2hlbWEgPSBmdW5jdGlvbiAoc2NoZW1hKSB7XG4gIGlmIChfLmlzUGxhaW5PYmplY3Qoc2NoZW1hLnNjaGVtYSkpIHtcbiAgICBzY2hlbWEgPSByZXNvbHZlU2NoZW1hKHNjaGVtYS5zY2hlbWEpO1xuICB9XG5cbiAgcmV0dXJuIHNjaGVtYTtcbn07XG5cbm1vZHVsZS5leHBvcnRzLnNpbXBsZVJlZiA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gIGlmICh0eXBlb2YgbmFtZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIGlmIChuYW1lLmluZGV4T2YoJyMvZGVmaW5pdGlvbnMvJykgPT09IDApIHtcbiAgICByZXR1cm4gbmFtZS5zdWJzdHJpbmcoJyMvZGVmaW5pdGlvbnMvJy5sZW5ndGgpO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiBuYW1lO1xuICB9XG59O1xuXG4vKipcbiAqIGhlbHBlciB0byByZW1vdmUgZXh0ZW5zaW9ucyBhbmQgYWRkIHRoZW0gdG8gYW4gb2JqZWN0XG4gKlxuICogQHBhcmFtIGtleW5hbWVcbiAqIEBwYXJhbSBvYmpcbiAqL1xubW9kdWxlLmV4cG9ydHMuZXh0cmFjdEV4dGVuc2lvbnMgPSBmdW5jdGlvbiAoa2V5bmFtZSwgb2JqLCB2YWx1ZSkge1xuICBpZigha2V5bmFtZSB8fCAhb2JqKSB7XG4gICAgcmV0dXJuO1xuICB9XG5cbiAgaWYgKHR5cGVvZiBrZXluYW1lID09PSAnc3RyaW5nJyAmJiBrZXluYW1lLmluZGV4T2YoJ3gtJykgPT09IDApIHtcbiAgICBvYmoudmVuZG9yRXh0ZW5zaW9ucyA9IG9iai52ZW5kb3JFeHRlbnNpb25zIHx8IHt9O1xuICAgIGlmKHZhbHVlKSB7XG4gICAgICBvYmoudmVuZG9yRXh0ZW5zaW9uc1trZXluYW1lXSA9IHZhbHVlO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIG9iai52ZW5kb3JFeHRlbnNpb25zW2tleW5hbWVdID0gb2JqW2tleW5hbWVdO1xuICAgIH1cbiAgfVxufTsiXX0= -},{"_process":12,"lodash-compat/array/indexOf":49,"lodash-compat/lang/isPlainObject":145}],5:[function(require,module,exports){ -(function (Buffer){ -'use strict'; - -var helpers = require('./helpers'); -var request = require('superagent'); -var jsyaml = require('js-yaml'); -var _ = { - isObject: require('lodash-compat/lang/isObject'), - keys: require('lodash-compat/object/keys') -}; - -/* - * JQueryHttpClient is a light-weight, node or browser HTTP client - */ -var JQueryHttpClient = function () { - this.type = 'JQueryHttpClient'; -}; - -/* - * SuperagentHttpClient is a light-weight, node or browser HTTP client - */ -var SuperagentHttpClient = function () { - this.type = 'SuperagentHttpClient'; -}; - -/** - * SwaggerHttp is a wrapper for executing requests - */ -var SwaggerHttp = module.exports = function () {}; - -SwaggerHttp.prototype.execute = function (obj, opts) { - var client; - - if(opts && opts.client) { - client = opts.client; - } - else { - client = new SuperagentHttpClient(opts); - } - client.opts = opts || {}; - - // legacy support - var hasJQuery = false; - if(typeof window !== 'undefined') { - if(typeof window.jQuery !== 'undefined') { - hasJQuery = true; - } - } - // OPTIONS support - if(obj.method.toLowerCase() === 'options' && client.type === 'SuperagentHttpClient') { - log('forcing jQuery as OPTIONS are not supported by SuperAgent'); - obj.useJQuery = true; - } - if(this.isInternetExplorer() && (obj.useJQuery === false || !hasJQuery )) { - throw new Error('Unsupported configuration! JQuery is required but not available'); - } - if ((obj && obj.useJQuery === true) || this.isInternetExplorer() && hasJQuery) { - client = new JQueryHttpClient(opts); - } - - var success = obj.on.response; - var error = obj.on.error; - - var requestInterceptor = function(data) { - if(opts && opts.requestInterceptor) { - data = opts.requestInterceptor.apply(data); - } - return data; - }; - - var responseInterceptor = function(data) { - if(opts && opts.responseInterceptor) { - data = opts.responseInterceptor.apply(data); - } - return success(data); - }; - - var errorInterceptor = function(data) { - if(opts && opts.responseInterceptor) { - data = opts.responseInterceptor.apply(data); - } - error(data); - }; - - obj.on.error = function(data) { - errorInterceptor(data); - }; - - obj.on.response = function(data) { - responseInterceptor(data); - }; - - if (_.isObject(obj) && _.isObject(obj.body)) { - // special processing for file uploads via jquery - if (obj.body.type && obj.body.type === 'formData'){ - if(opts.useJQuery) { - obj.contentType = false; - obj.processData = false; - delete obj.headers['Content-Type']; - } - } - } - - obj = requestInterceptor(obj) || obj; - if (obj.beforeSend) { - obj.beforeSend(function(_obj) { - client.execute(_obj || obj); - }); - } else { - client.execute(obj); - } - - return (obj.deferred) ? obj.deferred.promise : obj; -}; - -SwaggerHttp.prototype.isInternetExplorer = function () { - var detectedIE = false; - - if (typeof navigator !== 'undefined' && navigator.userAgent) { - var nav = navigator.userAgent.toLowerCase(); - - if (nav.indexOf('msie') !== -1) { - var version = parseInt(nav.split('msie')[1]); - - if (version <= 8) { - detectedIE = true; - } - } - } - - return detectedIE; -}; - -JQueryHttpClient.prototype.execute = function (obj) { - var jq = this.jQuery || (typeof window !== 'undefined' && window.jQuery); - var cb = obj.on; - var request = obj; - - if(typeof jq === 'undefined' || jq === false) { - throw new Error('Unsupported configuration! JQuery is required but not available'); - } - - obj.type = obj.method; - obj.cache = obj.jqueryAjaxCache; - obj.data = obj.body; - delete obj.jqueryAjaxCache; - delete obj.useJQuery; - delete obj.body; - - obj.complete = function (response) { - var headers = {}; - var headerArray = response.getAllResponseHeaders().split('\n'); - - for (var i = 0; i < headerArray.length; i++) { - var toSplit = headerArray[i].trim(); - - if (toSplit.length === 0) { - continue; - } - - var separator = toSplit.indexOf(':'); - - if (separator === -1) { - // Name but no value in the header - headers[toSplit] = null; - - continue; - } - - var name = toSplit.substring(0, separator).trim(); - var value = toSplit.substring(separator + 1).trim(); - - headers[name] = value; - } - - var out = { - url: request.url, - method: request.method, - status: response.status, - statusText: response.statusText, - data: response.responseText, - headers: headers - }; - - try { - var possibleObj = response.responseJSON || jsyaml.safeLoad(response.responseText); - out.obj = (typeof possibleObj === 'string') ? {} : possibleObj; - } catch (ex) { - // do not set out.obj - helpers.log('unable to parse JSON/YAML content'); - } - - // I can throw, or parse null? - out.obj = out.obj || null; - - if (response.status >= 200 && response.status < 300) { - cb.response(out); - } else if (response.status === 0 || (response.status >= 400 && response.status < 599)) { - cb.error(out); - } else { - return cb.response(out); - } - }; - - jq.support.cors = true; - - return jq.ajax(obj); -}; - -SuperagentHttpClient.prototype.execute = function (obj) { - var connectionAgent = obj.connectionAgent; - var method = obj.method.toLowerCase(); - var timeout = obj.timeout; - - if (method === 'delete') { - method = 'del'; - } - var headers = obj.headers || {}; - var r = request[method](obj.url); - - if (connectionAgent) { - r.agent(connectionAgent); - } - - if (timeout) { - r.timeout(timeout); - } - - if (obj.enableCookies) { - r.withCredentials(); - } - - var accept = obj.headers.Accept; - - if(this.binaryRequest(accept)) { - r.on('request', function () { - if(this.xhr) { - this.xhr.responseType = 'blob'; - } - }); - } - - if(obj.body) { - if(_.isObject(obj.body)) { - var contentType = obj.headers['Content-Type'] || ''; - if (contentType.indexOf('multipart/form-data') === 0) { - delete headers['Content-Type']; - if({}.toString.apply(obj.body) === '[object FormData]') { - r.send(obj.body); - } - else { - var keyname, value, v; - for (keyname in obj.body) { - value = obj.body[keyname]; - if(Array.isArray(value)) { - for(v in value) { - r.field(keyname, v); - } - } - else { - r.field(keyname, value); - } - } - } - } - else if (_.isObject(obj.body)) { - // non multipart/form-data - obj.body = JSON.stringify(obj.body); - r.send(obj.body); - } - } - else { - r.send(obj.body); - } - } - - var name; - for (name in headers) { - r.set(name, headers[name]); - } - - if(typeof r.buffer === 'function') { - r.buffer(); // force superagent to populate res.text with the raw response data - } - - r.end(function (err, res) { - res = res || { - status: 0, - headers: {error: 'no response from server'} - }; - var response = { - url: obj.url, - method: obj.method, - headers: res.headers - }; - var cb; - - if (!err && res.error) { - err = res.error; - } - - if (err && obj.on && obj.on.error) { - response.errObj = err; - response.status = res ? res.status : 500; - response.statusText = res ? res.text : err.message; - if (res.headers && res.headers['content-type']) { - if (res.headers['content-type'].indexOf('application/json') >= 0) { - try { - response.obj = JSON.parse(response.statusText); - } - catch (e) { - response.obj = null; - } - } - } - cb = obj.on.error; - } else if (res && obj.on && obj.on.response) { - var possibleObj; - - // Already parsed by by superagent? - if (res.body && _.keys(res.body).length > 0) { - possibleObj = res.body; - } else { - try { - possibleObj = jsyaml.safeLoad(res.text); - // can parse into a string... which we don't need running around in the system - possibleObj = (typeof possibleObj === 'string') ? null : possibleObj; - } catch (e) { - helpers.log('cannot parse JSON/YAML content'); - } - } - - // null means we can't parse into object - if(typeof Buffer === 'function' && Buffer.isBuffer(possibleObj)) { - response.data = possibleObj; - } - else { - response.obj = (typeof possibleObj === 'object') ? possibleObj : null; - } - - response.status = res.status; - response.statusText = res.text; - cb = obj.on.response; - } - if (res.xhr && res.xhr.response) { - response.data = res.xhr.response; - } - else if(!response.data) { - response.data = response.statusText; - } - - if (cb) { - cb(response); - } - }); -}; - -SuperagentHttpClient.prototype. binaryRequest = function (accept) { - if(!accept) { - return false; - } - return (/^image/i).test(accept) || (/^application\/pdf/).test(accept); -}; - -}).call(this,require("buffer").Buffer); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9odHRwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIGhlbHBlcnMgPSByZXF1aXJlKCcuL2hlbHBlcnMnKTtcbnZhciByZXF1ZXN0ID0gcmVxdWlyZSgnc3VwZXJhZ2VudCcpO1xudmFyIGpzeWFtbCA9IHJlcXVpcmUoJ2pzLXlhbWwnKTtcbnZhciBfID0ge1xuICBpc09iamVjdDogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9sYW5nL2lzT2JqZWN0JyksXG4gIGtleXM6IHJlcXVpcmUoJ2xvZGFzaC1jb21wYXQvb2JqZWN0L2tleXMnKVxufTtcblxuLypcbiAqIEpRdWVyeUh0dHBDbGllbnQgaXMgYSBsaWdodC13ZWlnaHQsIG5vZGUgb3IgYnJvd3NlciBIVFRQIGNsaWVudFxuICovXG52YXIgSlF1ZXJ5SHR0cENsaWVudCA9IGZ1bmN0aW9uICgpIHtcbiAgdGhpcy50eXBlID0gJ0pRdWVyeUh0dHBDbGllbnQnO1xufTtcblxuLypcbiAqIFN1cGVyYWdlbnRIdHRwQ2xpZW50IGlzIGEgbGlnaHQtd2VpZ2h0LCBub2RlIG9yIGJyb3dzZXIgSFRUUCBjbGllbnRcbiAqL1xudmFyIFN1cGVyYWdlbnRIdHRwQ2xpZW50ID0gZnVuY3Rpb24gKCkge1xuICB0aGlzLnR5cGUgPSAnU3VwZXJhZ2VudEh0dHBDbGllbnQnO1xufTtcblxuLyoqXG4gKiBTd2FnZ2VySHR0cCBpcyBhIHdyYXBwZXIgZm9yIGV4ZWN1dGluZyByZXF1ZXN0c1xuICovXG52YXIgU3dhZ2dlckh0dHAgPSBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uICgpIHt9O1xuXG5Td2FnZ2VySHR0cC5wcm90b3R5cGUuZXhlY3V0ZSA9IGZ1bmN0aW9uIChvYmosIG9wdHMpIHtcbiAgdmFyIGNsaWVudDtcblxuICBpZihvcHRzICYmIG9wdHMuY2xpZW50KSB7XG4gICAgY2xpZW50ID0gb3B0cy5jbGllbnQ7XG4gIH1cbiAgZWxzZSB7XG4gICAgY2xpZW50ID0gbmV3IFN1cGVyYWdlbnRIdHRwQ2xpZW50KG9wdHMpO1xuICB9XG4gIGNsaWVudC5vcHRzID0gb3B0cyB8fCB7fTtcblxuICAvLyBsZWdhY3kgc3VwcG9ydFxuICB2YXIgaGFzSlF1ZXJ5ID0gZmFsc2U7XG4gIGlmKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgaWYodHlwZW9mIHdpbmRvdy5qUXVlcnkgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICBoYXNKUXVlcnkgPSB0cnVlO1xuICAgIH1cbiAgfVxuICAvLyBPUFRJT05TIHN1cHBvcnRcbiAgaWYob2JqLm1ldGhvZC50b0xvd2VyQ2FzZSgpID09PSAnb3B0aW9ucycgJiYgY2xpZW50LnR5cGUgPT09ICdTdXBlcmFnZW50SHR0cENsaWVudCcpIHtcbiAgICBsb2coJ2ZvcmNpbmcgalF1ZXJ5IGFzIE9QVElPTlMgYXJlIG5vdCBzdXBwb3J0ZWQgYnkgU3VwZXJBZ2VudCcpO1xuICAgIG9iai51c2VKUXVlcnkgPSB0cnVlO1xuICB9XG4gIGlmKHRoaXMuaXNJbnRlcm5ldEV4cGxvcmVyKCkgJiYgKG9iai51c2VKUXVlcnkgPT09IGZhbHNlIHx8ICFoYXNKUXVlcnkgKSkge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgY29uZmlndXJhdGlvbiEgSlF1ZXJ5IGlzIHJlcXVpcmVkIGJ1dCBub3QgYXZhaWxhYmxlJyk7XG4gIH1cbiAgaWYgKChvYmogJiYgb2JqLnVzZUpRdWVyeSA9PT0gdHJ1ZSkgfHwgdGhpcy5pc0ludGVybmV0RXhwbG9yZXIoKSAmJiBoYXNKUXVlcnkpIHtcbiAgICBjbGllbnQgPSBuZXcgSlF1ZXJ5SHR0cENsaWVudChvcHRzKTtcbiAgfVxuXG4gIHZhciBzdWNjZXNzID0gb2JqLm9uLnJlc3BvbnNlO1xuICB2YXIgZXJyb3IgPSBvYmoub24uZXJyb3I7XG5cbiAgdmFyIHJlcXVlc3RJbnRlcmNlcHRvciA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICBpZihvcHRzICYmIG9wdHMucmVxdWVzdEludGVyY2VwdG9yKSB7XG4gICAgICBkYXRhID0gb3B0cy5yZXF1ZXN0SW50ZXJjZXB0b3IuYXBwbHkoZGF0YSk7XG4gICAgfVxuICAgIHJldHVybiBkYXRhO1xuICB9O1xuXG4gIHZhciByZXNwb25zZUludGVyY2VwdG9yID0gZnVuY3Rpb24oZGF0YSkge1xuICAgIGlmKG9wdHMgJiYgb3B0cy5yZXNwb25zZUludGVyY2VwdG9yKSB7XG4gICAgICBkYXRhID0gb3B0cy5yZXNwb25zZUludGVyY2VwdG9yLmFwcGx5KGRhdGEpO1xuICAgIH1cbiAgICByZXR1cm4gc3VjY2VzcyhkYXRhKTtcbiAgfTtcblxuICB2YXIgZXJyb3JJbnRlcmNlcHRvciA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICBpZihvcHRzICYmIG9wdHMucmVzcG9uc2VJbnRlcmNlcHRvcikge1xuICAgICAgZGF0YSA9IG9wdHMucmVzcG9uc2VJbnRlcmNlcHRvci5hcHBseShkYXRhKTtcbiAgICB9XG4gICAgZXJyb3IoZGF0YSk7XG4gIH07XG5cbiAgb2JqLm9uLmVycm9yID0gZnVuY3Rpb24oZGF0YSkge1xuICAgIGVycm9ySW50ZXJjZXB0b3IoZGF0YSk7XG4gIH07XG5cbiAgb2JqLm9uLnJlc3BvbnNlID0gZnVuY3Rpb24oZGF0YSkge1xuICAgIHJlc3BvbnNlSW50ZXJjZXB0b3IoZGF0YSk7XG4gIH07XG5cbiAgaWYgKF8uaXNPYmplY3Qob2JqKSAmJiBfLmlzT2JqZWN0KG9iai5ib2R5KSkge1xuICAgIC8vIHNwZWNpYWwgcHJvY2Vzc2luZyBmb3IgZmlsZSB1cGxvYWRzIHZpYSBqcXVlcnlcbiAgICBpZiAob2JqLmJvZHkudHlwZSAmJiBvYmouYm9keS50eXBlID09PSAnZm9ybURhdGEnKXtcbiAgICAgIGlmKG9wdHMudXNlSlF1ZXJ5KSB7XG4gICAgICAgIG9iai5jb250ZW50VHlwZSA9IGZhbHNlO1xuICAgICAgICBvYmoucHJvY2Vzc0RhdGEgPSBmYWxzZTtcbiAgICAgICAgZGVsZXRlIG9iai5oZWFkZXJzWydDb250ZW50LVR5cGUnXTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBvYmogPSByZXF1ZXN0SW50ZXJjZXB0b3Iob2JqKSB8fCBvYmo7XG4gIGlmIChvYmouYmVmb3JlU2VuZCkge1xuICAgIG9iai5iZWZvcmVTZW5kKGZ1bmN0aW9uKF9vYmopIHtcbiAgICAgIGNsaWVudC5leGVjdXRlKF9vYmogfHwgb2JqKTtcbiAgICB9KTtcbiAgfSBlbHNlIHtcbiAgICBjbGllbnQuZXhlY3V0ZShvYmopO1xuICB9XG5cbiAgcmV0dXJuIChvYmouZGVmZXJyZWQpID8gb2JqLmRlZmVycmVkLnByb21pc2UgOiBvYmo7XG59O1xuXG5Td2FnZ2VySHR0cC5wcm90b3R5cGUuaXNJbnRlcm5ldEV4cGxvcmVyID0gZnVuY3Rpb24gKCkge1xuICB2YXIgZGV0ZWN0ZWRJRSA9IGZhbHNlO1xuXG4gIGlmICh0eXBlb2YgbmF2aWdhdG9yICE9PSAndW5kZWZpbmVkJyAmJiBuYXZpZ2F0b3IudXNlckFnZW50KSB7XG4gICAgdmFyIG5hdiA9IG5hdmlnYXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKTtcblxuICAgIGlmIChuYXYuaW5kZXhPZignbXNpZScpICE9PSAtMSkge1xuICAgICAgdmFyIHZlcnNpb24gPSBwYXJzZUludChuYXYuc3BsaXQoJ21zaWUnKVsxXSk7XG5cbiAgICAgIGlmICh2ZXJzaW9uIDw9IDgpIHtcbiAgICAgICAgZGV0ZWN0ZWRJRSA9IHRydWU7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGRldGVjdGVkSUU7XG59O1xuXG5KUXVlcnlIdHRwQ2xpZW50LnByb3RvdHlwZS5leGVjdXRlID0gZnVuY3Rpb24gKG9iaikge1xuICB2YXIganEgPSB0aGlzLmpRdWVyeSB8fCAodHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcgJiYgd2luZG93LmpRdWVyeSk7XG4gIHZhciBjYiA9IG9iai5vbjtcbiAgdmFyIHJlcXVlc3QgPSBvYmo7XG5cbiAgaWYodHlwZW9mIGpxID09PSAndW5kZWZpbmVkJyB8fCBqcSA9PT0gZmFsc2UpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vuc3VwcG9ydGVkIGNvbmZpZ3VyYXRpb24hIEpRdWVyeSBpcyByZXF1aXJlZCBidXQgbm90IGF2YWlsYWJsZScpO1xuICB9XG5cbiAgb2JqLnR5cGUgPSBvYmoubWV0aG9kO1xuICBvYmouY2FjaGUgPSBvYmouanF1ZXJ5QWpheENhY2hlO1xuICBvYmouZGF0YSA9IG9iai5ib2R5O1xuICBkZWxldGUgb2JqLmpxdWVyeUFqYXhDYWNoZTtcbiAgZGVsZXRlIG9iai51c2VKUXVlcnk7XG4gIGRlbGV0ZSBvYmouYm9keTtcblxuICBvYmouY29tcGxldGUgPSBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICB2YXIgaGVhZGVycyA9IHt9O1xuICAgIHZhciBoZWFkZXJBcnJheSA9IHJlc3BvbnNlLmdldEFsbFJlc3BvbnNlSGVhZGVycygpLnNwbGl0KCdcXG4nKTtcblxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgaGVhZGVyQXJyYXkubGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciB0b1NwbGl0ID0gaGVhZGVyQXJyYXlbaV0udHJpbSgpO1xuXG4gICAgICBpZiAodG9TcGxpdC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG5cbiAgICAgIHZhciBzZXBhcmF0b3IgPSB0b1NwbGl0LmluZGV4T2YoJzonKTtcblxuICAgICAgaWYgKHNlcGFyYXRvciA9PT0gLTEpIHtcbiAgICAgICAgLy8gTmFtZSBidXQgbm8gdmFsdWUgaW4gdGhlIGhlYWRlclxuICAgICAgICBoZWFkZXJzW3RvU3BsaXRdID0gbnVsbDtcblxuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSB0b1NwbGl0LnN1YnN0cmluZygwLCBzZXBhcmF0b3IpLnRyaW0oKTtcbiAgICAgIHZhciB2YWx1ZSA9IHRvU3BsaXQuc3Vic3RyaW5nKHNlcGFyYXRvciArIDEpLnRyaW0oKTtcblxuICAgICAgaGVhZGVyc1tuYW1lXSA9IHZhbHVlO1xuICAgIH1cblxuICAgIHZhciBvdXQgPSB7XG4gICAgICB1cmw6IHJlcXVlc3QudXJsLFxuICAgICAgbWV0aG9kOiByZXF1ZXN0Lm1ldGhvZCxcbiAgICAgIHN0YXR1czogcmVzcG9uc2Uuc3RhdHVzLFxuICAgICAgc3RhdHVzVGV4dDogcmVzcG9uc2Uuc3RhdHVzVGV4dCxcbiAgICAgIGRhdGE6IHJlc3BvbnNlLnJlc3BvbnNlVGV4dCxcbiAgICAgIGhlYWRlcnM6IGhlYWRlcnNcbiAgICB9O1xuXG4gICAgdHJ5IHtcbiAgICAgIHZhciBwb3NzaWJsZU9iaiA9ICByZXNwb25zZS5yZXNwb25zZUpTT04gfHwganN5YW1sLnNhZmVMb2FkKHJlc3BvbnNlLnJlc3BvbnNlVGV4dCk7XG4gICAgICBvdXQub2JqID0gKHR5cGVvZiBwb3NzaWJsZU9iaiA9PT0gJ3N0cmluZycpID8ge30gOiBwb3NzaWJsZU9iajtcbiAgICB9IGNhdGNoIChleCkge1xuICAgICAgLy8gZG8gbm90IHNldCBvdXQub2JqXG4gICAgICBoZWxwZXJzLmxvZygndW5hYmxlIHRvIHBhcnNlIEpTT04vWUFNTCBjb250ZW50Jyk7XG4gICAgfVxuXG4gICAgLy8gSSBjYW4gdGhyb3csIG9yIHBhcnNlIG51bGw/XG4gICAgb3V0Lm9iaiA9IG91dC5vYmogfHwgbnVsbDtcblxuICAgIGlmIChyZXNwb25zZS5zdGF0dXMgPj0gMjAwICYmIHJlc3BvbnNlLnN0YXR1cyA8IDMwMCkge1xuICAgICAgY2IucmVzcG9uc2Uob3V0KTtcbiAgICB9IGVsc2UgaWYgKHJlc3BvbnNlLnN0YXR1cyA9PT0gMCB8fCAocmVzcG9uc2Uuc3RhdHVzID49IDQwMCAmJiByZXNwb25zZS5zdGF0dXMgPCA1OTkpKSB7XG4gICAgICBjYi5lcnJvcihvdXQpO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gY2IucmVzcG9uc2Uob3V0KTtcbiAgICB9XG4gIH07XG5cbiAganEuc3VwcG9ydC5jb3JzID0gdHJ1ZTtcblxuICByZXR1cm4ganEuYWpheChvYmopO1xufTtcblxuU3VwZXJhZ2VudEh0dHBDbGllbnQucHJvdG90eXBlLmV4ZWN1dGUgPSBmdW5jdGlvbiAob2JqKSB7XG4gIHZhciBjb25uZWN0aW9uQWdlbnQgPSBvYmouY29ubmVjdGlvbkFnZW50O1xuICB2YXIgbWV0aG9kID0gb2JqLm1ldGhvZC50b0xvd2VyQ2FzZSgpO1xuICB2YXIgdGltZW91dCA9IG9iai50aW1lb3V0O1xuXG4gIGlmIChtZXRob2QgPT09ICdkZWxldGUnKSB7XG4gICAgbWV0aG9kID0gJ2RlbCc7XG4gIH1cbiAgdmFyIGhlYWRlcnMgPSBvYmouaGVhZGVycyB8fCB7fTtcbiAgdmFyIHIgPSByZXF1ZXN0W21ldGhvZF0ob2JqLnVybCk7XG5cbiAgaWYgKGNvbm5lY3Rpb25BZ2VudCkge1xuICAgIHIuYWdlbnQoY29ubmVjdGlvbkFnZW50KTtcbiAgfVxuICBcbiAgaWYgKHRpbWVvdXQpIHtcbiAgICByLnRpbWVvdXQodGltZW91dCk7XG4gIH1cblxuICBpZiAob2JqLmVuYWJsZUNvb2tpZXMpIHtcbiAgICByLndpdGhDcmVkZW50aWFscygpO1xuICB9XG5cbiAgdmFyIGFjY2VwdCA9IG9iai5oZWFkZXJzLkFjY2VwdDtcblxuICBpZih0aGlzLmJpbmFyeVJlcXVlc3QoYWNjZXB0KSkge1xuICAgIHIub24oJ3JlcXVlc3QnLCBmdW5jdGlvbiAoKSB7XG4gICAgICBpZih0aGlzLnhocikge1xuICAgICAgICB0aGlzLnhoci5yZXNwb25zZVR5cGUgPSAnYmxvYic7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICBpZihvYmouYm9keSkge1xuICAgIGlmKF8uaXNPYmplY3Qob2JqLmJvZHkpKSB7XG4gICAgICB2YXIgY29udGVudFR5cGUgPSBvYmouaGVhZGVyc1snQ29udGVudC1UeXBlJ10gfHwgJyc7XG4gICAgICBpZiAoY29udGVudFR5cGUuaW5kZXhPZignbXVsdGlwYXJ0L2Zvcm0tZGF0YScpID09PSAwKSB7XG4gICAgICAgIGRlbGV0ZSBoZWFkZXJzWydDb250ZW50LVR5cGUnXTtcbiAgICAgICAgaWYoe30udG9TdHJpbmcuYXBwbHkob2JqLmJvZHkpID09PSAnW29iamVjdCBGb3JtRGF0YV0nKSB7XG4gICAgICAgICAgci5zZW5kKG9iai5ib2R5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICB2YXIga2V5bmFtZSwgdmFsdWUsIHY7XG4gICAgICAgICAgZm9yIChrZXluYW1lIGluIG9iai5ib2R5KSB7XG4gICAgICAgICAgICB2YWx1ZSA9IG9iai5ib2R5W2tleW5hbWVdO1xuICAgICAgICAgICAgaWYoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgZm9yKHYgaW4gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICByLmZpZWxkKGtleW5hbWUsIHYpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgci5maWVsZChrZXluYW1lLCB2YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIGlmIChfLmlzT2JqZWN0KG9iai5ib2R5KSkge1xuICAgICAgICAvLyBub24gbXVsdGlwYXJ0L2Zvcm0tZGF0YVxuICAgICAgICBvYmouYm9keSA9IEpTT04uc3RyaW5naWZ5KG9iai5ib2R5KTtcbiAgICAgICAgci5zZW5kKG9iai5ib2R5KTtcbiAgICAgIH1cbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICByLnNlbmQob2JqLmJvZHkpO1xuICAgIH1cbiAgfVxuXG4gIHZhciBuYW1lO1xuICBmb3IgKG5hbWUgaW4gaGVhZGVycykge1xuICAgIHIuc2V0KG5hbWUsIGhlYWRlcnNbbmFtZV0pO1xuICB9XG5cbiAgaWYodHlwZW9mIHIuYnVmZmVyID09PSAnZnVuY3Rpb24nKSB7XG4gICAgci5idWZmZXIoKTsgLy8gZm9yY2Ugc3VwZXJhZ2VudCB0byBwb3B1bGF0ZSByZXMudGV4dCB3aXRoIHRoZSByYXcgcmVzcG9uc2UgZGF0YVxuICB9XG5cbiAgci5lbmQoZnVuY3Rpb24gKGVyciwgcmVzKSB7XG4gICAgcmVzID0gcmVzIHx8IHtcbiAgICAgIHN0YXR1czogMCxcbiAgICAgIGhlYWRlcnM6IHtlcnJvcjogJ25vIHJlc3BvbnNlIGZyb20gc2VydmVyJ31cbiAgICB9O1xuICAgIHZhciByZXNwb25zZSA9IHtcbiAgICAgIHVybDogb2JqLnVybCxcbiAgICAgIG1ldGhvZDogb2JqLm1ldGhvZCxcbiAgICAgIGhlYWRlcnM6IHJlcy5oZWFkZXJzXG4gICAgfTtcbiAgICB2YXIgY2I7XG5cbiAgICBpZiAoIWVyciAmJiByZXMuZXJyb3IpIHtcbiAgICAgIGVyciA9IHJlcy5lcnJvcjtcbiAgICB9XG5cbiAgICBpZiAoZXJyICYmIG9iai5vbiAmJiBvYmoub24uZXJyb3IpIHtcbiAgICAgIHJlc3BvbnNlLmVyck9iaiA9IGVycjtcbiAgICAgIHJlc3BvbnNlLnN0YXR1cyA9IHJlcyA/IHJlcy5zdGF0dXMgOiA1MDA7XG4gICAgICByZXNwb25zZS5zdGF0dXNUZXh0ID0gcmVzID8gcmVzLnRleHQgOiBlcnIubWVzc2FnZTtcbiAgICAgIGlmIChyZXMuaGVhZGVycyAmJiByZXMuaGVhZGVyc1snY29udGVudC10eXBlJ10pIHtcbiAgICAgICAgaWYgKHJlcy5oZWFkZXJzWydjb250ZW50LXR5cGUnXS5pbmRleE9mKCdhcHBsaWNhdGlvbi9qc29uJykgPj0gMCkge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXNwb25zZS5vYmogPSBKU09OLnBhcnNlKHJlc3BvbnNlLnN0YXR1c1RleHQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXRjaCAoZSkge1xuICAgICAgICAgICAgcmVzcG9uc2Uub2JqID0gbnVsbDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGNiID0gb2JqLm9uLmVycm9yO1xuICAgIH0gZWxzZSBpZiAocmVzICYmIG9iai5vbiAmJiBvYmoub24ucmVzcG9uc2UpIHtcbiAgICAgIHZhciBwb3NzaWJsZU9iajtcblxuICAgICAgLy8gQWxyZWFkeSBwYXJzZWQgYnkgYnkgc3VwZXJhZ2VudD9cbiAgICAgIGlmIChyZXMuYm9keSAmJiBfLmtleXMocmVzLmJvZHkpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgcG9zc2libGVPYmogPSByZXMuYm9keTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcG9zc2libGVPYmogPSBqc3lhbWwuc2FmZUxvYWQocmVzLnRleHQpO1xuICAgICAgICAgIC8vIGNhbiBwYXJzZSBpbnRvIGEgc3RyaW5nLi4uIHdoaWNoIHdlIGRvbid0IG5lZWQgcnVubmluZyBhcm91bmQgaW4gdGhlIHN5c3RlbVxuICAgICAgICAgIHBvc3NpYmxlT2JqID0gKHR5cGVvZiBwb3NzaWJsZU9iaiA9PT0gJ3N0cmluZycpID8gbnVsbCA6IHBvc3NpYmxlT2JqO1xuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgaGVscGVycy5sb2coJ2Nhbm5vdCBwYXJzZSBKU09OL1lBTUwgY29udGVudCcpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIG51bGwgbWVhbnMgd2UgY2FuJ3QgcGFyc2UgaW50byBvYmplY3RcbiAgICAgIGlmKHR5cGVvZiBCdWZmZXIgPT09ICdmdW5jdGlvbicgJiYgQnVmZmVyLmlzQnVmZmVyKHBvc3NpYmxlT2JqKSkge1xuICAgICAgICByZXNwb25zZS5kYXRhID0gcG9zc2libGVPYmo7XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgcmVzcG9uc2Uub2JqID0gKHR5cGVvZiBwb3NzaWJsZU9iaiA9PT0gJ29iamVjdCcpID8gcG9zc2libGVPYmogOiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXNwb25zZS5zdGF0dXMgPSByZXMuc3RhdHVzO1xuICAgICAgcmVzcG9uc2Uuc3RhdHVzVGV4dCA9IHJlcy50ZXh0O1xuICAgICAgY2IgPSBvYmoub24ucmVzcG9uc2U7XG4gICAgfVxuICAgIGlmIChyZXMueGhyICYmIHJlcy54aHIucmVzcG9uc2UpIHtcbiAgICAgIHJlc3BvbnNlLmRhdGEgPSByZXMueGhyLnJlc3BvbnNlO1xuICAgIH1cbiAgICBlbHNlIGlmKCFyZXNwb25zZS5kYXRhKSB7XG4gICAgICByZXNwb25zZS5kYXRhID0gcmVzcG9uc2Uuc3RhdHVzVGV4dDtcbiAgICB9XG5cbiAgICBpZiAoY2IpIHtcbiAgICAgIGNiKHJlc3BvbnNlKTtcbiAgICB9XG4gIH0pO1xufTtcblxuU3VwZXJhZ2VudEh0dHBDbGllbnQucHJvdG90eXBlLiBiaW5hcnlSZXF1ZXN0ID0gZnVuY3Rpb24gKGFjY2VwdCkge1xuICBpZighYWNjZXB0KSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG4gIHJldHVybiAoL15pbWFnZS9pKS50ZXN0KGFjY2VwdCkgfHwgKC9eYXBwbGljYXRpb25cXC9wZGYvKS50ZXN0KGFjY2VwdCk7XG59O1xuIl19 -},{"./helpers":4,"buffer":14,"js-yaml":19,"lodash-compat/lang/isObject":144,"lodash-compat/object/keys":149,"superagent":158}],6:[function(require,module,exports){ -'use strict'; - -var SwaggerHttp = require('./http'); -var _ = { - isObject: require('lodash-compat/lang/isObject'), - cloneDeep: require('lodash-compat/lang/cloneDeep'), - isArray: require('lodash-compat/lang/isArray'), - isString: require('lodash-compat/lang/isString') -}; - - -/** - * Resolves a spec's remote references - */ -var Resolver = module.exports = function () { - this.failedUrls = []; - this.resolverCache = {}; - this.pendingUrls = {}; -}; - -Resolver.prototype.processAllOf = function(root, name, definition, resolutionTable, unresolvedRefs, spec) { - var i, location, property; - - definition['x-resolved-from'] = [ '#/definitions/' + name ]; - var allOf = definition.allOf; - // the refs go first - allOf.sort(function(a, b) { - if(a.$ref && b.$ref) { return 0; } - else if(a.$ref) { return -1; } - else { return 1; } - }); - for (i = 0; i < allOf.length; i++) { - property = allOf[i]; - location = '/definitions/' + name + '/allOf'; - this.resolveInline(root, spec, property, resolutionTable, unresolvedRefs, location); - } -}; - -Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { - this.spec = spec; - var root = arg1, callback = arg2, scope = arg3, opts = {}, location, i; - if(typeof arg1 === 'function') { - root = null; - callback = arg1; - scope = arg2; - } - var _root = root, modelName; - this.scope = (scope || this); - this.iteration = this.iteration || 0; - - if(this.scope.options && this.scope.options.requestInterceptor){ - opts.requestInterceptor = this.scope.options.requestInterceptor; - } - - if(this.scope.options && this.scope.options.responseInterceptor){ - opts.responseInterceptor = this.scope.options.responseInterceptor; - } - - var name, path, property, propertyName, parameter, done, counter; - var processedCalls = 0, resolvedRefs = {}, unresolvedRefs = {}; - var resolutionTable = []; // store objects for dereferencing - - spec.definitions = spec.definitions || {}; - // definitions - for (name in spec.definitions) { - var definition = spec.definitions[name]; - if(definition.$ref) { - this.resolveInline(root, spec, definition, resolutionTable, unresolvedRefs, definition); - } - else { - for (propertyName in definition.properties) { - property = definition.properties[propertyName]; - if (_.isArray(property.allOf)) { - this.processAllOf(root, name, property, resolutionTable, unresolvedRefs, spec); - } - else { - this.resolveTo(root, property, resolutionTable, '/definitions'); - } - } - - if (definition.allOf) { - this.processAllOf(root, name, definition, resolutionTable, unresolvedRefs, spec); - } - } - } - - // shared parameters - spec.parameters = spec.parameters || {}; - for(name in spec.parameters) { - parameter = spec.parameters[name]; - if (parameter.in === 'body' && parameter.schema) { - if(_.isArray(parameter.schema.allOf)) { - // move to a definition - modelName = 'inline_model'; - var _name = modelName; - done = false; counter = 0; - while(!done) { - if(typeof spec.definitions[_name] === 'undefined') { - done = true; - break; - } - _name = modelName + '_' + counter; - counter ++; - } - spec.definitions[_name] = { allOf: parameter.schema.allOf }; - delete parameter.schema.allOf; - parameter.schema.$ref = '#/definitions/' + _name; - this.processAllOf(root, _name, spec.definitions[_name], resolutionTable, unresolvedRefs, spec); - } - else { - this.resolveTo(root, parameter.schema, resolutionTable, location); - } - } - - if (parameter.$ref) { - // parameter reference - this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); - } - } - - // operations - for (name in spec.paths) { - var method, operation, responseCode; - path = spec.paths[name]; - - if(typeof path === 'object') { - for (method in path) { - // operation reference - if (method === '$ref') { - // location = path[method]; - location = '/paths' + name; - this.resolveInline(root, spec, path, resolutionTable, unresolvedRefs, location); - } - else { - operation = path[method]; - var sharedParameters = path.parameters || []; - var parameters = operation.parameters || []; - - for (i in sharedParameters) { - parameter = sharedParameters[i]; - parameters.unshift(parameter); - } - if (method !== 'parameters' && _.isObject(operation)) { - operation.parameters = operation.parameters || parameters; - } - - for (i in parameters) { - parameter = parameters[i]; - location = '/paths' + name + '/' + method + '/parameters'; - - if (parameter.in === 'body' && parameter.schema) { - if (_.isArray(parameter.schema.allOf)) { - // move to a definition - modelName = 'inline_model'; - name = modelName; - done = false; - counter = 0; - while (!done) { - if (typeof spec.definitions[name] === 'undefined') { - done = true; - break; - } - name = modelName + '_' + counter; - counter++; - } - spec.definitions[name] = {allOf: parameter.schema.allOf}; - delete parameter.schema.allOf; - parameter.schema.$ref = '#/definitions/' + name; - this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); - } - else { - this.resolveTo(root, parameter.schema, resolutionTable, location); - } - } - - if (parameter.$ref) { - // parameter reference - this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); - } - } - - for (responseCode in operation.responses) { - var response = operation.responses[responseCode]; - location = '/paths' + name + '/' + method + '/responses/' + responseCode; - - if (_.isObject(response)) { - if (response.$ref) { - // response reference - this.resolveInline(root, spec, response, resolutionTable, unresolvedRefs, location); - } - if (response.schema) { - var responseObj = response; - if (_.isArray(responseObj.schema.allOf)) { - // move to a definition - modelName = 'inline_model'; - name = modelName; - done = false; - counter = 0; - while (!done) { - if (typeof spec.definitions[name] === 'undefined') { - done = true; - break; - } - name = modelName + '_' + counter; - counter++; - } - spec.definitions[name] = {allOf: responseObj.schema.allOf}; - delete responseObj.schema.allOf; - delete responseObj.schema.type; - responseObj.schema.$ref = '#/definitions/' + name; - this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); - } - else if ('array' === responseObj.schema.type) { - if (responseObj.schema.items && responseObj.schema.items.$ref) { - // response reference - this.resolveInline(root, spec, responseObj.schema.items, resolutionTable, unresolvedRefs, location); - } - } - else { - this.resolveTo(root, response.schema, resolutionTable, location); - } - } - } - } - } - } - // clear them out to avoid multiple resolutions - path.parameters = []; - } - } - - var expectedCalls = 0, toResolve = []; - // if the root is same as obj[i].root we can resolve locally - var all = resolutionTable; - - var parts; - for(i = 0; i < all.length; i++) { - var a = all[i]; - if(root === a.root) { - if(a.resolveAs === 'ref') { - // resolve any path walking - var joined = ((a.root || '') + '/' + a.key).split('/'); - var normalized = []; - var url = ''; - var k; - - if(a.key.indexOf('../') >= 0) { - for(var j = 0; j < joined.length; j++) { - if(joined[j] === '..') { - normalized = normalized.slice(0, normalized.length-1); - } - else { - normalized.push(joined[j]); - } - } - for(k = 0; k < normalized.length; k ++) { - if(k > 0) { - url += '/'; - } - url += normalized[k]; - } - // we now have to remote resolve this because the path has changed - a.root = url; - toResolve.push(a); - } - else { - parts = a.key.split('#'); - if(parts.length === 2) { - if(parts[0].indexOf('http:') === 0 || parts[0].indexOf('https:') === 0) { - a.root = parts[0]; - } - location = parts[1].split('/'); - var r; - var s = spec; - for(k = 0; k < location.length; k++) { - var part = location[k]; - if(part !== '') { - s = s[part]; - if(typeof s !== 'undefined') { - r = s; - } - else { - r = null; - break; - } - } - } - if(r === null) { - // must resolve this too - toResolve.push(a); - } - } - } - } - else { - if (a.resolveAs === 'inline') { - if(a.key && a.key.indexOf('#') === -1 && a.key.charAt(0) !== '/') { - // handle relative schema - parts = a.root.split('/'); - location = ''; - for(i = 0; i < parts.length - 1; i++) { - location += parts[i] + '/'; - } - location += a.key; - a.root = location; - a.location = ''; - } - toResolve.push(a); - } - } - } - else { - toResolve.push(a); - } - } - expectedCalls = toResolve.length; - - // resolve anything that is local - - var lock = {}; - for(var ii = 0; ii < toResolve.length; ii++) { - (function(item, spec, self, lock, ii) { - if(!item.root || item.root === root) { - // local resolve - self.resolveItem(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, item); - processedCalls += 1; - - if(processedCalls === expectedCalls) { - self.finish(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, true); - } - } - else if(self.failedUrls.indexOf(item.root) === -1) { - var obj = { - useJQuery: false, // TODO - url: item.root, - method: 'get', - headers: { - accept: self.scope.swaggerRequestHeaders || 'application/json' - }, - on: { - error: function (error) { - processedCalls += 1; - console.log('failed url: ' + obj.url); - self.failedUrls.push(obj.url); - if (lock) { - delete lock[item.root]; - } - unresolvedRefs[item.key] = { - root: item.root, - location: item.location - }; - - if (processedCalls === expectedCalls) { - self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } - }, // jshint ignore:line - response: function (response) { - var swagger = response.obj; - if (lock) { - delete lock[item.root]; - } - if (self.resolverCache) { - self.resolverCache[item.root] = swagger; - } - self.resolveItem(swagger, item.root, resolutionTable, resolvedRefs, unresolvedRefs, item); - processedCalls += 1; - - if (processedCalls === expectedCalls) { - self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } - } - } // jshint ignore:line - }; - - // apply timeout only when specified - if (scope && scope.fetchSpecTimeout) { - obj.timeout = scope.fetchSpecTimeout; - } - - if (scope && scope.clientAuthorizations) { - scope.clientAuthorizations.apply(obj); - } - - (function waitForUnlock() { - setTimeout(function() { - if (lock[obj.url]) { - waitForUnlock(); - } - else { - var cached = self.resolverCache[obj.url]; - if (_.isObject(cached)) { - obj.on.response({obj: cached}); - } - else { - lock[obj.url] = true; - new SwaggerHttp().execute(obj, opts); - } - } - }, 0); - })(); - } - - else { - processedCalls += 1; - unresolvedRefs[item.key] = { - root: item.root, - location: item.location - }; - if (processedCalls === expectedCalls) { - self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } - } - }(toResolve[ii], spec, this, lock, ii)); - } - - if (Object.keys(toResolve).length === 0) { - this.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); - } -}; - -Resolver.prototype.resolveItem = function(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, item) { - var path = item.location; - var location = spec, parts = path.split('/'); - if(path !== '') { - for (var j = 0; j < parts.length; j++) { - var segment = parts[j]; - if (segment.indexOf('~1') !== -1) { - segment = parts[j].replace(/~0/g, '~').replace(/~1/g, '/'); - if (segment.charAt(0) !== '/') { - segment = '/' + segment; - } - } - if (typeof location === 'undefined' || location === null) { - break; - } - if (segment === '' && j === (parts.length - 1) && parts.length > 1) { - location = null; - break; - } - if (segment.length > 0) { - location = location[segment]; - } - } - } - var resolved = item.key; - parts = item.key.split('/'); - var resolvedName = parts[parts.length-1]; - - if(resolvedName.indexOf('#') >= 0) { - resolvedName = resolvedName.split('#')[1]; - } - - if (location !== null && typeof location !== 'undefined') { - resolvedRefs[resolved] = { - name: resolvedName, - obj: location, - key: item.key, - root: item.root - }; - } else { - unresolvedRefs[resolved] = { - root: item.root, - location: item.location - }; - } -}; - -Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, localResolve) { - // walk resolution table and replace with resolved refs - var ref, abs; - for (ref in resolutionTable) { - var item = resolutionTable[ref]; - - var key = item.key; - var resolvedTo = resolvedRefs[key]; - if (resolvedTo) { - spec.definitions = spec.definitions || {}; - if (item.resolveAs === 'ref') { - if (localResolve !== true) { - // don't retain root for local definitions - for (key in resolvedTo.obj) { - abs = this.retainRoot(key, resolvedTo.obj[key], item.root); - resolvedTo.obj[key] = abs; - } - } - spec.definitions[resolvedTo.name] = resolvedTo.obj; - item.obj.$ref = '#/definitions/' + resolvedTo.name; - } else if (item.resolveAs === 'inline') { - var targetObj = item.obj; - targetObj['x-resolved-from'] = [ item.key ]; - delete targetObj.$ref; - - for (key in resolvedTo.obj) { - abs = resolvedTo.obj[key]; - - if (localResolve !== true) { - // don't retain root for local definitions - abs = this.retainRoot(key, resolvedTo.obj[key], item.root); - } - targetObj[key] = abs; - } - } - } - } - var existingUnresolved = this.countUnresolvedRefs(spec); - - if(existingUnresolved === 0 || this.iteration > 5) { - this.resolveAllOf(spec.definitions); - this.resolverCache = null; - callback.call(this.scope, spec, unresolvedRefs); - } - else { - this.iteration += 1; - this.resolve(spec, root, callback, this.scope); - } -}; - -Resolver.prototype.countUnresolvedRefs = function(spec) { - var i; - var refs = this.getRefs(spec); - var keys = []; - var unresolvedKeys = []; - for(i in refs) { - if(i.indexOf('#') === 0) { - keys.push(i.substring(1)); - } - else { - unresolvedKeys.push(i); - } - } - - // verify possible keys - for (i = 0; i < keys.length; i++) { - var part = keys[i]; - var parts = part.split('/'); - var obj = spec; - - for (var k = 0; k < parts.length; k++) { - var key = parts[k]; - if(key !== '') { - obj = obj[key]; - if(typeof obj === 'undefined') { - unresolvedKeys.push(part); - break; - } - } - } - } - return unresolvedKeys.length; -}; - -Resolver.prototype.getRefs = function(spec, obj) { - obj = obj || spec; - var output = {}; - for(var key in obj) { - if (!obj.hasOwnProperty(key)) { - continue; - } - var item = obj[key]; - if(key === '$ref' && typeof item === 'string') { - output[item] = null; - } - else if(_.isObject(item)) { - var o = this.getRefs(item); - for(var k in o) { - output[k] = null; - } - } - } - return output; -}; - -function splitUrl(url) { - var result = {}; - var proto = /[a-z]+:\/\//i.exec(url); - if (proto) { - result.proto = proto[0].slice(0, -3); - url = url.slice(result.proto.length + 1); - } - if (url.slice(0, 2) === '//') { - result.domain = url.slice(2).split('/')[0]; - url = url.slice(2 + result.domain.length); - } - var p = url.split('#'); - if (p[0].length) { - result.path = p[0]; - } - if (p.length > 1) { - result.fragment = p.slice(1).join('#'); - } - return result; -} - -function unsplitUrl(url) { - var result = url.path; - if (result === undefined) { - result = ''; - } - if (url.fragment !== undefined) { - result += '#' + url.fragment; - } - if (url.domain !== undefined) { - if (result.slice(0, 1) === '/') { - result = result.slice(1); - } - result = '//' + url.domain + '/' + result; - if (url.proto !== undefined) { - result = url.proto + ':' + result; - } - } - return result; -} - -function joinUrl(base, rel) { - var relsp = splitUrl(rel); - if (relsp.domain !== undefined) { - return rel; - } - var result = splitUrl(base); - if (relsp.path === undefined) { - // change only fragment part - result.fragment = relsp.fragment; - } else if (relsp.path.slice(0, 1) === '/') { - // relative to domain - result.path = relsp.path; - result.fragment = relsp.fragment; - } else { - // relative to path - var path = result.path === undefined ? [] : result.path.split('/'); - var relpath = relsp.path.split('/'); - if (path.length) { - path.pop(); - } - while (relpath[0] === '..' || relpath[0] === '.') { - if (relpath[0] === '..') { - path.pop(); - } - relpath.shift(); - } - result.path = path.concat(relpath).join('/'); - result.fragment = relsp.fragment; - } - return unsplitUrl(result); -} - -Resolver.prototype.retainRoot = function(origKey, obj, root) { - // walk object and look for relative $refs - if(_.isObject(obj)) { - for(var key in obj) { - var item = obj[key]; - if (key === '$ref' && typeof item === 'string') { - obj[key] = joinUrl(root, item); - } - else if (_.isObject(item)) { - this.retainRoot(key, item, root); - } - } - } - else if(_.isString(obj) && origKey === '$ref') { - obj = joinUrl(root, obj); - } - return obj; -}; - -/** - * immediately in-lines local refs, queues remote refs - * for inline resolution - */ -Resolver.prototype.resolveInline = function (root, spec, property, resolutionTable, unresolvedRefs, location) { - var key = property.$ref, ref = property.$ref, i, p, p2, rs; - var rootTrimmed = false; - - root = root || ''; // Guard against .split. @fehguy, you'll need to check if this logic fits - // More imporantly is how do we gracefully handle relative urls, when provided just a 'spec', not a 'url' ? - - if (ref) { - if(ref.indexOf('../') === 0) { - // reset root - p = ref.split('../'); - p2 = root.split('/'); - ref = ''; - for(i = 0; i < p.length; i++) { - if(p[i] === '') { - p2 = p2.slice(0, p2.length-1); - } - else { - ref += p[i]; - } - } - root = ''; - for(i = 0; i < p2.length - 1; i++) { - if(i > 0) { root += '/'; } - root += p2[i]; - } - rootTrimmed = true; - } - if(ref.indexOf('#') >= 0) { - if(ref.indexOf('/') === 0) { - rs = ref.split('#'); - p = root.split('//'); - p2 = p[1].split('/'); - root = p[0] + '//' + p2[0] + rs[0]; - location = rs[1]; - } - else { - rs = ref.split('#'); - if(rs[0] !== '') { - p2 = root.split('/'); - p2 = p2.slice(0, p2.length - 1); - if(!rootTrimmed) { - root = ''; - for (var k = 0; k < p2.length; k++) { - if(k > 0) { root += '/'; } - root += p2[k]; - } - } - root += '/' + ref.split('#')[0]; - } - location = rs[1]; - } - } - if (ref.indexOf('http:') === 0 || ref.indexOf('https:') === 0) { - if(ref.indexOf('#') >= 0) { - root = ref.split('#')[0]; - location = ref.split('#')[1]; - } - else { - root = ref; - location = ''; - } - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } else if (ref.indexOf('#') === 0) { - location = ref.split('#')[1]; - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } else if (ref.indexOf('/') === 0 && ref.indexOf('#') === -1) { - location = ref; - var matches = root.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i); - if(matches) { - root = matches[0] + ref.substring(1); - location = ''; - } - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } - else { - resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); - } - } - else if (property.type === 'array') { - this.resolveTo(root, property.items, resolutionTable, location); - } -}; - -Resolver.prototype.resolveTo = function (root, property, resolutionTable, location) { - var sp, i; - var ref = property.$ref; - var lroot = root; - if ((typeof ref !== 'undefined') && (ref !== null)) { - if(ref.indexOf('#') >= 0) { - var parts = ref.split('#'); - - // #/definitions/foo - // foo.json#/bar - if(parts[0] && ref.indexOf('/') === 0) { - - } - else if(parts[0] && (parts[0].indexOf('http:') === 0 || parts[0].indexOf('https:') === 0)) { - lroot = parts[0]; - ref = parts[1]; - } - else if(parts[0] && parts[0].length > 0) { - // relative file - sp = root.split('/'); - lroot = ''; - for(i = 0; i < sp.length - 1; i++) { - lroot += sp[i] + '/'; - } - lroot += parts[0]; - } - else { - - } - - location = parts[1]; - } - else if (ref.indexOf('http:') === 0 || ref.indexOf('https:') === 0) { - lroot = ref; - location = ''; - } - else { - // relative file - sp = root.split('/'); - lroot = ''; - for(i = 0; i < sp.length - 1; i++) { - lroot += sp[i] + '/'; - } - lroot += ref; - location = ''; - } - resolutionTable.push({ - obj: property, resolveAs: 'ref', root: lroot, key: ref, location: location - }); - } else if (property.type === 'array') { - var items = property.items; - this.resolveTo(root, items, resolutionTable, location); - } else { - if(property && (property.properties || property.additionalProperties)) { - var name = this.uniqueName('inline_model'); - if (property.title) { - name = this.uniqueName(property.title); - } - delete property.title; - this.spec.definitions[name] = _.cloneDeep(property); - property.$ref = '#/definitions/' + name; - delete property.type; - delete property.properties; - } - } -}; - -Resolver.prototype.uniqueName = function(base) { - var name = base; - var count = 0; - while(true) { - if(!_.isObject(this.spec.definitions[name])) { - return name; - } - name = base + '_' + count; - count++; - } -}; - -Resolver.prototype.resolveAllOf = function(spec, obj, depth) { - depth = depth || 0; - obj = obj || spec; - var name; - for(var key in obj) { - if (!obj.hasOwnProperty(key)) { - continue; - } - var item = obj[key]; - if(item === null) { - throw new TypeError('Swagger 2.0 does not support null types (' + obj + '). See https://github.com/swagger-api/swagger-spec/issues/229.'); - } - if(typeof item === 'object') { - this.resolveAllOf(spec, item, depth + 1); - } - if(item && typeof item.allOf !== 'undefined') { - var allOf = item.allOf; - if(_.isArray(allOf)) { - var output = _.cloneDeep(item); - delete output.allOf; - - output['x-composed'] = true; - if (typeof item['x-resolved-from'] !== 'undefined') { - output['x-resolved-from'] = item['x-resolved-from']; - } - - for(var i = 0; i < allOf.length; i++) { - var component = allOf[i]; - var source = 'self'; - if(typeof component['x-resolved-from'] !== 'undefined') { - source = component['x-resolved-from'][0]; - } - - for(var part in component) { - if(!output.hasOwnProperty(part)) { - output[part] = _.cloneDeep(component[part]); - if(part === 'properties') { - for(name in output[part]) { - output[part][name]['x-resolved-from'] = source; - } - } - } - else { - if(part === 'properties') { - var properties = component[part]; - for(name in properties) { - output.properties[name] = _.cloneDeep(properties[name]); - var resolvedFrom = properties[name]['x-resolved-from']; - if (typeof resolvedFrom === 'undefined' || resolvedFrom === 'self') { - resolvedFrom = source; - } - output.properties[name]['x-resolved-from'] = resolvedFrom; - } - } - else if(part === 'required') { - // merge & dedup the required array - var a = output.required.concat(component[part]); - for(var k = 0; k < a.length; ++k) { - for(var j = k + 1; j < a.length; ++j) { - if(a[k] === a[j]) { a.splice(j--, 1); } - } - } - output.required = a; - } - else if(part === 'x-resolved-from') { - output['x-resolved-from'].push(source); - } - else { - // TODO: need to merge this property - // console.log('what to do with ' + part) - } - } - } - } - obj[key] = output; - } - } - } -}; - -},{"./http":5,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isString":146}],7:[function(require,module,exports){ -'use strict'; - -var Helpers = require('./helpers'); - -var _ = { - isPlainObject: require('lodash-compat/lang/isPlainObject'), - isUndefined: require('lodash-compat/lang/isUndefined'), - isArray: require('lodash-compat/lang/isArray'), - isObject: require('lodash-compat/lang/isObject'), - isEmpty: require('lodash-compat/lang/isEmpty'), - map: require('lodash-compat/collection/map'), - indexOf: require('lodash-compat/array/indexOf'), - cloneDeep: require('lodash-compat/lang/cloneDeep'), - keys: require('lodash-compat/object/keys'), - forEach: require('lodash-compat/collection/forEach') -}; - -var optionHtml = module.exports.optionHtml = function (label, value) { - return '' + label + ':' + value + ''; -}; - -module.exports.typeFromJsonSchema = function (type, format) { - var str; - - if (type === 'integer' && format === 'int32') { - str = 'integer'; - } else if (type === 'integer' && format === 'int64') { - str = 'long'; - } else if (type === 'integer' && typeof format === 'undefined') { - str = 'long'; - } else if (type === 'string' && format === 'date-time') { - str = 'date-time'; - } else if (type === 'string' && format === 'date') { - str = 'date'; - } else if (type === 'number' && format === 'float') { - str = 'float'; - } else if (type === 'number' && format === 'double') { - str = 'double'; - } else if (type === 'number' && typeof format === 'undefined') { - str = 'double'; - } else if (type === 'boolean') { - str = 'boolean'; - } else if (type === 'string') { - str = 'string'; - } - - return str; -}; - -var getStringSignature = module.exports.getStringSignature = function (obj, baseComponent) { - var str = ''; - - if (typeof obj.$ref !== 'undefined') { - str += Helpers.simpleRef(obj.$ref); - } else if (typeof obj.type === 'undefined') { - str += 'object'; - } else if (obj.type === 'array') { - if (baseComponent) { - str += getStringSignature((obj.items || obj.$ref || {})); - } else { - str += 'Array['; - str += getStringSignature((obj.items || obj.$ref || {})); - str += ']'; - } - } else if (obj.type === 'integer' && obj.format === 'int32') { - str += 'integer'; - } else if (obj.type === 'integer' && obj.format === 'int64') { - str += 'long'; - } else if (obj.type === 'integer' && typeof obj.format === 'undefined') { - str += 'long'; - } else if (obj.type === 'string' && obj.format === 'date-time') { - str += 'date-time'; - } else if (obj.type === 'string' && obj.format === 'date') { - str += 'date'; - } else if (obj.type === 'string' && typeof obj.format === 'undefined') { - str += 'string'; - } else if (obj.type === 'number' && obj.format === 'float') { - str += 'float'; - } else if (obj.type === 'number' && obj.format === 'double') { - str += 'double'; - } else if (obj.type === 'number' && typeof obj.format === 'undefined') { - str += 'double'; - } else if (obj.type === 'boolean') { - str += 'boolean'; - } else if (obj.$ref) { - str += Helpers.simpleRef(obj.$ref); - } else { - str += obj.type; - } - - return str; -}; - -var schemaToJSON = module.exports.schemaToJSON = function (schema, models, modelsToIgnore, modelPropertyMacro) { - // Resolve the schema (Handle nested schemas) - schema = Helpers.resolveSchema(schema); - - if(typeof modelPropertyMacro !== 'function') { - modelPropertyMacro = function(prop){ - return (prop || {}).default; - }; - } - - modelsToIgnore= modelsToIgnore || {}; - - var type = schema.type || 'object'; - var format = schema.format; - var model; - var output; - - if (!_.isUndefined(schema.example)) { - output = schema.example; - } else if (_.isUndefined(schema.items) && _.isArray(schema.enum)) { - output = schema.enum[0]; - } - - if (_.isUndefined(output)) { - if (schema.$ref) { - model = models[Helpers.simpleRef(schema.$ref)]; - - if (!_.isUndefined(model)) { - if (_.isUndefined(modelsToIgnore[model.name])) { - modelsToIgnore[model.name] = model; - output = schemaToJSON(model.definition, models, modelsToIgnore, modelPropertyMacro); - delete modelsToIgnore[model.name]; - } else { - if (model.type === 'array') { - output = []; - } else { - output = {}; - } - } - } - } else if (!_.isUndefined(schema.default)) { - output = schema.default; - } else if (type === 'string') { - if (format === 'date-time') { - output = new Date().toISOString(); - } else if (format === 'date') { - output = new Date().toISOString().split('T')[0]; - } else { - output = 'string'; - } - } else if (type === 'integer') { - output = 0; - } else if (type === 'number') { - output = 0.0; - } else if (type === 'boolean') { - output = true; - } else if (type === 'object') { - output = {}; - - _.forEach(schema.properties, function (property, name) { - var cProperty = _.cloneDeep(property); - - // Allow macro to set the default value - cProperty.default = modelPropertyMacro(property); - - output[name] = schemaToJSON(cProperty, models, modelsToIgnore, modelPropertyMacro); - }); - } else if (type === 'array') { - output = []; - - if (_.isArray(schema.items)) { - _.forEach(schema.items, function (item) { - output.push(schemaToJSON(item, models, modelsToIgnore, modelPropertyMacro)); - }); - } else if (_.isPlainObject(schema.items)) { - output.push(schemaToJSON(schema.items, models, modelsToIgnore, modelPropertyMacro)); - } else if (_.isUndefined(schema.items)) { - output.push({}); - } else { - Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process'); - } - } - } - - return output; -}; - -module.exports.schemaToHTML =function (name, schema, models, modelPropertyMacro) { - var strongOpen = ''; - var strongClose = ''; - - // Allow for ignoring the 'name' argument.... shifting the rest - if(_.isObject(arguments[0])) { - name = void 0; - schema = arguments[0]; - models = arguments[1]; - modelPropertyMacro = arguments[2]; - } - - models = models || {}; - - // Resolve the schema (Handle nested schemas) - schema = Helpers.resolveSchema(schema); - - // Return for empty object - if(_.isEmpty(schema)) { - return strongOpen + 'Empty' + strongClose; - } - - // Dereference $ref from 'models' - if(typeof schema.$ref === 'string') { - name = Helpers.simpleRef(schema.$ref); - schema = models[name]; - if(typeof schema === 'undefined') - { - return strongOpen + name + ' is not defined!' + strongClose; - } - } - - if(typeof name !== 'string') { - name = schema.title || 'Inline Model'; - } - - // If we are a Model object... adjust accordingly - if(schema.definition) { - schema = schema.definition; - } - - if(typeof modelPropertyMacro !== 'function') { - modelPropertyMacro = function(prop){ - return (prop || {}).default; - }; - } - - var references = {}; - var seenModels = []; - var inlineModels = 0; - - - - // Generate current HTML - var html = processModel(schema, name); - - // Generate references HTML - while (_.keys(references).length > 0) { - /* jshint ignore:start */ - _.forEach(references, function (schema, name) { - var seenModel = _.indexOf(seenModels, name) > -1; - - delete references[name]; - - if (!seenModel) { - seenModels.push(name); - - html += '
      ' + processModel(schema, name); - } - }); - /* jshint ignore:end */ - } - - return html; - - ///////////////////////////////// - - function addReference(schema, name, skipRef) { - var modelName = name; - var model; - - if (schema.$ref) { - modelName = schema.title || Helpers.simpleRef(schema.$ref); - model = models[modelName]; - } else if (_.isUndefined(name)) { - modelName = schema.title || 'Inline Model ' + (++inlineModels); - model = {definition: schema}; - } - - if (skipRef !== true) { - references[modelName] = _.isUndefined(model) ? {} : model.definition; - } - - return modelName; - } - - function primitiveToHTML(schema) { - var html = ''; - var type = schema.type || 'object'; - - if (schema.$ref) { - html += addReference(schema, Helpers.simpleRef(schema.$ref)); - } else if (type === 'object') { - if (!_.isUndefined(schema.properties)) { - html += addReference(schema); - } else { - html += 'object'; - } - } else if (type === 'array') { - html += 'Array['; - - if (_.isArray(schema.items)) { - html += _.map(schema.items, addReference).join(','); - } else if (_.isPlainObject(schema.items)) { - if (_.isUndefined(schema.items.$ref)) { - if (!_.isUndefined(schema.items.type) && _.indexOf(['array', 'object'], schema.items.type) === -1) { - html += schema.items.type; - } else { - html += addReference(schema.items); - } - } else { - html += addReference(schema.items, Helpers.simpleRef(schema.items.$ref)); - } - } else { - Helpers.log('Array type\'s \'items\' schema is not an array or an object, cannot process'); - html += 'object'; - } - - html += ']'; - } else { - html += schema.type; - } - - html += ''; - - return html; - } - - function primitiveToOptionsHTML(schema, html) { - var options = ''; - var type = schema.type || 'object'; - var isArray = type === 'array'; - - if (isArray) { - if (_.isPlainObject(schema.items) && !_.isUndefined(schema.items.type)) { - type = schema.items.type; - } else { - type = 'object'; - } - } - - if (!_.isUndefined(schema.default)) { - options += optionHtml('Default', schema.default); - } - - switch (type) { - case 'string': - if (schema.minLength) { - options += optionHtml('Min. Length', schema.minLength); - } - - if (schema.maxLength) { - options += optionHtml('Max. Length', schema.maxLength); - } - - if (schema.pattern) { - options += optionHtml('Reg. Exp.', schema.pattern); - } - break; - case 'integer': - case 'number': - if (schema.minimum) { - options += optionHtml('Min. Value', schema.minimum); - } - - if (schema.exclusiveMinimum) { - options += optionHtml('Exclusive Min.', 'true'); - } - - if (schema.maximum) { - options += optionHtml('Max. Value', schema.maximum); - } - - if (schema.exclusiveMaximum) { - options += optionHtml('Exclusive Max.', 'true'); - } - - if (schema.multipleOf) { - options += optionHtml('Multiple Of', schema.multipleOf); - } - - break; - } - - if (isArray) { - if (schema.minItems) { - options += optionHtml('Min. Items', schema.minItems); - } - - if (schema.maxItems) { - options += optionHtml('Max. Items', schema.maxItems); - } - - if (schema.uniqueItems) { - options += optionHtml('Unique Items', 'true'); - } - - if (schema.collectionFormat) { - options += optionHtml('Coll. Format', schema.collectionFormat); - } - } - - if (_.isUndefined(schema.items)) { - if (_.isArray(schema.enum)) { - var enumString; - - if (type === 'number' || type === 'integer') { - enumString = schema.enum.join(', '); - } else { - enumString = '"' + schema.enum.join('", "') + '"'; - } - - options += optionHtml('Enum', enumString); - } - } - - if (options.length > 0) { - html = '' + html + '' + options + '
      ' + type + '
      '; - } - - return html; - } - - function processModel(schema, name) { - var type = schema.type || 'object'; - var isArray = schema.type === 'array'; - var html = strongOpen + name + ' ' + (isArray ? '[' : '{') + strongClose; - - if (name) { - seenModels.push(name); - } - - if (isArray) { - if (_.isArray(schema.items)) { - html += '
      ' + _.map(schema.items, function (item) { - var type = item.type || 'object'; - - if (_.isUndefined(item.$ref)) { - if (_.indexOf(['array', 'object'], type) > -1) { - if (type === 'object' && _.isUndefined(item.properties)) { - return 'object'; - } else { - return addReference(item); - } - } else { - return primitiveToOptionsHTML(item, type); - } - } else { - return addReference(item, Helpers.simpleRef(item.$ref)); - } - }).join(',
      '); - } else if (_.isPlainObject(schema.items)) { - if (_.isUndefined(schema.items.$ref)) { - if (_.indexOf(['array', 'object'], schema.items.type || 'object') > -1) { - if ((_.isUndefined(schema.items.type) || schema.items.type === 'object') && _.isUndefined(schema.items.properties)) { - html += '
      object
      '; - } else { - html += '
      ' + addReference(schema.items) + '
      '; - } - } else { - html += '
      ' + primitiveToOptionsHTML(schema.items, schema.items.type) + '
      '; - } - } else { - html += '
      ' + addReference(schema.items, Helpers.simpleRef(schema.items.$ref)) + '
      '; - } - } else { - Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process'); - html += '
      object
      '; - } - } else { - if (schema.$ref) { - html += '
      ' + addReference(schema, name) + '
      '; - } else if (type === 'object') { - if (_.isPlainObject(schema.properties)) { - var contents = _.map(schema.properties, function (property, name) { - var propertyIsRequired = (_.indexOf(schema.required, name) >= 0); - var cProperty = _.cloneDeep(property); - - var requiredClass = propertyIsRequired ? 'required' : ''; - var html = '' + name + ' ('; - var model; - var propDescription; - - // Allow macro to set the default value - cProperty.default = modelPropertyMacro(cProperty); - - // Resolve the schema (Handle nested schemas) - cProperty = Helpers.resolveSchema(cProperty); - - propDescription = property.description || cProperty.description; - - // We need to handle property references to primitives (Issue 339) - if (!_.isUndefined(cProperty.$ref)) { - model = models[Helpers.simpleRef(cProperty.$ref)]; - - if (!_.isUndefined(model) && _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) { - // Use referenced schema - cProperty = Helpers.resolveSchema(model.definition); - } - } - - html += primitiveToHTML(cProperty); - - if(!propertyIsRequired) { - html += ', optional'; - } - - if(property.readOnly) { - html += ', read only'; - } - - html += ')'; - - if (!_.isUndefined(propDescription)) { - html += ': ' + '' + propDescription + ''; - } - - if (cProperty.enum) { - html += ' = [\'' + cProperty.enum.join('\', \'') + '\']'; - } - - return '' + primitiveToOptionsHTML(cProperty, html); - }).join(',
      '); - - if (contents) { - html += contents + '
      '; - } - } - } else { - html += '
      ' + primitiveToOptionsHTML(schema, type) + '
      '; - } - } - - return html + strongOpen + (isArray ? ']' : '}') + strongClose; - } -}; -},{"./helpers":4,"lodash-compat/array/indexOf":49,"lodash-compat/collection/forEach":54,"lodash-compat/collection/map":56,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"lodash-compat/object/keys":149}],8:[function(require,module,exports){ -'use strict'; - -var SwaggerHttp = require('./http'); -var _ = { - isObject: require('lodash-compat/lang/isObject') -}; - -var SwaggerSpecConverter = module.exports = function () { - this.errors = []; - this.warnings = []; - this.modelMap = {}; -}; - -SwaggerSpecConverter.prototype.setDocumentationLocation = function (location) { - this.docLocation = location; -}; - -/** - * converts a resource listing OR api declaration - **/ -SwaggerSpecConverter.prototype.convert = function (obj, clientAuthorizations, opts, callback) { - // not a valid spec - if(!obj || !Array.isArray(obj.apis)) { - return this.finish(callback, null); - } - this.clientAuthorizations = clientAuthorizations; - - // create a new swagger object to return - var swagger = { swagger: '2.0' }; - - swagger.originalVersion = obj.swaggerVersion; - - // add the info - this.apiInfo(obj, swagger); - - // add security definitions - this.securityDefinitions(obj, swagger); - - // take basePath into account - if (obj.basePath) { - this.setDocumentationLocation(obj.basePath); - } - - // see if this is a single-file swagger definition - var isSingleFileSwagger = false; - var i; - for(i = 0; i < obj.apis.length; i++) { - var api = obj.apis[i]; - if(Array.isArray(api.operations)) { - isSingleFileSwagger = true; - } - } - if(isSingleFileSwagger) { - this.declaration(obj, swagger); - this.finish(callback, swagger); - } - else { - this.resourceListing(obj, swagger, opts, callback); - } -}; - -SwaggerSpecConverter.prototype.declaration = function(obj, swagger) { - var name, i, p, pos; - if(!obj.apis) { - return; - } - - if (obj.basePath.indexOf('http://') === 0) { - p = obj.basePath.substring('http://'.length); - pos = p.indexOf('/'); - if (pos > 0) { - swagger.host = p.substring(0, pos); - swagger.basePath = p.substring(pos); - } - else { - swagger.host = p; - swagger.basePath = '/'; - } - } else if (obj.basePath.indexOf('https://') === 0) { - p = obj.basePath.substring('https://'.length); - pos = p.indexOf('/'); - if (pos > 0) { - swagger.host = p.substring(0, pos); - swagger.basePath = p.substring(pos); - } - else { - swagger.host = p; - swagger.basePath = '/'; - } - } else { - swagger.basePath = obj.basePath; - } - - var resourceLevelAuth; - if(obj.authorizations) { - resourceLevelAuth = obj.authorizations; - } - if(obj.consumes) { - swagger.consumes = obj.consumes; - } - if(obj.produces) { - swagger.produces = obj.produces; - } - - // build a mapping of id to name for 1.0 model resolutions - if(_.isObject(obj)) { - for(name in obj.models) { - var existingModel = obj.models[name]; - var key = (existingModel.id || name); - this.modelMap[key] = name; - } - } - - for(i = 0; i < obj.apis.length; i++) { - var api = obj.apis[i]; - var path = api.path; - var operations = api.operations; - this.operations(path, obj.resourcePath, operations, resourceLevelAuth, swagger); - } - - var models = obj.models || {}; - this.models(models, swagger); -}; - -SwaggerSpecConverter.prototype.models = function(obj, swagger) { - if(!_.isObject(obj)) { - return; - } - var name; - - swagger.definitions = swagger.definitions || {}; - for(name in obj) { - var existingModel = obj[name]; - var _required = []; - var schema = { properties: {}}; - var propertyName; - for(propertyName in existingModel.properties) { - var existingProperty = existingModel.properties[propertyName]; - var property = {}; - this.dataType(existingProperty, property); - if(existingProperty.description) { - property.description = existingProperty.description; - } - if(existingProperty['enum']) { - property['enum'] = existingProperty['enum']; - } - if(typeof existingProperty.required === 'boolean' && existingProperty.required === true) { - _required.push(propertyName); - } - if(typeof existingProperty.required === 'string' && existingProperty.required === 'true') { - _required.push(propertyName); - } - schema.properties[propertyName] = property; - } - if(_required.length > 0) { - schema.required = _required; - } else { - schema.required = existingModel.required; - } - swagger.definitions[name] = schema; - } -}; - -SwaggerSpecConverter.prototype.extractTag = function(resourcePath) { - var pathString = resourcePath || 'default'; - if(pathString.indexOf('http:') === 0 || pathString.indexOf('https:') === 0) { - pathString = pathString.split(['/']); - pathString = pathString[pathString.length -1].substring(); - } - if(pathString.endsWith('.json')) { - pathString = pathString.substring(0, pathString.length - '.json'.length); - } - return pathString.replace('/',''); -}; - -SwaggerSpecConverter.prototype.operations = function(path, resourcePath, obj, resourceLevelAuth, swagger) { - if(!Array.isArray(obj)) { - return; - } - var i; - - if(!swagger.paths) { - swagger.paths = {}; - } - - var pathObj = swagger.paths[path] || {}; - var tag = this.extractTag(resourcePath); - swagger.tags = swagger.tags || []; - var matched = false; - for(i = 0; i < swagger.tags.length; i++) { - var tagObject = swagger.tags[i]; - if(tagObject.name === tag) { - matched = true; - } - } - if(!matched) { - swagger.tags.push({name: tag}); - } - - for(i = 0; i < obj.length; i++) { - var existingOperation = obj[i]; - var method = (existingOperation.method || existingOperation.httpMethod).toLowerCase(); - var operation = {tags: [tag]}; - var existingAuthorizations = existingOperation.authorizations; - - if(existingAuthorizations && Object.keys(existingAuthorizations).length === 0) { - existingAuthorizations = resourceLevelAuth; - } - - if(typeof existingAuthorizations !== 'undefined') { - var scopesObject; - for(var key in existingAuthorizations) { - operation.security = operation.security || []; - var scopes = existingAuthorizations[key]; - if(scopes) { - var securityScopes = []; - for(var j in scopes) { - securityScopes.push(scopes[j].scope); - } - scopesObject = {}; - scopesObject[key] = securityScopes; - operation.security.push(scopesObject); - } - else { - scopesObject = {}; - scopesObject[key] = []; - operation.security.push(scopesObject); - } - } - } - - if(existingOperation.consumes) { - operation.consumes = existingOperation.consumes; - } - else if(swagger.consumes) { - operation.consumes = swagger.consumes; - } - if(existingOperation.produces) { - operation.produces = existingOperation.produces; - } - else if(swagger.produces) { - operation.produces = swagger.produces; - } - if(existingOperation.summary) { - operation.summary = existingOperation.summary; - } - if(existingOperation.notes) { - operation.description = existingOperation.notes; - } - if(existingOperation.nickname) { - operation.operationId = existingOperation.nickname; - } - if(existingOperation.deprecated) { - operation.deprecated = existingOperation.deprecated; - } - - this.authorizations(existingAuthorizations, swagger); - this.parameters(operation, existingOperation.parameters, swagger); - this.responseMessages(operation, existingOperation, swagger); - - pathObj[method] = operation; - } - - swagger.paths[path] = pathObj; -}; - -SwaggerSpecConverter.prototype.responseMessages = function(operation, existingOperation) { - if(!_.isObject(existingOperation)) { - return; - } - // build default response from the operation (1.x) - var defaultResponse = {}; - this.dataType(existingOperation, defaultResponse); - // TODO: look into the real problem of rendering responses in swagger-ui - // ....should reponseType have an implicit schema? - if(!defaultResponse.schema && defaultResponse.type) { - defaultResponse = {schema: defaultResponse}; - } - - operation.responses = operation.responses || {}; - - // grab from responseMessages (1.2) - var has200 = false; - if(Array.isArray(existingOperation.responseMessages)) { - var i; - var existingResponses = existingOperation.responseMessages; - for(i = 0; i < existingResponses.length; i++) { - var existingResponse = existingResponses[i]; - var response = { description: existingResponse.message }; - if(existingResponse.code === 200) { - has200 = true; - } - // Convert responseModel -> schema{$ref: responseModel} - if(existingResponse.responseModel) { - response.schema = {'$ref': '#/definitions/' + existingResponse.responseModel}; - } - operation.responses['' + existingResponse.code] = response; - } - } - - if(has200) { - operation.responses['default'] = defaultResponse; - } - else { - operation.responses['200'] = defaultResponse; - } -}; - -SwaggerSpecConverter.prototype.authorizations = function(obj) { - // TODO - if(!_.isObject(obj)) { - - } -}; - -SwaggerSpecConverter.prototype.parameters = function(operation, obj) { - if(!Array.isArray(obj)) { - return; - } - var i; - for(i = 0; i < obj.length; i++) { - var existingParameter = obj[i]; - var parameter = {}; - parameter.name = existingParameter.name; - parameter.description = existingParameter.description; - parameter.required = existingParameter.required; - parameter.in = existingParameter.paramType; - - // per #168 - if(parameter.in === 'body') { - parameter.name = 'body'; - } - if(parameter.in === 'form') { - parameter.in = 'formData'; - } - - if(existingParameter.enum) { - parameter.enum = existingParameter.enum; - } - - if(existingParameter.allowMultiple === true || existingParameter.allowMultiple === 'true') { - var innerType = {}; - this.dataType(existingParameter, innerType); - parameter.type = 'array'; - parameter.items = innerType; - - if(existingParameter.allowableValues) { - var av = existingParameter.allowableValues; - if(av.valueType === 'LIST') { - parameter['enum'] = av.values; - } - } - } - else { - this.dataType(existingParameter, parameter); - } - if(typeof existingParameter.defaultValue !== 'undefined') { - parameter.default = existingParameter.defaultValue; - } - - operation.parameters = operation.parameters || []; - operation.parameters.push(parameter); - } -}; - -SwaggerSpecConverter.prototype.dataType = function(source, target) { - if(!_.isObject(source)) { - return; - } - - if(source.minimum) { - target.minimum = source.minimum; - } - if(source.maximum) { - target.maximum = source.maximum; - } - if (source.format) { - target.format = source.format; - } - - // default can be 'false' - if(typeof source.defaultValue !== 'undefined') { - target.default = source.defaultValue; - } - - var jsonSchemaType = this.toJsonSchema(source); - if(jsonSchemaType) { - target = target || {}; - if(jsonSchemaType.type) { - target.type = jsonSchemaType.type; - } - if(jsonSchemaType.format) { - target.format = jsonSchemaType.format; - } - if(jsonSchemaType.$ref) { - target.schema = {$ref: jsonSchemaType.$ref}; - } - if(jsonSchemaType.items) { - target.items = jsonSchemaType.items; - } - } -}; - -SwaggerSpecConverter.prototype.toJsonSchema = function(source) { - if(!source) { - return 'object'; - } - var detectedType = (source.type || source.dataType || source.responseClass || ''); - var lcType = detectedType.toLowerCase(); - var format = (source.format || '').toLowerCase(); - - if(lcType.indexOf('list[') === 0) { - var innerType = detectedType.substring(5, detectedType.length - 1); - var jsonType = this.toJsonSchema({type: innerType}); - return {type: 'array', items: jsonType}; - } else if(lcType === 'int' || (lcType === 'integer' && format === 'int32')) { - {return {type: 'integer', format: 'int32'};} - } else if(lcType === 'long' || (lcType === 'integer' && format === 'int64')) { - {return {type: 'integer', format: 'int64'};} - } else if(lcType === 'integer') { - {return {type: 'integer', format: 'int64'};} - } else if(lcType === 'float' || (lcType === 'number' && format === 'float')) { - {return {type: 'number', format: 'float'};} - } else if(lcType === 'double' || (lcType === 'number' && format === 'double')) { - {return {type: 'number', format: 'double'};} - } else if((lcType === 'string' && format === 'date-time') || (lcType === 'date')) { - {return {type: 'string', format: 'date-time'};} - } else if(lcType === 'string') { - {return {type: 'string'};} - } else if(lcType === 'file') { - {return {type: 'file'};} - } else if(lcType === 'boolean') { - {return {type: 'boolean'};} - } else if(lcType === 'boolean') { - {return {type: 'boolean'};} - } else if(lcType === 'array' || lcType === 'list') { - if(source.items) { - var it = this.toJsonSchema(source.items); - return {type: 'array', items: it}; - } - else { - return {type: 'array', items: {type: 'object'}}; - } - } else if(source.$ref) { - return {$ref: this.modelMap[source.$ref] ? '#/definitions/' + this.modelMap[source.$ref] : source.$ref}; - } else if(lcType === 'void' || lcType === '') { - {return {};} - } else if (this.modelMap[source.type]) { - // If this a model using `type` instead of `$ref`, that's fine. - return {$ref: '#/definitions/' + this.modelMap[source.type]}; - } else { - // Unknown model type or 'object', pass it along. - return {type: source.type}; - } -}; - -SwaggerSpecConverter.prototype.resourceListing = function(obj, swagger, opts, callback) { - var i; - var processedCount = 0; // jshint ignore:line - var self = this; // jshint ignore:line - var expectedCount = obj.apis.length; - var _swagger = swagger; // jshint ignore:line - var _opts = {}; - - if(opts && opts.requestInterceptor){ - _opts.requestInterceptor = opts.requestInterceptor; - } - - if(opts && opts.responseInterceptor){ - _opts.responseInterceptor = opts.responseInterceptor; - } - - var swaggerRequestHeaders = 'application/json'; - - if(opts && opts.swaggerRequestHeaders) { - swaggerRequestHeaders = opts.swaggerRequestHeaders; - } - - if(expectedCount === 0) { - this.finish(callback, swagger); - } - - for(i = 0; i < expectedCount; i++) { - var api = obj.apis[i]; - var path = api.path; - var absolutePath = this.getAbsolutePath(obj.swaggerVersion, this.docLocation, path); - - if(api.description) { - swagger.tags = swagger.tags || []; - swagger.tags.push({ - name : this.extractTag(api.path), - description : api.description || '' - }); - } - var http = { - url: absolutePath, - headers: { accept: swaggerRequestHeaders }, - on: {}, - method: 'get', - timeout: opts.timeout - }; - /* jshint ignore:start */ - http.on.response = function(data) { - processedCount += 1; - var obj = data.obj; - if(obj) { - self.declaration(obj, _swagger); - } - if(processedCount === expectedCount) { - self.finish(callback, _swagger); - } - }; - http.on.error = function(data) { - console.error(data); - processedCount += 1; - if(processedCount === expectedCount) { - self.finish(callback, _swagger); - } - }; - /* jshint ignore:end */ - - if(this.clientAuthorizations && typeof this.clientAuthorizations.apply === 'function') { - this.clientAuthorizations.apply(http); - } - - new SwaggerHttp().execute(http, _opts); - } -}; - -SwaggerSpecConverter.prototype.getAbsolutePath = function(version, docLocation, path) { - if(version === '1.0') { - if(docLocation.endsWith('.json')) { - // get root path - var pos = docLocation.lastIndexOf('/'); - if(pos > 0) { - docLocation = docLocation.substring(0, pos); - } - } - } - - var location = docLocation; - if(path.indexOf('http:') === 0 || path.indexOf('https:') === 0) { - location = path; - } - else { - if(docLocation.endsWith('/')) { - location = docLocation.substring(0, docLocation.length - 1); - } - location += path; - } - location = location.replace('{format}', 'json'); - return location; -}; - -SwaggerSpecConverter.prototype.securityDefinitions = function(obj, swagger) { - if(obj.authorizations) { - var name; - for(name in obj.authorizations) { - var isValid = false; - var securityDefinition = { - vendorExtensions: {} - }; - var definition = obj.authorizations[name]; - if(definition.type === 'apiKey') { - securityDefinition.type = 'apiKey'; - securityDefinition.in = definition.passAs; - securityDefinition.name = definition.keyname || name; - isValid = true; - } - else if(definition.type === 'basicAuth') { - securityDefinition.type = 'basicAuth'; - isValid = true; - } - else if(definition.type === 'oauth2') { - var existingScopes = definition.scopes || []; - var scopes = {}; - var i; - for(i in existingScopes) { - var scope = existingScopes[i]; - scopes[scope.scope] = scope.description; - } - securityDefinition.type = 'oauth2'; - if(i > 0) { - securityDefinition.scopes = scopes; - } - if(definition.grantTypes) { - if(definition.grantTypes.implicit) { - var implicit = definition.grantTypes.implicit; - securityDefinition.flow = 'implicit'; - securityDefinition.authorizationUrl = implicit.loginEndpoint; - isValid = true; - } - /* jshint ignore:start */ - if(definition.grantTypes['authorization_code']) { - if(!securityDefinition.flow) { - // cannot set if flow is already defined - var authCode = definition.grantTypes['authorization_code']; - securityDefinition.flow = 'accessCode'; - securityDefinition.authorizationUrl = authCode.tokenRequestEndpoint.url; - securityDefinition.tokenUrl = authCode.tokenEndpoint.url; - isValid = true; - } - } - /* jshint ignore:end */ - } - } - if(isValid) { - swagger.securityDefinitions = swagger.securityDefinitions || {}; - swagger.securityDefinitions[name] = securityDefinition; - } - } - } -}; - -SwaggerSpecConverter.prototype.apiInfo = function(obj, swagger) { - // info section - if(obj.info) { - var info = obj.info; - swagger.info = {}; - - if(info.contact) { - swagger.info.contact = {}; - swagger.info.contact.email = info.contact; - } - if(info.description) { - swagger.info.description = info.description; - } - if(info.title) { - swagger.info.title = info.title; - } - if(info.termsOfServiceUrl) { - swagger.info.termsOfService = info.termsOfServiceUrl; - } - if(info.license || info.licenseUrl) { - swagger.license = {}; - if(info.license) { - swagger.license.name = info.license; - } - if(info.licenseUrl) { - swagger.license.url = info.licenseUrl; - } - } - } - else { - this.warnings.push('missing info section'); - } -}; - -SwaggerSpecConverter.prototype.finish = function (callback, obj) { - callback(obj); -}; - -},{"./http":5,"lodash-compat/lang/isObject":144}],9:[function(require,module,exports){ -'use strict'; - -var log = require('../helpers').log; -var _ = { - isPlainObject: require('lodash-compat/lang/isPlainObject'), - isString: require('lodash-compat/lang/isString'), -}; - -var SchemaMarkup = require('../schema-markup.js'); -var jsyaml = require('js-yaml'); - -var Model = module.exports = function (name, definition, models, modelPropertyMacro) { - this.definition = definition || {}; - this.isArray = definition.type === 'array'; - this.models = models || {}; - this.name = name || definition.title || 'Inline Model'; - this.modelPropertyMacro = modelPropertyMacro || function (property) { - return property.default; - }; - - return this; -}; - -// Note! This function will be removed in 2.2.x! -Model.prototype.createJSONSample = Model.prototype.getSampleValue = function (modelsToIgnore) { - modelsToIgnore = modelsToIgnore || {}; - - modelsToIgnore[this.name] = this; - - // Response support - if (this.examples && _.isPlainObject(this.examples) && this.examples['application/json']) { - this.definition.example = this.examples['application/json']; - - if (_.isString(this.definition.example)) { - this.definition.example = jsyaml.safeLoad(this.definition.example); - } - } else if (!this.definition.example) { - this.definition.example = this.examples; - } - - return SchemaMarkup.schemaToJSON(this.definition, this.models, modelsToIgnore, this.modelPropertyMacro); -}; - -Model.prototype.getMockSignature = function () { - return SchemaMarkup.schemaToHTML(this.name, this.definition, this.models, this.modelPropertyMacro); -}; - -},{"../helpers":4,"../schema-markup.js":7,"js-yaml":19,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isString":146}],10:[function(require,module,exports){ -'use strict'; - -var _ = { - cloneDeep: require('lodash-compat/lang/cloneDeep'), - isUndefined: require('lodash-compat/lang/isUndefined'), - isEmpty: require('lodash-compat/lang/isEmpty'), - isObject: require('lodash-compat/lang/isObject') -}; -var helpers = require('../helpers'); -var Model = require('./model'); -var SwaggerHttp = require('../http'); -var Q = require('q'); - -var Operation = module.exports = function (parent, scheme, operationId, httpMethod, path, args, definitions, models, clientAuthorizations) { - var errors = []; - - parent = parent || {}; - args = args || {}; - - if(parent && parent.options) { - this.client = parent.options.client || null; - this.requestInterceptor = parent.options.requestInterceptor || null; - this.responseInterceptor = parent.options.responseInterceptor || null; - } - this.authorizations = args.security; - this.basePath = parent.basePath || '/'; - this.clientAuthorizations = clientAuthorizations; - this.consumes = args.consumes || parent.consumes || ['application/json']; - this.produces = args.produces || parent.produces || ['application/json']; - this.deprecated = args.deprecated; - this.description = args.description; - this.host = parent.host; - this.method = (httpMethod || errors.push('Operation ' + operationId + ' is missing method.')); - this.models = models || {}; - this.nickname = (operationId || errors.push('Operations must have a nickname.')); - this.operation = args; - this.operations = {}; - this.parameters = args !== null ? (args.parameters || []) : {}; - this.parent = parent; - this.path = (path || errors.push('Operation ' + this.nickname + ' is missing path.')); - this.responses = (args.responses || {}); - this.scheme = scheme || parent.scheme || 'http'; - this.schemes = args.schemes || parent.schemes; - this.security = args.security || parent.security; - this.summary = args.summary || ''; - this.timeout = parent.timeout; - this.type = null; - this.useJQuery = parent.useJQuery; - this.jqueryAjaxCache = parent.jqueryAjaxCache; - this.enableCookies = parent.enableCookies; - - var key; - - if(!this.host) { - if(typeof window !== 'undefined') { - this.host = window.location.host; - } - else { - this.host = 'localhost'; - } - } - this.parameterMacro = parent.parameterMacro || function (operation, parameter) { - return parameter.default; - }; - - this.inlineModels = []; - - if(this.basePath !== '/' && this.basePath.slice(-1) === '/') { - this.basePath = this.basePath.slice(0, -1); - } - - if (typeof this.deprecated === 'string') { - switch(this.deprecated.toLowerCase()) { - case 'true': case 'yes': case '1': { - this.deprecated = true; - break; - } - - case 'false': case 'no': case '0': case null: { - this.deprecated = false; - break; - } - - default: this.deprecated = Boolean(this.deprecated); - } - } - - var i, model; - - if (definitions) { - // add to global models - for (key in definitions) { - model = new Model(key, definitions[key], this.models, parent.modelPropertyMacro); - - if (model) { - this.models[key] = model; - } - } - } - else { - definitions = {}; - } - - for (i = 0; i < this.parameters.length; i++) { - var d, param = this.parameters[i]; - - // Allow macro to set the default value - param.default = this.parameterMacro(this, param); - - if (param.type === 'array') { - param.isList = true; - param.allowMultiple = true; - } - - var innerType = this.getType(param); - - if (innerType && innerType.toString().toLowerCase() === 'boolean') { - param.allowableValues = {}; - param.isList = true; - param['enum'] = [true, false]; // use actual primitives - } - - for(key in param) { - helpers.extractExtensions(key, param); - } - if(typeof param['x-example'] !== 'undefined') { - d = param['x-example']; - param.default = d; - } - if(param['x-examples']) { - d = param['x-examples'].default; - if(typeof d !== 'undefined') { - param.default = d; - } - } - - var enumValues = param['enum'] || (param.items && param.items['enum']); - - if (typeof enumValues !== 'undefined') { - var id; - - param.allowableValues = {}; - param.allowableValues.values = []; - param.allowableValues.descriptiveValues = []; - - for (id = 0; id < enumValues.length; id++) { - var value = enumValues[id]; - var isDefault = (value === param.default || value+'' === param.default); - - param.allowableValues.values.push(value); - // Always have string for descriptive values.... - param.allowableValues.descriptiveValues.push({value : value+'', isDefault: isDefault}); - } - } - - if (param.type === 'array') { - innerType = [innerType]; - - if (typeof param.allowableValues === 'undefined') { - // can't show as a list if no values to select from - delete param.isList; - delete param.allowMultiple; - } - } - - param.modelSignature = {type: innerType, definitions: this.models}; - param.signature = this.getModelSignature(innerType, this.models).toString(); - param.sampleJSON = this.getModelSampleJSON(innerType, this.models); - param.responseClassSignature = param.signature; - } - - var keyname, defaultResponseCode, response, responses = this.responses; - - if (responses['200']) { - response = responses['200']; - defaultResponseCode = '200'; - } else if (responses['201']) { - response = responses['201']; - defaultResponseCode = '201'; - } else if (responses['202']) { - response = responses['202']; - defaultResponseCode = '202'; - } else if (responses['203']) { - response = responses['203']; - defaultResponseCode = '203'; - } else if (responses['204']) { - response = responses['204']; - defaultResponseCode = '204'; - } else if (responses['205']) { - response = responses['205']; - defaultResponseCode = '205'; - } else if (responses['206']) { - response = responses['206']; - defaultResponseCode = '206'; - } else if (responses['default']) { - response = responses['default']; - defaultResponseCode = 'default'; - } - - for(keyname in responses) { - helpers.extractExtensions(keyname, responses); - if(typeof keyname === 'string' && keyname.indexOf('x-') === -1) { - var responseObject = responses[keyname]; - if(typeof responseObject === 'object' && typeof responseObject.headers === 'object') { - var headers = responseObject.headers; - for(var headerName in headers) { - var header = headers[headerName]; - if(typeof header === 'object') { - for(var headerKey in header) { - helpers.extractExtensions(headerKey, header); - } - } - } - } - } - } - - if (response) { - for(keyname in response) { - helpers.extractExtensions(keyname, response); - } - } - - if (response && response.schema) { - var resolvedModel = this.resolveModel(response.schema, definitions); - var successResponse; - - delete responses[defaultResponseCode]; - - if (resolvedModel) { - this.successResponse = {}; - successResponse = this.successResponse[defaultResponseCode] = resolvedModel; - } else if (!response.schema.type || response.schema.type === 'object' || response.schema.type === 'array') { - // Inline model - this.successResponse = {}; - successResponse = this.successResponse[defaultResponseCode] = new Model(undefined, response.schema || {}, this.models, parent.modelPropertyMacro); - } else { - // Primitive - this.successResponse = {}; - successResponse = this.successResponse[defaultResponseCode] = response.schema; - } - - if (successResponse) { - successResponse.vendorExtensions = response.vendorExtensions; - // Attach response properties - if (response.description) { - successResponse.description = response.description; - } - - if (response.examples) { - successResponse.examples = response.examples; - } - - if (response.headers) { - successResponse.headers = response.headers; - } - } - - this.type = response; - } - - if (errors.length > 0) { - if (this.resource && this.resource.api && this.resource.api.fail) { - this.resource.api.fail(errors); - } - } - - return this; -}; - -Operation.prototype.isDefaultArrayItemValue = function(value, param) { - if (param.default && Array.isArray(param.default)) { - return param.default.indexOf(value) !== -1; - } - return value === param.default; -}; - -Operation.prototype.getType = function (param) { - var type = param.type; - var format = param.format; - var isArray = false; - var str; - - if (type === 'integer' && format === 'int32') { - str = 'integer'; - } else if (type === 'integer' && format === 'int64') { - str = 'long'; - } else if (type === 'integer') { - str = 'integer'; - } else if (type === 'string') { - if (format === 'date-time') { - str = 'date-time'; - } else if (format === 'date') { - str = 'date'; - } else { - str = 'string'; - } - } else if (type === 'number' && format === 'float') { - str = 'float'; - } else if (type === 'number' && format === 'double') { - str = 'double'; - } else if (type === 'number') { - str = 'double'; - } else if (type === 'boolean') { - str = 'boolean'; - } else if (type === 'array') { - isArray = true; - - if (param.items) { - str = this.getType(param.items); - } - } else if (type === 'file') { - str = 'file'; - } - - if (param.$ref) { - str = helpers.simpleRef(param.$ref); - } - - var schema = param.schema; - - if (schema) { - var ref = schema.$ref; - - if (ref) { - ref = helpers.simpleRef(ref); - - if (isArray) { - return [ ref ]; - } else { - return ref; - } - } else { - // If inline schema, we add it our interal hash -> which gives us it's ID (int) - if(schema.type === 'object') { - return this.addInlineModel(schema); - } - return this.getType(schema); - } - } - if (isArray) { - return [ str ]; - } else { - return str; - } -}; - -/** - * adds an inline schema (model) to a hash, where we can ref it later - * @param {object} schema a schema - * @return {number} the ID of the schema being added, or null - **/ -Operation.prototype.addInlineModel = function (schema) { - var len = this.inlineModels.length; - var model = this.resolveModel(schema, {}); - if(model) { - this.inlineModels.push(model); - return 'Inline Model '+len; // return string ref of the inline model (used with #getInlineModel) - } - return null; // report errors? -}; - -/** - * gets the internal ref to an inline model - * @param {string} inline_str a string reference to an inline model - * @return {Model} the model being referenced. Or null - **/ -Operation.prototype.getInlineModel = function(inlineStr) { - if(/^Inline Model \d+$/.test(inlineStr)) { - var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); // - var model = this.inlineModels[id]; - return model; - } - // I'm returning null here, should I rather throw an error? - return null; -}; - -Operation.prototype.resolveModel = function (schema, definitions) { - if (typeof schema.$ref !== 'undefined') { - var ref = schema.$ref; - - if (ref.indexOf('#/definitions/') === 0) { - ref = ref.substring('#/definitions/'.length); - } - - if (definitions[ref]) { - return new Model(ref, definitions[ref], this.models, this.parent.modelPropertyMacro); - } - // schema must at least be an object to get resolved to an inline Model - } else if (schema && typeof schema === 'object' && - (schema.type === 'object' || _.isUndefined(schema.type))) { - return new Model(undefined, schema, this.models, this.parent.modelPropertyMacro); - } - - return null; -}; - -Operation.prototype.help = function (dontPrint) { - var out = this.nickname + ': ' + this.summary + '\n'; - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - var typeInfo = param.signature; - - out += '\n * ' + param.name + ' (' + typeInfo + '): ' + param.description; - } - - if (typeof dontPrint === 'undefined') { - helpers.log(out); - } - - return out; -}; - -Operation.prototype.getModelSignature = function (type, definitions) { - var isPrimitive, listType; - - if (type instanceof Array) { - listType = true; - type = type[0]; - } - - // Convert undefined to string of 'undefined' - if (typeof type === 'undefined') { - type = 'undefined'; - isPrimitive = true; - - } else if (definitions[type]){ - // a model def exists? - type = definitions[type]; /* Model */ - isPrimitive = false; - - } else if (this.getInlineModel(type)) { - type = this.getInlineModel(type); /* Model */ - isPrimitive = false; - - } else { - // We default to primitive - isPrimitive = true; - } - - if (isPrimitive) { - if (listType) { - return 'Array[' + type + ']'; - } else { - return type.toString(); - } - } else { - if (listType) { - return 'Array[' + type.getMockSignature() + ']'; - } else { - return type.getMockSignature(); - } - } -}; - -Operation.prototype.supportHeaderParams = function () { - return true; -}; - -Operation.prototype.supportedSubmitMethods = function () { - return this.parent.supportedSubmitMethods; -}; - -Operation.prototype.getHeaderParams = function (args) { - var headers = this.setContentTypes(args, {}); - var headerParamsByLowerCase = {}; - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (param.in === 'header') { - headerParamsByLowerCase[param.name.toLowerCase()] = param; - } - } - - for (var arg in args) { - var headerParam = headerParamsByLowerCase[arg.toLowerCase()]; - if (typeof headerParam !== 'undefined') { - var value = args[arg]; - - if (Array.isArray(value)) { - value = value.toString(); - } - - headers[headerParam.name] = value; - } - } - - return headers; -}; - -Operation.prototype.urlify = function (args) { - var formParams = {}; - var requestUrl = this.path.replace(/#.*/, ''); // remove URL fragment - var querystring = ''; // grab params from the args, build the querystring along the way - - for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (typeof args[param.name] !== 'undefined') { - if (param.in === 'path') { - var reg = new RegExp('\{' + param.name + '\}', 'gi'); - var value = args[param.name]; - - if (Array.isArray(value)) { - value = this.encodePathCollection(param.collectionFormat, param.name, value); - } else { - value = this.encodePathParam(value); - } - - requestUrl = requestUrl.replace(reg, value); - } else if (param.in === 'query' && typeof args[param.name] !== 'undefined') { - if (querystring === '' && requestUrl.indexOf('?') < 0) { - querystring += '?'; - } else { - querystring += '&'; - } - - if (typeof param.collectionFormat !== 'undefined') { - var qp = args[param.name]; - - if (Array.isArray(qp)) { - querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp); - } else { - querystring += this.encodeQueryKey(param.name) + '=' + this.encodeQueryParam(args[param.name]); - } - } else { - querystring += this.encodeQueryKey(param.name) + '=' + this.encodeQueryParam(args[param.name]); - } - } else if (param.in === 'formData') { - formParams[param.name] = args[param.name]; - } - } - } - var url = this.scheme + '://' + this.host; - - if (this.basePath !== '/') { - url += this.basePath; - } - return url + requestUrl + querystring; -}; - -Operation.prototype.getMissingParams = function (args) { - var missingParams = []; // check required params, track the ones that are missing - var i; - - for (i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - - if (param.required === true) { - if (typeof args[param.name] === 'undefined') { - missingParams = param.name; - } - } - } - - return missingParams; -}; - -Operation.prototype.getBody = function (headers, args) { - var formParams = {}, hasFormParams, param, body, key, value, hasBody = false; - - // look at each param and put form params in an object - for (var i = 0; i < this.parameters.length; i++) { - param = this.parameters[i]; - if (typeof args[param.name] !== 'undefined') { - if (param.in === 'body') { - body = args[param.name]; - } else if (param.in === 'formData') { - formParams[param.name] = { - param: param, - value: args[param.name] - }; - hasFormParams = true; - } - } - else { - if(param.in === 'body') { - hasBody = true; - } - } - } - - // if body is null and hasBody is true, AND a JSON body is requested, send empty {} - if(hasBody && typeof body === 'undefined') { - var contentType = headers['Content-Type']; - if(contentType && contentType.indexOf('application/json') === 0) { - body = '{}'; - } - } - - var isMultiPart = false; - if(headers['Content-Type'] && headers['Content-Type'].indexOf('multipart/form-data') >= 0) { - isMultiPart = true; - } - - // handle form params - if (hasFormParams && !isMultiPart) { - var encoded = ''; - - for (key in formParams) { - param = formParams[key].param; - value = formParams[key].value; - - if (typeof value !== 'undefined') { - if (Array.isArray(value)) { - if (encoded !== '') { - encoded += '&'; - } - encoded += this.encodeQueryCollection(param.collectionFormat, key, value); - } - else { - if (encoded !== '') { - encoded += '&'; - } - - encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value); - } - } - } - - body = encoded; - } else if (isMultiPart) { - var bodyParam; - if (typeof FormData === 'function') { - bodyParam = new FormData(); - - bodyParam.type = 'formData'; - - for (key in formParams) { - param = formParams[key].param; - value = args[key]; - - if (typeof value !== 'undefined') { - if({}.toString.apply(value) === '[object File]') { - bodyParam.append(key, value); - } - else if (value.type === 'file' && value.value) { - bodyParam.append(key, value.value); - } else { - if (Array.isArray(value)) { - if(param.collectionFormat === 'multi') { - bodyParam.delete(key); - for(var v in value) { - bodyParam.append(key, value[v]); - } - } - else { - bodyParam.append(key, this.encodeQueryCollection(param.collectionFormat, key, value).split('=').slice(1).join('=')); - } - } - else { - bodyParam.append(key, value); - } - } - } - } - body = bodyParam; - } - else { - bodyParam = {}; - for (key in formParams) { - value = args[key]; - if (Array.isArray(value)) { - var delimeter; - var format = param.collectionFormat || 'multi'; - if(format === 'ssv') { - delimeter = ' '; - } - else if(format === 'pipes') { - delimeter = '|'; - } - else if(format === 'tsv') { - delimeter = '\t'; - } - else if(format === 'multi') { - bodyParam[key] = value; - break; - } - else { - delimeter = ','; - } - var data; - value.forEach(function(v) { - if(data) { - data += delimeter; - } - else { - data = ''; - } - data += v; - }); - bodyParam[key] = data; - } - else { - bodyParam[key] = value; - } - } - body = bodyParam; - } - headers['Content-Type'] = 'multipart/form-data'; - } - - return body; -}; - -/** - * gets sample response for a single operation - **/ -Operation.prototype.getModelSampleJSON = function (type, models) { - var listType, sampleJson, innerType; - models = models || {}; - - listType = (type instanceof Array); - innerType = listType ? type[0] : type; - - if(models[innerType]) { - sampleJson = models[innerType].createJSONSample(); - } else if (this.getInlineModel(innerType)){ - sampleJson = this.getInlineModel(innerType).createJSONSample(); // may return null, if type isn't correct - } - - - if (sampleJson) { - sampleJson = listType ? [sampleJson] : sampleJson; - - if (typeof sampleJson === 'string') { - return sampleJson; - } else if (_.isObject(sampleJson)) { - var t = sampleJson; - - if (sampleJson instanceof Array && sampleJson.length > 0) { - t = sampleJson[0]; - } - - if (t.nodeName && typeof t === 'Node') { - var xmlString = new XMLSerializer().serializeToString(t); - - return this.formatXml(xmlString); - } else { - return JSON.stringify(sampleJson, null, 2); - } - } else { - return sampleJson; - } - } -}; - -/** - * legacy binding - **/ -Operation.prototype.do = function (args, opts, callback, error, parent) { - return this.execute(args, opts, callback, error, parent); -}; - -/** - * executes an operation - **/ -Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { - var args = arg1 || {}; - var opts = {}, success, error, deferred, timeout; - - if (_.isObject(arg2)) { - opts = arg2; - success = arg3; - error = arg4; - } - - timeout = typeof opts.timeout !== 'undefined' ? opts.timeout : this.timeout; - - if(this.client) { - opts.client = this.client; - } - - // add the request interceptor from parent, if none sent from client - if(!opts.requestInterceptor && this.requestInterceptor ) { - opts.requestInterceptor = this.requestInterceptor ; - } - - if(!opts.responseInterceptor && this.responseInterceptor) { - opts.responseInterceptor = this.responseInterceptor; - } - - if (typeof arg2 === 'function') { - success = arg2; - error = arg3; - } - - if (this.parent.usePromise) { - deferred = Q.defer(); - } else { - success = (success || this.parent.defaultSuccessCallback || helpers.log); - error = (error || this.parent.defaultErrorCallback || helpers.log); - } - - if (typeof opts.useJQuery === 'undefined') { - opts.useJQuery = this.useJQuery; - } - - if (typeof opts.jqueryAjaxCache === 'undefined') { - opts.jqueryAjaxCache = this.jqueryAjaxCache; - } - - if (typeof opts.enableCookies === 'undefined') { - opts.enableCookies = this.enableCookies; - } - - var missingParams = this.getMissingParams(args); - - if (missingParams.length > 0) { - var message = 'missing required params: ' + missingParams; - - helpers.fail(message); - - if (this.parent.usePromise) { - deferred.reject(message); - return deferred.promise; - } else { - error(message, parent); - return {}; - } - } - - var allHeaders = this.getHeaderParams(args); - var contentTypeHeaders = this.setContentTypes(args, opts); - var headers = {}, attrname; - - for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; } - for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; } - - var body = this.getBody(contentTypeHeaders, args, opts); - var url = this.urlify(args); - - if(url.indexOf('.{format}') > 0) { - if(headers) { - var format = headers.Accept || headers.accept; - if(format && format.indexOf('json') > 0) { - url = url.replace('.{format}', '.json'); - } - else if(format && format.indexOf('xml') > 0) { - url = url.replace('.{format}', '.xml'); - } - } - } - - var obj = { - url: url, - method: this.method.toUpperCase(), - body: body, - enableCookies: opts.enableCookies, - useJQuery: opts.useJQuery, - jqueryAjaxCache: opts.jqueryAjaxCache, - deferred: deferred, - headers: headers, - clientAuthorizations: opts.clientAuthorizations, - on: { - response: function (response) { - if (deferred) { - deferred.resolve(response); - return deferred.promise; - } else { - return success(response, parent); - } - }, - error: function (response) { - if (deferred) { - deferred.reject(response); - return deferred.promise; - } else { - return error(response, parent); - } - } - } - }; - - if (timeout) { - obj.timeout = timeout; - } - - this.clientAuthorizations.apply(obj, this.operation.security); - if (opts.mock === true) { - return obj; - } else { - return new SwaggerHttp().execute(obj, opts); - } -}; - -function itemByPriority(col, itemPriority) { - - // No priorities? return first... - if(_.isEmpty(itemPriority)) { - return col[0]; - } - - for (var i = 0, len = itemPriority.length; i < len; i++) { - if(col.indexOf(itemPriority[i]) > -1) { - return itemPriority[i]; - } - } - - // Otherwise return first - return col[0]; -} - -Operation.prototype.setContentTypes = function (args, opts) { - // default type - var allDefinedParams = this.parameters; - var body; - var consumes = args.parameterContentType || itemByPriority(this.consumes, ['application/json', 'application/yaml']); - var accepts = opts.responseContentType || itemByPriority(this.produces, ['application/json', 'application/yaml']); - var definedFileParams = []; - var definedFormParams = []; - var headers = {}; - var i; - - // get params from the operation and set them in definedFileParams, definedFormParams, headers - for (i = 0; i < allDefinedParams.length; i++) { - var param = allDefinedParams[i]; - - if (param.in === 'formData') { - if (param.type === 'file') { - definedFileParams.push(param); - } else { - definedFormParams.push(param); - } - } else if (param.in === 'header' && opts) { - var key = param.name; - var headerValue = opts[param.name]; - - if (typeof opts[param.name] !== 'undefined') { - headers[key] = headerValue; - } - } else if (param.in === 'body' && typeof args[param.name] !== 'undefined') { - body = args[param.name]; - } - } - - // if there's a body, need to set the consumes header via requestContentType - var hasBody = body || definedFileParams.length || definedFormParams.length; - if (this.method === 'post' || this.method === 'put' || this.method === 'patch' || - ((this.method === 'delete' || this.method === 'get') && hasBody)) { - if (opts.requestContentType) { - consumes = opts.requestContentType; - } - // if any form params, content type must be set - if (definedFormParams.length > 0) { - consumes = undefined; - if (opts.requestContentType) { // override if set - consumes = opts.requestContentType; - } else if (definedFileParams.length > 0) { // if a file, must be multipart/form-data - consumes = 'multipart/form-data'; - } else { - if (this.consumes && this.consumes.length > 0) { - // use the consumes setting - for(var c in this.consumes) { - var chk = this.consumes[c]; - if(chk.indexOf('application/x-www-form-urlencoded') === 0 || chk.indexOf('multipart/form-data') === 0) { - consumes = chk; - } - } - } - } - if(typeof consumes === 'undefined') { - // default to x-www-from-urlencoded - consumes = 'application/x-www-form-urlencoded'; - } - } - } - else { - consumes = null; - } - - if (consumes && this.consumes) { - if (this.consumes.indexOf(consumes) === -1) { - helpers.log('server doesn\'t consume ' + consumes + ', try ' + JSON.stringify(this.consumes)); - } - } - - if (!this.matchesAccept(accepts)) { - helpers.log('server can\'t produce ' + accepts); - } - - if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded')) { - headers['Content-Type'] = consumes; - } - else if(this.consumes && this.consumes.length > 0 && this.consumes[0] === 'application/x-www-form-urlencoded') { - headers['Content-Type'] = this.consumes[0]; - } - - if (accepts) { - headers.Accept = accepts; - } - - return headers; -}; - -/** - * Returns true if the request accepts header matches anything in this.produces. - * If this.produces contains * / *, ignore the accept header. - * @param {string=} accepts The client request accept header. - * @return {boolean} - */ -Operation.prototype.matchesAccept = function(accepts) { - // no accepts or produces, no problem! - if (!accepts || !this.produces) { - return true; - } - return this.produces.indexOf(accepts) !== -1 || this.produces.indexOf('*/*') !== -1; -}; - -Operation.prototype.asCurl = function (args1, args2) { - var opts = {mock: true}; - if (typeof args2 === 'object') { - for (var argKey in args2) { - opts[argKey] = args2[argKey]; - } - } - var obj = this.execute(args1, opts); - - this.clientAuthorizations.apply(obj, this.operation.security); - - var results = []; - - results.push('-X ' + this.method.toUpperCase()); - - if (typeof obj.headers !== 'undefined') { - var key; - - for (key in obj.headers) { - var value = obj.headers[key]; - if(typeof value === 'string'){ - value = value.replace(/\'/g, '\\u0027'); - } - results.push('--header \'' + key + ': ' + value + '\''); - } - } - var isFormData = false; - var isMultipart = false; - - var type = obj.headers['Content-Type']; - if(type && type.indexOf('application/x-www-form-urlencoded') === 0) { - isFormData = true; - } - else if (type && type.indexOf('multipart/form-data') === 0) { - isFormData = true; - isMultipart = true; - } - - if (obj.body) { - var body; - if (_.isObject(obj.body)) { - if(isMultipart) { - isMultipart = true; - // add the form data - for(var i = 0; i < this.parameters.length; i++) { - var parameter = this.parameters[i]; - if(parameter.in === 'formData') { - if (!body) { - body = ''; - } - - var paramValue; - if(typeof FormData === 'function' && obj.body instanceof FormData) { - paramValue = obj.body.getAll(parameter.name); - } - else { - paramValue = obj.body[parameter.name]; - } - if (paramValue) { - if (parameter.type === 'file') { - if(paramValue.name) { - body += '-F ' + parameter.name + '=@"' + paramValue.name + '" '; - } - } - else { - if (Array.isArray(paramValue)) { - if(parameter.collectionFormat === 'multi') { - for(var v in paramValue) { - body += '-F ' + this.encodeQueryKey(parameter.name) + '=' + paramValue[v] + ' '; - } - } - else { - body += '-F ' + this.encodeQueryCollection(parameter.collectionFormat, parameter.name, paramValue) + ' '; - } - } else { - body += '-F ' + this.encodeQueryKey(parameter.name) + '=' + paramValue + ' '; - } - } - } - } - } - } - if(!body) { - body = JSON.stringify(obj.body); - } - } else { - body = obj.body; - } - // escape @ => %40, ' => %27 - body = body.replace(/\'/g, '%27').replace(/\n/g, ' \\ \n '); - - if(!isFormData) { - // escape & => %26 - body = body.replace(/&/g, '%26'); - } - if(isMultipart) { - results.push(body); - } - else { - results.push('-d \'' + body.replace(/@/g, '%40') + '\''); - } - } - - return 'curl ' + (results.join(' ')) + ' \'' + obj.url + '\''; -}; - -Operation.prototype.encodePathCollection = function (type, name, value) { - var encoded = ''; - var i; - var separator = ''; - - if (type === 'ssv') { - separator = '%20'; - } else if (type === 'tsv') { - separator = '%09'; - } else if (type === 'pipes') { - separator = '|'; - } else { - separator = ','; - } - - for (i = 0; i < value.length; i++) { - if (i === 0) { - encoded = this.encodeQueryParam(value[i]); - } else { - encoded += separator + this.encodeQueryParam(value[i]); - } - } - - return encoded; -}; - -Operation.prototype.encodeQueryCollection = function (type, name, value) { - var encoded = ''; - var i; - - type = type || 'default'; - if (type === 'default' || type === 'multi') { - for (i = 0; i < value.length; i++) { - if (i > 0) {encoded += '&';} - - encoded += this.encodeQueryKey(name) + '=' + this.encodeQueryParam(value[i]); - } - } else { - var separator = ''; - - if (type === 'csv') { - separator = ','; - } else if (type === 'ssv') { - separator = '%20'; - } else if (type === 'tsv') { - separator = '%09'; - } else if (type === 'pipes') { - separator = '|'; - } else if (type === 'brackets') { - for (i = 0; i < value.length; i++) { - if (i !== 0) { - encoded += '&'; - } - - encoded += this.encodeQueryKey(name) + '[]=' + this.encodeQueryParam(value[i]); - } - } - - if (separator !== '') { - for (i = 0; i < value.length; i++) { - if (i === 0) { - encoded = this.encodeQueryKey(name) + '=' + this.encodeQueryParam(value[i]); - } else { - encoded += separator + this.encodeQueryParam(value[i]); - } - } - } - } - - return encoded; -}; - -Operation.prototype.encodeQueryKey = function (arg) { - return encodeURIComponent(arg) - .replace('%5B','[').replace('%5D', ']').replace('%24', '$'); -}; - -Operation.prototype.encodeQueryParam = function (arg) { - return encodeURIComponent(arg); -}; - -/** - * TODO revisit, might not want to leave '/' - **/ -Operation.prototype.encodePathParam = function (pathParam) { - return encodeURIComponent(pathParam); -}; - -},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isUndefined":148,"q":157}],11:[function(require,module,exports){ -'use strict'; - -var OperationGroup = module.exports = function (tag, description, externalDocs, operation) { - this.description = description; - this.externalDocs = externalDocs; - this.name = tag; - this.operation = operation; - this.operationsArray = []; - this.path = tag; - this.tag = tag; -}; - -OperationGroup.prototype.sort = function () { - -}; - - -},{}],12:[function(require,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; - -function drainQueue() { - if (draining) { - return; - } - draining = true; - var currentQueue; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - var i = -1; - while (++i < len) { - currentQueue[i](); - } - len = queue.length; - } - draining = false; -} -process.nextTick = function (fun) { - queue.push(fun); - if (!draining) { - setTimeout(drainQueue, 0); - } -}; - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],13:[function(require,module,exports){ -(function (Buffer){ -(function () { - "use strict"; - - function btoa(str) { - var buffer - ; - - if (str instanceof Buffer) { - buffer = str; - } else { - buffer = new Buffer(str.toString(), 'binary'); - } - - return buffer.toString('base64'); - } - - module.exports = btoa; -}()); - -}).call(this,require("buffer").Buffer); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiKGZ1bmN0aW9uICgpIHtcbiAgXCJ1c2Ugc3RyaWN0XCI7XG5cbiAgZnVuY3Rpb24gYnRvYShzdHIpIHtcbiAgICB2YXIgYnVmZmVyXG4gICAgICA7XG5cbiAgICBpZiAoc3RyIGluc3RhbmNlb2YgQnVmZmVyKSB7XG4gICAgICBidWZmZXIgPSBzdHI7XG4gICAgfSBlbHNlIHtcbiAgICAgIGJ1ZmZlciA9IG5ldyBCdWZmZXIoc3RyLnRvU3RyaW5nKCksICdiaW5hcnknKTtcbiAgICB9XG5cbiAgICByZXR1cm4gYnVmZmVyLnRvU3RyaW5nKCdiYXNlNjQnKTtcbiAgfVxuXG4gIG1vZHVsZS5leHBvcnRzID0gYnRvYTtcbn0oKSk7XG4iXX0= -},{"buffer":14}],14:[function(require,module,exports){ -/*! - * The buffer module from node.js, for the browser. - * - * author Feross Aboukhadijeh - * @license MIT - */ - -var base64 = require('base64-js'); -var ieee754 = require('ieee754'); -var isArray = require('is-array'); - -exports.Buffer = Buffer; -exports.SlowBuffer = SlowBuffer; -exports.INSPECT_MAX_BYTES = 50; -Buffer.poolSize = 8192; // not used by this implementation - -var rootParent = {}; - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property - * on objects. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = (function () { - function Bar () {} - try { - var arr = new Uint8Array(1); - arr.foo = function () { return 42 }; - arr.constructor = Bar; - return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Bar && // constructor can be set - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray` - } catch (e) { - return false - } -})(); - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]); - return new Buffer(arg) - } - - this.length = 0; - this.parent = undefined; - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'; - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0; - that = allocate(that, length); - - that.write(string, encoding); - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object); - - if (isArray(object)) return fromArray(that, object); - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined') { - if (object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - if (object instanceof ArrayBuffer) { - return fromArrayBuffer(that, object) - } - } - - if (object.length) return fromArrayLike(that, object); - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0; - that = allocate(that, length); - buffer.copy(that, 0, 0, length); - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0; - that = allocate(that, length); - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0; - that = allocate(that, length); - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - array.byteLength; - that = Buffer._augment(new Uint8Array(array)) - } else { - // Fallback: Return an object instance of the Buffer class - that = fromTypedArray(that, new Uint8Array(array)) - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0; - that = allocate(that, length); - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array; - var length = 0; - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data; - length = checked(array.length) | 0 - } - that = allocate(that, length); - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length; - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1; - if (fromPool) that.parent = rootParent; - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding); - - var buf = new Buffer(subject, encoding); - delete buf.parent; - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -}; - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0; - - var x = a.length; - var y = b.length; - - var i = 0; - var len = Math.min(x, y); - while (i < len) { - if (a[i] !== b[i]) break; - - ++i - } - - if (i !== len) { - x = a[i]; - y = b[i] - } - - if (x < y) return -1; - if (y < x) return 1; - return 0 -}; - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true; - default: - return false - } -}; - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.'); - - if (list.length === 0) { - return new Buffer(0) - } - - var i; - if (length === undefined) { - length = 0; - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length); - var pos = 0; - for (i = 0; i < list.length; i++) { - var item = list[i]; - item.copy(buf, pos); - pos += item.length - } - return buf -}; - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = '' + string; - - var len = string.length; - if (len === 0) return 0; - - // Use a for loop to avoid recursion - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len; - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2; - case 'hex': - return len >>> 1; - case 'base64': - return base64ToBytes(string).length; - default: - if (loweredCase) return utf8ToBytes(string).length; // assume utf8 - encoding = ('' + encoding).toLowerCase(); - loweredCase = true - } - } -} -Buffer.byteLength = byteLength; - -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined; -Buffer.prototype.parent = undefined; - -function slowToString (encoding, start, end) { - var loweredCase = false; - - start = start | 0; - end = end === undefined || end === Infinity ? this.length : end | 0; - - if (!encoding) encoding = 'utf8'; - if (start < 0) start = 0; - if (end > this.length) end = this.length; - if (end <= start) return ''; - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end); - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end); - - case 'ascii': - return asciiSlice(this, start, end); - - case 'binary': - return binarySlice(this, start, end); - - case 'base64': - return base64Slice(this, start, end); - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end); - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); - encoding = (encoding + '').toLowerCase(); - loweredCase = true - } - } -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0; - if (length === 0) return ''; - if (arguments.length === 0) return utf8Slice(this, 0, length); - return slowToString.apply(this, arguments) -}; - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); - if (this === b) return true; - return Buffer.compare(this, b) === 0 -}; - -Buffer.prototype.inspect = function inspect () { - var str = ''; - var max = exports.INSPECT_MAX_BYTES; - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); - if (this.length > max) str += ' ... ' - } - return '' -}; - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); - if (this === b) return 0; - return Buffer.compare(this, b) -}; - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff; - else if (byteOffset < -0x80000000) byteOffset = -0x80000000; - byteOffset >>= 0; - - if (this.length === 0) return -1; - if (byteOffset >= this.length) return -1; - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0); - - if (typeof val === 'string') { - if (val.length === 0) return -1; // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1; - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i; - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -}; - -// `get` is deprecated -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.'); - return this.readUInt8(offset) -}; - -// `set` is deprecated -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.'); - return this.writeUInt8(v, offset) -}; - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0; - var remaining = buf.length - offset; - if (!length) { - length = remaining - } else { - length = Number(length); - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length; - if (strLen % 2 !== 0) throw new Error('Invalid hex string'); - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(parsed)) throw new Error('Invalid hex string'); - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8'; - length = this.length; - offset = 0; - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset; - length = this.length; - offset = 0; - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0; - if (isFinite(length)) { - length = length | 0; - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length; - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding; - encoding = offset; - offset = length | 0; - length = swap - } - - var remaining = this.length - offset; - if (length === undefined || length > remaining) length = remaining; - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8'; - - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length); - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length); - - case 'ascii': - return asciiWrite(this, string, offset, length); - - case 'binary': - return binaryWrite(this, string, offset, length); - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length); - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length); - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); - encoding = ('' + encoding).toLowerCase(); - loweredCase = true - } - } -}; - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -}; - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end); - var res = []; - - var i = start; - while (i < end) { - var firstByte = buf[i]; - var codePoint = null; - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1; - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint; - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break; - case 2: - secondByte = buf[i + 1]; - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break; - case 3: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break; - case 4: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - fourthByte = buf[i + 3]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD; - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000; - res.push(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint); - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000; - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints); // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = ''; - var i = 0; - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length; - - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - - var out = ''; - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end); - var res = ''; - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length; - start = ~~start; - end = end === undefined ? len : ~~end; - - if (start < 0) { - start += len; - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len; - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start; - - var newBuf; - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start; - newBuf = new Buffer(sliceLen, undefined); - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this; - - return newBuf -}; - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint'); - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -}; - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength]; - var mul = 1; - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -}; - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - return this[offset] -}; - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return this[offset] | (this[offset + 1] << 8) -}; - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return (this[offset] << 8) | this[offset + 1] -}; - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -}; - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -}; - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val -}; - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var i = byteLength; - var mul = 1; - var val = this[offset + --i]; - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val -}; - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - if (!(this[offset] & 0x80)) return (this[offset]); - return ((0xff - this[offset] + 1) * -1) -}; - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset] | (this[offset + 1] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val -}; - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset + 1] | (this[offset] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val -}; - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -}; - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -}; - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return ieee754.read(this, offset, true, 23, 4) -}; - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return ieee754.read(this, offset, false, 23, 4) -}; - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return ieee754.read(this, offset, true, 52, 8) -}; - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return ieee754.read(this, offset, false, 52, 8) -}; - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance'); - if (value > max || value < min) throw new RangeError('value is out of bounds'); - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0); - - var mul = 1; - var i = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -}; - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0); - - var i = byteLength - 1; - var mul = 1; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -}; - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - this[offset] = value; - return offset + 1 -}; - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value; - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -}; - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -}; - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24); - this[offset + 2] = (value >>> 16); - this[offset + 1] = (value >>> 8); - this[offset] = value - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -}; - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -}; - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0; - var mul = 1; - var sub = value < 0 ? 1 : 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -}; - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1; - var mul = 1; - var sub = value < 0 ? 1 : 0; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -}; - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - if (value < 0) value = 0xff + value + 1; - this[offset] = value; - return offset + 1 -}; - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value; - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -}; - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = value - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -}; - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value; - this[offset + 1] = (value >>> 8); - this[offset + 2] = (value >>> 16); - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -}; - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (value < 0) value = 0xffffffff + value + 1; - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = value - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -}; - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds'); - if (offset + ext > buf.length) throw new RangeError('index out of range'); - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4); - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -}; - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -}; - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8); - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -}; - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -}; - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0; - if (!end && end !== 0) end = this.length; - if (targetStart >= target.length) targetStart = target.length; - if (!targetStart) targetStart = 0; - if (end > 0 && end < start) end = start; - - // Copy 0 bytes; we're done - if (end === start) return 0; - if (target.length === 0 || this.length === 0) return 0; - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds'); - if (end < 0) throw new RangeError('sourceEnd out of bounds'); - - // Are we oob? - if (end > this.length) end = this.length; - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start; - var i; - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; i--) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -}; - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0; - if (!start) start = 0; - if (!end) end = this.length; - - if (end < start) throw new RangeError('end < start'); - - // Fill 0 bytes; we're done - if (end === start) return; - if (this.length === 0) return; - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds'); - if (end < 0 || end > this.length) throw new RangeError('end out of bounds'); - - var i; - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()); - var len = bytes.length; - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -}; - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length); - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -}; - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype; - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer; - arr._isBuffer = true; - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set; - - // deprecated - arr.get = BP.get; - arr.set = BP.set; - - arr.write = BP.write; - arr.toString = BP.toString; - arr.toLocaleString = BP.toString; - arr.toJSON = BP.toJSON; - arr.equals = BP.equals; - arr.compare = BP.compare; - arr.indexOf = BP.indexOf; - arr.copy = BP.copy; - arr.slice = BP.slice; - arr.readUIntLE = BP.readUIntLE; - arr.readUIntBE = BP.readUIntBE; - arr.readUInt8 = BP.readUInt8; - arr.readUInt16LE = BP.readUInt16LE; - arr.readUInt16BE = BP.readUInt16BE; - arr.readUInt32LE = BP.readUInt32LE; - arr.readUInt32BE = BP.readUInt32BE; - arr.readIntLE = BP.readIntLE; - arr.readIntBE = BP.readIntBE; - arr.readInt8 = BP.readInt8; - arr.readInt16LE = BP.readInt16LE; - arr.readInt16BE = BP.readInt16BE; - arr.readInt32LE = BP.readInt32LE; - arr.readInt32BE = BP.readInt32BE; - arr.readFloatLE = BP.readFloatLE; - arr.readFloatBE = BP.readFloatBE; - arr.readDoubleLE = BP.readDoubleLE; - arr.readDoubleBE = BP.readDoubleBE; - arr.writeUInt8 = BP.writeUInt8; - arr.writeUIntLE = BP.writeUIntLE; - arr.writeUIntBE = BP.writeUIntBE; - arr.writeUInt16LE = BP.writeUInt16LE; - arr.writeUInt16BE = BP.writeUInt16BE; - arr.writeUInt32LE = BP.writeUInt32LE; - arr.writeUInt32BE = BP.writeUInt32BE; - arr.writeIntLE = BP.writeIntLE; - arr.writeIntBE = BP.writeIntBE; - arr.writeInt8 = BP.writeInt8; - arr.writeInt16LE = BP.writeInt16LE; - arr.writeInt16BE = BP.writeInt16BE; - arr.writeInt32LE = BP.writeInt32LE; - arr.writeInt32BE = BP.writeInt32BE; - arr.writeFloatLE = BP.writeFloatLE; - arr.writeFloatBE = BP.writeFloatBE; - arr.writeDoubleLE = BP.writeDoubleLE; - arr.writeDoubleBE = BP.writeDoubleBE; - arr.fill = BP.fill; - arr.inspect = BP.inspect; - arr.toArrayBuffer = BP.toArrayBuffer; - - return arr -}; - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, ''); - // Node converts strings with length < 2 to '' - if (str.length < 2) return ''; - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim(); - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16); - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity; - var codePoint; - var length = string.length; - var leadSurrogate = null; - var bytes = []; - - for (var i = 0; i < length; i++) { - codePoint = string.charCodeAt(i); - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } - - // valid lead - leadSurrogate = codePoint; - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - leadSurrogate = codePoint; - continue - } - - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null; - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break; - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break; - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break; - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break; - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = []; - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo; - var byteArray = []; - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break; - - c = str.charCodeAt(i); - hi = c >> 8; - lo = c % 256; - byteArray.push(lo); - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break; - dst[i + offset] = src[i] - } - return i -} - -},{"base64-js":15,"ieee754":16,"is-array":17}],15:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array; - - var PLUS = '+'.charCodeAt(0); - var SLASH = '/'.charCodeAt(0); - var NUMBER = '0'.charCodeAt(0); - var LOWER = 'a'.charCodeAt(0); - var UPPER = 'A'.charCodeAt(0); - var PLUS_URL_SAFE = '-'.charCodeAt(0); - var SLASH_URL_SAFE = '_'.charCodeAt(0); - - function decode (elt) { - var code = elt.charCodeAt(0); - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62; // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63; // '/' - if (code < NUMBER) - return -1; //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26; - if (code < UPPER + 26) - return code - UPPER; - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr; - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length; - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0; - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders); - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length; - - var L = 0; - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)); - push((tmp & 0xFF0000) >> 16); - push((tmp & 0xFF00) >> 8); - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4); - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2); - push((tmp >> 8) & 0xFF); - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length; - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1]; - output += encode(temp >> 2); - output += encode((temp << 4) & 0x3F); - output += '=='; - break; - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); - output += encode(temp >> 10); - output += encode((temp >> 4) & 0x3F); - output += encode((temp << 2) & 0x3F); - output += '='; - break - } - - return output - } - - exports.toByteArray = b64ToByteArray; - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],16:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i = isLE ? (nBytes - 1) : 0; - var d = isLE ? -1 : 1; - var s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen); - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -}; - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); - var i = isLE ? 0 : (nBytes - 1); - var d = isLE ? 1 : -1; - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++; - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],17:[function(require,module,exports){ - -/** - * isArray - */ - -var isArray = Array.isArray; - -/** - * toString - */ - -var str = Object.prototype.toString; - -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ - -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; - -},{}],18:[function(require,module,exports){ -/* jshint node: true */ -(function () { - "use strict"; - - function CookieAccessInfo(domain, path, secure, script) { - if (this instanceof CookieAccessInfo) { - this.domain = domain || undefined; - this.path = path || "/"; - this.secure = !!secure; - this.script = !!script; - return this; - } - return new CookieAccessInfo(domain, path, secure, script); - } - exports.CookieAccessInfo = CookieAccessInfo; - - function Cookie(cookiestr, request_domain, request_path) { - if (cookiestr instanceof Cookie) { - return cookiestr; - } - if (this instanceof Cookie) { - this.name = null; - this.value = null; - this.expiration_date = Infinity; - this.path = String(request_path || "/"); - this.explicit_path = false; - this.domain = request_domain || null; - this.explicit_domain = false; - this.secure = false; //how to define default? - this.noscript = false; //httponly - if (cookiestr) { - this.parse(cookiestr, request_domain, request_path); - } - return this; - } - return new Cookie(cookiestr, request_domain, request_path); - } - exports.Cookie = Cookie; - - Cookie.prototype.toString = function toString() { - var str = [this.name + "=" + this.value]; - if (this.expiration_date !== Infinity) { - str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); - } - if (this.domain) { - str.push("domain=" + this.domain); - } - if (this.path) { - str.push("path=" + this.path); - } - if (this.secure) { - str.push("secure"); - } - if (this.noscript) { - str.push("httponly"); - } - return str.join("; "); - }; - - Cookie.prototype.toValueString = function toValueString() { - return this.name + "=" + this.value; - }; - - var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; - Cookie.prototype.parse = function parse(str, request_domain, request_path) { - if (this instanceof Cookie) { - var parts = str.split(";").filter(function (value) { - return !!value; - }), - pair = parts[0].match(/([^=]+)=([\s\S]*)/), - key = pair[1], - value = pair[2], - i; - this.name = key; - this.value = value; - - for (i = 1; i < parts.length; i += 1) { - pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); - key = pair[1].trim().toLowerCase(); - value = pair[2]; - switch (key) { - case "httponly": - this.noscript = true; - break; - case "expires": - this.expiration_date = value ? - Number(Date.parse(value)) : - Infinity; - break; - case "path": - this.path = value ? - value.trim() : - ""; - this.explicit_path = true; - break; - case "domain": - this.domain = value ? - value.trim() : - ""; - this.explicit_domain = !!this.domain; - break; - case "secure": - this.secure = true; - break; - } - } - - if (!this.explicit_path) { - this.path = request_path || "/"; - } - if (!this.explicit_domain) { - this.domain = request_domain; - } - - return this; - } - return new Cookie().parse(str, request_domain, request_path); - }; - - Cookie.prototype.matches = function matches(access_info) { - if (this.noscript && access_info.script || - this.secure && !access_info.secure || - !this.collidesWith(access_info)) { - return false; - } - return true; - }; - - Cookie.prototype.collidesWith = function collidesWith(access_info) { - if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { - return false; - } - if (this.path && access_info.path.indexOf(this.path) !== 0) { - return false; - } - if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) { - return false; - } - var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); - var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); - if (cookie_domain === access_domain) { - return true; - } - if (cookie_domain) { - if (!this.explicit_domain) { - return false; // we already checked if the domains were exactly the same - } - var wildcard = access_domain.indexOf(cookie_domain); - if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { - return false; - } - return true; - } - return true; - }; - - function CookieJar() { - var cookies, cookies_list, collidable_cookie; - if (this instanceof CookieJar) { - cookies = Object.create(null); //name: [Cookie] - - this.setCookie = function setCookie(cookie, request_domain, request_path) { - var remove, i; - cookie = new Cookie(cookie, request_domain, request_path); - //Delete the cookie if the set is past the current time - remove = cookie.expiration_date <= Date.now(); - if (cookies[cookie.name] !== undefined) { - cookies_list = cookies[cookie.name]; - for (i = 0; i < cookies_list.length; i += 1) { - collidable_cookie = cookies_list[i]; - if (collidable_cookie.collidesWith(cookie)) { - if (remove) { - cookies_list.splice(i, 1); - if (cookies_list.length === 0) { - delete cookies[cookie.name]; - } - return false; - } - cookies_list[i] = cookie; - return cookie; - } - } - if (remove) { - return false; - } - cookies_list.push(cookie); - return cookie; - } - if (remove) { - return false; - } - cookies[cookie.name] = [cookie]; - return cookies[cookie.name]; - }; - //returns a cookie - this.getCookie = function getCookie(cookie_name, access_info) { - var cookie, i; - cookies_list = cookies[cookie_name]; - if (!cookies_list) { - return; - } - for (i = 0; i < cookies_list.length; i += 1) { - cookie = cookies_list[i]; - if (cookie.expiration_date <= Date.now()) { - if (cookies_list.length === 0) { - delete cookies[cookie.name]; - } - continue; - } - - if (cookie.matches(access_info)) { - return cookie; - } - } - }; - //returns a list of cookies - this.getCookies = function getCookies(access_info) { - var matches = [], cookie_name, cookie; - for (cookie_name in cookies) { - cookie = this.getCookie(cookie_name, access_info); - if (cookie) { - matches.push(cookie); - } - } - matches.toString = function toString() { - return matches.join(":"); - }; - matches.toValueString = function toValueString() { - return matches.map(function (c) { - return c.toValueString(); - }).join(';'); - }; - return matches; - }; - - return this; - } - return new CookieJar(); - } - exports.CookieJar = CookieJar; - - //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. - CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { - cookies = Array.isArray(cookies) ? - cookies : - cookies.split(cookie_str_splitter); - var successful = [], - i, - cookie; - cookies = cookies.map(function(item){ - return new Cookie(item, request_domain, request_path); - }); - for (i = 0; i < cookies.length; i += 1) { - cookie = cookies[i]; - if (this.setCookie(cookie, request_domain, request_path)) { - successful.push(cookie); - } - } - return successful; - }; -}()); - -},{}],19:[function(require,module,exports){ -'use strict'; - - -var yaml = require('./lib/js-yaml.js'); - - -module.exports = yaml; - -},{"./lib/js-yaml.js":20}],20:[function(require,module,exports){ -'use strict'; - - -var loader = require('./js-yaml/loader'); -var dumper = require('./js-yaml/dumper'); - - -function deprecated(name) { - return function () { - throw new Error('Function ' + name + ' is deprecated and cannot be used.'); - }; -} - - -module.exports.Type = require('./js-yaml/type'); -module.exports.Schema = require('./js-yaml/schema'); -module.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe'); -module.exports.JSON_SCHEMA = require('./js-yaml/schema/json'); -module.exports.CORE_SCHEMA = require('./js-yaml/schema/core'); -module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); -module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full'); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.safeLoad = loader.safeLoad; -module.exports.safeLoadAll = loader.safeLoadAll; -module.exports.dump = dumper.dump; -module.exports.safeDump = dumper.safeDump; -module.exports.YAMLException = require('./js-yaml/exception'); - -// Deprecated schema names from JS-YAML 2.0.x -module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe'); -module.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe'); -module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full'); - -// Deprecated functions from JS-YAML 1.x.x -module.exports.scan = deprecated('scan'); -module.exports.parse = deprecated('parse'); -module.exports.compose = deprecated('compose'); -module.exports.addConstructor = deprecated('addConstructor'); - -},{"./js-yaml/dumper":22,"./js-yaml/exception":23,"./js-yaml/loader":24,"./js-yaml/schema":26,"./js-yaml/schema/core":27,"./js-yaml/schema/default_full":28,"./js-yaml/schema/default_safe":29,"./js-yaml/schema/failsafe":30,"./js-yaml/schema/json":31,"./js-yaml/type":32}],21:[function(require,module,exports){ -'use strict'; - - -function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); -} - - -function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); -} - - -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; -} - - -function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; -} - - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); -} - - -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; - -},{}],22:[function(require,module,exports){ -'use strict'; - -/*eslint-disable no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); -var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - - type = schema.compiledTypeMap[tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - -function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// Simplified test for values allowed after the first character in plain style. -function isPlainSafe(c) { - // Uses a subset of nb-char - c-flow-indicator - ":" - "#" - // where nb-char ::= c-printable - b-char - c-byte-order-mark. - return isPrintable(c) && c !== 0xFEFF - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // - ":" - "#" - && c !== CHAR_COLON - && c !== CHAR_SHARP; -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - return isPrintable(c) && c !== 0xFEFF - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { - var i; - var char; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(string.charCodeAt(0)) - && !isWhitespace(string.charCodeAt(string.length - 1)); - - if (singleLineOnly) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char); - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char); - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - return plain && !testAmbiguousType(string) - ? STYLE_PLAIN : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (string[0] === ' ' && indentPerLevel > 9) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey) { - state.dump = (function () { - if (string.length === 0) { - return "''"; - } - if (!state.noCompatMode && - DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { - return "'" + string + "'"; - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char; - var escapeSeq; - - for (var i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - escapeSeq = ESCAPE_SEQUENCES[char]; - result += !escapeSeq && isPrintable(char) - ? string[i] - : escapeSeq || encodeHex(char); - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level, object[index], false, false)) { - if (index !== 0) _result += ', '; - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || index !== 0) { - _result += generateNextLine(state, level); - } - _result += '- ' + state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (index !== 0) pairBuffer += ', '; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + ': '; - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || index !== 0) { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - state.tag = explicit ? type.tag : '?'; - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - writeBlockSequence(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey); - } - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - state.dump = '!<' + state.tag + '> ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - - return ''; -} - -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - -module.exports.dump = dump; -module.exports.safeDump = safeDump; - -},{"./common":21,"./exception":23,"./schema/default_full":28,"./schema/default_safe":29}],23:[function(require,module,exports){ -// YAML error class. http://stackoverflow.com/questions/8458984 -// -'use strict'; - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - var result = this.name + ': '; - - result += this.reason || '(unknown reason)'; - - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } - - return result; -}; - - -module.exports = YAMLException; - -},{}],24:[function(require,module,exports){ -'use strict'; - -/*eslint-disable max-len,no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var Mark = require('./mark'); -var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); -var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.onWarning = options['onWarning'] || null; - this.legacy = options['legacy'] || false; - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - return new YAMLException( - message, - new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; - _position < _length; - _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode) { - var index, quantity; - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - throwError(state, 'duplicated mapping key'); - } - _result[keyNode] = valueNode; - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = captureEnd = state.position; - state.position++; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = {}, - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else { - break; // Reading is done. Go to the epilogue. - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if (state.lineIndent > nodeIndent && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!state.anchorMap.hasOwnProperty(alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag !== null && state.tag !== '!') { - if (state.tag === '?') { - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; - typeIndex < typeQuantity; - typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only assigned to plain scalars. So, it isn't - // needed to check for 'kind' conformity. - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (_hasOwnProperty.call(state.typeMap, state.tag)) { - type = state.typeMap[state.tag]; - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = {}; - state.anchorMap = {}; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - var documents = loadDocuments(input, options), index, length; - - for (index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -function safeLoadAll(input, output, options) { - loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; - -},{"./common":21,"./exception":23,"./mark":25,"./schema/default_full":28,"./schema/default_safe":29}],25:[function(require,module,exports){ -'use strict'; - - -var common = require('./common'); - - -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} - - -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; - - if (!this.buffer) return null; - - indent = indent || 4; - maxLength = maxLength || 75; - - head = ''; - start = this.position; - - while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; - } - } - - tail = ''; - end = this.position; - - while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; - } - } - - snippet = this.buffer.slice(start, end); - - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; - - -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; - - if (this.name) { - where += 'in "' + this.name + '" '; - } - - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { - snippet = this.getSnippet(); - - if (snippet) { - where += ':\n' + snippet; - } - } - - return where; -}; - - -module.exports = Mark; - -},{"./common":21}],26:[function(require,module,exports){ -'use strict'; - -/*eslint-disable max-len*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var Type = require('./type'); - - -function compileList(schema, name, result) { - var exclude = []; - - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); - - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag) { - exclude.push(previousIndex); - } - }); - - result.push(currentType); - }); - - return result.filter(function (type, index) { - return exclude.indexOf(index) === -1; - }); -} - - -function compileMap(/* lists... */) { - var result = {}, index, length; - - function collectType(type) { - result[type.tag] = type; - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - - return result; -} - - -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - - this.implicit.forEach(function (type) { - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} - - -Schema.DEFAULT = null; - - -Schema.create = function createSchema() { - var schemas, types; - - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; - - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; - - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } - - schemas = common.toArray(schemas); - types = common.toArray(types); - - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } - - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - return new Schema({ - include: schemas, - explicit: types - }); -}; - - -module.exports = Schema; - -},{"./common":21,"./exception":23,"./type":32}],27:[function(require,module,exports){ -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./json') - ] -}); - -},{"../schema":26,"./json":31}],28:[function(require,module,exports){ -// JS-YAML's default schema for `load` function. -// It is not described in the YAML specification. -// -// This schema is based on JS-YAML's default safe schema and includes -// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. -// -// Also this schema is used as default base schema at `Schema.create` function. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = Schema.DEFAULT = new Schema({ - include: [ - require('./default_safe') - ], - explicit: [ - require('../type/js/undefined'), - require('../type/js/regexp'), - require('../type/js/function') - ] -}); - -},{"../schema":26,"../type/js/function":37,"../type/js/regexp":38,"../type/js/undefined":39,"./default_safe":29}],29:[function(require,module,exports){ -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./core') - ], - implicit: [ - require('../type/timestamp'), - require('../type/merge') - ], - explicit: [ - require('../type/binary'), - require('../type/omap'), - require('../type/pairs'), - require('../type/set') - ] -}); - -},{"../schema":26,"../type/binary":33,"../type/merge":41,"../type/omap":43,"../type/pairs":44,"../type/set":46,"../type/timestamp":48,"./core":27}],30:[function(require,module,exports){ -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - explicit: [ - require('../type/str'), - require('../type/seq'), - require('../type/map') - ] -}); - -},{"../schema":26,"../type/map":40,"../type/seq":45,"../type/str":47}],31:[function(require,module,exports){ -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./failsafe') - ], - implicit: [ - require('../type/null'), - require('../type/bool'), - require('../type/int'), - require('../type/float') - ] -}); - -},{"../schema":26,"../type/bool":34,"../type/float":35,"../type/int":36,"../type/null":42,"./failsafe":30}],32:[function(require,module,exports){ -'use strict'; - -var YAMLException = require('./exception'); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; - -},{"./exception":23}],33:[function(require,module,exports){ -'use strict'; - -/*eslint-disable no-bitwise*/ - -var NodeBuffer; - -try { - // A trick for browserified version, to not include `Buffer` shim - var _require = require; - NodeBuffer = _require('buffer').Buffer; -} catch (__) {} - -var Type = require('../type'); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) return new NodeBuffer(result); - - return result; -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(object) { - return NodeBuffer && NodeBuffer.isBuffer(object); -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - -},{"../type":32}],34:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); - -},{"../type":32}],35:[function(require,module,exports){ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -var YAML_FLOAT_PATTERN = new RegExp( - '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' + - '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' + - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - '|[-+]?\\.(?:inf|Inf|INF)' + - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data)) return false; - - return true; -} - -function constructYamlFloat(data) { - var value, sign, base, digits; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - digits = []; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - - } else if (value.indexOf(':') >= 0) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); - - value = 0.0; - base = 1; - - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); - - return sign * value; - - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - -},{"../common":21,"../type":32}],36:[function(require,module,exports){ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits; - } - - // base 8 - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits; - } - - // base 10 (except 0) or base 60 - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch === ':') break; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - if (!hasDigits) return false; - - // if !base60 - done; - if (ch !== ':') return true; - - // base60 almost not used, no needs to optimize - return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch, base, digits = []; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value, 16); - return sign * parseInt(value, 8); - } - - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); - - value = 0; - base = 1; - - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); - - return sign * value; - - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (object) { return '0b' + object.toString(2); }, - octal: function (object) { return '0' + object.toString(8); }, - decimal: function (object) { return object.toString(10); }, - hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - -},{"../common":21,"../type":32}],37:[function(require,module,exports){ -'use strict'; - -var esprima; - -// Browserified version does not have esprima -// -// 1. For node.js just require module as deps -// 2. For browser try to require mudule via external AMD system. -// If not found - try to fallback to window.esprima. If not -// found too - then fail to parse. -// -try { - // workaround to exclude package from browserify list. - var _require = require; - esprima = _require('esprima'); -} catch (_) { - /*global window */ - if (typeof window !== 'undefined') esprima = window.esprima; -} - -var Type = require('../../type'); - -function resolveJavascriptFunction(data) { - if (data === null) return false; - - try { - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }); - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - ast.body[0].expression.type !== 'FunctionExpression') { - return false; - } - - return true; - } catch (err) { - return false; - } -} - -function constructJavascriptFunction(data) { - /*jslint evil:true*/ - - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - ast.body[0].expression.type !== 'FunctionExpression') { - throw new Error('Failed to resolve function'); - } - - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); - - body = ast.body[0].expression.body.range; - - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - /*eslint-disable no-new-func*/ - return new Function(params, source.slice(body[0] + 1, body[1] - 1)); -} - -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} - -function isFunction(object) { - return Object.prototype.toString.call(object) === '[object Function]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/function', { - kind: 'scalar', - resolve: resolveJavascriptFunction, - construct: constructJavascriptFunction, - predicate: isFunction, - represent: representJavascriptFunction -}); - -},{"../../type":32}],38:[function(require,module,exports){ -'use strict'; - -var Type = require('../../type'); - -function resolveJavascriptRegExp(data) { - if (data === null) return false; - if (data.length === 0) return false; - - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // if regexp starts with '/' it can have modifiers and must be properly closed - // `/foo/gim` - modifiers tail can be maximum 3 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - - if (modifiers.length > 3) return false; - // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; - } - - return true; -} - -function constructJavascriptRegExp(data) { - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // `/foo/gim` - tail can be maximum 4 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - - return new RegExp(regexp, modifiers); -} - -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) result += 'g'; - if (object.multiline) result += 'm'; - if (object.ignoreCase) result += 'i'; - - return result; -} - -function isRegExp(object) { - return Object.prototype.toString.call(object) === '[object RegExp]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); - -},{"../../type":32}],39:[function(require,module,exports){ -'use strict'; - -var Type = require('../../type'); - -function resolveJavascriptUndefined() { - return true; -} - -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; -} - -function representJavascriptUndefined() { - return ''; -} - -function isUndefined(object) { - return typeof object === 'undefined'; -} - -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); - -},{"../../type":32}],40:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - -},{"../type":32}],41:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - -},{"../type":32}],42:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; } - }, - defaultStyle: 'lowercase' -}); - -},{"../type":32}],43:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); - -},{"../type":32}],44:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); - -},{"../type":32}],45:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - -},{"../type":32}],46:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); - -},{"../type":32}],47:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - -},{"../type":32}],48:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - -},{"../type":32}],49:[function(require,module,exports){ -var baseIndexOf = require('../internal/baseIndexOf'), - binaryIndex = require('../internal/binaryIndex'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {boolean|number} [fromIndex=0] The index to search from or `true` - * to perform a binary search on a sorted array. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - * - * // performing a binary search - * _.indexOf([1, 1, 2, 2], 2, true); - * // => 2 - */ -function indexOf(array, value, fromIndex) { - var length = array ? array.length : 0; - if (!length) { - return -1; - } - if (typeof fromIndex == 'number') { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; - } else if (fromIndex) { - var index = binaryIndex(array, value); - if (index < length && - (value === value ? (value === array[index]) : (array[index] !== array[index]))) { - return index; - } - return -1; - } - return baseIndexOf(array, value, fromIndex || 0); -} - -module.exports = indexOf; - -},{"../internal/baseIndexOf":78,"../internal/binaryIndex":92}],50:[function(require,module,exports){ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -module.exports = last; - -},{}],51:[function(require,module,exports){ -var LazyWrapper = require('../internal/LazyWrapper'), - LodashWrapper = require('../internal/LodashWrapper'), - baseLodash = require('../internal/baseLodash'), - isArray = require('../lang/isArray'), - isObjectLike = require('../internal/isObjectLike'), - wrapperClone = require('../internal/wrapperClone'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates a `lodash` object which wraps `value` to enable implicit chaining. - * Methods that operate on and return arrays, collections, and functions can - * be chained together. Methods that retrieve a single value or may return a - * primitive value will automatically end the chain returning the unwrapped - * value. Explicit chaining may be enabled using `_.chain`. The execution of - * chained methods is lazy, that is, execution is deferred until `_#value` - * is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. Shortcut - * fusion is an optimization strategy which merge iteratee calls; this can help - * to avoid the creation of intermediate data structures and greatly reduce the - * number of iteratee executions. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, - * `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, - * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, - * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, - * and `where` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, - * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, - * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, - * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, - * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, - * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, - * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, - * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, - * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, - * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, - * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, - * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, - * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, - * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, - * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, - * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, - * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, - * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, - * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, - * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, - * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, - * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, - * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, - * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, - * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, - * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, - * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, - * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, - * `unescape`, `uniqueId`, `value`, and `words` - * - * The wrapper method `sample` will return a wrapped value when `n` is provided, - * otherwise an unwrapped value is returned. - * - * @name _ - * @constructor - * @category Chain - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var wrapped = _([1, 2, 3]); - * - * // returns an unwrapped value - * wrapped.reduce(function(total, n) { - * return total + n; - * }); - * // => 6 - * - * // returns a wrapped value - * var squares = wrapped.map(function(n) { - * return n * n; - * }); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ -function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); -} - -// Ensure wrappers are instances of `baseLodash`. -lodash.prototype = baseLodash.prototype; - -module.exports = lodash; - -},{"../internal/LazyWrapper":60,"../internal/LodashWrapper":61,"../internal/baseLodash":82,"../internal/isObjectLike":126,"../internal/wrapperClone":137,"../lang/isArray":140}],52:[function(require,module,exports){ -module.exports = require('./forEach'); - -},{"./forEach":54}],53:[function(require,module,exports){ -var baseEach = require('../internal/baseEach'), - createFind = require('../internal/createFind'); - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.result(_.find(users, function(chr) { - * return chr.age < 40; - * }), 'user'); - * // => 'barney' - * - * // using the `_.matches` callback shorthand - * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.result(_.find(users, 'active', false), 'user'); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.result(_.find(users, 'active'), 'user'); - * // => 'barney' - */ -var find = createFind(baseEach); - -module.exports = find; - -},{"../internal/baseEach":71,"../internal/createFind":102}],54:[function(require,module,exports){ -var arrayEach = require('../internal/arrayEach'), - baseEach = require('../internal/baseEach'), - createForEach = require('../internal/createForEach'); - -/** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early - * by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" property - * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ -var forEach = createForEach(arrayEach, baseEach); - -module.exports = forEach; - -},{"../internal/arrayEach":63,"../internal/baseEach":71,"../internal/createForEach":103}],55:[function(require,module,exports){ -var baseIndexOf = require('../internal/baseIndexOf'), - getLength = require('../internal/getLength'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'), - isLength = require('../internal/isLength'), - isString = require('../lang/isString'), - values = require('../object/values'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Checks if `target` is in `collection` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ -function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) - : (!!length && baseIndexOf(collection, target, fromIndex) > -1); -} - -module.exports = includes; - -},{"../internal/baseIndexOf":78,"../internal/getLength":112,"../internal/isIterateeCall":122,"../internal/isLength":125,"../lang/isArray":140,"../lang/isString":146,"../object/values":152}],56:[function(require,module,exports){ -var arrayMap = require('../internal/arrayMap'), - baseCallback = require('../internal/baseCallback'), - baseMap = require('../internal/baseMap'), - isArray = require('../lang/isArray'); - -/** - * Creates an array of values by running each element in `collection` through - * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three - * arguments: (value, index|key, collection). - * - * If a property name is provided for `iteratee` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `iteratee` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, - * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, - * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, - * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, - * `sum`, `uniq`, and `words` - * - * @static - * @memberOf _ - * @alias collect - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array} Returns the new mapped array. - * @example - * - * function timesThree(n) { - * return n * 3; - * } - * - * _.map([1, 2], timesThree); - * // => [3, 6] - * - * _.map({ 'a': 1, 'b': 2 }, timesThree); - * // => [3, 6] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // using the `_.property` callback shorthand - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee, thisArg) { - var func = isArray(collection) ? arrayMap : baseMap; - iteratee = baseCallback(iteratee, thisArg, 3); - return func(collection, iteratee); -} - -module.exports = map; - -},{"../internal/arrayMap":64,"../internal/baseCallback":67,"../internal/baseMap":83,"../lang/isArray":140}],57:[function(require,module,exports){ -var getNative = require('../internal/getNative'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeNow = getNative(Date, 'now'); - -/** - * Gets the number of milliseconds that have elapsed since the Unix epoch - * (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @category Date - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => logs the number of milliseconds it took for the deferred function to be invoked - */ -var now = nativeNow || function() { - return new Date().getTime(); -}; - -module.exports = now; - -},{"../internal/getNative":114}],58:[function(require,module,exports){ -var createWrapper = require('../internal/createWrapper'), - replaceHolders = require('../internal/replaceHolders'), - restParam = require('./restParam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind` this method does not set the "length" - * property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var greet = function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * }; - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // using placeholders - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ -var bind = restParam(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(func, bitmask, thisArg, partials, holders); -}); - -// Assign default placeholders. -bind.placeholder = {}; - -module.exports = bind; - -},{"../internal/createWrapper":106,"../internal/replaceHolders":132,"./restParam":59}],59:[function(require,module,exports){ -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} - -module.exports = restParam; - -},{}],60:[function(require,module,exports){ -var baseCreate = require('./baseCreate'), - baseLodash = require('./baseLodash'); - -/** Used as references for `-Infinity` and `Infinity`. */ -var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; - -/** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @param {*} value The value to wrap. - */ -function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = POSITIVE_INFINITY; - this.__views__ = []; -} - -LazyWrapper.prototype = baseCreate(baseLodash.prototype); -LazyWrapper.prototype.constructor = LazyWrapper; - -module.exports = LazyWrapper; - -},{"./baseCreate":70,"./baseLodash":82}],61:[function(require,module,exports){ -var baseCreate = require('./baseCreate'), - baseLodash = require('./baseLodash'); - -/** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable chaining for all wrapper methods. - * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. - */ -function LodashWrapper(value, chainAll, actions) { - this.__wrapped__ = value; - this.__actions__ = actions || []; - this.__chain__ = !!chainAll; -} - -LodashWrapper.prototype = baseCreate(baseLodash.prototype); -LodashWrapper.prototype.constructor = LodashWrapper; - -module.exports = LodashWrapper; - -},{"./baseCreate":70,"./baseLodash":82}],62:[function(require,module,exports){ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function arrayCopy(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = arrayCopy; - -},{}],63:[function(require,module,exports){ -/** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; - -},{}],64:[function(require,module,exports){ -/** - * A specialized version of `_.map` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -module.exports = arrayMap; - -},{}],65:[function(require,module,exports){ -/** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -module.exports = arraySome; - -},{}],66:[function(require,module,exports){ -var baseCopy = require('./baseCopy'), - keys = require('../object/keys'); - -/** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); -} - -module.exports = baseAssign; - -},{"../object/keys":149,"./baseCopy":69}],67:[function(require,module,exports){ -var baseMatches = require('./baseMatches'), - baseMatchesProperty = require('./baseMatchesProperty'), - bindCallback = require('./bindCallback'), - identity = require('../utility/identity'), - property = require('../utility/property'); - -/** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return thisArg === undefined - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return thisArg === undefined - ? property(func) - : baseMatchesProperty(func, thisArg); -} - -module.exports = baseCallback; - -},{"../utility/identity":154,"../utility/property":156,"./baseMatches":84,"./baseMatchesProperty":85,"./bindCallback":94}],68:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - arrayEach = require('./arrayEach'), - baseAssign = require('./baseAssign'), - baseForOwn = require('./baseForOwn'), - initCloneArray = require('./initCloneArray'), - initCloneByTag = require('./initCloneByTag'), - initCloneObject = require('./initCloneObject'), - isArray = require('../lang/isArray'), - isHostObject = require('./isHostObject'), - isObject = require('../lang/isObject'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = -cloneableTags[dateTag] = cloneableTags[float32Tag] = -cloneableTags[float64Tag] = cloneableTags[int8Tag] = -cloneableTags[int16Tag] = cloneableTags[int32Tag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[stringTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[mapTag] = cloneableTags[setTag] = -cloneableTags[weakMapTag] = false; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * The base implementation of `_.clone` without support for argument juggling - * and `this` binding `customizer` functions. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The object `value` belongs to. - * @param {Array} [stackA=[]] Tracks traversed source objects. - * @param {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { - var result; - if (customizer) { - result = object ? customizer(value, key, object) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return arrayCopy(value, result); - } - } else { - var tag = objToString.call(value), - isFunc = tag == funcTag; - - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return baseAssign(result, value); - } - } else { - return cloneableTags[tag] - ? initCloneByTag(value, tag, isDeep) - : (object ? value : {}); - } - } - // Check for circular references and return its corresponding clone. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } - } - // Add the source value to the stack of traversed objects and associate it with its clone. - stackA.push(value); - stackB.push(result); - - // Recursively populate clone (susceptible to call stack limits). - (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { - result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); - }); - return result; -} - -module.exports = baseClone; - -},{"../lang/isArray":140,"../lang/isObject":144,"./arrayCopy":62,"./arrayEach":63,"./baseAssign":66,"./baseForOwn":76,"./initCloneArray":116,"./initCloneByTag":117,"./initCloneObject":118,"./isHostObject":120}],69:[function(require,module,exports){ -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ -function baseCopy(source, props, object) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; -} - -module.exports = baseCopy; - -},{}],70:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(prototype) { - if (isObject(prototype)) { - object.prototype = prototype; - var result = new object; - object.prototype = undefined; - } - return result || {}; - }; -}()); - -module.exports = baseCreate; - -},{"../lang/isObject":144}],71:[function(require,module,exports){ -var baseForOwn = require('./baseForOwn'), - createBaseEach = require('./createBaseEach'); - -/** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -module.exports = baseEach; - -},{"./baseForOwn":76,"./createBaseEach":98}],72:[function(require,module,exports){ -/** - * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, - * without support for callback shorthands and `this` binding, which iterates - * over `collection` using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; -} - -module.exports = baseFind; - -},{}],73:[function(require,module,exports){ -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to search. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = baseFindIndex; - -},{}],74:[function(require,module,exports){ -var createBaseFor = require('./createBaseFor'); - -/** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -module.exports = baseFor; - -},{"./createBaseFor":99}],75:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keysIn = require('../object/keysIn'); - -/** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); -} - -module.exports = baseForIn; - -},{"../object/keysIn":150,"./baseFor":74}],76:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keys = require('../object/keys'); - -/** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return baseFor(object, iteratee, keys); -} - -module.exports = baseForOwn; - -},{"../object/keys":149,"./baseFor":74}],77:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - object = toObject(object); - if (pathKey !== undefined && pathKey in object) { - path = [pathKey]; - } - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = toObject(object)[path[index++]]; - } - return (index && index == length) ? object : undefined; -} - -module.exports = baseGet; - -},{"./toObject":135}],78:[function(require,module,exports){ -var indexOfNaN = require('./indexOfNaN'); - -/** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @private - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = baseIndexOf; - -},{"./indexOfNaN":115}],79:[function(require,module,exports){ -var baseIsEqualDeep = require('./baseIsEqualDeep'), - isObject = require('../lang/isObject'), - isObjectLike = require('./isObjectLike'); - -/** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); -} - -module.exports = baseIsEqual; - -},{"../lang/isObject":144,"./baseIsEqualDeep":80,"./isObjectLike":126}],80:[function(require,module,exports){ -var equalArrays = require('./equalArrays'), - equalByTag = require('./equalByTag'), - equalObjects = require('./equalObjects'), - isArray = require('../lang/isArray'), - isHostObject = require('./isHostObject'), - isTypedArray = require('../lang/isTypedArray'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } - } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), - isSameTag = objTag == othTag; - - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); - } - } - if (!isSameTag) { - return false; - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; -} - -module.exports = baseIsEqualDeep; - -},{"../lang/isArray":140,"../lang/isTypedArray":147,"./equalArrays":107,"./equalByTag":108,"./equalObjects":109,"./isHostObject":120}],81:[function(require,module,exports){ -var baseIsEqual = require('./baseIsEqual'), - toObject = require('./toObject'); - -/** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} matchData The propery names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = toObject(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { - return false; - } - } - } - return true; -} - -module.exports = baseIsMatch; - -},{"./baseIsEqual":79,"./toObject":135}],82:[function(require,module,exports){ -/** - * The function whose prototype all chaining wrappers inherit from. - * - * @private - */ -function baseLodash() { - // No operation performed. -} - -module.exports = baseLodash; - -},{}],83:[function(require,module,exports){ -var baseEach = require('./baseEach'), - isArrayLike = require('./isArrayLike'); - -/** - * The base implementation of `_.map` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -module.exports = baseMap; - -},{"./baseEach":71,"./isArrayLike":119}],84:[function(require,module,exports){ -var baseIsMatch = require('./baseIsMatch'), - getMatchData = require('./getMatchData'), - toObject = require('./toObject'); - -/** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; - - return function(object) { - if (object == null) { - return false; - } - object = toObject(object); - return object[key] === value && (value !== undefined || (key in object)); - }; - } - return function(object) { - return baseIsMatch(object, matchData); - }; -} - -module.exports = baseMatches; - -},{"./baseIsMatch":81,"./getMatchData":113,"./toObject":135}],85:[function(require,module,exports){ -var baseGet = require('./baseGet'), - baseIsEqual = require('./baseIsEqual'), - baseSlice = require('./baseSlice'), - isArray = require('../lang/isArray'), - isKey = require('./isKey'), - isStrictComparable = require('./isStrictComparable'), - last = require('../array/last'), - toObject = require('./toObject'), - toPath = require('./toPath'); - -/** - * The base implementation of `_.matchesProperty` which does not clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to compare. - * @returns {Function} Returns the new function. - */ -function baseMatchesProperty(path, srcValue) { - var isArr = isArray(path), - isCommon = isKey(path) && isStrictComparable(srcValue), - pathKey = (path + ''); - - path = toPath(path); - return function(object) { - if (object == null) { - return false; - } - var key = pathKey; - object = toObject(object); - if ((isArr || !isCommon) && !(key in object)) { - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - key = last(path); - object = toObject(object); - } - return object[key] === srcValue - ? (srcValue !== undefined || (key in object)) - : baseIsEqual(srcValue, object[key], undefined, true); - }; -} - -module.exports = baseMatchesProperty; - -},{"../array/last":50,"../lang/isArray":140,"./baseGet":77,"./baseIsEqual":79,"./baseSlice":89,"./isKey":123,"./isStrictComparable":127,"./toObject":135,"./toPath":136}],86:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : toObject(object)[key]; - }; -} - -module.exports = baseProperty; - -},{"./toObject":135}],87:[function(require,module,exports){ -var baseGet = require('./baseGet'), - toPath = require('./toPath'); - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - */ -function basePropertyDeep(path) { - var pathKey = (path + ''); - path = toPath(path); - return function(object) { - return baseGet(object, path, pathKey); - }; -} - -module.exports = basePropertyDeep; - -},{"./baseGet":77,"./toPath":136}],88:[function(require,module,exports){ -var identity = require('../utility/identity'), - metaMap = require('./metaMap'); - -/** - * The base implementation of `setData` without support for hot loop detection. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; -}; - -module.exports = baseSetData; - -},{"../utility/identity":154,"./metaMap":129}],89:[function(require,module,exports){ -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -module.exports = baseSlice; - -},{}],90:[function(require,module,exports){ -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - return value == null ? '' : (value + ''); -} - -module.exports = baseToString; - -},{}],91:[function(require,module,exports){ -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - var index = -1, - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = baseValues; - -},{}],92:[function(require,module,exports){ -var binaryIndexBy = require('./binaryIndexBy'), - identity = require('../utility/identity'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - -/** - * Performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function binaryIndex(array, value, retHighest) { - var low = 0, - high = array ? array.length : low; - - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; - - if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return binaryIndexBy(array, value, identity, retHighest); -} - -module.exports = binaryIndex; - -},{"../utility/identity":154,"./binaryIndexBy":93}],93:[function(require,module,exports){ -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor, - nativeMin = Math.min; - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; - -/** - * This function is like `binaryIndex` except that it invokes `iteratee` for - * `value` and each element of `array` to compute their sort ranking. The - * iteratee is invoked with one argument; (value). - * - * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The function invoked per iteration. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - */ -function binaryIndexBy(array, value, iteratee, retHighest) { - value = iteratee(value); - - var low = 0, - high = array ? array.length : 0, - valIsNaN = value !== value, - valIsNull = value === null, - valIsUndef = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - isDef = computed !== undefined, - isReflexive = computed === computed; - - if (valIsNaN) { - var setLow = isReflexive || retHighest; - } else if (valIsNull) { - setLow = isReflexive && isDef && (retHighest || computed != null); - } else if (valIsUndef) { - setLow = isReflexive && (retHighest || isDef); - } else if (computed == null) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin(high, MAX_ARRAY_INDEX); -} - -module.exports = binaryIndexBy; - -},{}],94:[function(require,module,exports){ -var identity = require('../utility/identity'); - -/** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; -} - -module.exports = bindCallback; - -},{"../utility/identity":154}],95:[function(require,module,exports){ -(function (global){ -/** Native method references. */ -var ArrayBuffer = global.ArrayBuffer, - Uint8Array = global.Uint8Array; - -/** - * Creates a clone of the given array buffer. - * - * @private - * @param {ArrayBuffer} buffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function bufferClone(buffer) { - var result = new ArrayBuffer(buffer.byteLength), - view = new Uint8Array(result); - - view.set(new Uint8Array(buffer)); - return result; -} - -module.exports = bufferClone; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2J1ZmZlckNsb25lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBOYXRpdmUgbWV0aG9kIHJlZmVyZW5jZXMuICovXG52YXIgQXJyYXlCdWZmZXIgPSBnbG9iYWwuQXJyYXlCdWZmZXIsXG4gICAgVWludDhBcnJheSA9IGdsb2JhbC5VaW50OEFycmF5O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBjbG9uZSBvZiB0aGUgZ2l2ZW4gYXJyYXkgYnVmZmVyLlxuICpcbiAqIEBwcml2YXRlXG4gKiBAcGFyYW0ge0FycmF5QnVmZmVyfSBidWZmZXIgVGhlIGFycmF5IGJ1ZmZlciB0byBjbG9uZS5cbiAqIEByZXR1cm5zIHtBcnJheUJ1ZmZlcn0gUmV0dXJucyB0aGUgY2xvbmVkIGFycmF5IGJ1ZmZlci5cbiAqL1xuZnVuY3Rpb24gYnVmZmVyQ2xvbmUoYnVmZmVyKSB7XG4gIHZhciByZXN1bHQgPSBuZXcgQXJyYXlCdWZmZXIoYnVmZmVyLmJ5dGVMZW5ndGgpLFxuICAgICAgdmlldyA9IG5ldyBVaW50OEFycmF5KHJlc3VsdCk7XG5cbiAgdmlldy5zZXQobmV3IFVpbnQ4QXJyYXkoYnVmZmVyKSk7XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gYnVmZmVyQ2xvbmU7XG4iXX0= -},{}],96:[function(require,module,exports){ -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgs(args, partials, holders) { - var holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - leftIndex = -1, - leftLength = partials.length, - result = Array(leftLength + argsLength); - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - while (argsLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; -} - -module.exports = composeArgs; - -},{}],97:[function(require,module,exports){ -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgsRight(args, partials, holders) { - var holdersIndex = -1, - holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - rightIndex = -1, - rightLength = partials.length, - result = Array(argsLength + rightLength); - - while (++argsIndex < argsLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - return result; -} - -module.exports = composeArgsRight; - -},{}],98:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'), - toObject = require('./toObject'); - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -module.exports = createBaseEach; - -},{"./getLength":112,"./isLength":125,"./toObject":135}],99:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = createBaseFor; - -},{"./toObject":135}],100:[function(require,module,exports){ -(function (global){ -var createCtorWrapper = require('./createCtorWrapper'); - -/** - * Creates a function that wraps `func` and invokes it with the `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new bound function. - */ -function createBindWrapper(func, thisArg) { - var Ctor = createCtorWrapper(func); - - function wrapper() { - var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; - return fn.apply(thisArg, arguments); - } - return wrapper; -} - -module.exports = createBindWrapper; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUJpbmRXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyk7XG5cbi8qKlxuICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgd3JhcHMgYGZ1bmNgIGFuZCBpbnZva2VzIGl0IHdpdGggdGhlIGB0aGlzYFxuICogYmluZGluZyBvZiBgdGhpc0FyZ2AuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGJpbmQuXG4gKiBAcGFyYW0geyp9IFt0aGlzQXJnXSBUaGUgYHRoaXNgIGJpbmRpbmcgb2YgYGZ1bmNgLlxuICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgYm91bmQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZUJpbmRXcmFwcGVyKGZ1bmMsIHRoaXNBcmcpIHtcbiAgdmFyIEN0b3IgPSBjcmVhdGVDdG9yV3JhcHBlcihmdW5jKTtcblxuICBmdW5jdGlvbiB3cmFwcGVyKCkge1xuICAgIHZhciBmbiA9ICh0aGlzICYmIHRoaXMgIT09IGdsb2JhbCAmJiB0aGlzIGluc3RhbmNlb2Ygd3JhcHBlcikgPyBDdG9yIDogZnVuYztcbiAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZywgYXJndW1lbnRzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVCaW5kV3JhcHBlcjtcbiJdfQ== -},{"./createCtorWrapper":101}],101:[function(require,module,exports){ -var baseCreate = require('./baseCreate'), - isObject = require('../lang/isObject'); - -/** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ -function createCtorWrapper(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. - // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; -} - -module.exports = createCtorWrapper; - -},{"../lang/isObject":144,"./baseCreate":70}],102:[function(require,module,exports){ -var baseCallback = require('./baseCallback'), - baseFind = require('./baseFind'), - baseFindIndex = require('./baseFindIndex'), - isArray = require('../lang/isArray'); - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new find function. - */ -function createFind(eachFunc, fromRight) { - return function(collection, predicate, thisArg) { - predicate = baseCallback(predicate, thisArg, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, fromRight); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, eachFunc); - }; -} - -module.exports = createFind; - -},{"../lang/isArray":140,"./baseCallback":67,"./baseFind":72,"./baseFindIndex":73}],103:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isArray = require('../lang/isArray'); - -/** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ -function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; -} - -module.exports = createForEach; - -},{"../lang/isArray":140,"./bindCallback":94}],104:[function(require,module,exports){ -(function (global){ -var arrayCopy = require('./arrayCopy'), - composeArgs = require('./composeArgs'), - composeArgsRight = require('./composeArgsRight'), - createCtorWrapper = require('./createCtorWrapper'), - isLaziable = require('./isLaziable'), - reorder = require('./reorder'), - replaceHolders = require('./replaceHolders'), - setData = require('./setData'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64, - ARY_FLAG = 128; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that wraps `func` and invokes it with optional `this` - * binding of, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & ARY_FLAG, - isBind = bitmask & BIND_FLAG, - isBindKey = bitmask & BIND_KEY_FLAG, - isCurry = bitmask & CURRY_FLAG, - isCurryBound = bitmask & CURRY_BOUND_FLAG, - isCurryRight = bitmask & CURRY_RIGHT_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); - - function wrapper() { - // Avoid `arguments` object use disqualifying optimizations by - // converting it to an array before providing it to other functions. - var length = arguments.length, - index = length, - args = Array(length); - - while (index--) { - args[index] = arguments[index]; - } - if (partials) { - args = composeArgs(args, partials, holders); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight); - } - if (isCurry || isCurryRight) { - var placeholder = wrapper.placeholder, - argsHolders = replaceHolders(args, placeholder); - - length -= argsHolders.length; - if (length < arity) { - var newArgPos = argPos ? arrayCopy(argPos) : undefined, - newArity = nativeMax(arity - length, 0), - newsHolders = isCurry ? argsHolders : undefined, - newHoldersRight = isCurry ? undefined : argsHolders, - newPartials = isCurry ? args : undefined, - newPartialsRight = isCurry ? undefined : args; - - bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); - - if (!isCurryBound) { - bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); - } - var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], - result = createHybridWrapper.apply(undefined, newData); - - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return result; - } - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - if (argPos) { - args = reorder(args, argPos); - } - if (isAry && ary < args.length) { - args.length = ary; - } - if (this && this !== global && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(func); - } - return fn.apply(thisBinding, args); - } - return wrapper; -} - -module.exports = createHybridWrapper; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUh5YnJpZFdyYXBwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYXJyYXlDb3B5ID0gcmVxdWlyZSgnLi9hcnJheUNvcHknKSxcbiAgICBjb21wb3NlQXJncyA9IHJlcXVpcmUoJy4vY29tcG9zZUFyZ3MnKSxcbiAgICBjb21wb3NlQXJnc1JpZ2h0ID0gcmVxdWlyZSgnLi9jb21wb3NlQXJnc1JpZ2h0JyksXG4gICAgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyksXG4gICAgaXNMYXppYWJsZSA9IHJlcXVpcmUoJy4vaXNMYXppYWJsZScpLFxuICAgIHJlb3JkZXIgPSByZXF1aXJlKCcuL3Jlb3JkZXInKSxcbiAgICByZXBsYWNlSG9sZGVycyA9IHJlcXVpcmUoJy4vcmVwbGFjZUhvbGRlcnMnKSxcbiAgICBzZXREYXRhID0gcmVxdWlyZSgnLi9zZXREYXRhJyk7XG5cbi8qKiBVc2VkIHRvIGNvbXBvc2UgYml0bWFza3MgZm9yIHdyYXBwZXIgbWV0YWRhdGEuICovXG52YXIgQklORF9GTEFHID0gMSxcbiAgICBCSU5EX0tFWV9GTEFHID0gMixcbiAgICBDVVJSWV9CT1VORF9GTEFHID0gNCxcbiAgICBDVVJSWV9GTEFHID0gOCxcbiAgICBDVVJSWV9SSUdIVF9GTEFHID0gMTYsXG4gICAgUEFSVElBTF9GTEFHID0gMzIsXG4gICAgUEFSVElBTF9SSUdIVF9GTEFHID0gNjQsXG4gICAgQVJZX0ZMQUcgPSAxMjg7XG5cbi8qIE5hdGl2ZSBtZXRob2QgcmVmZXJlbmNlcyBmb3IgdGhvc2Ugd2l0aCB0aGUgc2FtZSBuYW1lIGFzIG90aGVyIGBsb2Rhc2hgIG1ldGhvZHMuICovXG52YXIgbmF0aXZlTWF4ID0gTWF0aC5tYXg7XG5cbi8qKlxuICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgd3JhcHMgYGZ1bmNgIGFuZCBpbnZva2VzIGl0IHdpdGggb3B0aW9uYWwgYHRoaXNgXG4gKiBiaW5kaW5nIG9mLCBwYXJ0aWFsIGFwcGxpY2F0aW9uLCBhbmQgY3VycnlpbmcuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7RnVuY3Rpb258c3RyaW5nfSBmdW5jIFRoZSBmdW5jdGlvbiBvciBtZXRob2QgbmFtZSB0byByZWZlcmVuY2UuXG4gKiBAcGFyYW0ge251bWJlcn0gYml0bWFzayBUaGUgYml0bWFzayBvZiBmbGFncy4gU2VlIGBjcmVhdGVXcmFwcGVyYCBmb3IgbW9yZSBkZXRhaWxzLlxuICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBmdW5jYC5cbiAqIEBwYXJhbSB7QXJyYXl9IFtwYXJ0aWFsc10gVGhlIGFyZ3VtZW50cyB0byBwcmVwZW5kIHRvIHRob3NlIHByb3ZpZGVkIHRvIHRoZSBuZXcgZnVuY3Rpb24uXG4gKiBAcGFyYW0ge0FycmF5fSBbaG9sZGVyc10gVGhlIGBwYXJ0aWFsc2AgcGxhY2Vob2xkZXIgaW5kZXhlcy5cbiAqIEBwYXJhbSB7QXJyYXl9IFtwYXJ0aWFsc1JpZ2h0XSBUaGUgYXJndW1lbnRzIHRvIGFwcGVuZCB0byB0aG9zZSBwcm92aWRlZCB0byB0aGUgbmV3IGZ1bmN0aW9uLlxuICogQHBhcmFtIHtBcnJheX0gW2hvbGRlcnNSaWdodF0gVGhlIGBwYXJ0aWFsc1JpZ2h0YCBwbGFjZWhvbGRlciBpbmRleGVzLlxuICogQHBhcmFtIHtBcnJheX0gW2FyZ1Bvc10gVGhlIGFyZ3VtZW50IHBvc2l0aW9ucyBvZiB0aGUgbmV3IGZ1bmN0aW9uLlxuICogQHBhcmFtIHtudW1iZXJ9IFthcnldIFRoZSBhcml0eSBjYXAgb2YgYGZ1bmNgLlxuICogQHBhcmFtIHtudW1iZXJ9IFthcml0eV0gVGhlIGFyaXR5IG9mIGBmdW5jYC5cbiAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IHdyYXBwZWQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZUh5YnJpZFdyYXBwZXIoZnVuYywgYml0bWFzaywgdGhpc0FyZywgcGFydGlhbHMsIGhvbGRlcnMsIHBhcnRpYWxzUmlnaHQsIGhvbGRlcnNSaWdodCwgYXJnUG9zLCBhcnksIGFyaXR5KSB7XG4gIHZhciBpc0FyeSA9IGJpdG1hc2sgJiBBUllfRkxBRyxcbiAgICAgIGlzQmluZCA9IGJpdG1hc2sgJiBCSU5EX0ZMQUcsXG4gICAgICBpc0JpbmRLZXkgPSBiaXRtYXNrICYgQklORF9LRVlfRkxBRyxcbiAgICAgIGlzQ3VycnkgPSBiaXRtYXNrICYgQ1VSUllfRkxBRyxcbiAgICAgIGlzQ3VycnlCb3VuZCA9IGJpdG1hc2sgJiBDVVJSWV9CT1VORF9GTEFHLFxuICAgICAgaXNDdXJyeVJpZ2h0ID0gYml0bWFzayAmIENVUlJZX1JJR0hUX0ZMQUcsXG4gICAgICBDdG9yID0gaXNCaW5kS2V5ID8gdW5kZWZpbmVkIDogY3JlYXRlQ3RvcldyYXBwZXIoZnVuYyk7XG5cbiAgZnVuY3Rpb24gd3JhcHBlcigpIHtcbiAgICAvLyBBdm9pZCBgYXJndW1lbnRzYCBvYmplY3QgdXNlIGRpc3F1YWxpZnlpbmcgb3B0aW1pemF0aW9ucyBieVxuICAgIC8vIGNvbnZlcnRpbmcgaXQgdG8gYW4gYXJyYXkgYmVmb3JlIHByb3ZpZGluZyBpdCB0byBvdGhlciBmdW5jdGlvbnMuXG4gICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsXG4gICAgICAgIGluZGV4ID0gbGVuZ3RoLFxuICAgICAgICBhcmdzID0gQXJyYXkobGVuZ3RoKTtcblxuICAgIHdoaWxlIChpbmRleC0tKSB7XG4gICAgICBhcmdzW2luZGV4XSA9IGFyZ3VtZW50c1tpbmRleF07XG4gICAgfVxuICAgIGlmIChwYXJ0aWFscykge1xuICAgICAgYXJncyA9IGNvbXBvc2VBcmdzKGFyZ3MsIHBhcnRpYWxzLCBob2xkZXJzKTtcbiAgICB9XG4gICAgaWYgKHBhcnRpYWxzUmlnaHQpIHtcbiAgICAgIGFyZ3MgPSBjb21wb3NlQXJnc1JpZ2h0KGFyZ3MsIHBhcnRpYWxzUmlnaHQsIGhvbGRlcnNSaWdodCk7XG4gICAgfVxuICAgIGlmIChpc0N1cnJ5IHx8IGlzQ3VycnlSaWdodCkge1xuICAgICAgdmFyIHBsYWNlaG9sZGVyID0gd3JhcHBlci5wbGFjZWhvbGRlcixcbiAgICAgICAgICBhcmdzSG9sZGVycyA9IHJlcGxhY2VIb2xkZXJzKGFyZ3MsIHBsYWNlaG9sZGVyKTtcblxuICAgICAgbGVuZ3RoIC09IGFyZ3NIb2xkZXJzLmxlbmd0aDtcbiAgICAgIGlmIChsZW5ndGggPCBhcml0eSkge1xuICAgICAgICB2YXIgbmV3QXJnUG9zID0gYXJnUG9zID8gYXJyYXlDb3B5KGFyZ1BvcykgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZXdBcml0eSA9IG5hdGl2ZU1heChhcml0eSAtIGxlbmd0aCwgMCksXG4gICAgICAgICAgICBuZXdzSG9sZGVycyA9IGlzQ3VycnkgPyBhcmdzSG9sZGVycyA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIG5ld0hvbGRlcnNSaWdodCA9IGlzQ3VycnkgPyB1bmRlZmluZWQgOiBhcmdzSG9sZGVycyxcbiAgICAgICAgICAgIG5ld1BhcnRpYWxzID0gaXNDdXJyeSA/IGFyZ3MgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBuZXdQYXJ0aWFsc1JpZ2h0ID0gaXNDdXJyeSA/IHVuZGVmaW5lZCA6IGFyZ3M7XG5cbiAgICAgICAgYml0bWFzayB8PSAoaXNDdXJyeSA/IFBBUlRJQUxfRkxBRyA6IFBBUlRJQUxfUklHSFRfRkxBRyk7XG4gICAgICAgIGJpdG1hc2sgJj0gfihpc0N1cnJ5ID8gUEFSVElBTF9SSUdIVF9GTEFHIDogUEFSVElBTF9GTEFHKTtcblxuICAgICAgICBpZiAoIWlzQ3VycnlCb3VuZCkge1xuICAgICAgICAgIGJpdG1hc2sgJj0gfihCSU5EX0ZMQUcgfCBCSU5EX0tFWV9GTEFHKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmV3RGF0YSA9IFtmdW5jLCBiaXRtYXNrLCB0aGlzQXJnLCBuZXdQYXJ0aWFscywgbmV3c0hvbGRlcnMsIG5ld1BhcnRpYWxzUmlnaHQsIG5ld0hvbGRlcnNSaWdodCwgbmV3QXJnUG9zLCBhcnksIG5ld0FyaXR5XSxcbiAgICAgICAgICAgIHJlc3VsdCA9IGNyZWF0ZUh5YnJpZFdyYXBwZXIuYXBwbHkodW5kZWZpbmVkLCBuZXdEYXRhKTtcblxuICAgICAgICBpZiAoaXNMYXppYWJsZShmdW5jKSkge1xuICAgICAgICAgIHNldERhdGEocmVzdWx0LCBuZXdEYXRhKTtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQucGxhY2Vob2xkZXIgPSBwbGFjZWhvbGRlcjtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cbiAgICB9XG4gICAgdmFyIHRoaXNCaW5kaW5nID0gaXNCaW5kID8gdGhpc0FyZyA6IHRoaXMsXG4gICAgICAgIGZuID0gaXNCaW5kS2V5ID8gdGhpc0JpbmRpbmdbZnVuY10gOiBmdW5jO1xuXG4gICAgaWYgKGFyZ1Bvcykge1xuICAgICAgYXJncyA9IHJlb3JkZXIoYXJncywgYXJnUG9zKTtcbiAgICB9XG4gICAgaWYgKGlzQXJ5ICYmIGFyeSA8IGFyZ3MubGVuZ3RoKSB7XG4gICAgICBhcmdzLmxlbmd0aCA9IGFyeTtcbiAgICB9XG4gICAgaWYgKHRoaXMgJiYgdGhpcyAhPT0gZ2xvYmFsICYmIHRoaXMgaW5zdGFuY2VvZiB3cmFwcGVyKSB7XG4gICAgICBmbiA9IEN0b3IgfHwgY3JlYXRlQ3RvcldyYXBwZXIoZnVuYyk7XG4gICAgfVxuICAgIHJldHVybiBmbi5hcHBseSh0aGlzQmluZGluZywgYXJncyk7XG4gIH1cbiAgcmV0dXJuIHdyYXBwZXI7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gY3JlYXRlSHlicmlkV3JhcHBlcjtcbiJdfQ== -},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./createCtorWrapper":101,"./isLaziable":124,"./reorder":131,"./replaceHolders":132,"./setData":133}],105:[function(require,module,exports){ -(function (global){ -var createCtorWrapper = require('./createCtorWrapper'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` and invokes it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. - * - * @private - * @param {Function} func The function to partially apply arguments to. - * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to the new function. - * @returns {Function} Returns the new bound function. - */ -function createPartialWrapper(func, bitmask, thisArg, partials) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); - - function wrapper() { - // Avoid `arguments` object use disqualifying optimizations by - // converting it to an array before providing it `func`. - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength); - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, args); - } - return wrapper; -} - -module.exports = createPartialWrapper; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZVBhcnRpYWxXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyk7XG5cbi8qKiBVc2VkIHRvIGNvbXBvc2UgYml0bWFza3MgZm9yIHdyYXBwZXIgbWV0YWRhdGEuICovXG52YXIgQklORF9GTEFHID0gMTtcblxuLyoqXG4gKiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCB3cmFwcyBgZnVuY2AgYW5kIGludm9rZXMgaXQgd2l0aCB0aGUgb3B0aW9uYWwgYHRoaXNgXG4gKiBiaW5kaW5nIG9mIGB0aGlzQXJnYCBhbmQgdGhlIGBwYXJ0aWFsc2AgcHJlcGVuZGVkIHRvIHRob3NlIHByb3ZpZGVkIHRvXG4gKiB0aGUgd3JhcHBlci5cbiAqXG4gKiBAcHJpdmF0ZVxuICogQHBhcmFtIHtGdW5jdGlvbn0gZnVuYyBUaGUgZnVuY3Rpb24gdG8gcGFydGlhbGx5IGFwcGx5IGFyZ3VtZW50cyB0by5cbiAqIEBwYXJhbSB7bnVtYmVyfSBiaXRtYXNrIFRoZSBiaXRtYXNrIG9mIGZsYWdzLiBTZWUgYGNyZWF0ZVdyYXBwZXJgIGZvciBtb3JlIGRldGFpbHMuXG4gKiBAcGFyYW0geyp9IHRoaXNBcmcgVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBmdW5jYC5cbiAqIEBwYXJhbSB7QXJyYXl9IHBhcnRpYWxzIFRoZSBhcmd1bWVudHMgdG8gcHJlcGVuZCB0byB0aG9zZSBwcm92aWRlZCB0byB0aGUgbmV3IGZ1bmN0aW9uLlxuICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgYm91bmQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZVBhcnRpYWxXcmFwcGVyKGZ1bmMsIGJpdG1hc2ssIHRoaXNBcmcsIHBhcnRpYWxzKSB7XG4gIHZhciBpc0JpbmQgPSBiaXRtYXNrICYgQklORF9GTEFHLFxuICAgICAgQ3RvciA9IGNyZWF0ZUN0b3JXcmFwcGVyKGZ1bmMpO1xuXG4gIGZ1bmN0aW9uIHdyYXBwZXIoKSB7XG4gICAgLy8gQXZvaWQgYGFyZ3VtZW50c2Agb2JqZWN0IHVzZSBkaXNxdWFsaWZ5aW5nIG9wdGltaXphdGlvbnMgYnlcbiAgICAvLyBjb252ZXJ0aW5nIGl0IHRvIGFuIGFycmF5IGJlZm9yZSBwcm92aWRpbmcgaXQgYGZ1bmNgLlxuICAgIHZhciBhcmdzSW5kZXggPSAtMSxcbiAgICAgICAgYXJnc0xlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsXG4gICAgICAgIGxlZnRJbmRleCA9IC0xLFxuICAgICAgICBsZWZ0TGVuZ3RoID0gcGFydGlhbHMubGVuZ3RoLFxuICAgICAgICBhcmdzID0gQXJyYXkobGVmdExlbmd0aCArIGFyZ3NMZW5ndGgpO1xuXG4gICAgd2hpbGUgKCsrbGVmdEluZGV4IDwgbGVmdExlbmd0aCkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXhdID0gcGFydGlhbHNbbGVmdEluZGV4XTtcbiAgICB9XG4gICAgd2hpbGUgKGFyZ3NMZW5ndGgtLSkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXgrK10gPSBhcmd1bWVudHNbKythcmdzSW5kZXhdO1xuICAgIH1cbiAgICB2YXIgZm4gPSAodGhpcyAmJiB0aGlzICE9PSBnbG9iYWwgJiYgdGhpcyBpbnN0YW5jZW9mIHdyYXBwZXIpID8gQ3RvciA6IGZ1bmM7XG4gICAgcmV0dXJuIGZuLmFwcGx5KGlzQmluZCA/IHRoaXNBcmcgOiB0aGlzLCBhcmdzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVQYXJ0aWFsV3JhcHBlcjtcbiJdfQ== -},{"./createCtorWrapper":101}],106:[function(require,module,exports){ -var baseSetData = require('./baseSetData'), - createBindWrapper = require('./createBindWrapper'), - createHybridWrapper = require('./createHybridWrapper'), - createPartialWrapper = require('./createPartialWrapper'), - getData = require('./getData'), - mergeData = require('./mergeData'), - setData = require('./setData'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64; - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to reference. - * @param {number} bitmask The bitmask of flags. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - length -= (holders ? holders.length : 0); - if (bitmask & PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func), - newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; - - if (data) { - mergeData(newData, data); - bitmask = newData[1]; - arity = newData[9]; - } - newData[9] = arity == null - ? (isBindKey ? 0 : func.length) - : (nativeMax(arity - length, 0) || 0); - - if (bitmask == BIND_FLAG) { - var result = createBindWrapper(newData[0], newData[2]); - } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { - result = createPartialWrapper.apply(undefined, newData); - } else { - result = createHybridWrapper.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setter(result, newData); -} - -module.exports = createWrapper; - -},{"./baseSetData":88,"./createBindWrapper":100,"./createHybridWrapper":104,"./createPartialWrapper":105,"./getData":110,"./mergeData":128,"./setData":133}],107:[function(require,module,exports){ -var arraySome = require('./arraySome'); - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; - - if (result !== undefined) { - if (result) { - continue; - } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - })) { - return false; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { - return false; - } - } - return true; -} - -module.exports = equalArrays; - -},{"./arraySome":65}],108:[function(require,module,exports){ -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag) { - switch (tag) { - case boolTag: - case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. - return +object == +other; - - case errorTag: - return object.name == other.name && object.message == other.message; - - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) - ? other != +other - : object == +other; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); - } - return false; -} - -module.exports = equalByTag; - -},{}],109:[function(require,module,exports){ -var keys = require('../object/keys'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isLoose) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; - - // Recursively compare objects (susceptible to call stack limits). - if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { - return false; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - return false; - } - } - return true; -} - -module.exports = equalObjects; - -},{"../object/keys":149}],110:[function(require,module,exports){ -var metaMap = require('./metaMap'), - noop = require('../utility/noop'); - -/** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ -var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); -}; - -module.exports = getData; - -},{"../utility/noop":155,"./metaMap":129}],111:[function(require,module,exports){ -var realNames = require('./realNames'); - -/** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ -function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = array ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; -} - -module.exports = getFuncName; - -},{"./realNames":130}],112:[function(require,module,exports){ -var baseProperty = require('./baseProperty'); - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -module.exports = getLength; - -},{"./baseProperty":86}],113:[function(require,module,exports){ -var isStrictComparable = require('./isStrictComparable'), - pairs = require('../object/pairs'); - -/** - * Gets the propery names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = pairs(object), - length = result.length; - - while (length--) { - result[length][2] = isStrictComparable(result[length][1]); - } - return result; -} - -module.exports = getMatchData; - -},{"../object/pairs":151,"./isStrictComparable":127}],114:[function(require,module,exports){ -var isNative = require('../lang/isNative'); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -module.exports = getNative; - -},{"../lang/isNative":143}],115:[function(require,module,exports){ -/** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ -function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; -} - -module.exports = indexOfNaN; - -},{}],116:[function(require,module,exports){ -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add array properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -module.exports = initCloneArray; - -},{}],117:[function(require,module,exports){ -(function (global){ -var bufferClone = require('./bufferClone'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** Native method references. */ -var Uint8Array = global.Uint8Array; - -/** Used to lookup a type array constructors by `toStringTag`. */ -var ctorByTag = {}; -ctorByTag[float32Tag] = global.Float32Array; -ctorByTag[float64Tag] = global.Float64Array; -ctorByTag[int8Tag] = global.Int8Array; -ctorByTag[int16Tag] = global.Int16Array; -ctorByTag[int32Tag] = global.Int32Array; -ctorByTag[uint8Tag] = Uint8Array; -ctorByTag[uint8ClampedTag] = global.Uint8ClampedArray; -ctorByTag[uint16Tag] = global.Uint16Array; -ctorByTag[uint32Tag] = global.Uint32Array; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return bufferClone(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - // Safari 5 mobile incorrectly has `Object` as the constructor of typed arrays. - if (Ctor instanceof Ctor) { - Ctor = ctorByTag[tag]; - } - var buffer = object.buffer; - return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - var result = new Ctor(object.source, reFlags.exec(object)); - result.lastIndex = object.lastIndex; - } - return result; -} - -module.exports = initCloneByTag; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2luaXRDbG9uZUJ5VGFnLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgYnVmZmVyQ2xvbmUgPSByZXF1aXJlKCcuL2J1ZmZlckNsb25lJyk7XG5cbi8qKiBgT2JqZWN0I3RvU3RyaW5nYCByZXN1bHQgcmVmZXJlbmNlcy4gKi9cbnZhciBib29sVGFnID0gJ1tvYmplY3QgQm9vbGVhbl0nLFxuICAgIGRhdGVUYWcgPSAnW29iamVjdCBEYXRlXScsXG4gICAgbnVtYmVyVGFnID0gJ1tvYmplY3QgTnVtYmVyXScsXG4gICAgcmVnZXhwVGFnID0gJ1tvYmplY3QgUmVnRXhwXScsXG4gICAgc3RyaW5nVGFnID0gJ1tvYmplY3QgU3RyaW5nXSc7XG5cbnZhciBhcnJheUJ1ZmZlclRhZyA9ICdbb2JqZWN0IEFycmF5QnVmZmVyXScsXG4gICAgZmxvYXQzMlRhZyA9ICdbb2JqZWN0IEZsb2F0MzJBcnJheV0nLFxuICAgIGZsb2F0NjRUYWcgPSAnW29iamVjdCBGbG9hdDY0QXJyYXldJyxcbiAgICBpbnQ4VGFnID0gJ1tvYmplY3QgSW50OEFycmF5XScsXG4gICAgaW50MTZUYWcgPSAnW29iamVjdCBJbnQxNkFycmF5XScsXG4gICAgaW50MzJUYWcgPSAnW29iamVjdCBJbnQzMkFycmF5XScsXG4gICAgdWludDhUYWcgPSAnW29iamVjdCBVaW50OEFycmF5XScsXG4gICAgdWludDhDbGFtcGVkVGFnID0gJ1tvYmplY3QgVWludDhDbGFtcGVkQXJyYXldJyxcbiAgICB1aW50MTZUYWcgPSAnW29iamVjdCBVaW50MTZBcnJheV0nLFxuICAgIHVpbnQzMlRhZyA9ICdbb2JqZWN0IFVpbnQzMkFycmF5XSc7XG5cbi8qKiBVc2VkIHRvIG1hdGNoIGBSZWdFeHBgIGZsYWdzIGZyb20gdGhlaXIgY29lcmNlZCBzdHJpbmcgdmFsdWVzLiAqL1xudmFyIHJlRmxhZ3MgPSAvXFx3KiQvO1xuXG4vKiogTmF0aXZlIG1ldGhvZCByZWZlcmVuY2VzLiAqL1xudmFyIFVpbnQ4QXJyYXkgPSBnbG9iYWwuVWludDhBcnJheTtcblxuLyoqIFVzZWQgdG8gbG9va3VwIGEgdHlwZSBhcnJheSBjb25zdHJ1Y3RvcnMgYnkgYHRvU3RyaW5nVGFnYC4gKi9cbnZhciBjdG9yQnlUYWcgPSB7fTtcbmN0b3JCeVRhZ1tmbG9hdDMyVGFnXSA9IGdsb2JhbC5GbG9hdDMyQXJyYXk7XG5jdG9yQnlUYWdbZmxvYXQ2NFRhZ10gPSBnbG9iYWwuRmxvYXQ2NEFycmF5O1xuY3RvckJ5VGFnW2ludDhUYWddID0gZ2xvYmFsLkludDhBcnJheTtcbmN0b3JCeVRhZ1tpbnQxNlRhZ10gPSBnbG9iYWwuSW50MTZBcnJheTtcbmN0b3JCeVRhZ1tpbnQzMlRhZ10gPSBnbG9iYWwuSW50MzJBcnJheTtcbmN0b3JCeVRhZ1t1aW50OFRhZ10gPSBVaW50OEFycmF5O1xuY3RvckJ5VGFnW3VpbnQ4Q2xhbXBlZFRhZ10gPSBnbG9iYWwuVWludDhDbGFtcGVkQXJyYXk7XG5jdG9yQnlUYWdbdWludDE2VGFnXSA9IGdsb2JhbC5VaW50MTZBcnJheTtcbmN0b3JCeVRhZ1t1aW50MzJUYWddID0gZ2xvYmFsLlVpbnQzMkFycmF5O1xuXG4vKipcbiAqIEluaXRpYWxpemVzIGFuIG9iamVjdCBjbG9uZSBiYXNlZCBvbiBpdHMgYHRvU3RyaW5nVGFnYC5cbiAqXG4gKiAqKk5vdGU6KiogVGhpcyBmdW5jdGlvbiBvbmx5IHN1cHBvcnRzIGNsb25pbmcgdmFsdWVzIHdpdGggdGFncyBvZlxuICogYEJvb2xlYW5gLCBgRGF0ZWAsIGBFcnJvcmAsIGBOdW1iZXJgLCBgUmVnRXhwYCwgb3IgYFN0cmluZ2AuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBjbG9uZS5cbiAqIEBwYXJhbSB7c3RyaW5nfSB0YWcgVGhlIGB0b1N0cmluZ1RhZ2Agb2YgdGhlIG9iamVjdCB0byBjbG9uZS5cbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW2lzRGVlcF0gU3BlY2lmeSBhIGRlZXAgY2xvbmUuXG4gKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBpbml0aWFsaXplZCBjbG9uZS5cbiAqL1xuZnVuY3Rpb24gaW5pdENsb25lQnlUYWcob2JqZWN0LCB0YWcsIGlzRGVlcCkge1xuICB2YXIgQ3RvciA9IG9iamVjdC5jb25zdHJ1Y3RvcjtcbiAgc3dpdGNoICh0YWcpIHtcbiAgICBjYXNlIGFycmF5QnVmZmVyVGFnOlxuICAgICAgcmV0dXJuIGJ1ZmZlckNsb25lKG9iamVjdCk7XG5cbiAgICBjYXNlIGJvb2xUYWc6XG4gICAgY2FzZSBkYXRlVGFnOlxuICAgICAgcmV0dXJuIG5ldyBDdG9yKCtvYmplY3QpO1xuXG4gICAgY2FzZSBmbG9hdDMyVGFnOiBjYXNlIGZsb2F0NjRUYWc6XG4gICAgY2FzZSBpbnQ4VGFnOiBjYXNlIGludDE2VGFnOiBjYXNlIGludDMyVGFnOlxuICAgIGNhc2UgdWludDhUYWc6IGNhc2UgdWludDhDbGFtcGVkVGFnOiBjYXNlIHVpbnQxNlRhZzogY2FzZSB1aW50MzJUYWc6XG4gICAgICAvLyBTYWZhcmkgNSBtb2JpbGUgaW5jb3JyZWN0bHkgaGFzIGBPYmplY3RgIGFzIHRoZSBjb25zdHJ1Y3RvciBvZiB0eXBlZCBhcnJheXMuXG4gICAgICBpZiAoQ3RvciBpbnN0YW5jZW9mIEN0b3IpIHtcbiAgICAgICAgQ3RvciA9IGN0b3JCeVRhZ1t0YWddO1xuICAgICAgfVxuICAgICAgdmFyIGJ1ZmZlciA9IG9iamVjdC5idWZmZXI7XG4gICAgICByZXR1cm4gbmV3IEN0b3IoaXNEZWVwID8gYnVmZmVyQ2xvbmUoYnVmZmVyKSA6IGJ1ZmZlciwgb2JqZWN0LmJ5dGVPZmZzZXQsIG9iamVjdC5sZW5ndGgpO1xuXG4gICAgY2FzZSBudW1iZXJUYWc6XG4gICAgY2FzZSBzdHJpbmdUYWc6XG4gICAgICByZXR1cm4gbmV3IEN0b3Iob2JqZWN0KTtcblxuICAgIGNhc2UgcmVnZXhwVGFnOlxuICAgICAgdmFyIHJlc3VsdCA9IG5ldyBDdG9yKG9iamVjdC5zb3VyY2UsIHJlRmxhZ3MuZXhlYyhvYmplY3QpKTtcbiAgICAgIHJlc3VsdC5sYXN0SW5kZXggPSBvYmplY3QubGFzdEluZGV4O1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gaW5pdENsb25lQnlUYWc7XG4iXX0= -},{"./bufferClone":95}],118:[function(require,module,exports){ -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - var Ctor = object.constructor; - if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { - Ctor = Object; - } - return new Ctor; -} - -module.exports = initCloneObject; - -},{}],119:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -module.exports = isArrayLike; - -},{"./getLength":112,"./isLength":125}],120:[function(require,module,exports){ -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -var isHostObject = (function() { - try { - Object({ 'toString': 0 } + ''); - } catch(e) { - return function() { return false; }; - } - return function(value) { - // IE < 9 presents many host objects as `Object` objects that can coerce - // to strings despite having improperly defined `toString` methods. - return typeof value.toString != 'function' && typeof (value + '') == 'string'; - }; -}()); - -module.exports = isHostObject; - -},{}],121:[function(require,module,exports){ -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -module.exports = isIndex; - -},{}],122:[function(require,module,exports){ -var isArrayLike = require('./isArrayLike'), - isIndex = require('./isIndex'), - isObject = require('../lang/isObject'); - -/** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -module.exports = isIterateeCall; - -},{"../lang/isObject":144,"./isArrayLike":119,"./isIndex":121}],123:[function(require,module,exports){ -var isArray = require('../lang/isArray'), - toObject = require('./toObject'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} - -module.exports = isKey; - -},{"../lang/isArray":140,"./toObject":135}],124:[function(require,module,exports){ -var LazyWrapper = require('./LazyWrapper'), - getData = require('./getData'), - getFuncName = require('./getFuncName'), - lodash = require('../chain/lodash'); - -/** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. - */ -function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; -} - -module.exports = isLaziable; - -},{"../chain/lodash":51,"./LazyWrapper":60,"./getData":110,"./getFuncName":111}],125:[function(require,module,exports){ -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; - -},{}],126:[function(require,module,exports){ -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isObjectLike; - -},{}],127:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -module.exports = isStrictComparable; - -},{"../lang/isObject":144}],128:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - composeArgs = require('./composeArgs'), - composeArgsRight = require('./composeArgsRight'), - replaceHolders = require('./replaceHolders'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - ARY_FLAG = 128, - REARG_FLAG = 256; - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers required to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` - * augment function arguments, making the order in which they are executed important, - * preventing the merging of metadata. However, we make an exception for a safe - * common case where curried functions have `_.ary` and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ -function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < ARY_FLAG; - - var isCombo = - (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || - (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || - (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = arrayCopy(value); - } - // Use source `ary` if it's smaller. - if (srcBitmask & ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; -} - -module.exports = mergeData; - -},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./replaceHolders":132}],129:[function(require,module,exports){ -(function (global){ -var getNative = require('./getNative'); - -/** Native method references. */ -var WeakMap = getNative(global, 'WeakMap'); - -/** Used to store function metadata. */ -var metaMap = WeakMap && new WeakMap; - -module.exports = metaMap; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL21ldGFNYXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2V0TmF0aXZlID0gcmVxdWlyZSgnLi9nZXROYXRpdmUnKTtcblxuLyoqIE5hdGl2ZSBtZXRob2QgcmVmZXJlbmNlcy4gKi9cbnZhciBXZWFrTWFwID0gZ2V0TmF0aXZlKGdsb2JhbCwgJ1dlYWtNYXAnKTtcblxuLyoqIFVzZWQgdG8gc3RvcmUgZnVuY3Rpb24gbWV0YWRhdGEuICovXG52YXIgbWV0YU1hcCA9IFdlYWtNYXAgJiYgbmV3IFdlYWtNYXA7XG5cbm1vZHVsZS5leHBvcnRzID0gbWV0YU1hcDtcbiJdfQ== -},{"./getNative":114}],130:[function(require,module,exports){ -/** Used to lookup unminified function names. */ -var realNames = {}; - -module.exports = realNames; - -},{}],131:[function(require,module,exports){ -var arrayCopy = require('./arrayCopy'), - isIndex = require('./isIndex'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = arrayCopy(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; -} - -module.exports = reorder; - -},{"./arrayCopy":62,"./isIndex":121}],132:[function(require,module,exports){ -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - if (array[index] === placeholder) { - array[index] = PLACEHOLDER; - result[++resIndex] = index; - } - } - return result; -} - -module.exports = replaceHolders; - -},{}],133:[function(require,module,exports){ -var baseSetData = require('./baseSetData'), - now = require('../date/now'); - -/** Used to detect when a function becomes hot. */ -var HOT_COUNT = 150, - HOT_SPAN = 16; - -/** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity function - * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var setData = (function() { - var count = 0, - lastCalled = 0; - - return function(key, value) { - var stamp = now(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return key; - } - } else { - count = 0; - } - return baseSetData(key, value); - }; -}()); - -module.exports = setData; - -},{"../date/now":57,"./baseSetData":88}],134:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('./isIndex'), - isLength = require('./isLength'), - isString = require('../lang/isString'), - keysIn = require('../object/keysIn'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object) || isString(object)); - - var index = -1, - result = []; - - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; -} - -module.exports = shimKeys; - -},{"../lang/isArguments":139,"../lang/isArray":140,"../lang/isString":146,"../object/keysIn":150,"./isIndex":121,"./isLength":125}],135:[function(require,module,exports){ -var isObject = require('../lang/isObject'), - isString = require('../lang/isString'), - support = require('../support'); - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - if (support.unindexedChars && isString(value)) { - var index = -1, - length = value.length, - result = Object(value); - - while (++index < length) { - result[index] = value.charAt(index); - } - return result; - } - return isObject(value) ? value : Object(value); -} - -module.exports = toObject; - -},{"../lang/isObject":144,"../lang/isString":146,"../support":153}],136:[function(require,module,exports){ -var baseToString = require('./baseToString'), - isArray = require('../lang/isArray'); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ -function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -} - -module.exports = toPath; - -},{"../lang/isArray":140,"./baseToString":90}],137:[function(require,module,exports){ -var LazyWrapper = require('./LazyWrapper'), - LodashWrapper = require('./LodashWrapper'), - arrayCopy = require('./arrayCopy'); - -/** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ -function wrapperClone(wrapper) { - return wrapper instanceof LazyWrapper - ? wrapper.clone() - : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); -} - -module.exports = wrapperClone; - -},{"./LazyWrapper":60,"./LodashWrapper":61,"./arrayCopy":62}],138:[function(require,module,exports){ -var baseClone = require('../internal/baseClone'), - bindCallback = require('../internal/bindCallback'); - -/** - * Creates a deep clone of `value`. If `customizer` is provided it's invoked - * to produce the cloned values. If `customizer` returns `undefined` cloning - * is handled by the method instead. The `customizer` is bound to `thisArg` - * and invoked with up to three argument; (value [, index|key, object]). - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). - * The enumerable properties of `arguments` objects and objects created by - * constructors other than `Object` are cloned to plain `Object` objects. An - * empty object is returned for uncloneable values such as functions, DOM nodes, - * Maps, Sets, and WeakMaps. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to deep clone. - * @param {Function} [customizer] The function to customize cloning values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {*} Returns the deep cloned value. - * @example - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * var deep = _.cloneDeep(users); - * deep[0] === users[0]; - * // => false - * - * // using a customizer callback - * var el = _.cloneDeep(document.body, function(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } - * }); - * - * el === document.body - * // => false - * el.nodeName - * // => BODY - * el.childNodes.length; - * // => 20 - */ -function cloneDeep(value, customizer, thisArg) { - return typeof customizer == 'function' - ? baseClone(value, true, bindCallback(customizer, thisArg, 3)) - : baseClone(value, true); -} - -module.exports = cloneDeep; - -},{"../internal/baseClone":68,"../internal/bindCallback":94}],139:[function(require,module,exports){ -var isArrayLike = require('../internal/isArrayLike'), - isObjectLike = require('../internal/isObjectLike'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && - hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); -} - -module.exports = isArguments; - -},{"../internal/isArrayLike":119,"../internal/isObjectLike":126}],140:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; - -module.exports = isArray; - -},{"../internal/getNative":114,"../internal/isLength":125,"../internal/isObjectLike":126}],141:[function(require,module,exports){ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('../internal/isArrayLike'), - isFunction = require('./isFunction'), - isObjectLike = require('../internal/isObjectLike'), - isString = require('./isString'), - keys = require('../object/keys'); - -/** - * Checks if `value` is empty. A value is considered empty unless it's an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {Array|Object|string} value The value to inspect. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || - (isObjectLike(value) && isFunction(value.splice)))) { - return !value.length; - } - return !keys(value).length; -} - -module.exports = isEmpty; - -},{"../internal/isArrayLike":119,"../internal/isObjectLike":126,"../object/keys":149,"./isArguments":139,"./isArray":140,"./isFunction":142,"./isString":146}],142:[function(require,module,exports){ -var isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 which returns 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -module.exports = isFunction; - -},{"./isObject":144}],143:[function(require,module,exports){ -var isFunction = require('./isFunction'), - isHostObject = require('../internal/isHostObject'), - isObjectLike = require('../internal/isObjectLike'); - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value); -} - -module.exports = isNative; - -},{"../internal/isHostObject":120,"../internal/isObjectLike":126,"./isFunction":142}],144:[function(require,module,exports){ -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - -},{}],145:[function(require,module,exports){ -var baseForIn = require('../internal/baseForIn'), - isArguments = require('./isArguments'), - isHostObject = require('../internal/isHostObject'), - isObjectLike = require('../internal/isObjectLike'), - support = require('../support'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * **Note:** This method assumes objects created by the `Object` constructor - * have no inherited enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - var Ctor; - - // Exit early for non `Object` objects. - if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) || - (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { - return false; - } - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - var result; - if (support.ownLast) { - baseForIn(value, function(subValue, key, object) { - result = hasOwnProperty.call(object, key); - return false; - }); - return result !== false; - } - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - baseForIn(value, function(subValue, key) { - result = key; - }); - return result === undefined || hasOwnProperty.call(value, result); -} - -module.exports = isPlainObject; - -},{"../internal/baseForIn":75,"../internal/isHostObject":120,"../internal/isObjectLike":126,"../support":153,"./isArguments":139}],146:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); -} - -module.exports = isString; - -},{"../internal/isObjectLike":126}],147:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; -} - -module.exports = isTypedArray; - -},{"../internal/isLength":125,"../internal/isObjectLike":126}],148:[function(require,module,exports){ -/** - * Checks if `value` is `undefined`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -module.exports = isUndefined; - -},{}],149:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isArrayLike = require('../internal/isArrayLike'), - isObject = require('../lang/isObject'), - shimKeys = require('../internal/shimKeys'), - support = require('../support'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? undefined : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; -}; - -module.exports = keys; - -},{"../internal/getNative":114,"../internal/isArrayLike":119,"../internal/shimKeys":134,"../lang/isObject":144,"../support":153}],150:[function(require,module,exports){ -var arrayEach = require('../internal/arrayEach'), - isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isFunction = require('../lang/isFunction'), - isIndex = require('../internal/isIndex'), - isLength = require('../internal/isLength'), - isObject = require('../lang/isObject'), - isString = require('../lang/isString'), - support = require('../support'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** Used to fix the JScript `[[DontEnum]]` bug. */ -var shadowProps = [ - 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', - 'toLocaleString', 'toString', 'valueOf' -]; - -/** Used for native method references. */ -var errorProto = Error.prototype, - objectProto = Object.prototype, - stringProto = String.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to avoid iterating over non-enumerable properties in IE < 9. */ -var nonEnumProps = {}; -nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; -nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true }; -nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true }; -nonEnumProps[objectTag] = { 'constructor': true }; - -arrayEach(shadowProps, function(key) { - for (var tag in nonEnumProps) { - if (hasOwnProperty.call(nonEnumProps, tag)) { - var props = nonEnumProps[tag]; - props[key] = hasOwnProperty.call(props, key); - } - } -}); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - - length = (length && isLength(length) && - (isArray(object) || isArguments(object) || isString(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - proto = (isFunction(Ctor) && Ctor.prototype) || objectProto, - isProto = proto === object, - result = Array(length), - skipIndexes = length > 0, - skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error), - skipProto = support.enumPrototypes && isFunction(object); - - while (++index < length) { - result[index] = (index + ''); - } - // lodash skips the `constructor` property when it infers it's iterating - // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]` - // attribute of an existing property and the `constructor` property of a - // prototype defaults to non-enumerable. - for (var key in object) { - if (!(skipProto && key == 'prototype') && - !(skipErrorProps && (key == 'message' || key == 'name')) && - !(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - if (support.nonEnumShadows && object !== objectProto) { - var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)), - nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag]; - - if (tag == objectTag) { - proto = objectProto; - } - length = shadowProps.length; - while (length--) { - key = shadowProps[length]; - var nonEnum = nonEnums[key]; - if (!(isProto && nonEnum) && - (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) { - result.push(key); - } - } - } - return result; -} - -module.exports = keysIn; - -},{"../internal/arrayEach":63,"../internal/isIndex":121,"../internal/isLength":125,"../lang/isArguments":139,"../lang/isArray":140,"../lang/isFunction":142,"../lang/isObject":144,"../lang/isString":146,"../support":153}],151:[function(require,module,exports){ -var keys = require('./keys'), - toObject = require('../internal/toObject'); - -/** - * Creates a two dimensional array of the key-value pairs for `object`, - * e.g. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. - * @example - * - * _.pairs({ 'barney': 36, 'fred': 40 }); - * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) - */ -function pairs(object) { - object = toObject(object); - - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; -} - -module.exports = pairs; - -},{"../internal/toObject":135,"./keys":149}],152:[function(require,module,exports){ -var baseValues = require('../internal/baseValues'), - keys = require('./keys'); - -/** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return baseValues(object, keys(object)); -} - -module.exports = values; - -},{"../internal/baseValues":91,"./keys":149}],153:[function(require,module,exports){ -/** Used for native method references. */ -var arrayProto = Array.prototype, - errorProto = Error.prototype, - objectProto = Object.prototype; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; - -/** - * An object environment feature flags. - * - * @static - * @memberOf _ - * @type Object - */ -var support = {}; - -(function(x) { - var Ctor = function() { this.x = x; }, - object = { '0': x, 'length': x }, - props = []; - - Ctor.prototype = { 'valueOf': x, 'y': x }; - for (var key in new Ctor) { props.push(key); } - - /** - * Detect if `name` or `message` properties of `Error.prototype` are - * enumerable by default (IE < 9, Safari < 5.1). - * - * @memberOf _.support - * @type boolean - */ - support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || - propertyIsEnumerable.call(errorProto, 'name'); - - /** - * Detect if `prototype` properties are enumerable by default. - * - * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 - * (if the prototype or a property on the prototype has been set) - * incorrectly set the `[[Enumerable]]` value of a function's `prototype` - * property to `true`. - * - * @memberOf _.support - * @type boolean - */ - support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype'); - - /** - * Detect if properties shadowing those on `Object.prototype` are non-enumerable. - * - * In IE < 9 an object's own properties, shadowing non-enumerable ones, - * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug). - * - * @memberOf _.support - * @type boolean - */ - support.nonEnumShadows = !/valueOf/.test(props); - - /** - * Detect if own properties are iterated after inherited properties (IE < 9). - * - * @memberOf _.support - * @type boolean - */ - support.ownLast = props[0] != 'x'; - - /** - * Detect if `Array#shift` and `Array#splice` augment array-like objects - * correctly. - * - * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array - * `shift()` and `splice()` functions that fail to remove the last element, - * `value[0]`, of array-like objects even though the "length" property is - * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8, - * while `splice()` is buggy regardless of mode in IE < 9. - * - * @memberOf _.support - * @type boolean - */ - support.spliceObjects = (splice.call(object, 0, 1), !object[0]); - - /** - * Detect lack of support for accessing string characters by index. - * - * IE < 8 can't access characters by index. IE 8 can only access characters - * by index on string literals, not string objects. - * - * @memberOf _.support - * @type boolean - */ - support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; -}(1, 0)); - -module.exports = support; - -},{}],154:[function(require,module,exports){ -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - -},{}],155:[function(require,module,exports){ -/** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. - * - * @static - * @memberOf _ - * @category Utility - * @example - * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true - */ -function noop() { - // No operation performed. -} - -module.exports = noop; - -},{}],156:[function(require,module,exports){ -var baseProperty = require('../internal/baseProperty'), - basePropertyDeep = require('../internal/basePropertyDeep'), - isKey = require('../internal/isKey'); - -/** - * Creates a function that returns the property value at `path` on a - * given object. - * - * @static - * @memberOf _ - * @category Utility - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - * @example - * - * var objects = [ - * { 'a': { 'b': { 'c': 2 } } }, - * { 'a': { 'b': { 'c': 1 } } } - * ]; - * - * _.map(objects, _.property('a.b.c')); - * // => [2, 1] - * - * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); -} - -module.exports = property; - -},{"../internal/baseProperty":86,"../internal/basePropertyDeep":87,"../internal/isKey":123}],157:[function(require,module,exports){ -(function (process){ -// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - - - - - - - - - - - - - - - - - - - - - - - - -
       
      -
      - - diff --git a/api/src/main/resources/public/lang/ca.js b/api/src/main/resources/public/lang/ca.js deleted file mode 100644 index f8c815aa..00000000 --- a/api/src/main/resources/public/lang/ca.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Advertència: Obsolet", - "Implementation Notes":"Notes d'implementació", - "Response Class":"Classe de la Resposta", - "Status":"Estatus", - "Parameters":"Paràmetres", - "Parameter":"Paràmetre", - "Value":"Valor", - "Description":"Descripció", - "Parameter Type":"Tipus del Paràmetre", - "Data Type":"Tipus de la Dada", - "Response Messages":"Missatges de la Resposta", - "HTTP Status Code":"Codi d'Estatus HTTP", - "Reason":"Raó", - "Response Model":"Model de la Resposta", - "Request URL":"URL de la Sol·licitud", - "Response Body":"Cos de la Resposta", - "Response Code":"Codi de la Resposta", - "Response Headers":"Capçaleres de la Resposta", - "Hide Response":"Amagar Resposta", - "Try it out!":"Prova-ho!", - "Show/Hide":"Mostrar/Amagar", - "List Operations":"Llista Operacions", - "Expand Operations":"Expandir Operacions", - "Raw":"Cru", - "can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru", - "Example Value":"Valor d'Exemple", - "Model Schema":"Esquema del Model", - "Model":"Model", - "apply":"aplicar", - "Username":"Nom d'usuari", - "Password":"Contrasenya", - "Terms of service":"Termes del servei", - "Created by":"Creat per", - "See more at":"Veure més en", - "Contact the developer":"Contactar amb el desenvolupador", - "api version":"versió de la api", - "Response Content Type":"Tipus de Contingut de la Resposta", - "fetching resource":"recollint recurs", - "fetching resource list":"recollins llista de recursos", - "Explore":"Explorant", - "Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.", - "Please specify the protocol for":"Si us plau, especifiqueu el protocol per a", - "Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de", - "Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI", - "Unable to read api":"No es pot llegir l'api", - "from path":"des de la ruta", - "server returned":"el servidor ha retornat" -}); diff --git a/api/src/main/resources/public/lang/el.js b/api/src/main/resources/public/lang/el.js deleted file mode 100644 index fcd1ffdd..00000000 --- a/api/src/main/resources/public/lang/el.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Προειδοποίηση: Έχει αποσυρθεί", - "Implementation Notes":"Σημειώσεις Υλοποίησης", - "Response Class":"Απόκριση", - "Status":"Κατάσταση", - "Parameters":"Παράμετροι", - "Parameter":"Παράμετρος", - "Value":"Τιμή", - "Description":"Περιγραφή", - "Parameter Type":"Τύπος Παραμέτρου", - "Data Type":"Τύπος Δεδομένων", - "Response Messages":"Μηνύματα Απόκρισης", - "HTTP Status Code":"Κωδικός Κατάστασης HTTP", - "Reason":"Αιτιολογία", - "Response Model":"Μοντέλο Απόκρισης", - "Request URL":"URL Αιτήματος", - "Response Body":"Σώμα Απόκρισης", - "Response Code":"Κωδικός Απόκρισης", - "Response Headers":"Επικεφαλίδες Απόκρισης", - "Hide Response":"Απόκρυψη Απόκρισης", - "Headers":"Επικεφαλίδες", - "Try it out!":"Δοκιμάστε το!", - "Show/Hide":"Εμφάνιση/Απόκρυψη", - "List Operations":"Λίστα Λειτουργιών", - "Expand Operations":"Ανάπτυξη Λειτουργιών", - "Raw":"Ακατέργαστο", - "can't parse JSON. Raw result":"αδυναμία ανάλυσης JSON. Ακατέργαστο αποτέλεσμα", - "Example Value":"Παράδειγμα Τιμής", - "Model Schema":"Σχήμα Μοντέλου", - "Model":"Μοντέλο", - "Click to set as parameter value":"Πατήστε για να θέσετε τιμή παραμέτρου", - "apply":"εφαρμογή", - "Username":"Όνομα χρήση", - "Password":"Κωδικός πρόσβασης", - "Terms of service":"Όροι χρήσης", - "Created by":"Δημιουργήθηκε από", - "See more at":"Δείτε περισσότερα στο", - "Contact the developer":"Επικοινωνήστε με τον προγραμματιστή", - "api version":"έκδοση api", - "Response Content Type":"Τύπος Περιεχομένου Απόκρισης", - "Parameter content type:":"Τύπος περιεχομένου παραμέτρου:", - "fetching resource":"παραλαβή πόρου", - "fetching resource list":"παραλαβή λίστας πόρων", - "Explore":"Εξερεύνηση", - "Show Swagger Petstore Example Apis":"Εμφάνιση Api Δειγμάτων Petstore του Swagger", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Αδυναμία ανάγνωσης από τον εξυπηρετητή. Μπορεί να μην έχει κατάλληλες ρυθμίσεις για access-control-origin.", - "Please specify the protocol for":"Παρακαλώ προσδιορίστε το πρωτόκολλο για", - "Can't read swagger JSON from":"Αδυναμία ανάγνωσης swagger JSON από", - "Finished Loading Resource Information. Rendering Swagger UI":"Ολοκλήρωση Φόρτωσης Πληροφορικών Πόρου. Παρουσίαση Swagger UI", - "Unable to read api":"Αδυναμία ανάγνωσης api", - "from path":"από το μονοπάτι", - "server returned":"ο εξυπηρετηρής επέστρεψε" -}); diff --git a/api/src/main/resources/public/lang/en.js b/api/src/main/resources/public/lang/en.js deleted file mode 100644 index 91831366..00000000 --- a/api/src/main/resources/public/lang/en.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Warning: Deprecated", - "Implementation Notes":"Implementation Notes", - "Response Class":"Response Class", - "Status":"Status", - "Parameters":"Parameters", - "Parameter":"Parameter", - "Value":"Value", - "Description":"Description", - "Parameter Type":"Parameter Type", - "Data Type":"Data Type", - "Response Messages":"Response Messages", - "HTTP Status Code":"HTTP Status Code", - "Reason":"Reason", - "Response Model":"Response Model", - "Request URL":"Request URL", - "Response Body":"Response Body", - "Response Code":"Response Code", - "Response Headers":"Response Headers", - "Hide Response":"Hide Response", - "Headers":"Headers", - "Try it out!":"Try it out!", - "Show/Hide":"Show/Hide", - "List Operations":"List Operations", - "Expand Operations":"Expand Operations", - "Raw":"Raw", - "can't parse JSON. Raw result":"can't parse JSON. Raw result", - "Example Value":"Example Value", - "Model Schema":"Model Schema", - "Model":"Model", - "Click to set as parameter value":"Click to set as parameter value", - "apply":"apply", - "Username":"Username", - "Password":"Password", - "Terms of service":"Terms of service", - "Created by":"Created by", - "See more at":"See more at", - "Contact the developer":"Contact the developer", - "api version":"api version", - "Response Content Type":"Response Content Type", - "Parameter content type:":"Parameter content type:", - "fetching resource":"fetching resource", - "fetching resource list":"fetching resource list", - "Explore":"Explore", - "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.", - "Please specify the protocol for":"Please specify the protocol for", - "Can't read swagger JSON from":"Can't read swagger JSON from", - "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI", - "Unable to read api":"Unable to read api", - "from path":"from path", - "server returned":"server returned" -}); diff --git a/api/src/main/resources/public/lang/es.js b/api/src/main/resources/public/lang/es.js deleted file mode 100644 index 13fa015e..00000000 --- a/api/src/main/resources/public/lang/es.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Advertencia: Obsoleto", - "Implementation Notes":"Notas de implementación", - "Response Class":"Clase de la Respuesta", - "Status":"Status", - "Parameters":"Parámetros", - "Parameter":"Parámetro", - "Value":"Valor", - "Description":"Descripción", - "Parameter Type":"Tipo del Parámetro", - "Data Type":"Tipo del Dato", - "Response Messages":"Mensajes de la Respuesta", - "HTTP Status Code":"Código de Status HTTP", - "Reason":"Razón", - "Response Model":"Modelo de la Respuesta", - "Request URL":"URL de la Solicitud", - "Response Body":"Cuerpo de la Respuesta", - "Response Code":"Código de la Respuesta", - "Response Headers":"Encabezados de la Respuesta", - "Hide Response":"Ocultar Respuesta", - "Try it out!":"Pruébalo!", - "Show/Hide":"Mostrar/Ocultar", - "List Operations":"Listar Operaciones", - "Expand Operations":"Expandir Operaciones", - "Raw":"Crudo", - "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo", - "Example Value":"Valor de Ejemplo", - "Model Schema":"Esquema del Modelo", - "Model":"Modelo", - "apply":"aplicar", - "Username":"Nombre de usuario", - "Password":"Contraseña", - "Terms of service":"Términos de Servicio", - "Created by":"Creado por", - "See more at":"Ver más en", - "Contact the developer":"Contactar al desarrollador", - "api version":"versión de la api", - "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta", - "fetching resource":"buscando recurso", - "fetching resource list":"buscando lista del recurso", - "Explore":"Explorar", - "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.", - "Please specify the protocol for":"Por favor, especificar el protocola para", - "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde", - "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI", - "Unable to read api":"No se puede leer la api", - "from path":"desde ruta", - "server returned":"el servidor retornó" -}); diff --git a/api/src/main/resources/public/lang/fr.js b/api/src/main/resources/public/lang/fr.js deleted file mode 100644 index 388dff14..00000000 --- a/api/src/main/resources/public/lang/fr.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Avertissement : Obsolète", - "Implementation Notes":"Notes d'implémentation", - "Response Class":"Classe de la réponse", - "Status":"Statut", - "Parameters":"Paramètres", - "Parameter":"Paramètre", - "Value":"Valeur", - "Description":"Description", - "Parameter Type":"Type du paramètre", - "Data Type":"Type de données", - "Response Messages":"Messages de la réponse", - "HTTP Status Code":"Code de statut HTTP", - "Reason":"Raison", - "Response Model":"Modèle de réponse", - "Request URL":"URL appelée", - "Response Body":"Corps de la réponse", - "Response Code":"Code de la réponse", - "Response Headers":"En-têtes de la réponse", - "Hide Response":"Cacher la réponse", - "Headers":"En-têtes", - "Try it out!":"Testez !", - "Show/Hide":"Afficher/Masquer", - "List Operations":"Liste des opérations", - "Expand Operations":"Développer les opérations", - "Raw":"Brut", - "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut", - "Example Value":"Exemple la valeur", - "Model Schema":"Définition du modèle", - "Model":"Modèle", - "apply":"appliquer", - "Username":"Nom d'utilisateur", - "Password":"Mot de passe", - "Terms of service":"Conditions de service", - "Created by":"Créé par", - "See more at":"Voir plus sur", - "Contact the developer":"Contacter le développeur", - "api version":"version de l'api", - "Response Content Type":"Content Type de la réponse", - "fetching resource":"récupération de la ressource", - "fetching resource list":"récupération de la liste de ressources", - "Explore":"Explorer", - "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.", - "Please specify the protocol for":"Veuillez spécifier un protocole pour", - "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de", - "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI", - "Unable to read api":"Impossible de lire l'api", - "from path":"à partir du chemin", - "server returned":"réponse du serveur" -}); diff --git a/api/src/main/resources/public/lang/geo.js b/api/src/main/resources/public/lang/geo.js deleted file mode 100644 index 609c20d9..00000000 --- a/api/src/main/resources/public/lang/geo.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"ყურადღება: აღარ გამოიყენება", - "Implementation Notes":"იმპლემენტაციის აღწერა", - "Response Class":"რესპონს კლასი", - "Status":"სტატუსი", - "Parameters":"პარამეტრები", - "Parameter":"პარამეტრი", - "Value":"მნიშვნელობა", - "Description":"აღწერა", - "Parameter Type":"პარამეტრის ტიპი", - "Data Type":"მონაცემის ტიპი", - "Response Messages":"პასუხი", - "HTTP Status Code":"HTTP სტატუსი", - "Reason":"მიზეზი", - "Response Model":"რესპონს მოდელი", - "Request URL":"მოთხოვნის URL", - "Response Body":"პასუხის სხეული", - "Response Code":"პასუხის კოდი", - "Response Headers":"პასუხის ჰედერები", - "Hide Response":"დამალე პასუხი", - "Headers":"ჰედერები", - "Try it out!":"ცადე !", - "Show/Hide":"გამოჩენა/დამალვა", - "List Operations":"ოპერაციების სია", - "Expand Operations":"ოპერაციები ვრცლად", - "Raw":"ნედლი", - "can't parse JSON. Raw result":"JSON-ის დამუშავება ვერ მოხერხდა. ნედლი პასუხი", - "Example Value":"მაგალითი", - "Model Schema":"მოდელის სტრუქტურა", - "Model":"მოდელი", - "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე", - "apply":"გამოყენება", - "Username":"მოხმარებელი", - "Password":"პაროლი", - "Terms of service":"მომსახურების პირობები", - "Created by":"შექმნა", - "See more at":"ნახე ვრცლად", - "Contact the developer":"დაუკავშირდი დეველოპერს", - "api version":"api ვერსია", - "Response Content Type":"პასუხის კონტენტის ტიპი", - "Parameter content type:":"პარამეტრის კონტენტის ტიპი:", - "fetching resource":"რესურსების მიღება", - "fetching resource list":"რესურსების სიის მიღება", - "Explore":"ნახვა", - "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.", - "Please specify the protocol for":"მიუთითეთ პროტოკოლი", - "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა", - "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება", - "Unable to read api":"api წაკითხვა ვერ მოხერხდა", - "from path":"მისამართიდან", - "server returned":"სერვერმა დააბრუნა" -}); diff --git a/api/src/main/resources/public/lang/it.js b/api/src/main/resources/public/lang/it.js deleted file mode 100644 index 8529c2a9..00000000 --- a/api/src/main/resources/public/lang/it.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Attenzione: Deprecato", - "Implementation Notes":"Note di implementazione", - "Response Class":"Classe della risposta", - "Status":"Stato", - "Parameters":"Parametri", - "Parameter":"Parametro", - "Value":"Valore", - "Description":"Descrizione", - "Parameter Type":"Tipo di parametro", - "Data Type":"Tipo di dato", - "Response Messages":"Messaggi della risposta", - "HTTP Status Code":"Codice stato HTTP", - "Reason":"Motivo", - "Response Model":"Modello di risposta", - "Request URL":"URL della richiesta", - "Response Body":"Corpo della risposta", - "Response Code":"Oggetto della risposta", - "Response Headers":"Intestazioni della risposta", - "Hide Response":"Nascondi risposta", - "Try it out!":"Provalo!", - "Show/Hide":"Mostra/Nascondi", - "List Operations":"Mostra operazioni", - "Expand Operations":"Espandi operazioni", - "Raw":"Grezzo (raw)", - "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).", - "Model Schema":"Schema del modello", - "Model":"Modello", - "apply":"applica", - "Username":"Nome utente", - "Password":"Password", - "Terms of service":"Condizioni del servizio", - "Created by":"Creato da", - "See more at":"Informazioni aggiuntive:", - "Contact the developer":"Contatta lo sviluppatore", - "api version":"versione api", - "Response Content Type":"Tipo di contenuto (content type) della risposta", - "fetching resource":"recuperando la risorsa", - "fetching resource list":"recuperando lista risorse", - "Explore":"Esplora", - "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.", - "Please specify the protocol for":"Si prega di specificare il protocollo per", - "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:", - "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata", - "Unable to read api":"Impossibile leggere la api", - "from path":"da cartella", - "server returned":"il server ha restituito" -}); diff --git a/api/src/main/resources/public/lang/ja.js b/api/src/main/resources/public/lang/ja.js deleted file mode 100644 index 1cbeb374..00000000 --- a/api/src/main/resources/public/lang/ja.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"警告: 廃止予定", - "Implementation Notes":"実装メモ", - "Response Class":"レスポンスクラス", - "Status":"ステータス", - "Parameters":"パラメータ群", - "Parameter":"パラメータ", - "Value":"値", - "Description":"説明", - "Parameter Type":"パラメータタイプ", - "Data Type":"データタイプ", - "Response Messages":"レスポンスメッセージ", - "HTTP Status Code":"HTTPステータスコード", - "Reason":"理由", - "Response Model":"レスポンスモデル", - "Request URL":"リクエストURL", - "Response Body":"レスポンスボディ", - "Response Code":"レスポンスコード", - "Response Headers":"レスポンスヘッダ", - "Hide Response":"レスポンスを隠す", - "Headers":"ヘッダ", - "Try it out!":"実際に実行!", - "Show/Hide":"表示/非表示", - "List Operations":"操作一覧", - "Expand Operations":"操作の展開", - "Raw":"未加工", - "can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果", - "Example Value":"値の例", - "Model Schema":"モデルスキーマ", - "Model":"モデル", - "Click to set as parameter value":"パラメータ値と設定するにはクリック", - "apply":"実行", - "Username":"ユーザ名", - "Password":"パスワード", - "Terms of service":"サービス利用規約", - "Created by":"Created by", - "See more at":"詳細を見る", - "Contact the developer":"開発者に連絡", - "api version":"APIバージョン", - "Response Content Type":"レスポンス コンテンツタイプ", - "Parameter content type:":"パラメータコンテンツタイプ:", - "fetching resource":"リソースの取得", - "fetching resource list":"リソース一覧の取得", - "Explore":"調査", - "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.", - "Please specify the protocol for":"プロトコルを指定してください", - "Can't read swagger JSON from":"次からswagger JSONを読み込めません", - "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています", - "Unable to read api":"APIを読み込めません", - "from path":"次のパスから", - "server returned":"サーバからの返答" -}); diff --git a/api/src/main/resources/public/lang/ko-kr.js b/api/src/main/resources/public/lang/ko-kr.js deleted file mode 100644 index 03c7626d..00000000 --- a/api/src/main/resources/public/lang/ko-kr.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"경고:폐기예정됨", - "Implementation Notes":"구현 노트", - "Response Class":"응답 클래스", - "Status":"상태", - "Parameters":"매개변수들", - "Parameter":"매개변수", - "Value":"값", - "Description":"설명", - "Parameter Type":"매개변수 타입", - "Data Type":"데이터 타입", - "Response Messages":"응답 메세지", - "HTTP Status Code":"HTTP 상태 코드", - "Reason":"원인", - "Response Model":"응답 모델", - "Request URL":"요청 URL", - "Response Body":"응답 본문", - "Response Code":"응답 코드", - "Response Headers":"응답 헤더", - "Hide Response":"응답 숨기기", - "Headers":"헤더", - "Try it out!":"써보기!", - "Show/Hide":"보이기/숨기기", - "List Operations":"목록 작업", - "Expand Operations":"전개 작업", - "Raw":"원본", - "can't parse JSON. Raw result":"JSON을 파싱할수 없음. 원본결과:", - "Model Schema":"모델 스키마", - "Model":"모델", - "apply":"적용", - "Username":"사용자 이름", - "Password":"암호", - "Terms of service":"이용약관", - "Created by":"작성자", - "See more at":"추가정보:", - "Contact the developer":"개발자에게 문의", - "api version":"api버전", - "Response Content Type":"응답Content Type", - "fetching resource":"리소스 가져오기", - "fetching resource list":"리소스 목록 가져오기", - "Explore":"탐색", - "Show Swagger Petstore Example Apis":"Swagger Petstore 예제 보기", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"서버로부터 읽어들일수 없습니다. access-control-origin 설정이 올바르지 않을수 있습니다.", - "Please specify the protocol for":"다음을 위한 프로토콜을 정하세요", - "Can't read swagger JSON from":"swagger JSON 을 다음으로 부터 읽을수 없습니다", - "Finished Loading Resource Information. Rendering Swagger UI":"리소스 정보 불러오기 완료. Swagger UI 랜더링", - "Unable to read api":"api를 읽을 수 없습니다.", - "from path":"다음 경로로 부터", - "server returned":"서버 응답함." -}); diff --git a/api/src/main/resources/public/lang/pl.js b/api/src/main/resources/public/lang/pl.js deleted file mode 100644 index ce41e917..00000000 --- a/api/src/main/resources/public/lang/pl.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Uwaga: Wycofane", - "Implementation Notes":"Uwagi Implementacji", - "Response Class":"Klasa Odpowiedzi", - "Status":"Status", - "Parameters":"Parametry", - "Parameter":"Parametr", - "Value":"Wartość", - "Description":"Opis", - "Parameter Type":"Typ Parametru", - "Data Type":"Typ Danych", - "Response Messages":"Wiadomości Odpowiedzi", - "HTTP Status Code":"Kod Statusu HTTP", - "Reason":"Przyczyna", - "Response Model":"Model Odpowiedzi", - "Request URL":"URL Wywołania", - "Response Body":"Treść Odpowiedzi", - "Response Code":"Kod Odpowiedzi", - "Response Headers":"Nagłówki Odpowiedzi", - "Hide Response":"Ukryj Odpowiedź", - "Headers":"Nagłówki", - "Try it out!":"Wypróbuj!", - "Show/Hide":"Pokaż/Ukryj", - "List Operations":"Lista Operacji", - "Expand Operations":"Rozwiń Operacje", - "Raw":"Nieprzetworzone", - "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane", - "Model Schema":"Schemat Modelu", - "Model":"Model", - "apply":"użyj", - "Username":"Nazwa użytkownika", - "Password":"Hasło", - "Terms of service":"Warunki używania", - "Created by":"Utworzone przez", - "See more at":"Zobacz więcej na", - "Contact the developer":"Kontakt z deweloperem", - "api version":"wersja api", - "Response Content Type":"Typ Zasobu Odpowiedzi", - "fetching resource":"ładowanie zasobu", - "fetching resource list":"ładowanie listy zasobów", - "Explore":"Eksploruj", - "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.", - "Please specify the protocol for":"Proszę podać protokół dla", - "Can't read swagger JSON from":"Nie można odczytać swagger JSON z", - "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI", - "Unable to read api":"Nie można odczytać api", - "from path":"ze ścieżki", - "server returned":"serwer zwrócił" -}); diff --git a/api/src/main/resources/public/lang/pt.js b/api/src/main/resources/public/lang/pt.js deleted file mode 100644 index f2e7c13d..00000000 --- a/api/src/main/resources/public/lang/pt.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Aviso: Depreciado", - "Implementation Notes":"Notas de Implementação", - "Response Class":"Classe de resposta", - "Status":"Status", - "Parameters":"Parâmetros", - "Parameter":"Parâmetro", - "Value":"Valor", - "Description":"Descrição", - "Parameter Type":"Tipo de parâmetro", - "Data Type":"Tipo de dados", - "Response Messages":"Mensagens de resposta", - "HTTP Status Code":"Código de status HTTP", - "Reason":"Razão", - "Response Model":"Modelo resposta", - "Request URL":"URL requisição", - "Response Body":"Corpo da resposta", - "Response Code":"Código da resposta", - "Response Headers":"Cabeçalho da resposta", - "Headers":"Cabeçalhos", - "Hide Response":"Esconder resposta", - "Try it out!":"Tente agora!", - "Show/Hide":"Mostrar/Esconder", - "List Operations":"Listar operações", - "Expand Operations":"Expandir operações", - "Raw":"Cru", - "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru", - "Model Schema":"Modelo esquema", - "Model":"Modelo", - "apply":"Aplicar", - "Username":"Usuário", - "Password":"Senha", - "Terms of service":"Termos do serviço", - "Created by":"Criado por", - "See more at":"Veja mais em", - "Contact the developer":"Contate o desenvolvedor", - "api version":"Versão api", - "Response Content Type":"Tipo de conteúdo da resposta", - "fetching resource":"busca recurso", - "fetching resource list":"buscando lista de recursos", - "Explore":"Explorar", - "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin", - "Please specify the protocol for":"Por favor especifique o protocolo", - "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de", - "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI", - "Unable to read api":"Não foi possível ler api", - "from path":"do caminho", - "server returned":"servidor retornou" -}); diff --git a/api/src/main/resources/public/lang/ru.js b/api/src/main/resources/public/lang/ru.js deleted file mode 100644 index 592744e9..00000000 --- a/api/src/main/resources/public/lang/ru.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Предупреждение: Устарело", - "Implementation Notes":"Заметки", - "Response Class":"Пример ответа", - "Status":"Статус", - "Parameters":"Параметры", - "Parameter":"Параметр", - "Value":"Значение", - "Description":"Описание", - "Parameter Type":"Тип параметра", - "Data Type":"Тип данных", - "HTTP Status Code":"HTTP код", - "Reason":"Причина", - "Response Model":"Структура ответа", - "Request URL":"URL запроса", - "Response Body":"Тело ответа", - "Response Code":"HTTP код ответа", - "Response Headers":"Заголовки ответа", - "Hide Response":"Спрятать ответ", - "Headers":"Заголовки", - "Response Messages":"Что может прийти в ответ", - "Try it out!":"Попробовать!", - "Show/Hide":"Показать/Скрыть", - "List Operations":"Операции кратко", - "Expand Operations":"Операции подробно", - "Raw":"В сыром виде", - "can't parse JSON. Raw result":"Не удается распарсить ответ:", - "Example Value":"Пример", - "Model Schema":"Структура", - "Model":"Описание", - "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра", - "apply":"применить", - "Username":"Имя пользователя", - "Password":"Пароль", - "Terms of service":"Условия использования", - "Created by":"Разработано", - "See more at":"Еще тут", - "Contact the developer":"Связаться с разработчиком", - "api version":"Версия API", - "Response Content Type":"Content Type ответа", - "Parameter content type:":"Content Type параметра:", - "fetching resource":"Получение ресурса", - "fetching resource list":"Получение ресурсов", - "Explore":"Показать", - "Show Swagger Petstore Example Apis":"Показать примеры АПИ", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа", - "Please specify the protocol for":"Пожалуйста, укажите протокол для", - "Can't read swagger JSON from":"Не получается прочитать swagger json из", - "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим", - "Unable to read api":"Не удалось прочитать api", - "from path":"по адресу", - "server returned":"сервер сказал" -}); diff --git a/api/src/main/resources/public/lang/tr.js b/api/src/main/resources/public/lang/tr.js deleted file mode 100644 index 16426a9c..00000000 --- a/api/src/main/resources/public/lang/tr.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"Uyarı: Deprecated", - "Implementation Notes":"Gerçekleştirim Notları", - "Response Class":"Dönen Sınıf", - "Status":"Statü", - "Parameters":"Parametreler", - "Parameter":"Parametre", - "Value":"Değer", - "Description":"Açıklama", - "Parameter Type":"Parametre Tipi", - "Data Type":"Veri Tipi", - "Response Messages":"Dönüş Mesajı", - "HTTP Status Code":"HTTP Statü Kodu", - "Reason":"Gerekçe", - "Response Model":"Dönüş Modeli", - "Request URL":"İstek URL", - "Response Body":"Dönüş İçeriği", - "Response Code":"Dönüş Kodu", - "Response Headers":"Dönüş Üst Bilgileri", - "Hide Response":"Dönüşü Gizle", - "Headers":"Üst Bilgiler", - "Try it out!":"Dene!", - "Show/Hide":"Göster/Gizle", - "List Operations":"Operasyonları Listele", - "Expand Operations":"Operasyonları Aç", - "Raw":"Ham", - "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç", - "Model Schema":"Model Şema", - "Model":"Model", - "apply":"uygula", - "Username":"Kullanıcı Adı", - "Password":"Parola", - "Terms of service":"Servis şartları", - "Created by":"Oluşturan", - "See more at":"Daha fazlası için", - "Contact the developer":"Geliştirici ile İletişime Geçin", - "api version":"api versiyon", - "Response Content Type":"Dönüş İçerik Tipi", - "fetching resource":"kaynak getiriliyor", - "fetching resource list":"kaynak listesi getiriliyor", - "Explore":"Keşfet", - "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.", - "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz", - "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor", - "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor", - "Unable to read api":"api okunamadı", - "from path":"yoldan", - "server returned":"sunucuya dönüldü" -}); diff --git a/api/src/main/resources/public/lang/translator.js b/api/src/main/resources/public/lang/translator.js deleted file mode 100644 index ffb879f9..00000000 --- a/api/src/main/resources/public/lang/translator.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -/** - * Translator for documentation pages. - * - * To enable translation you should include one of language-files in your index.html - * after . - * For example - - * - * If you wish to translate some new texts you should do two things: - * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. - * 2. Mark that text it templates this way New Phrase or . - * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. - * - */ -window.SwaggerTranslator = { - - _words:[], - - translate: function(sel) { - var $this = this; - sel = sel || '[data-sw-translate]'; - - $(sel).each(function() { - $(this).html($this._tryTranslate($(this).html())); - - $(this).val($this._tryTranslate($(this).val())); - $(this).attr('title', $this._tryTranslate($(this).attr('title'))); - }); - }, - - _tryTranslate: function(word) { - return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; - }, - - learn: function(wordsMap) { - this._words = wordsMap; - } -}; diff --git a/api/src/main/resources/public/lang/zh-cn.js b/api/src/main/resources/public/lang/zh-cn.js deleted file mode 100644 index 3af61ad6..00000000 --- a/api/src/main/resources/public/lang/zh-cn.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/* jshint quotmark: double */ -window.SwaggerTranslator.learn({ - "Warning: Deprecated":"警告:已过时", - "Implementation Notes":"实现备注", - "Response Class":"响应类", - "Status":"状态", - "Parameters":"参数", - "Parameter":"参数", - "Value":"值", - "Description":"描述", - "Parameter Type":"参数类型", - "Data Type":"数据类型", - "Response Messages":"响应消息", - "HTTP Status Code":"HTTP状态码", - "Reason":"原因", - "Response Model":"响应模型", - "Request URL":"请求URL", - "Response Body":"响应体", - "Response Code":"响应码", - "Response Headers":"响应头", - "Hide Response":"隐藏响应", - "Headers":"头", - "Try it out!":"试一下!", - "Show/Hide":"显示/隐藏", - "List Operations":"显示操作", - "Expand Operations":"展开操作", - "Raw":"原始", - "can't parse JSON. Raw result":"无法解析JSON. 原始结果", - "Example Value":"示例", - "Click to set as parameter value":"点击设置参数", - "Model Schema":"模型架构", - "Model":"模型", - "apply":"应用", - "Username":"用户名", - "Password":"密码", - "Terms of service":"服务条款", - "Created by":"创建者", - "See more at":"查看更多:", - "Contact the developer":"联系开发者", - "api version":"api版本", - "Response Content Type":"响应Content Type", - "Parameter content type:":"参数类型:", - "fetching resource":"正在获取资源", - "fetching resource list":"正在获取资源列表", - "Explore":"浏览", - "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis", - "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。", - "Please specify the protocol for":"请指定协议:", - "Can't read swagger JSON from":"无法读取swagger JSON于", - "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI", - "Unable to read api":"无法读取api", - "from path":"从路径", - "server returned":"服务器返回" -}); diff --git a/api/src/main/resources/public/lib/backbone-min.js b/api/src/main/resources/public/lib/backbone-min.js deleted file mode 100644 index a3f544be..00000000 --- a/api/src/main/resources/public/lib/backbone-min.js +++ /dev/null @@ -1,15 +0,0 @@ -// Backbone.js 1.1.2 - -(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('