diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..af21be79 Binary files /dev/null and b/.DS_Store differ diff --git a/404.html b/404.html index 1eb93f81..c08c4cb5 100644 --- a/404.html +++ b/404.html @@ -1,145 +1,148 @@ -all4fun blog | all4fun blog +页面没有找到 | 王恒's Blog - + - + - + -
Page not found

404

未找到
\ No newline at end of file + })(window)

404

未找到
回到主页
\ No newline at end of file diff --git a/about/index.html b/about/index.html index 606fdc27..c8678787 100644 --- a/about/index.html +++ b/about/index.html @@ -1,115 +1,26 @@ -关于 | all4fun blog +About me | 王恒's Blog - + - - + + - + - - + + -
关于

Another Programmer

-

项目:http://github.com/all4fun

-

邮箱:点击联系我

-

评论
\ No newline at end of file +} +
\ No newline at end of file diff --git a/apple-keyboard-the-helper.html b/apple-keyboard-the-helper.html index a4a5d73c..9a4579e6 100644 --- a/apple-keyboard-the-helper.html +++ b/apple-keyboard-the-helper.html @@ -1,130 +1,26 @@ -apple keyboard helper苹果键盘tools | all4fun blog +apple keyboard helper苹果键盘tools | 王恒's Blog - - + + - + - - + + -

apple keyboard helper苹果键盘tools

-前一阵终于忍受不了 iPad 2 上面的虚拟键盘,为了发博码字的方便,入手了 Apple 的蓝牙键盘,清脆的手感非常不错。虽然苹果键盘一直以来都是与 Mac 搭配使用的,但是 Apple 键盘简洁精美的做工也深受许多玩家的喜爱。加上蓝牙键盘既可以用在 PC 上又可以用在 iOS 设备上,相信拥有 Apple Keyboard 的玩家也不在少数。但是 Apple 的键盘用在普通 PC 上的时候,发现很多功能键都不能用,甚至连 Del 键都没有,多少带来了一些不便。最近发现了一款小工具 Apple Keyboard Helper,安装 Apple Keyboard Helper 之后,苹果键盘的 F3(屏幕截图)、F4(任务管理器)、F7–F9(iTunes 控制)、F10–F12(系统音量控制)等按键就可以在 Windows PC 上使用了。 + postUpdate: '2021-10-11 10:11:44' +}
赞助

评论
avatar
all4fun
make progress little day by day.
开源主页
公告
VPS 香港服务器推荐: VollCloud HK
最新文章

apple keyboard helper苹果键盘tools

+

   前一阵终于忍受不了iPad2上面的虚拟键盘,为了发博码字的方便,入手了apple的蓝牙键盘,清脆的手感非常不错。虽然苹果键盘一直以来都是与Mac搭配使用的,但是apple键盘简洁精美的做工也深受许多玩家的喜爱。加上蓝牙键盘既可以用在pc上又可以用在ios设备上,相信拥有apple keboard的玩家也不在少数。但是apple的键盘用在普通PC上的时候,发现很多功能键都不能用,甚至连del键都没有,多少带来了一些不便。最近发现了一款小工具apple keyboard helper,安装 Apple Keyboard Helper之后,苹果键盘的F3(屏幕截图)F4(任务管理器)F7-F9(iTunes控制)F10-12(系统音量控制)等按键就可以在Windows PC上使用了。

下载地址如下:apple keyboard helper

同时作者还将源码开放了,有兴趣的同学不妨看一下 :)

+
+
文章作者: 王恒
文章链接: http://wangheng.org/apple-keyboard-the-helper.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} +
\ No newline at end of file diff --git a/archives/2011/06/index.html b/archives/2011/06/index.html index 32be854a..d79b497c 100644 --- a/archives/2011/06/index.html +++ b/archives/2011/06/index.html @@ -1,145 +1,148 @@ -2011年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2011/07/index.html b/archives/2011/07/index.html index 9b2f8ae0..baf486cf 100644 --- a/archives/2011/07/index.html +++ b/archives/2011/07/index.html @@ -1,145 +1,148 @@ -2011年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2011
Razer Krait 鼠标换微动
\ No newline at end of file + })(window)
文章总览 - 86
2011
Razer Krait 鼠标换微动
\ No newline at end of file diff --git a/archives/2011/08/index.html b/archives/2011/08/index.html index 170db64a..fbce8582 100644 --- a/archives/2011/08/index.html +++ b/archives/2011/08/index.html @@ -1,145 +1,148 @@ -2011年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2011/10/index.html b/archives/2011/10/index.html new file mode 100644 index 00000000..548de3b0 --- /dev/null +++ b/archives/2011/10/index.html @@ -0,0 +1,148 @@ +时间线 | 王恒's Blog + + + + + + + + + + +
文章总览 - 86
2011
按对象的某个属性值来排序
\ No newline at end of file diff --git a/archives/2011/11/index.html b/archives/2011/11/index.html index bfa4ad4e..515946e0 100644 --- a/archives/2011/11/index.html +++ b/archives/2011/11/index.html @@ -1,145 +1,148 @@ -2011年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
文章总览 - 86
2011
Globus Toolkit 安装与配置
Ubuntu 搭建 Vpn 服务
Ubuntu下的 VPN 连接
\ No newline at end of file diff --git a/archives/2011/12/index.html b/archives/2011/12/index.html index d70be949..12aea141 100644 --- a/archives/2011/12/index.html +++ b/archives/2011/12/index.html @@ -1,145 +1,148 @@ -2011年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2011/index.html b/archives/2011/index.html index 8d2d3950..ad5d1b48 100644 --- a/archives/2011/index.html +++ b/archives/2011/index.html @@ -1,145 +1,148 @@ -2011 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2011/page/2/index.html b/archives/2011/page/2/index.html index 608a84ae..2f71d88b 100644 --- a/archives/2011/page/2/index.html +++ b/archives/2011/page/2/index.html @@ -1,145 +1,148 @@ -2011 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 12
2011
HTML 页面跳转的几种方法
Ubuntu 10.10 更新源总结
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/01/index.html b/archives/2012/01/index.html index 4e8f3334..1db5a098 100644 --- a/archives/2012/01/index.html +++ b/archives/2012/01/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/02/index.html b/archives/2012/02/index.html index e7c3344f..f12cbd2a 100644 --- a/archives/2012/02/index.html +++ b/archives/2012/02/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 3
2012
简单配置PHP
设置Win7无线网络共享
Apache2配置多域名
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/03/index.html b/archives/2012/03/index.html index 80123882..af9da36a 100644 --- a/archives/2012/03/index.html +++ b/archives/2012/03/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/04/index.html b/archives/2012/04/index.html index 76d87bd9..d4245598 100644 --- a/archives/2012/04/index.html +++ b/archives/2012/04/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/05/index.html b/archives/2012/05/index.html index 9fcf48ad..c71b29d5 100644 --- a/archives/2012/05/index.html +++ b/archives/2012/05/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/06/index.html b/archives/2012/06/index.html index 33b807b5..564cc8a9 100644 --- a/archives/2012/06/index.html +++ b/archives/2012/06/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/07/index.html b/archives/2012/07/index.html index 68e8756e..e3f57e22 100644 --- a/archives/2012/07/index.html +++ b/archives/2012/07/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/08/index.html b/archives/2012/08/index.html index 905610f4..3b26b55c 100644 --- a/archives/2012/08/index.html +++ b/archives/2012/08/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2012
金山快盘丢文件
\ No newline at end of file + })(window)
文章总览 - 86
2012
金山快盘丢文件
(转)告诉你一个真实的北京
\ No newline at end of file diff --git a/archives/2012/09/index.html b/archives/2012/09/index.html index cf860d8c..5f837605 100644 --- a/archives/2012/09/index.html +++ b/archives/2012/09/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/10/index.html b/archives/2012/10/index.html index 984e75c8..99af820d 100644 --- a/archives/2012/10/index.html +++ b/archives/2012/10/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/11/index.html b/archives/2012/11/index.html index 5027c7ba..567c3618 100644 --- a/archives/2012/11/index.html +++ b/archives/2012/11/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/12/index.html b/archives/2012/12/index.html index 018c7a52..7ab1b626 100644 --- a/archives/2012/12/index.html +++ b/archives/2012/12/index.html @@ -1,145 +1,148 @@ -2012年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/index.html b/archives/2012/index.html index 0d7e969b..09470679 100644 --- a/archives/2012/index.html +++ b/archives/2012/index.html @@ -1,145 +1,148 @@ -2012 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/page/2/index.html b/archives/2012/page/2/index.html index d6c99e9f..362e7859 100644 --- a/archives/2012/page/2/index.html +++ b/archives/2012/page/2/index.html @@ -1,145 +1,148 @@ -2012 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/page/3/index.html b/archives/2012/page/3/index.html index 46bce839..a3ef46e3 100644 --- a/archives/2012/page/3/index.html +++ b/archives/2012/page/3/index.html @@ -1,145 +1,148 @@ -2012 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/page/4/index.html b/archives/2012/page/4/index.html index ff9f97f6..e656ba22 100644 --- a/archives/2012/page/4/index.html +++ b/archives/2012/page/4/index.html @@ -1,145 +1,148 @@ -2012 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2012/page/5/index.html b/archives/2012/page/5/index.html index 933b9dbe..3b2232b3 100644 --- a/archives/2012/page/5/index.html +++ b/archives/2012/page/5/index.html @@ -1,145 +1,148 @@ -2012 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 41
2012
安装nvidia官方驱动
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2013/01/index.html b/archives/2013/01/index.html index c5e155dc..cbcaa598 100644 --- a/archives/2013/01/index.html +++ b/archives/2013/01/index.html @@ -1,145 +1,148 @@ -2013年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2013
解决MySQL远程连接丢失问题
\ No newline at end of file + })(window)
文章总览 - 86
2013
博客服务器系统升级
解决MySQL远程连接丢失问题
\ No newline at end of file diff --git a/archives/2013/03/index.html b/archives/2013/03/index.html index 84bd3396..7d2704e2 100644 --- a/archives/2013/03/index.html +++ b/archives/2013/03/index.html @@ -1,145 +1,148 @@ -2013年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2013
Linux中dd命令详解
\ No newline at end of file + })(window)
文章总览 - 86
2013
Linux中dd命令详解
\ No newline at end of file diff --git a/archives/2013/07/index.html b/archives/2013/07/index.html index 5d41e919..18240ddb 100644 --- a/archives/2013/07/index.html +++ b/archives/2013/07/index.html @@ -1,145 +1,148 @@ -2013年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 3
2013
手动编译vim配置
性能调优备忘
Linux中设置代理服务器
\ No newline at end of file + })(window)
文章总览 - 86
2013
手动编译vim配置
性能调优备忘
Linux中设置代理服务器
\ No newline at end of file diff --git a/archives/2013/11/index.html b/archives/2013/11/index.html index 379ab4ae..ac6f92df 100644 --- a/archives/2013/11/index.html +++ b/archives/2013/11/index.html @@ -1,145 +1,148 @@ -2013年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2013
Linux/Windows/Mac刷新DNS缓存
\ No newline at end of file + })(window)
文章总览 - 86
2013
Linux/Windows/Mac刷新DNS缓存
\ No newline at end of file diff --git a/archives/2013/index.html b/archives/2013/index.html index cf9ed6c9..7401003f 100644 --- a/archives/2013/index.html +++ b/archives/2013/index.html @@ -1,145 +1,148 @@ -2013 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2014/01/index.html b/archives/2014/01/index.html new file mode 100644 index 00000000..e6b0d884 --- /dev/null +++ b/archives/2014/01/index.html @@ -0,0 +1,148 @@ +时间线 | 王恒's Blog + + + + + + + + + + +
文章总览 - 86
2014
Hi 2014
\ No newline at end of file diff --git a/archives/2014/04/index.html b/archives/2014/04/index.html index 7a52c443..781fe54d 100644 --- a/archives/2014/04/index.html +++ b/archives/2014/04/index.html @@ -1,145 +1,148 @@ -2014年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2014/06/index.html b/archives/2014/06/index.html index da00497e..23330305 100644 --- a/archives/2014/06/index.html +++ b/archives/2014/06/index.html @@ -1,145 +1,148 @@ -2014年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2014
禁用或替换博客google字体
\ No newline at end of file + })(window)
文章总览 - 86
2014
禁用或替换博客google字体
\ No newline at end of file diff --git a/archives/2014/index.html b/archives/2014/index.html index 3c9ba3ba..51b3bb00 100644 --- a/archives/2014/index.html +++ b/archives/2014/index.html @@ -1,145 +1,148 @@ -2014 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2015/01/index.html b/archives/2015/01/index.html index fe10f5fb..27140fa4 100644 --- a/archives/2015/01/index.html +++ b/archives/2015/01/index.html @@ -1,145 +1,148 @@ -2015年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2015/05/index.html b/archives/2015/05/index.html index 05c55a0d..4cd1739e 100644 --- a/archives/2015/05/index.html +++ b/archives/2015/05/index.html @@ -1,145 +1,148 @@ -2015年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2015/index.html b/archives/2015/index.html index 0cae908f..e929585b 100644 --- a/archives/2015/index.html +++ b/archives/2015/index.html @@ -1,145 +1,148 @@ -2015 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/2018/10/index.html b/archives/2018/10/index.html index c7e248b3..4297d662 100644 --- a/archives/2018/10/index.html +++ b/archives/2018/10/index.html @@ -1,145 +1,148 @@ -2018年 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2018
从wordpress迁移到hexo填坑
\ No newline at end of file + })(window)
文章总览 - 86
2018
从wordpress迁移到hexo填坑
\ No newline at end of file diff --git a/archives/2018/index.html b/archives/2018/index.html index e78ee3a1..f28b02bf 100644 --- a/archives/2018/index.html +++ b/archives/2018/index.html @@ -1,145 +1,148 @@ -2018 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
全部文章 - 1
2018
从wordpress迁移到hexo填坑
\ No newline at end of file + })(window)
文章总览 - 86
2018
从wordpress迁移到hexo填坑
\ No newline at end of file diff --git a/archives/index.html b/archives/index.html index 1f3bb67e..c3e264c1 100644 --- a/archives/index.html +++ b/archives/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/2/index.html b/archives/page/2/index.html index 91da1cf0..7044c82c 100644 --- a/archives/page/2/index.html +++ b/archives/page/2/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/3/index.html b/archives/page/3/index.html index fc4d78b6..d2b7f5fc 100644 --- a/archives/page/3/index.html +++ b/archives/page/3/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/4/index.html b/archives/page/4/index.html index 75c3a123..984dbbe3 100644 --- a/archives/page/4/index.html +++ b/archives/page/4/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/5/index.html b/archives/page/5/index.html index 84201476..f4435c31 100644 --- a/archives/page/5/index.html +++ b/archives/page/5/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/6/index.html b/archives/page/6/index.html index 88cac2d7..743b44f6 100644 --- a/archives/page/6/index.html +++ b/archives/page/6/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/7/index.html b/archives/page/7/index.html index 68e6d79c..f00f9640 100644 --- a/archives/page/7/index.html +++ b/archives/page/7/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/8/index.html b/archives/page/8/index.html index b46084a5..f3b824a6 100644 --- a/archives/page/8/index.html +++ b/archives/page/8/index.html @@ -1,145 +1,148 @@ -时间线 | all4fun blog +时间线 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/archives/page/9/index.html b/archives/page/9/index.html new file mode 100644 index 00000000..bf29e4dc --- /dev/null +++ b/archives/page/9/index.html @@ -0,0 +1,148 @@ +时间线 | 王恒's Blog + + + + + + + + + + +
\ No newline at end of file diff --git a/blog-server-system-upgrade.html b/blog-server-system-upgrade.html new file mode 100644 index 00000000..a047dd8d --- /dev/null +++ b/blog-server-system-upgrade.html @@ -0,0 +1,189 @@ +博客服务器系统升级 | 王恒's Blog + + + + + + + + + + + + +

博客服务器系统升级

+由于前两天博客所在的VPS机房搬迁,加之工作太忙无精力再去弄一个备份服务器,导致了博客连续两天都无法访问。近日拜访的朋友实在是抱歉了~~ + +

刚好之前也是一直懒得升级服务器的系统版本,旧的系统(ubuntu 11.04) 已经不被支持了,所以今天升级到了最新的 LTS 版本。还好各种数据都有备份,升级过程很顺利,各种工具安装配置基本都很快弄好了。自己试了几次,访问速度还可以~~ 嘿嘿

+

很快就要新年了,希望各位朋友继续多多支持~~

+

提前祝各位新年快乐,工作顺利,学业有成~~

+
文章作者: 王恒
文章链接: http://wangheng.org/blog-server-system-upgrade.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file diff --git a/c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html b/c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html index 3fae883e..cdf30523 100644 --- a/c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html +++ b/c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html @@ -1,165 +1,153 @@ -C#利用反射给对象赋值 | all4fun blog +C#利用反射给对象赋值 | 王恒's Blog - + - + - - + + -

C#利用反射给对象赋值

+ })(window)

C#利用反射给对象赋值

我们如果想利用凡是给一个对象属性赋值可以通过PropertyInfo.SetValue()方式进行赋值,但要注意值的类型要与属性保持一致,例如:

var property = obj.GetType().GetProperty(“PropertyName”);//此时可以使用GetProperty获取属性数组,循环进行赋值。

@@ -189,61 +177,37 @@ } }

这样,在使用Convert.ChangeType()转换可空类型时,就不会报错了。

-
文章作者: all4fun
文章链接: http://wangheng.org/c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/categories/Route/index.html b/categories/Route/index.html index 8d31c575..ff537d75 100644 --- a/categories/Route/index.html +++ b/categories/Route/index.html @@ -1,145 +1,148 @@ -分类: Route | all4fun blog +分类: Route | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/Autohotkey/index.html b/categories/Technical/Autohotkey/index.html index ef100456..7d10efa2 100644 --- a/categories/Technical/Autohotkey/index.html +++ b/categories/Technical/Autohotkey/index.html @@ -1,145 +1,148 @@ -分类: Autohotkey | all4fun blog +分类: Autohotkey | 王恒's Blog - + - + - + -
分类 - Autohotkey
2012
高效办公辅助工具Autohotkey
\ No newline at end of file + })(window)
分类 - Autohotkey
2012
高效办公辅助工具Autohotkey
\ No newline at end of file diff --git a/categories/Technical/Route/index.html b/categories/Technical/Route/index.html index b3265ae3..1d0508e6 100644 --- a/categories/Technical/Route/index.html +++ b/categories/Technical/Route/index.html @@ -1,145 +1,148 @@ -分类: Route | all4fun blog +分类: Route | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/index.html b/categories/Technical/index.html index c4136d8b..1278f9a4 100644 --- a/categories/Technical/index.html +++ b/categories/Technical/index.html @@ -1,145 +1,148 @@ -分类: Technical | all4fun blog +分类: Technical | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/page/2/index.html b/categories/Technical/page/2/index.html index d33b70aa..4b4ceec0 100644 --- a/categories/Technical/page/2/index.html +++ b/categories/Technical/page/2/index.html @@ -1,145 +1,148 @@ -分类: Technical | all4fun blog +分类: Technical | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/page/3/index.html b/categories/Technical/page/3/index.html index 8b289d72..9791c7f2 100644 --- a/categories/Technical/page/3/index.html +++ b/categories/Technical/page/3/index.html @@ -1,145 +1,148 @@ -分类: Technical | all4fun blog +分类: Technical | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/page/4/index.html b/categories/Technical/page/4/index.html index f32feee2..62adf11e 100644 --- a/categories/Technical/page/4/index.html +++ b/categories/Technical/page/4/index.html @@ -1,145 +1,148 @@ -分类: Technical | all4fun blog +分类: Technical | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/page/5/index.html b/categories/Technical/page/5/index.html index 345c3a61..247765b7 100644 --- a/categories/Technical/page/5/index.html +++ b/categories/Technical/page/5/index.html @@ -1,145 +1,148 @@ -分类: Technical | all4fun blog +分类: Technical | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/Technical/page/6/index.html b/categories/Technical/page/6/index.html new file mode 100644 index 00000000..bfa80973 --- /dev/null +++ b/categories/Technical/page/6/index.html @@ -0,0 +1,148 @@ +分类: Technical | 王恒's Blog + + + + + + + + + + +
分类 - Technical
2011
Ubuntu 10.10 更新源总结
\ No newline at end of file diff --git a/categories/index.html b/categories/index.html index 488822eb..426f2acd 100644 --- a/categories/index.html +++ b/categories/index.html @@ -1,218 +1,150 @@ -分类 | all4fun blog +分类 | 王恒's Blog - + - + - - + + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/categories/linux/index.html b/categories/linux/index.html index 36ce2bcf..6e7f301e 100644 --- a/categories/linux/index.html +++ b/categories/linux/index.html @@ -1,145 +1,148 @@ -分类: linux | all4fun blog +分类: linux | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git "a/categories/\344\271\261\344\270\203\345\205\253\347\263\237/index.html" "b/categories/\344\271\261\344\270\203\345\205\253\347\263\237/index.html" new file mode 100644 index 00000000..42399e1a --- /dev/null +++ "b/categories/\344\271\261\344\270\203\345\205\253\347\263\237/index.html" @@ -0,0 +1,148 @@ +分类: 乱七八糟 | 王恒's Blog + + + + + + + + + + +
\ No newline at end of file diff --git "a/categories/\346\234\200\350\277\221\346\267\273\345\212\240/index.html" "b/categories/\346\234\200\350\277\221\346\267\273\345\212\240/index.html" index 8d92720b..5dc84c5e 100644 --- "a/categories/\346\234\200\350\277\221\346\267\273\345\212\240/index.html" +++ "b/categories/\346\234\200\350\277\221\346\267\273\345\212\240/index.html" @@ -1,145 +1,148 @@ -分类: 最近添加 | all4fun blog +分类: 最近添加 | 王恒's Blog - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git "a/categories/\346\234\200\350\277\221\346\267\273\345\212\240/page/2/index.html" "b/categories/\346\234\200\350\277\221\346\267\273\345\212\240/page/2/index.html" index 2404ade7..1da336af 100644 --- "a/categories/\346\234\200\350\277\221\346\267\273\345\212\240/page/2/index.html" +++ "b/categories/\346\234\200\350\277\221\346\267\273\345\212\240/page/2/index.html" @@ -1,145 +1,148 @@ -分类: 最近添加 | all4fun blog +分类: 最近添加 | 王恒's Blog - + - + - + -
分类 - 最近添加
2014
使用parted创建GPT分区
2013
Linux/Windows/Mac刷新DNS缓存
Linux中dd命令详解
2012
SAE中使用TmpFS功能
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/clear-the-mysql-log-bin-log.html b/clear-the-mysql-log-bin-log.html index fca0c45d..e0080549 100644 --- a/clear-the-mysql-log-bin-log.html +++ b/clear-the-mysql-log-bin-log.html @@ -1,168 +1,156 @@ -清除mysql的log-bin日志 | all4fun blog +清除mysql的log-bin日志 | 王恒's Blog - + - + - - + + -

清除mysql的log-bin日志

+ })(window)

清除mysql的log-bin日志

前一阵子工作项目上的事情忙的焦头烂额,最近要进行部门调整将要去做新的项目。又要学习很多新的知识了,还是很兴奋激动的。今天下班回来查看了一下VPS状态,发现VPS的空间只剩下了1G多!第一反应是被入侵了,但是看了一下log并没有发现什么异常的登录,加上平时基本都是用私钥免密码登录的VPS,别入侵的可能也不是很大。那我就很疑惑了,因为系统文件占用应该也就3G多,我平时并没有在VPS放过什么大文件,不应该一下子少那么多空间。于是开始一番du查找终于找到了罪魁祸首!原来是mysql的log文件导致的。

装mysql并运行一段时间后,在mysql目录下出现一堆类似mysql-bin.000***,从mysql-bin.000001开始一直排列下来,而且占用了大量硬盘空间,高达十几个G.。原来mysql-bin.000001、mysql-bin.000002等文件是数据库的操作日志,例如UPDATE一个表,或者DELETE一些数据,即使该语句没有匹配的数据,这个命令也会存储到日志文件中,还包括每个语句执行的时间,也会记录进去的。 这些形如mysql-bin.00001的文件主要是用来做什么的呢? 1、数据恢复

如果你的数据库出问题了,而你之前有过备份,那么可以看日志文件,找出是哪个命令导致你的数据库出问题了,想办法挽回损失。

2、主从服务器之间同步数据

主服务器上所有的操作都在记录日志中,从服务器可以根据该日志来进行,以确保两个同步。

3、清除办法

运行 /usr/local/mysql/bin/mysql -u root -p 登录执行:

reset master;

如果你只有一个mysql服务器,在/etc/ 下面找到my.cnf文件vim /etc/my.cnf把里面的

@@ -183,61 +171,37 @@

D:清理所有的日志,但是不包括目标日志,因为从服务器还要跟它同步。 简单地说,这些MySQL目录下的形如mysql-bin.000***的文件时MySQL的事务日志。 删除复制服务器已经拿走的binlog是安全的,一般来说网络状况好的时候,保留最新的那一个足以。

-
文章作者: all4fun
文章链接: http://wangheng.org/clear-the-mysql-log-bin-log.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/cmd-in-window-property-the-settings.html b/cmd-in-window-property-the-settings.html index 97d793ce..a9c22459 100644 --- a/cmd-in-window-property-the-settings.html +++ b/cmd-in-window-property-the-settings.html @@ -1,167 +1,155 @@ -CMD窗口属性设置 | all4fun blog +CMD窗口属性设置 | 王恒's Blog - + - + - - + + -

CMD窗口属性设置

+ })(window)

CMD窗口属性设置

首先打开注册表编辑器,Win+R(win就是那个Windows标志的按键)。具体设置参考如下:

1、默认设置:
保存在 HKEY_CURRENT_USER\Console
2、自定义设置:
保存在 [HKEY_CURRENT_USER\Console%SystemRoot%_system32_cmd.exe]

@@ -191,61 +179,37 @@

36—00240000—18*41

72—00480000—36*82

以上是自定义cmd窗口属性的基本知识

-
文章作者: all4fun
文章链接: http://wangheng.org/cmd-in-window-property-the-settings.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/configure-gcc-on-ipad2.html b/configure-gcc-on-ipad2.html index 18e20b8a..e7a39aaf 100644 --- a/configure-gcc-on-ipad2.html +++ b/configure-gcc-on-ipad2.html @@ -1,14 +1,14 @@ -为ipad2安装和配置gcc编译环境 | all4fun blog +为ipad2安装和配置gcc编译环境 | 王恒's Blog - + - + - - + + @@ -22,163 +22,151 @@ -

为ipad2安装和配置gcc编译环境

-iPad2可不仅仅是一个电子书,也不仅仅是用来看电影大号MP4。微笑 废话就不多说了,下面介绍的是我给iPad2配置gcc编译环境的过程。 + })(window)

为ipad2安装和配置gcc编译环境

+iPad2可不仅仅是一个电子书,也不仅仅是用来看电影大号MP4。微笑 废话就不多说了,下面介绍的是我给iPad2配置gcc编译环境的过程。

1、首先你必须越狱,网上教程也很多,这里就不多讲了。

声明:越狱可以让你的ipad运行无签名的可执行文件,但可能损害你的设备,对于你设备可能出现的问题,本文不负任何责任!

好了,现在我假设你的设备已经越狱成功。很棒,下面请让你的ipad接入一个无线网络,后续的步骤也可能需要网络 :)

如果你想使用电脑来SSH 到iPad2 你可能需要使用Cydia来安装openssh。

记得安装完Openssh要修改root和mobile用户的密码哦!(默认是alpine

-

PC端可以可以使用putty 和winscp配合来访问iPad2,MAC系统或者Linux可以使用系统自带的终端 ssh root@192.168.1.6  。我这里使用的是Tunnelier,它集成了putty 和winscp两款工具的功能,个人感觉很好用!

+

PC端可以可以使用putty 和winscp配合来访问iPad2,MAC系统或者Linux可以使用系统自带的终端 ssh root@192.168.1.6  。我这里使用的是Tunnelier,它集成了putty 和winscp两款工具的功能,个人感觉很好用!

可能用的的工具:

Tunnelier (地址:www.bitvise.com/tunnelier推荐

putty (地址:www.putty.org/

@@ -194,8 +182,7 @@

2、使用Tunnelier SSH到你的iPad

-image - +

image

Host:添入你的iPad的IP地址

Prot:默认是22

Username:root(用root或者mobile用户登录,这里是root)

@@ -205,8 +192,7 @@

将mobile用户加到sudo组,在命令行输入:

$ visudo

这个和vi的用法一样,移动光标到最后一行,按A在最后添加

mobile ALL=(ALL) ALL

如图:

-image - +

image

使用:wq或者ZZ保存并退出vi。

以后就可以用 mobile用户登录并使用sudo命令来执行一些危险的操作了!

3、开始安装

@@ -214,13 +200,11 @@
wget http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb
 sudo dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb
 sudo apt-get install iphone-gcc ldid
-#注:安装ldid为应用程序签名(防止在应用启动时被iOS杀掉)
- -image +#注:安装ldid为应用程序签名(防止在应用启动时被iOS杀掉)image

安装 libSystem:

cd /usr/lib/
sudo ln -s libSystem.B.dylib libSystem.dylib
下载并安装SDK(IPAD)头文件:

下载sys32Libheader.tgz 文件到 iPad 路径 /var

-

点击下载

+

点击下载

也可以将下载下来的tgz包通过sftp传到/var 目录,终端中输入代码:

cd /var
 tar xzvf sys32Libheader.tgz
@@ -251,64 +235,39 @@ #为编译后的应用程序签名的方式是,运行:ldid –S [Aplication];

哈哈,看到iPad2上成功的第一次执行了自己写的代码!

附图:

-image - +

image

注:部分内容参考http://antirez.com/page/iphone-gcc-guide.html

-
文章作者: all4fun
文章链接: http://wangheng.org/configure-gcc-on-ipad2.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/configure-nginx-to-support-thinkphp-pathinfo-mode.html b/configure-nginx-to-support-thinkphp-pathinfo-mode.html index ced1a050..2ccd58a1 100644 --- a/configure-nginx-to-support-thinkphp-pathinfo-mode.html +++ b/configure-nginx-to-support-thinkphp-pathinfo-mode.html @@ -1,166 +1,154 @@ -配置nginx伪静态以支持ThinkPHP的PATHINFO模式 | all4fun blog +配置nginx伪静态以支持ThinkPHP的PATHINFO模式 | 王恒's Blog - + - + - - + + -

配置nginx伪静态以支持ThinkPHP的PATHINFO模式

+ })(window)

配置nginx伪静态以支持ThinkPHP的PATHINFO模式

ThinkPHP是一款很不错的框架,也是PHP开发中最近用的比较火的。平时在本地开发中打开apache的modrewrite 配合.htaccess文件就可以完美的支持ThinkPHP的PATHINFO模式,但是家里的linux机器搭建的却是nginx 环境。这就造成了url 重写出现了很多奇怪的问题,所以需要对nginx 的配置文件修改一下来让它支持ThinkPHP的框架。 首先你的项目的config文件中要配置这一项
  'URL_MODEL' => 2, // rewrite
@@ -171,10 +159,10 @@ if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?s=/$1 last; } -} +}

然后在你的配置文件中include一下刚刚的配置文件。

- +

如果你的ThinkPHP入口文件index.php不在根目录,则需要把thinkphp.conf改成这样

location /入口文件所在目录/ {
@@ -183,61 +171,37 @@
   }
 }
-
文章作者: all4fun
文章链接: http://wangheng.org/configure-nginx-to-support-thinkphp-pathinfo-mode.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/css/index.css b/css/index.css index 2cbfef82..500faa38 100644 --- a/css/index.css +++ b/css/index.css @@ -179,12 +179,14 @@ template { display: none } .limit-one-line, -.container .flink .flink-item-name, -.container .flink .flink-item-desc, +#article-container .flink .flink-list > .flink-list-item a .flink-item-name, +#article-container .flink .flink-list > .flink-list-item a .flink-item-desc, +#aside-content .card-info .card-info-data > .card-info-data-item a .headline, #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span, #aside-content .card-categories ul.card-category-list > .card-category-list-item a span, -.site-data > a .headline, -#nav #blog-info, +#pagination .prev_info, +#pagination .next_info, +#sidebar #sidebar-menus .site-data .data-item .data-item-link > a > div, #sidebar #sidebar-menus .menus_items .site-page { overflow: hidden; -o-text-overflow: ellipsis; @@ -192,191 +194,34 @@ template { white-space: nowrap; } .limit-more-line, -.type-404 .error-content .error-info .error_subtitle, +.error404 #error-wrap .error-content .error-info .error_subtitle, .article-sort-item-title, -#recent-posts .recent-post-item >.recent-post-info > .article-title, -#recent-posts .recent-post-item >.recent-post-info > .content, +#recent-posts > .recent-post-item >.recent-post-info > .article-title, +#recent-posts > .recent-post-item >.recent-post-info > .content, #aside-content .aside-list > .aside-list-item .content > .name, #aside-content .aside-list > .aside-list-item .content > .title, #aside-content .aside-list > .aside-list-item .content > .comment, #post-info .post-title, -.pagination-related .info .info-1 .info-item-2, -.pagination-related .info .info-2 .info-item-1, -.container figure.gallery-group p, -.container figure.gallery-group .gallery-group-name { +.relatedPosts > .relatedPosts-list .content .title, +figure.gallery-group p, +figure.gallery-group .gallery-group-name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; } .fontawesomeIcon, -.custom-hr:before, -.container h1:before, -.container h2:before, -.container h3:before, -.container h4:before, -.container h5:before, -.container h6:before, -.container hr:before, +hr:before, #post .post-copyright:before, -#post #post-outdate-notice:before, -.note:not(.no-icon)::before, -.search-dialog hr:before { +#post .post-outdate-notice:before, +.note:not(.no-icon)::before { display: inline-block; font-weight: 600; - font-family: 'Font Awesome 7 Free', 'Font Awesome 6 Free'; + font-style: normal; + font-variant: normal; + font-family: 'Font Awesome 5 Free'; text-rendering: auto; -webkit-font-smoothing: antialiased; } -.cardHover, -.type-404 .error-content, -.layout > div:first-child:not(.nc), -#recent-posts .recent-post-item, -#article-container .shuoshuo-item, -#aside-content .card-widget, -.layout .pagination > *:not(.space) { - background: var(--card-bg); - -webkit-box-shadow: var(--card-box-shadow); - box-shadow: var(--card-box-shadow); - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; - border-radius: 8px; -} -.cardHover:hover, -.type-404 .error-content:hover, -.layout > div:first-child:not(.nc):hover, -#recent-posts .recent-post-item:hover, -#article-container .shuoshuo-item:hover, -#aside-content .card-widget:hover, -.layout .pagination > *:not(.space):hover { - -webkit-box-shadow: var(--card-hover-box-shadow); - box-shadow: var(--card-hover-box-shadow); -} -.imgHover, -.type-404 .error-content .error-img img, -.article-sort-item-img :first-child, -#recent-posts .recent-post-item .post_cover .post-bg, -#aside-content .aside-list > .aside-list-item .thumbnail :first-child { - width: 100%; - height: 100%; - -webkit-transition: filter 375ms ease-in 0.2s, -webkit-transform 0.6s; - -moz-transition: filter 375ms ease-in 0.2s, -moz-transform 0.6s; - -o-transition: filter 375ms ease-in 0.2s, -o-transform 0.6s; - -ms-transition: filter 375ms ease-in 0.2s, -ms-transform 0.6s; - transition: filter 375ms ease-in 0.2s, transform 0.6s; - object-fit: cover; -} -.imgHover:hover, -.type-404 .error-content .error-img img:hover, -.article-sort-item-img :first-child:hover, -#recent-posts .recent-post-item .post_cover .post-bg:hover, -#aside-content .aside-list > .aside-list-item .thumbnail :first-child:hover { - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); -} -.postImgHover:hover .cover, -.pagination-related:hover .cover { - opacity: 0.5; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - filter: alpha(opacity=50); - -webkit-transform: scale(1.1); - -moz-transform: scale(1.1); - -o-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); -} -.postImgHover .cover, -.pagination-related .cover { - width: 100%; - height: 100%; - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); - -webkit-transition: all 0.6s, filter 375ms ease-in 0.2s; - -moz-transition: all 0.6s, filter 375ms ease-in 0.2s; - -o-transition: all 0.6s, filter 375ms ease-in 0.2s; - -ms-transition: all 0.6s, filter 375ms ease-in 0.2s; - transition: all 0.6s, filter 375ms ease-in 0.2s; - object-fit: cover; -} -.list-beauty, -.category-lists ul { - list-style: none; -} -.list-beauty li, -.category-lists ul li { - position: relative; - padding: 0.12em 0.4em 0.12em 1.4em; -} -.list-beauty li:hover:before, -.category-lists ul li:hover:before { - border-color: var(--pseudo-hover); -} -.list-beauty li:before, -.category-lists ul li:before { - position: absolute; - top: 0.67em; - left: 0; - width: 0.43em; - height: 0.43em; - border: 0.215em solid #49b1f5; - border-radius: 0.43em; - background: transparent; - content: ''; - cursor: pointer; - -webkit-transition: all 0.3s ease-out; - -moz-transition: all 0.3s ease-out; - -o-transition: all 0.3s ease-out; - -ms-transition: all 0.3s ease-out; - transition: all 0.3s ease-out; -} -.custom-hr, -.container hr, -.search-dialog hr { - position: relative; - margin: 40px auto; - border: 2px dashed var(--hr-border); - width: calc(100% - 4px); -} -.custom-hr:hover:before, -.container hr:hover:before, -.search-dialog hr:hover:before { - left: calc(95% - 20px); -} -.custom-hr:before, -.container hr:before, -.search-dialog hr:before { - position: absolute; - top: -10px; - left: 5%; - z-index: 1; - color: var(--hr-before-color); - content: '\f0c4'; - font-size: 20px; - line-height: 1; - -webkit-transition: all 1s ease-in-out; - -moz-transition: all 1s ease-in-out; - -o-transition: all 1s ease-in-out; - -ms-transition: all 1s ease-in-out; - transition: all 1s ease-in-out; -} -.verticalCenter, -.pagination-related .info .info-1, -.pagination-related .info .info-2 { - position: absolute; - top: 50%; - width: 100%; - -webkit-transform: translate(0, -50%); - -moz-transform: translate(0, -50%); - -o-transform: translate(0, -50%); - -ms-transform: translate(0, -50%); - transform: translate(0, -50%); -} #content-inner, #footer { -webkit-animation: bottom-top 1s; @@ -385,8 +230,7 @@ template { -ms-animation: bottom-top 1s; animation: bottom-top 1s; } -#page-header:not(.full_page), -#nav.show { +#page-header { -webkit-animation: header-effect 1s; -moz-animation: header-effect 1s; -o-animation: header-effect 1s; @@ -395,11 +239,18 @@ template { } #site-title, #site-subtitle { - -webkit-animation: titleScale 1s; - -moz-animation: titleScale 1s; - -o-animation: titleScale 1s; - -ms-animation: titleScale 1s; - animation: titleScale 1s; + -webkit-animation: titlescale 1s; + -moz-animation: titlescale 1s; + -o-animation: titlescale 1s; + -ms-animation: titlescale 1s; + animation: titlescale 1s; +} +#nav.show { + -webkit-animation: headerNoOpacity 1s; + -moz-animation: headerNoOpacity 1s; + -o-animation: headerNoOpacity 1s; + -ms-animation: headerNoOpacity 1s; + animation: headerNoOpacity 1s; } canvas:not(#ribbon-canvas), #web_bg { @@ -444,6 +295,14 @@ canvas:not(#ribbon-canvas), -ms-animation: sidebarItem 0.8s; animation: sidebarItem 0.8s; } +.card-announcement-animation { + color: #f00; + -webkit-animation: announ_animation 0.8s linear infinite; + -moz-animation: announ_animation 0.8s linear infinite; + -o-animation: announ_animation 0.8s linear infinite; + -ms-animation: announ_animation 0.8s linear infinite; + animation: announ_animation 0.8s linear infinite; +} .scroll-down-effects { -webkit-animation: scroll-down-effect 1.5s infinite; -moz-animation: scroll-down-effect 1.5s infinite; @@ -458,324 +317,101 @@ canvas:not(#ribbon-canvas), -ms-animation: donate_effcet 0.3s 0.1s ease both; animation: donate_effcet 0.3s 0.1s ease both; } -.btn-effects, -.shuoshuo-navigation button:not(:disabled), -#aside-content .card-info #card-info-btn, -.post-reward .reward-button, -#rightside > div > button, -#rightside > div > a, -.container .btn-beautify, -.hide-inline > .hide-button, -.hide-block > .hide-button { - position: relative; - overflow: hidden; - -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -webkit-transform: translateZ(0); - -moz-transform: translateZ(0); - -o-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); -} -.btn-effects:hover, -.shuoshuo-navigation button:not(:disabled):hover, -#aside-content .card-info #card-info-btn:hover, -.post-reward .reward-button:hover, -#rightside > div > button:hover, -#rightside > div > a:hover, -.container .btn-beautify:hover, -.hide-inline > .hide-button:hover, -.hide-block > .hide-button:hover { - -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15); - box-shadow: 0 4px 12px rgba(0,0,0,0.15); - text-decoration: none; - -webkit-transform: translateY(-1px) scale(1.02); - -moz-transform: translateY(-1px) scale(1.02); - -o-transform: translateY(-1px) scale(1.02); - -ms-transform: translateY(-1px) scale(1.02); - transform: translateY(-1px) scale(1.02); -} -.btn-effects:active, -.shuoshuo-navigation button:not(:disabled):active, -#aside-content .card-info #card-info-btn:active, -.post-reward .reward-button:active, -#rightside > div > button:active, -#rightside > div > a:active, -.container .btn-beautify:active, -.hide-inline > .hide-button:active, -.hide-block > .hide-button:active { - -webkit-transition-duration: 0.1s; - -moz-transition-duration: 0.1s; - -o-transition-duration: 0.1s; - -ms-transition-duration: 0.1s; - transition-duration: 0.1s; - -webkit-transform: translateY(0) scale(0.98); - -moz-transform: translateY(0) scale(0.98); - -o-transform: translateY(0) scale(0.98); - -ms-transform: translateY(0) scale(0.98); - transform: translateY(0) scale(0.98); -} -.btn-effects i, -.shuoshuo-navigation button:not(:disabled) i, -#aside-content .card-info #card-info-btn i, -.post-reward .reward-button i, -#rightside > div > button i, -#rightside > div > a i, -.container .btn-beautify i, -.hide-inline > .hide-button i, -.hide-block > .hide-button i { - display: inline-block; - vertical-align: middle; - -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} -.btn-effects:hover i, -.shuoshuo-navigation button:not(:disabled):hover i, -#aside-content .card-info #card-info-btn:hover i, -.post-reward .reward-button:hover i, -#rightside > div > button:hover i, -#rightside > div > a:hover i, -.container .btn-beautify:hover i, -.hide-inline > .hide-button:hover i, -.hide-block > .hide-button:hover i { - -webkit-animation: buttonIconBounce 0.6s ease-in-out; - -moz-animation: buttonIconBounce 0.6s ease-in-out; - -o-animation: buttonIconBounce 0.6s ease-in-out; - -ms-animation: buttonIconBounce 0.6s ease-in-out; - animation: buttonIconBounce 0.6s ease-in-out; -} -.btn-effects i + span, -.shuoshuo-navigation button:not(:disabled) i + span, -#aside-content .card-info #card-info-btn i + span, -.post-reward .reward-button i + span, -#rightside > div > button i + span, -#rightside > div > a i + span, -.container .btn-beautify i + span, -.hide-inline > .hide-button i + span, -.hide-block > .hide-button i + span { - margin-left: 6px; - vertical-align: middle; - -webkit-transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); - transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} -.btn-effects:hover i + span, -.shuoshuo-navigation button:not(:disabled):hover i + span, -#aside-content .card-info #card-info-btn:hover i + span, -.post-reward .reward-button:hover i + span, -#rightside > div > button:hover i + span, -#rightside > div > a:hover i + span, -.container .btn-beautify:hover i + span, -.hide-inline > .hide-button:hover i + span, -.hide-block > .hide-button:hover i + span { - margin-left: 8px; -} -.btn-effects::before, -.shuoshuo-navigation button:not(:disabled)::before, -#aside-content .card-info #card-info-btn::before, -.post-reward .reward-button::before, -#rightside > div > button::before, -#rightside > div > a::before, -.container .btn-beautify::before, -.hide-inline > .hide-button::before, -.hide-block > .hide-button::before { - position: absolute; - top: 0; - left: -100%; - z-index: 1; - width: 100%; - height: 100%; - background: -webkit-linear-gradient(0deg, transparent, rgba(255,255,255,0.2), transparent); - background: -moz-linear-gradient(0deg, transparent, rgba(255,255,255,0.2), transparent); - background: -o-linear-gradient(0deg, transparent, rgba(255,255,255,0.2), transparent); - background: -ms-linear-gradient(0deg, transparent, rgba(255,255,255,0.2), transparent); - background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); - content: ''; - -webkit-transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1); - transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1); -} -.btn-effects:hover::before, -.shuoshuo-navigation button:not(:disabled):hover::before, -#aside-content .card-info #card-info-btn:hover::before, -.post-reward .reward-button:hover::before, -#rightside > div > button:hover::before, -#rightside > div > a:hover::before, -.container .btn-beautify:hover::before, -.hide-inline > .hide-button:hover::before, -.hide-block > .hide-button:hover::before { - left: 100%; -} -.btn-effects > *, -.shuoshuo-navigation button:not(:disabled) > *, -#aside-content .card-info #card-info-btn > *, -.post-reward .reward-button > *, -#rightside > div > button > *, -#rightside > div > a > *, -.container .btn-beautify > *, -.hide-inline > .hide-button > *, -.hide-block > .hide-button > * { - position: relative; - z-index: 2; -} -.btn-effects-large:hover, -.post-reward .reward-button:hover, -.container .btn-beautify.larger:hover { - -webkit-box-shadow: 0 6px 16px rgba(0,0,0,0.2); - box-shadow: 0 6px 16px rgba(0,0,0,0.2); - -webkit-transform: translateY(-2px) scale(1.03); - -moz-transform: translateY(-2px) scale(1.03); - -o-transform: translateY(-2px) scale(1.03); - -ms-transform: translateY(-2px) scale(1.03); - transform: translateY(-2px) scale(1.03); -} @-moz-keyframes scroll-down-effect { 0% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } 50% { + top: -16px; opacity: 1; -ms-filter: none; filter: none; - -webkit-transform: translate(0, -16px); - -moz-transform: translate(0, -16px); - -o-transform: translate(0, -16px); - -ms-transform: translate(0, -16px); - transform: translate(0, -16px); } 100% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } } @-webkit-keyframes scroll-down-effect { 0% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } 50% { + top: -16px; opacity: 1; -ms-filter: none; filter: none; - -webkit-transform: translate(0, -16px); - -moz-transform: translate(0, -16px); - -o-transform: translate(0, -16px); - -ms-transform: translate(0, -16px); - transform: translate(0, -16px); } 100% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } } @-o-keyframes scroll-down-effect { 0% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } 50% { + top: -16px; opacity: 1; -ms-filter: none; filter: none; - -webkit-transform: translate(0, -16px); - -moz-transform: translate(0, -16px); - -o-transform: translate(0, -16px); - -ms-transform: translate(0, -16px); - transform: translate(0, -16px); } 100% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } } @keyframes scroll-down-effect { 0% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } 50% { + top: -16px; opacity: 1; -ms-filter: none; filter: none; - -webkit-transform: translate(0, -16px); - -moz-transform: translate(0, -16px); - -o-transform: translate(0, -16px); - -ms-transform: translate(0, -16px); - transform: translate(0, -16px); } 100% { + top: 0; opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); } } @-moz-keyframes header-effect { 0% { - -webkit-transform: translateY(-35px); - -moz-transform: translateY(-35px); - -o-transform: translateY(-35px); - -ms-transform: translateY(-35px); - transform: translateY(-35px); + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { + opacity: 1; + -ms-filter: none; + filter: none; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); @@ -785,13 +421,19 @@ canvas:not(#ribbon-canvas), } @-webkit-keyframes header-effect { 0% { - -webkit-transform: translateY(-35px); - -moz-transform: translateY(-35px); - -o-transform: translateY(-35px); - -ms-transform: translateY(-35px); - transform: translateY(-35px); + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { + opacity: 1; + -ms-filter: none; + filter: none; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); @@ -801,13 +443,19 @@ canvas:not(#ribbon-canvas), } @-o-keyframes header-effect { 0% { - -webkit-transform: translateY(-35px); - -moz-transform: translateY(-35px); - -o-transform: translateY(-35px); - -ms-transform: translateY(-35px); - transform: translateY(-35px); + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { + opacity: 1; + -ms-filter: none; + filter: none; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); @@ -817,13 +465,19 @@ canvas:not(#ribbon-canvas), } @keyframes header-effect { 0% { - -webkit-transform: translateY(-35px); - -moz-transform: translateY(-35px); - -o-transform: translateY(-35px); - -ms-transform: translateY(-35px); - transform: translateY(-35px); + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { + opacity: 1; + -ms-filter: none; + filter: none; -webkit-transform: translateY(0); -moz-transform: translateY(0); -o-transform: translateY(0); @@ -831,13 +485,13 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } -@-moz-keyframes bottom-top { +@-moz-keyframes headerNoOpacity { 0% { - -webkit-transform: translateY(35px); - -moz-transform: translateY(35px); - -o-transform: translateY(35px); - -ms-transform: translateY(35px); - transform: translateY(35px); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { -webkit-transform: translateY(0); @@ -847,13 +501,13 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } -@-webkit-keyframes bottom-top { +@-webkit-keyframes headerNoOpacity { 0% { - -webkit-transform: translateY(35px); - -moz-transform: translateY(35px); - -o-transform: translateY(35px); - -ms-transform: translateY(35px); - transform: translateY(35px); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { -webkit-transform: translateY(0); @@ -863,13 +517,13 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } -@-o-keyframes bottom-top { +@-o-keyframes headerNoOpacity { 0% { - -webkit-transform: translateY(35px); - -moz-transform: translateY(35px); - -o-transform: translateY(35px); - -ms-transform: translateY(35px); - transform: translateY(35px); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { -webkit-transform: translateY(0); @@ -879,13 +533,13 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } -@keyframes bottom-top { +@keyframes headerNoOpacity { 0% { - -webkit-transform: translateY(35px); - -moz-transform: translateY(35px); - -o-transform: translateY(35px); - -ms-transform: translateY(35px); - transform: translateY(35px); + -webkit-transform: translateY(-50px); + -moz-transform: translateY(-50px); + -o-transform: translateY(-50px); + -ms-transform: translateY(-50px); + transform: translateY(-50px); } 100% { -webkit-transform: translateY(0); @@ -895,7 +549,63 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } -@-moz-keyframes titleScale { +@-moz-keyframes bottom-top { + 0% { + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + margin-top: 50px; + } + 100% { + opacity: 1; + -ms-filter: none; + filter: none; + margin-top: 0; + } +} +@-webkit-keyframes bottom-top { + 0% { + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + margin-top: 50px; + } + 100% { + opacity: 1; + -ms-filter: none; + filter: none; + margin-top: 0; + } +} +@-o-keyframes bottom-top { + 0% { + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + margin-top: 50px; + } + 100% { + opacity: 1; + -ms-filter: none; + filter: none; + margin-top: 0; + } +} +@keyframes bottom-top { + 0% { + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + margin-top: 50px; + } + 100% { + opacity: 1; + -ms-filter: none; + filter: none; + margin-top: 0; + } +} +@-moz-keyframes titlescale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -917,7 +627,7 @@ canvas:not(#ribbon-canvas), transform: scale(1); } } -@-webkit-keyframes titleScale { +@-webkit-keyframes titlescale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -939,7 +649,7 @@ canvas:not(#ribbon-canvas), transform: scale(1); } } -@-o-keyframes titleScale { +@-o-keyframes titlescale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -961,7 +671,7 @@ canvas:not(#ribbon-canvas), transform: scale(1); } } -@keyframes titleScale { +@keyframes titlescale { 0% { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; @@ -1455,6 +1165,70 @@ canvas:not(#ribbon-canvas), transform: translateY(0); } } +@-moz-keyframes announ_animation { + 0%, to { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + 50% { + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -o-transform: scale(1.2); + -ms-transform: scale(1.2); + transform: scale(1.2); + } +} +@-webkit-keyframes announ_animation { + 0%, to { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + 50% { + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -o-transform: scale(1.2); + -ms-transform: scale(1.2); + transform: scale(1.2); + } +} +@-o-keyframes announ_animation { + 0%, to { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + 50% { + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -o-transform: scale(1.2); + -ms-transform: scale(1.2); + transform: scale(1.2); + } +} +@keyframes announ_animation { + 0%, to { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + 50% { + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -o-transform: scale(1.2); + -ms-transform: scale(1.2); + transform: scale(1.2); + } +} @-moz-keyframes sidebarItem { 0% { -webkit-transform: translateX(200px); @@ -1519,126 +1293,6 @@ canvas:not(#ribbon-canvas), transform: translateX(0); } } -@-moz-keyframes buttonIconBounce { - 0%, 100% { - -webkit-transform: translateY(0) scale(1); - -moz-transform: translateY(0) scale(1); - -o-transform: translateY(0) scale(1); - -ms-transform: translateY(0) scale(1); - transform: translateY(0) scale(1); - } - 25% { - -webkit-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -moz-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -o-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -ms-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - } - 50% { - -webkit-transform: translateY(0) scale(1.05) rotateZ(0); - -moz-transform: translateY(0) scale(1.05) rotateZ(0); - -o-transform: translateY(0) scale(1.05) rotateZ(0); - -ms-transform: translateY(0) scale(1.05) rotateZ(0); - transform: translateY(0) scale(1.05) rotateZ(0); - } - 75% { - -webkit-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -moz-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -o-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -ms-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - transform: translateY(-1px) scale(1.02) rotateZ(2deg); - } -} -@-webkit-keyframes buttonIconBounce { - 0%, 100% { - -webkit-transform: translateY(0) scale(1); - -moz-transform: translateY(0) scale(1); - -o-transform: translateY(0) scale(1); - -ms-transform: translateY(0) scale(1); - transform: translateY(0) scale(1); - } - 25% { - -webkit-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -moz-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -o-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -ms-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - } - 50% { - -webkit-transform: translateY(0) scale(1.05) rotateZ(0); - -moz-transform: translateY(0) scale(1.05) rotateZ(0); - -o-transform: translateY(0) scale(1.05) rotateZ(0); - -ms-transform: translateY(0) scale(1.05) rotateZ(0); - transform: translateY(0) scale(1.05) rotateZ(0); - } - 75% { - -webkit-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -moz-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -o-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -ms-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - transform: translateY(-1px) scale(1.02) rotateZ(2deg); - } -} -@-o-keyframes buttonIconBounce { - 0%, 100% { - -webkit-transform: translateY(0) scale(1); - -moz-transform: translateY(0) scale(1); - -o-transform: translateY(0) scale(1); - -ms-transform: translateY(0) scale(1); - transform: translateY(0) scale(1); - } - 25% { - -webkit-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -moz-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -o-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -ms-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - } - 50% { - -webkit-transform: translateY(0) scale(1.05) rotateZ(0); - -moz-transform: translateY(0) scale(1.05) rotateZ(0); - -o-transform: translateY(0) scale(1.05) rotateZ(0); - -ms-transform: translateY(0) scale(1.05) rotateZ(0); - transform: translateY(0) scale(1.05) rotateZ(0); - } - 75% { - -webkit-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -moz-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -o-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -ms-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - transform: translateY(-1px) scale(1.02) rotateZ(2deg); - } -} -@keyframes buttonIconBounce { - 0%, 100% { - -webkit-transform: translateY(0) scale(1); - -moz-transform: translateY(0) scale(1); - -o-transform: translateY(0) scale(1); - -ms-transform: translateY(0) scale(1); - transform: translateY(0) scale(1); - } - 25% { - -webkit-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -moz-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -o-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - -ms-transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - transform: translateY(-3px) scale(1.1) rotateZ(-5deg); - } - 50% { - -webkit-transform: translateY(0) scale(1.05) rotateZ(0); - -moz-transform: translateY(0) scale(1.05) rotateZ(0); - -o-transform: translateY(0) scale(1.05) rotateZ(0); - -ms-transform: translateY(0) scale(1.05) rotateZ(0); - transform: translateY(0) scale(1.05) rotateZ(0); - } - 75% { - -webkit-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -moz-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -o-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - -ms-transform: translateY(-1px) scale(1.02) rotateZ(2deg); - transform: translateY(-1px) scale(1.02) rotateZ(2deg); - } -} :root { --global-font-size: 14px; --global-bg: #fff; @@ -1647,100 +1301,36 @@ canvas:not(#ribbon-canvas), --hr-before-color: #80c8f8; --search-bg: #f6f8fa; --search-input-color: #4c4948; - --search-a-color: #4c4948; + --search-result-title: #4c4948; --preloader-bg: #37474f; --preloader-color: #fff; --tab-border-color: #f0f0f0; - --tab-button-bg: #f0f0f0; - --tab-button-color: #1f2d3d; + --tab-botton-bg: #f0f0f0; + --tab-botton-color: #1f2d3d; --tab-button-hover-bg: #dcdcdc; --tab-button-active-bg: #fff; --card-bg: #fff; - --card-meta: #858585; --sidebar-bg: #f6f8fa; - --sidebar-menu-bg: #fff; --btn-hover-color: #ff7242; --btn-color: #fff; --btn-bg: #49b1f5; --text-bg-hover: rgba(73,177,245,0.7); --light-grey: #eee; - --dark-grey: #cacaca; --white: #fff; --text-highlight-color: #1f2d3d; --blockquote-color: #6a737d; --blockquote-bg: rgba(73,177,245,0.1); --reward-pop: #f5f5f5; --toc-link-color: #666261; - --card-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.05); - --card-hover-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.09); - --pseudo-hover: #ff7242; - --headline-presudo: #a0a0a0; - --scrollbar-color: #49b1f5; - --default-bg-color: #49b1f5; - --zoom-bg: #fff; - --mark-bg: rgba(0,0,0,0.3); + --card-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.06); + --card-hover-box-shadow: 0 3px 8px 6px rgba(7,17,27,0.15); } -:root { - --btn-color: #fff; - --btn-default-color: #777; - --tags-blue-color: #428bca; - --tags-blue-color-lighten: #e3eef7; - --tags-pink-color: #ff69b4; - --tags-pink-color-lighten: #ffe9f4; - --tags-red-color: #f00; - --tags-red-color-lighten: #ffd9d9; - --tags-orange-color: #ff8c00; - --tags-orange-color-lighten: #ffeed9; - --tags-purple-color: #6f42c1; - --tags-purple-color-lighten: #e9e3f6; - --tags-green-color: #5cb85c; - --tags-green-color-lighten: #e7f4e7; - --note-default-border: #777; - --note-default-bg: #f7f7f7; - --note-default-text: #777; - --note-modern-default-border: #e1e1e1; - --note-modern-default-bg: #f3f3f3; - --note-modern-default-text: #666; - --note-modern-default-hover: #454545; - --note-primary-border: #6f42c1; - --note-primary-bg: #f5f0fa; - --note-primary-text: #6f42c1; - --note-modern-primary-border: #e1c2ff; - --note-modern-primary-bg: #f3daff; - --note-modern-primary-text: #6f42c1; - --note-modern-primary-hover: #453298; - --note-info-border: #428bca; - --note-info-bg: #eef7fa; - --note-info-text: #428bca; - --note-modern-info-border: #b3e5ef; - --note-modern-info-bg: #d9edf7; - --note-modern-info-text: #31708f; - --note-modern-info-hover: #215761; - --note-success-border: #5cb85c; - --note-success-bg: #eff8f0; - --note-success-text: #5cb85c; - --note-modern-success-border: #d0e6be; - --note-modern-success-bg: #dff0d8; - --note-modern-success-text: #3c763d; - --note-modern-success-hover: #32562c; - --note-warning-border: #f0ad4e; - --note-warning-bg: #fdf8ea; - --note-warning-text: #f0ad4e; - --note-modern-warning-border: #fae4cd; - --note-modern-warning-bg: #fcf4e3; - --note-modern-warning-text: #8a6d3b; - --note-modern-warning-hover: #714f30; - --note-danger-border: #d9534f; - --note-danger-bg: #fcf1f2; - --note-danger-text: #d9534f; - --note-modern-danger-border: #ebcdd2; - --note-modern-danger-bg: #f2dfdf; - --note-modern-danger-text: #a94442; - --note-modern-danger-hover: #84333f; +html { + height: 100%; + font-size: 20px; } body { position: relative; - overflow-y: scroll; min-height: 100%; background: var(--global-bg); color: var(--font-color); @@ -1748,20 +1338,13 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Lato, Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 2; -webkit-tap-highlight-color: rgba(0,0,0,0); - scroll-behavior: smooth; -} -@-moz-document url-prefix() { - * { - scrollbar-width: thin; - scrollbar-color: var(--scrollbar-color) transparent; - } } *::-webkit-scrollbar { - width: 5px; - height: 5px; + width: 8px; + height: 8px; } *::-webkit-scrollbar-thumb { - background: var(--scrollbar-color); + background: var(--btn-bg); } *::-webkit-scrollbar-track { background-color: transparent; @@ -1776,7 +1359,7 @@ h4, h5, h6 { position: relative; - margin: 20px 0 14px; + margin: 1rem 0 0.7rem; color: var(--text-highlight-color); font-weight: bold; } @@ -1793,33 +1376,39 @@ h6 code { -moz-box-sizing: border-box; box-sizing: border-box; } -.table-wrap { - overflow-x: scroll; - margin: 0 0 20px; - border-radius: 5px; -} -.table-wrap table { - border-radius: 5px; -} -.table-wrap table thead > tr:first-child th:first-child { - border-top-left-radius: 5px; +hr { + position: relative; + margin: 2rem auto; + border: 2px dashed var(--hr-border); + width: calc(100% - 4px); } -.table-wrap table thead > tr:first-child th:last-child { - border-top-right-radius: 5px; +hr:hover:before { + left: calc(95% - 20px); } -.table-wrap table tbody > tr:last-child td:first-child { - border-bottom-left-radius: 5px; +hr:before { + position: absolute; + top: -10px; + left: 5%; + z-index: 1; + color: var(--hr-before-color); + content: '\f0c4'; + font-size: 20px; + line-height: 1; + -webkit-transition: all 1s ease-in-out; + -moz-transition: all 1s ease-in-out; + -o-transition: all 1s ease-in-out; + -ms-transition: all 1s ease-in-out; + transition: all 1s ease-in-out; } -.table-wrap table tbody > tr:last-child td:last-child { - border-bottom-right-radius: 5px; +.table-wrap { + overflow-x: scroll; + margin: 0 0 1rem; } table { display: table; width: 100%; border-spacing: 0; - border-collapse: separate; - border-top: 1px solid var(--light-grey); - border-left: 1px solid var(--light-grey); + border-collapse: collapse; empty-cells: show; } table thead { @@ -1827,10 +1416,8 @@ table thead { } table th, table td { - padding: 6px 12px; + padding: 0.3rem 0.6rem; border: 1px solid var(--light-grey); - border-top: none; - border-left: none; vertical-align: middle; } *::selection { @@ -1843,7 +1430,6 @@ button { border: none; background: none; cursor: pointer; - touch-action: manipulation; } a { color: #99a9bf; @@ -1859,11 +1445,74 @@ a { a:hover { color: #49b1f5; } -.text-center { +.is-center { text-align: center; } -.text-right { - text-align: right; +.copy-true { + -webkit-user-select: all; + -moz-user-select: all; + -ms-user-select: all; + user-select: all; +} +.pull-left { + float: left; +} +.pull-right { + float: right; +} +.button--animated { + position: relative; + z-index: 1; + -webkit-transition: color 1s; + -moz-transition: color 1s; + -o-transition: color 1s; + -ms-transition: color 1s; + transition: color 1s; +} +.button--animated:before { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1; + background: var(--btn-hover-color); + content: ''; + -webkit-transition: -webkit-transform 0.5s ease-out; + -moz-transition: -moz-transform 0.5s ease-out; + -o-transition: -o-transform 0.5s ease-out; + -ms-transition: -ms-transform 0.5s ease-out; + transition: transform 0.5s ease-out; + -webkit-transform: scaleX(0); + -moz-transform: scaleX(0); + -o-transform: scaleX(0); + -ms-transform: scaleX(0); + transform: scaleX(0); + -webkit-transform-origin: 0 50%; + -moz-transform-origin: 0 50%; + -o-transform-origin: 0 50%; + -ms-transform-origin: 0 50%; + transform-origin: 0 50%; +} +.button--animated:hover:before { + -webkit-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); + -moz-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); + -o-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); + -ms-transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); + transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66); + -webkit-transform: scaleX(1); + -moz-transform: scaleX(1); + -o-transform: scaleX(1); + -ms-transform: scaleX(1); + transform: scaleX(1); +} +img { + max-width: 100%; + -webkit-transition: all 0.2s; + -moz-transition: all 0.2s; + -o-transition: all 0.2s; + -ms-transition: all 0.2s; + transition: all 0.2s; } img[src=''], img:not([src]) { @@ -1872,31 +1521,12 @@ img:not([src]) { filter: alpha(opacity=0); } .img-alt { - margin: -10px 0 10px; + margin: -0.5rem 0 0.5rem; color: #858585; } .img-alt:hover { text-decoration: none !important; } -blockquote { - margin: 0 0 20px; - padding: 7px 15px; - border-left: 4px solid #49b1f5; - background-color: var(--blockquote-bg); - color: var(--blockquote-color); - border-radius: 6px; -} -blockquote footer cite:before { - padding: 0 5px; - content: '—'; -} -blockquote > :last-child { - margin-bottom: 0 !important; -} -.fa-fw { - width: 1.25em; - text-align: center; -} :root { --hl-color: #eff; --hl-bg: #212121; @@ -1907,19 +1537,6 @@ blockquote > :last-child { --hlscrollbar-bg: #353535; --hlexpand-bg: linear-gradient(180deg, rgba(33,33,33,0.6), rgba(33,33,33,0.9)); } -[data-theme='dark'] { - --hl-color: rgba(255,255,255,0.7); - --hl-bg: #171717; - --hltools-bg: #1a1a1a; - --hltools-color: #90a4ae; - --hlnumber-bg: #171717; - --hlnumber-color: rgba(255,255,255,0.4); - --hlscrollbar-bg: #1f1f1f; - --hlexpand-bg: linear-gradient(180deg, rgba(23,23,23,0.6), rgba(23,23,23,0.9)); -} -@-moz-document url-prefix() { - scrollbar-color: var(--hlscrollbar-bg) transparent; -} figure.highlight table::-webkit-scrollbar-thumb { background: var(--hlscrollbar-bg); } @@ -1995,99 +1612,105 @@ figure.highlight pre .tag .attr, figure.highlight pre .javascript .function { color: #c792ea; } -.container figure.highlight .line.marked { +#article-container figure.highlight .line.marked { background-color: rgba(97,97,97,0.314); } -.container figure.highlight table { +#article-container figure.highlight table { display: block; overflow: auto; border: none; } -.container figure.highlight table td { +#article-container figure.highlight table td { padding: 0; border: none; } -.container figure.highlight .gutter pre { - padding-right: 10px; - padding-left: 10px; +#article-container figure.highlight .gutter pre { + padding-right: 0.5rem; + padding-left: 0.5rem; background-color: var(--hlnumber-bg); color: var(--hlnumber-color); text-align: right; } -.container figure.highlight .code pre { - padding-right: 10px; - padding-left: 10px; +#article-container figure.highlight .code pre { + padding-right: 0.5rem; + padding-left: 0.5rem; width: 100%; } -.container pre, -.container figure.highlight { +#article-container pre, +#article-container figure.highlight { overflow: auto; - margin: 0 0 20px; + margin: 0 0 1rem; padding: 0; background: var(--hl-bg); color: var(--hl-color); line-height: 1.6; } -.container pre, -.container code { +blockquote { + margin: 0 0 1rem; + padding: 0.1rem 0.8rem; + border-left: 0.2rem solid #49b1f5; + background-color: var(--blockquote-bg); + color: var(--blockquote-color); +} +blockquote a { + word-break: break-all; +} +blockquote p { + margin: 0 !important; + padding: 0.5rem 0; +} +blockquote footer { + padding: 0 0 0.5rem; +} +blockquote footer cite:before { + padding: 0 0.3em; + content: '—'; +} +#article-container pre, +#article-container code { font-size: var(--global-font-size); - font-family: consolas, Menlo, monospace, 'PingFang SC', 'Microsoft YaHei', sans-serif !important; - border-radius: 6px; + font-family: consolas, Menlo, 'PingFang SC', 'Microsoft YaHei', sans-serif !important; } -.container code { - padding: 2px 5px; +#article-container code { + padding: 0.1rem 0.2rem; background: rgba(27,31,35,0.05); color: #f47466; } -.container pre { +#article-container pre { padding: 10px 20px; } -.container pre code { +#article-container pre code { padding: 0; background: none; color: var(--hl-color); text-shadow: none; } -.container figure.highlight { +#article-container figure.highlight { position: relative; - border-radius: 6px; } -.container figure.highlight pre { +#article-container figure.highlight pre { margin: 0; padding: 8px 0; border: none; } -.container figure.highlight figcaption, -.container figure.highlight .caption { - padding: 6px 0 2px 14px; +#article-container figure.highlight figcaption, +#article-container figure.highlight .caption { + padding: 0.3rem 0 0.1rem 0.7rem; font-size: var(--global-font-size); line-height: 1em; } -.container figure.highlight figcaption a, -.container figure.highlight .caption a { +#article-container figure.highlight figcaption a, +#article-container figure.highlight .caption a { float: right; padding-right: 10px; color: var(--hl-color); } -.container figure.highlight figcaption a:hover, -.container figure.highlight .caption a:hover { +#article-container figure.highlight figcaption a:hover, +#article-container figure.highlight .caption a:hover { border-bottom-color: var(--hl-color); } -.container figure.highlight.copy-true { - -webkit-user-select: all; - -moz-user-select: all; - -ms-user-select: all; - user-select: all; - -webkit-user-select: all; -} -.container figure.highlight.copy-true > table, -.container figure.highlight.copy-true > pre { - display: block !important; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); -} -.container .highlight-tools { +#article-container .highlight-tools { + position: relative; display: -webkit-box; display: -moz-box; display: -webkit-flex; @@ -2100,46 +1723,44 @@ figure.highlight pre .javascript .function { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - padding: 0 8px; - min-height: 24px; + overflow: hidden; + min-height: 1.2rem; height: 2.15em; background: var(--hltools-bg); color: var(--hltools-color); font-size: var(--global-font-size); - overflow: hidden; } -.container .highlight-tools > * { - padding: 5px; +#article-container .highlight-tools.closed ~ * { + display: none; } -.container .highlight-tools i { +#article-container .highlight-tools .expand { + position: absolute; + padding: 0.4rem 0.7rem; cursor: pointer; + -webkit-transition: -webkit-transform 0.3s; + -moz-transition: -moz-transform 0.3s; + -o-transition: -o-transform 0.3s; + -ms-transition: -ms-transform 0.3s; + transition: transform 0.3s; +} +#article-container .highlight-tools .expand + .code-lang { + left: 1.7rem; +} +#article-container .highlight-tools .expand.closed { -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s; + -webkit-transform: rotate(-90deg) !important; + -moz-transform: rotate(-90deg) !important; + -o-transform: rotate(-90deg) !important; + -ms-transform: rotate(-90deg) !important; + transform: rotate(-90deg) !important; } -.container .highlight-tools i:hover { - color: #49b1f5; -} -.container .highlight-tools.closed ~ * { - display: none; -} -.container .highlight-tools.closed .expand { - -webkit-transform: rotate(-90deg); - -moz-transform: rotate(-90deg); - -o-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); -} -.container .highlight-tools .code-lang { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; +#article-container .highlight-tools .code-lang { + position: absolute; + left: 0.7rem; text-transform: uppercase; font-weight: bold; font-size: 1.15em; @@ -2147,11 +1768,10 @@ figure.highlight pre .javascript .function { -moz-user-select: none; -ms-user-select: none; user-select: none; - -webkit-user-select: none; - padding: 2px; } -.container .highlight-tools .copy-notice { - padding-right: 2px; +#article-container .highlight-tools .copy-notice { + position: absolute; + right: 1.7rem; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); @@ -2161,187 +1781,276 @@ figure.highlight pre .javascript .function { -ms-transition: opacity 0.4s; transition: opacity 0.4s; } -.container .highlight-tools .code-lang { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; +#article-container .highlight-tools .copy-button { + position: absolute; + right: 0.7rem; + cursor: pointer; + -webkit-transition: color 0.2s; + -moz-transition: color 0.2s; + -o-transition: color 0.2s; + -ms-transition: color 0.2s; + transition: color 0.2s; +} +#article-container .highlight-tools .copy-button:hover { + color: #49b1f5; } -.container .gutter { +#article-container .gutter { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; - -webkit-user-select: none; } -.container .gist table { +#article-container .gist table { width: auto; } -.container .gist table td { +#article-container .gist table td { border: none; } -.container figure.highlight { - margin: 0 0 24px; - border-radius: 7px; - -webkit-box-shadow: 0 5px 10px 0 rgba(0,0,0,0.4); - box-shadow: 0 5px 10px 0 rgba(0,0,0,0.4); - -webkit-transform: translateZ(0); +@-moz-keyframes code-expand-key { + 0% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } + 50% { + opacity: 0.1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; + filter: alpha(opacity=10); + } + 100% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } +} +@-webkit-keyframes code-expand-key { + 0% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } + 50% { + opacity: 0.1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; + filter: alpha(opacity=10); + } + 100% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } +} +@-o-keyframes code-expand-key { + 0% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } + 50% { + opacity: 0.1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; + filter: alpha(opacity=10); + } + 100% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } +} +@keyframes code-expand-key { + 0% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } + 50% { + opacity: 0.1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; + filter: alpha(opacity=10); + } + 100% { + opacity: 0.6; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; + filter: alpha(opacity=60); + } } -.container figure.highlight .highlight-tools .macStyle { +.error404 #error-wrap { + position: absolute; + top: 50%; + right: 0; + left: 0; + margin: 0 auto; + padding: 0 1rem; + max-width: 1000px; + -webkit-transform: translate(0, -50%); + -moz-transform: translate(0, -50%); + -o-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); +} +.error404 #error-wrap .error-content { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; + -webkit-box-orient: horizontal; + -moz-box-orient: horizontal; + -o-box-orient: horizontal; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: center; + -moz-box-pack: center; + -o-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -moz-box-align: center; + -o-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + margin: 0 1rem; + height: 18rem; + border-radius: 8px; + background: var(--card-bg); + -webkit-box-shadow: var(--card-box-shadow); + box-shadow: var(--card-box-shadow); + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; } -.container figure.highlight .highlight-tools .macStyle > * { - margin-right: 8px; - width: 12px; - height: 12px; - border-radius: 50%; -} -.container figure.highlight .highlight-tools .macStyle > :last-child { - margin-right: 5px; -} -.container figure.highlight .highlight-tools .macStyle .mac-close { - background: #fc625d; -} -.container figure.highlight .highlight-tools .macStyle .mac-minimize { - background: #fdbc40; -} -.container figure.highlight .highlight-tools .macStyle .mac-maximize { - background: #35cd4b; -} -.container figure.highlight .highlight-tools > :nth-child(2) { - -webkit-box-ordinal-group: 8; - -moz-box-ordinal-group: 8; - -o-box-ordinal-group: 8; - -ms-flex-order: 8; - -webkit-order: 8; - order: 8; -} -.container figure.highlight .highlight-tools.closed .expand { - -webkit-transform: rotate(90deg); - -moz-transform: rotate(90deg); - -o-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -.type-404 .error-content { - overflow: hidden; - margin: 0 20px; - height: 360px; +.error404 #error-wrap .error-content:hover { + -webkit-box-shadow: var(--card-hover-box-shadow); + box-shadow: var(--card-hover-box-shadow); } @media screen and (max-width: 768px) { - .type-404 .error-content { + .error404 #error-wrap .error-content { + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; margin: 0; - height: 500px; + height: 25rem; } } -.type-404 .error-content .error-img { - display: inline-block; - overflow: hidden; - width: 50%; +.error404 #error-wrap .error-content .error-img { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; height: 100%; + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; + background-color: #49b1f5; + background-position: center; + -webkit-background-size: cover; + -moz-background-size: cover; + background-size: cover; } @media screen and (max-width: 768px) { - .type-404 .error-content .error-img { + .error404 #error-wrap .error-content .error-img { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; width: 100%; - height: 45%; + border-top-right-radius: 8px; + border-bottom-left-radius: 0; } } -.type-404 .error-content .error-img img { - background-color: #49b1f5; -} -.type-404 .error-content .error-info { - display: -webkit-inline-box; - display: -moz-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-box; - display: inline-flex; - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -o-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -ms-flex-line-pack: center; - -webkit-align-content: center; - align-content: center; - width: 50%; - height: 100%; - vertical-align: top; +.error404 #error-wrap .error-content .error-info { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + padding: 0.5rem; text-align: center; + font-size: 14px; } @media screen and (max-width: 768px) { - .type-404 .error-content .error-info { + .error404 #error-wrap .error-content .error-info { + -webkit-box-flex: 1.1; + -moz-box-flex: 1.1; + -o-box-flex: 1.1; + box-flex: 1.1; + -webkit-flex: 1.1; + -ms-flex: 1.1; + flex: 1.1; width: 100%; - height: 55%; } } -.type-404 .error-content .error-info .error_title { - margin-top: -0.6em; +.error404 #error-wrap .error-content .error-info .error_title { + margin-top: -4rem; font-size: 9em; } @media screen and (max-width: 768px) { - .type-404 .error-content .error-info .error_title { - font-size: 8em; + .error404 #error-wrap .error-content .error-info .error_title { + margin-top: -3rem; } } -.type-404 .error-content .error-info .error_subtitle { - margin-top: -3em; +.error404 #error-wrap .error-content .error-info .error_subtitle { + margin-top: -3.5rem; word-break: break-word; font-size: 1.6em; -webkit-line-clamp: 2; } -.type-404 .nc { - margin-top: 5%; - padding: 0 20px; +.error404 #error-wrap .error-content .error-info a { + display: inline-block; + margin-top: 0.5rem; + padding: 0.3rem 1.5rem; + background: var(--btn-bg); + color: var(--btn-color); } -.type-404 #footer { - display: none; +.error404 #error-wrap .error-content .error-info a i { + padding-right: 0.3rem; } -.type-404 + #rightside { +.error404 + #rightside { display: none; } .article-sort { - margin-left: 10px; - padding-left: 20px; + margin-left: 0.5rem; + padding-left: 1rem; border-left: 2px solid #aadafa; } .article-sort-title { position: relative; - margin-left: 10px; - padding-bottom: 20px; - padding-left: 20px; + margin-left: 0.5rem; + padding-bottom: 1rem; + padding-left: 1rem; font-size: 1.72em; } .article-sort-title:hover:before { - border-color: var(--pseudo-hover); + border-color: #ff7242; } .article-sort-title:before { position: absolute; - top: calc(((100% - 36px) / 2)); - left: -9px; + top: calc(((100% - 1.8rem) / 2)); + left: -0.45rem; z-index: 1; - width: 10px; - height: 10px; - border: 5px solid #49b1f5; - border-radius: 10px; + width: 0.5rem; + height: 0.5rem; + border: 0.25rem solid #49b1f5; + border-radius: 0.5rem; background: var(--card-bg); content: ''; - line-height: 10px; + line-height: 0.5rem; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -2353,7 +2062,7 @@ figure.highlight pre .javascript .function { bottom: 0; left: 0; z-index: 0; - width: 2px; + width: 0.1rem; height: 1.5em; background: #aadafa; content: ''; @@ -2372,7 +2081,7 @@ figure.highlight pre .javascript .function { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - margin: 0 0 20px 10px; + margin: 0 0 1rem 0.5rem; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -2380,15 +2089,15 @@ figure.highlight pre .javascript .function { transition: all 0.2s ease-in-out; } .article-sort-item:hover:before { - border-color: var(--pseudo-hover); + border-color: #ff7242; } .article-sort-item:before { position: absolute; - left: calc(-20px - 17px); - width: 6px; - height: 6px; - border: 3px solid #49b1f5; - border-radius: 6px; + left: calc(-1rem - 17px); + width: 0.3rem; + height: 0.3rem; + border: 0.15rem solid #49b1f5; + border-radius: 0.3rem; background: var(--card-bg); content: ''; -webkit-transition: all 0.2s ease-in-out; @@ -2405,25 +2114,24 @@ figure.highlight pre .javascript .function { } .article-sort-item.year { font-size: 1.43em; - margin-bottom: 10px; } .article-sort-item.year:hover:before { border-color: #49b1f5; } .article-sort-item.year:before { - border-color: var(--pseudo-hover); + border-color: #ff7242; } .article-sort-item-time { - color: var(--card-meta); - font-size: 0.85em; + color: #858585; + font-size: 95%; } .article-sort-item-time time { - padding-left: 6px; + padding-left: 0.3rem; cursor: default; } .article-sort-item-title { color: var(--font-color); - font-size: 1.05em; + font-size: 1.1em; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; @@ -2441,15 +2149,25 @@ figure.highlight pre .javascript .function { } .article-sort-item-img { overflow: hidden; - width: 100px; - height: 70px; - border-radius: 6px; + width: 80px; + height: 80px; } -@media screen and (max-width: 768px) { - .article-sort-item-img { - width: 70px; - height: 70px; - } +.article-sort-item-img img { + width: 100%; + height: 100%; + -webkit-transition: all 0.6s; + -moz-transition: all 0.6s; + -o-transition: all 0.6s; + -ms-transition: all 0.6s; + transition: all 0.6s; + object-fit: cover; +} +.article-sort-item-img img:hover { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); } .article-sort-item-info { -webkit-box-flex: 1; @@ -2459,46 +2177,74 @@ figure.highlight pre .javascript .function { -webkit-flex: 1; -ms-flex: 1; flex: 1; - padding: 0 16px; + padding: 0 0.8rem; +} +#page .category-lists { + padding: 1rem 0 1.5rem; +} +@media screen and (max-width: 768px) { + #page .category-lists { + padding: 0; + } } -.category-lists .category-title { +#page .category-lists .category-title { font-size: 2.57em; } @media screen and (max-width: 768px) { - .category-lists .category-title { + #page .category-lists .category-title { font-size: 2em; } } -.category-lists .category-list { - margin-bottom: 0; -} -.category-lists .category-list a { +#page .category-lists .category-list a { color: var(--font-color); } -.category-lists .category-list a:hover { +#page .category-lists .category-list a:hover { color: #49b1f5; } -.category-lists .category-list .category-list-count { - margin-left: 8px; - color: var(--card-meta); +#page .category-lists .category-list .category-list-count { + margin-left: 0.4rem; + color: #858585; } -.category-lists .category-list .category-list-count:before { +#page .category-lists .category-list .category-list-count:before { content: '('; } -.category-lists .category-list .category-list-count:after { +#page .category-lists .category-list .category-list-count:after { content: ')'; } -.category-lists ul { - padding: 0 0 0 20px; +#page .category-lists ul { + margin-top: 0.4rem; + padding: 0 0 0 1rem; + list-style: none; + counter-reset: li; } -.category-lists ul ul { - padding-left: 4px; +#page .category-lists ul ul { + padding-left: 0.2rem; } -.category-lists ul li { +#page .category-lists ul li { position: relative; - margin: 6px 0; + margin: 0.3rem 0; padding: 0.12em 0.4em 0.12em 1.4em; } +#page .category-lists ul li:before { + position: absolute; + left: 0; + cursor: pointer; + -webkit-transition: all 0.3s ease-out; + -moz-transition: all 0.3s ease-out; + -o-transition: all 0.3s ease-out; + -ms-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; + top: 0.7em; + width: 0.43em; + height: 0.43em; + border: 0.215em solid #49b1f5; + border-radius: 0.43em; + background: transparent; + content: ''; +} +#page .category-lists ul li:hover:before { + border-color: #ff7242; +} #body-wrap { display: -webkit-box; display: -moz-box; @@ -2529,7 +2275,7 @@ figure.highlight pre .javascript .function { -ms-flex: 1 auto; flex: 1 auto; margin: 0 auto; - padding: 40px 15px; + padding: 2rem 15px; max-width: 1200px; width: 100%; } @@ -2545,27 +2291,35 @@ figure.highlight pre .javascript .function { } @media screen and (max-width: 768px) { .layout { - padding: 20px 5px; + padding: 1rem 5px; } } @media screen and (min-width: 2000px) { .layout { - max-width: 60%; + max-width: 1500px; } } -.layout > div:first-child:not(.nc) { +.layout > div:first-child:not(.recent-posts) { -webkit-align-self: flex-start; align-self: flex-start; -ms-flex-item-align: start; padding: 50px 40px; + border-radius: 8px; + background: var(--card-bg); + -webkit-box-shadow: var(--card-box-shadow); + box-shadow: var(--card-box-shadow); +} +.layout > div:first-child:not(.recent-posts):hover { + -webkit-box-shadow: var(--card-hover-box-shadow); + box-shadow: var(--card-hover-box-shadow); } @media screen and (max-width: 768px) { - .layout > div:first-child:not(.nc) { - padding: 36px 14px; + .layout > div:first-child:not(.recent-posts) { + padding: 1.8rem 0.7rem !important; } } .layout > div:first-child { - width: 74%; + width: 75%; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; @@ -2588,52 +2342,43 @@ figure.highlight pre .javascript .function { .layout.hide-aside > div { width: 100% !important; } -.apple #page-header.full_page { - background-attachment: scroll !important; -} -.apple .recent-post-item, -.apple .avatar-img, -.apple .flink-item-icon { - -webkit-transform: translateZ(0); - -moz-transform: translateZ(0); - -o-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); -} -.container .flink { - margin-bottom: 20px; +#article-container .flink .flink-desc { + margin: 0.2rem 0 0.5rem; } -.container .flink .flink-list { +#article-container .flink .flink-list { overflow: auto; padding: 10px 10px 0; text-align: center; } -.container .flink .flink-list > .flink-list-item { +#article-container .flink .flink-list > .flink-list-item { position: relative; float: left; overflow: hidden; margin: 15px 7px; width: calc(100% / 3 - 15px); height: 90px; + border-radius: 8px; line-height: 17px; -webkit-transform: translateZ(0); - border-radius: 8px; } @media screen and (max-width: 1024px) { - .container .flink .flink-list > .flink-list-item { + #article-container .flink .flink-list > .flink-list-item { width: calc(50% - 15px) !important; } } @media screen and (max-width: 600px) { - .container .flink .flink-list > .flink-list-item { + #article-container .flink .flink-list > .flink-list-item { width: calc(100% - 15px) !important; } } -.container .flink .flink-list > .flink-list-item:hover .flink-item-icon { - margin-left: -10px; - width: 0; +#article-container .flink .flink-list > .flink-list-item:hover img { + -webkit-transform: rotate(360deg); + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); } -.container .flink .flink-list > .flink-list-item:before { +#article-container .flink .flink-list > .flink-list-item:before { position: absolute; top: 0; right: 0; @@ -2653,65 +2398,54 @@ figure.highlight pre .javascript .function { -ms-transform: scale(0); transform: scale(0); } -.container .flink .flink-list > .flink-list-item:hover:before, -.container .flink .flink-list > .flink-list-item:focus:before, -.container .flink .flink-list > .flink-list-item:active:before { +#article-container .flink .flink-list > .flink-list-item:hover:before, +#article-container .flink .flink-list > .flink-list-item:focus:before, +#article-container .flink .flink-list > .flink-list-item:active:before { -webkit-transform: scale(1); -moz-transform: scale(1); -o-transform: scale(1); -ms-transform: scale(1); transform: scale(1); } -.container .flink .flink-list > .flink-list-item a { +#article-container .flink .flink-list > .flink-list-item a { color: var(--font-color); text-decoration: none; } -.container .flink .flink-list > .flink-list-item a .flink-item-icon { +#article-container .flink .flink-list > .flink-list-item a .flink-item-icon { float: left; overflow: hidden; margin: 15px 10px; width: 60px; height: 60px; - border-radius: 7px; - -webkit-transition: width 0.3s ease-out; - -moz-transition: width 0.3s ease-out; - -o-transition: width 0.3s ease-out; - -ms-transition: width 0.3s ease-out; - transition: width 0.3s ease-out; -} -.container .flink .flink-list > .flink-list-item a .flink-item-icon img { + border-radius: 35px; +} +#article-container .flink .flink-list > .flink-list-item a .flink-item-icon img { width: 100%; height: 100%; - -webkit-transition: filter 375ms ease-in 0.2s, -webkit-transform 0.3s; - -moz-transition: filter 375ms ease-in 0.2s, -moz-transform 0.3s; - -o-transition: filter 375ms ease-in 0.2s, -o-transform 0.3s; - -ms-transition: filter 375ms ease-in 0.2s, -ms-transform 0.3s; - transition: filter 375ms ease-in 0.2s, transform 0.3s; - object-fit: cover; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; } -.container .flink .flink-list > .flink-list-item a .img-alt { +#article-container .flink .flink-list > .flink-list-item a .img-alt { display: none; } -.container .flink .flink-item-name { +#article-container .flink .flink-list > .flink-list-item a .flink-item-name { padding: 16px 10px 0 0; height: 40px; font-weight: bold; font-size: 1.43em; } -.container .flink .flink-item-desc { +#article-container .flink .flink-list > .flink-list-item a .flink-item-desc { padding: 16px 10px 16px 0; height: 50px; font-size: 0.93em; } -.container .flink .flink-name { - margin-bottom: 5px; - font-weight: bold; - font-size: 1.5em; +#recent-posts > .recent-post-item:not(:first-child) { + margin-top: 1rem; } -#recent-posts .recent-post-item { - position: relative; - overflow: hidden; - margin-bottom: 20px; +#recent-posts > .recent-post-item { display: -webkit-box; display: -moz-box; display: -webkit-flex; @@ -2730,88 +2464,85 @@ figure.highlight pre .javascript .function { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - height: 16.8em; + height: 20em; + border-radius: 12px 8px 8px 12px; + background: var(--card-bg); + -webkit-box-shadow: var(--card-box-shadow); + box-shadow: var(--card-box-shadow); + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; } @media screen and (max-width: 768px) { - #recent-posts .recent-post-item { - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -o-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - height: auto; + #recent-posts > .recent-post-item { + border-radius: 12px 12px 8px 8px; } } -@media screen and (min-width: 2000px) { - #recent-posts .recent-post-item { - height: 18.8em; - } +#recent-posts > .recent-post-item:hover { + -webkit-box-shadow: var(--card-hover-box-shadow); + box-shadow: var(--card-hover-box-shadow); } -#recent-posts .recent-post-item:hover .post-bg { +#recent-posts > .recent-post-item:hover img.post_bg { -webkit-transform: scale(1.1); -moz-transform: scale(1.1); -o-transform: scale(1.1); -ms-transform: scale(1.1); transform: scale(1.1); } -#recent-posts .recent-post-item.ads-wrap { +#recent-posts > .recent-post-item .left_radius { + border-radius: 8px 0 0 8px; +} +#recent-posts > .recent-post-item .right_radius { + -webkit-box-ordinal-group: 2; + -moz-box-ordinal-group: 2; + -o-box-ordinal-group: 2; + -ms-flex-order: 2; + -webkit-order: 2; + order: 2; + border-radius: 0 8px 8px 0; +} +#recent-posts > .recent-post-item.ads-wrap { display: block !important; height: auto !important; } -#recent-posts .recent-post-item .post_cover { +#recent-posts > .recent-post-item .post_cover { overflow: hidden; - width: 42%; + width: 45%; height: 100%; + -webkit-mask-image: -webkit-radial-gradient(#fff, #000); } -@media screen and (max-width: 768px) { - #recent-posts .recent-post-item .post_cover { - width: 100%; - height: 230px; - } -} -#recent-posts .recent-post-item .post_cover.right { - -webkit-box-ordinal-group: 1; - -moz-box-ordinal-group: 1; - -o-box-ordinal-group: 1; - -ms-flex-order: 1; - -webkit-order: 1; - order: 1; -} -@media screen and (max-width: 768px) { - #recent-posts .recent-post-item .post_cover.right { - -webkit-box-ordinal-group: 0; - -moz-box-ordinal-group: 0; - -o-box-ordinal-group: 0; - -ms-flex-order: 0; - -webkit-order: 0; - order: 0; - } +#recent-posts > .recent-post-item .post_cover img.post_bg { + width: 100%; + height: 100%; + -webkit-transition: all 0.6s; + -moz-transition: all 0.6s; + -o-transition: all 0.6s; + -ms-transition: all 0.6s; + transition: all 0.6s; + object-fit: cover; } -#recent-posts .recent-post-item .post_cover .post-bg { - z-index: -4; +#recent-posts > .recent-post-item .post_cover img.post_bg:hover { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); } -#recent-posts .recent-post-item >.recent-post-info { +#recent-posts > .recent-post-item >.recent-post-info { + display: inline-block; + overflow: hidden; padding: 0 40px; - width: 58%; -} -@media screen and (max-width: 768px) { - #recent-posts .recent-post-item >.recent-post-info { - padding: 20px 20px 30px; - width: 100%; - } + width: 55%; } -#recent-posts .recent-post-item >.recent-post-info.no-cover { +#recent-posts > .recent-post-item >.recent-post-info.no-cover { width: 100%; } -@media screen and (max-width: 768px) { - #recent-posts .recent-post-item >.recent-post-info.no-cover { - padding: 30px 20px; - } -} -#recent-posts .recent-post-item >.recent-post-info > .article-title { +#recent-posts > .recent-post-item >.recent-post-info > .article-title { + margin-bottom: 0.3rem; color: var(--text-highlight-color); - font-size: 1.55em; + font-size: 1.72em; line-height: 1.4; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; @@ -2820,692 +2551,118 @@ figure.highlight pre .javascript .function { transition: all 0.2s ease-in-out; -webkit-line-clamp: 2; } -#recent-posts .recent-post-item >.recent-post-info > .article-title .sticky { - margin-right: 10px; - color: #ff7242; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); -} -@media screen and (max-width: 768px) { - #recent-posts .recent-post-item >.recent-post-info > .article-title { - font-size: 1.43em; - } -} -#recent-posts .recent-post-item >.recent-post-info > .article-title:hover { +#recent-posts > .recent-post-item >.recent-post-info > .article-title:hover { color: #49b1f5; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap { - margin: 6px 0; - color: var(--card-meta); - font-size: 0.9em; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap { + color: #858585; + font-size: 90%; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap > .post-meta-date { +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap > .post-meta-date { cursor: default; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap i { - margin: 0 4px 0 0; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .sticky { + color: #ff7242; +} +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap i { + margin: 0 0.2rem 0 0; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap .fa-spinner { - margin: 0; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-label { + padding-right: 0.2rem; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-label { - padding-right: 4px; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta__separator { + margin: 0 0.3rem; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-separator { - margin: 0 6px; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta__link { + margin: 0 0.2rem; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap .article-meta-link { - margin: 0 4px; +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap .fa-angle-right { + margin: 0 0.2rem; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap a { - color: var(--card-meta); +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap a { + color: #858585; } -#recent-posts .recent-post-item >.recent-post-info > .article-meta-wrap a:hover { +#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap a:hover { color: #49b1f5; text-decoration: underline; } -#recent-posts .recent-post-item >.recent-post-info > .content { - -webkit-line-clamp: 2; - word-break: break-word; -} -#article-container .shuoshuo-item { - margin-bottom: 20px; - padding: 35px 30px 30px; +#recent-posts > .recent-post-item >.recent-post-info > .content { + margin-top: 0.3rem; + -webkit-line-clamp: 3; } @media screen and (max-width: 768px) { - #article-container .shuoshuo-item { - padding: 25px 20px 20px; + #recent-posts .recent-post-item { + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -o-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + height: auto !important; + } + #recent-posts .recent-post-item .post_cover { + -webkit-box-ordinal-group: 1 !important; + -moz-box-ordinal-group: 1 !important; + -o-box-ordinal-group: 1 !important; + -ms-flex-order: 1 !important; + -webkit-order: 1 !important; + order: 1 !important; + width: 100%; + height: 230px; + border-radius: 8px 8px 0 0; + } + #recent-posts .recent-post-item .recent-post-info { + -webkit-box-ordinal-group: 2 !important; + -moz-box-ordinal-group: 2 !important; + -o-box-ordinal-group: 2 !important; + -ms-flex-order: 2 !important; + -webkit-order: 2 !important; + order: 2 !important; + padding: 1rem 1rem 1.5rem; + width: 100%; + } + #recent-posts .recent-post-item .recent-post-info.no-cover { + padding: 1.5rem 1rem; + } + #recent-posts .recent-post-item .recent-post-info .article-title { + font-size: 1.43em; + } + #recent-posts .recent-post-item .recent-post-info .content { + height: auto; } } -#article-container .shuoshuo-item-header { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - cursor: default; -} -#article-container .shuoshuo-avatar { - overflow: hidden; - width: 40px; - height: 40px; - border-radius: 40px; +.tag-cloud-list a { + display: inline-block; + padding: 0 0.4rem; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; } -#article-container .shuoshuo-avatar img { - margin: 0; - width: 100%; - height: 100%; +.tag-cloud-list a:hover { + color: #49b1f5 !important; + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); } -#article-container .shuoshuo-info { - margin-left: 10px; - line-height: 1.5; +@media screen and (max-width: 768px) { + .tag-cloud-list a { + zoom: 0.85; + } } -#article-container .shuoshuo-date { - color: #858585; - font-size: 0.8em; -} -#article-container .shuoshuo-content { - padding: 15px 0 10px; -} -#article-container .shuoshuo-content > *:last-child { - margin-bottom: 0; -} -#article-container .shuoshuo-footer { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; -} -#article-container .shuoshuo-footer.flex-between { - -webkit-box-pack: justify; - -moz-box-pack: justify; - -o-box-pack: justify; - -ms-flex-pack: justify; - -webkit-justify-content: space-between; - justify-content: space-between; -} -#article-container .shuoshuo-footer.flex-end { - -webkit-box-pack: end; - -moz-box-pack: end; - -o-box-pack: end; - -ms-flex-pack: end; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} -#article-container .shuoshuo-footer .shuoshuo-tag { - display: inline-block; - margin-right: 8px; - padding: 0 8px; - width: fit-content; - border: 1px solid #49b1f5; - border-radius: 12px; - color: #49b1f5; - font-size: 0.85em; - cursor: default; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} -#article-container .shuoshuo-footer .shuoshuo-tag:hover { - background: #49b1f5; - color: var(--white); -} -#article-container .shuoshuo-footer .shuoshuo-comment-btn { - padding: 2px; - color: #90a4ae; - cursor: pointer; -} -#article-container .shuoshuo-footer .shuoshuo-comment-btn:hover { - color: #49b1f5; -} -#article-container .shuoshuo-comment { - padding-top: 10px; -} -#article-container .shuoshuo-comment.no-comment { - display: none; -} -.shuoshuo-navigation { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - margin-top: 20px; - padding: 20px 0; -/* 震動動畫 */ -} -.shuoshuo-navigation button { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - width: 2.7em; - height: 2.7em; - background-color: var(--btn-bg); - color: var(--btn-color); - font-size: 0.9em; - line-height: 2.5em; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - border-radius: 6px; -} -.shuoshuo-navigation button:hover:not(:disabled) { - background-color: var(--btn-hover-color); -} -.shuoshuo-navigation button:disabled { - background: #f5f5f5; - color: #ccc; - opacity: 0.5; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; - filter: alpha(opacity=50); - cursor: not-allowed; -} -.shuoshuo-navigation .shuoshuo-page-info { - margin: 0 15px; - color: #858585; - white-space: nowrap; - font-size: 0.9em; -} -.shuoshuo-navigation .shuoshuo-page-input { - margin-right: 12px; - padding: 0 15px; - height: 2.7em; - border: 1px solid var(--btn-bg); - background: var(--card-bg); - color: #858585; - text-align: center; - font-size: 0.9em; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -o-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - border-radius: 6px; -/* 隱藏 number 輸入框的上下箭頭 */ -/* Firefox */ - -moz-appearance: textfield; -/* 當作為頁碼按鈕時的樣式 */ -/* 超出範圍時的紅色樣式 */ -} -.shuoshuo-navigation .shuoshuo-page-input:focus { - outline: none; - border-width: 2px; -} -.shuoshuo-navigation .shuoshuo-page-input:focus::placeholder { - color: transparent; -} -.shuoshuo-navigation .shuoshuo-page-input::-webkit-outer-spin-button, -.shuoshuo-navigation .shuoshuo-page-input::-webkit-inner-spin-button { - margin: 0; - -webkit-appearance: none; -} -.shuoshuo-navigation .shuoshuo-page-input.shuoshuo-page-num { - min-width: 40px; - width: 40px; - border: none; - background: #49b1f5; - color: var(--white); - font-weight: 500; - cursor: text; -} -.shuoshuo-navigation .shuoshuo-page-input.shuoshuo-page-num:focus { - border: 1px solid #49b1f5; - background: var(--white); - color: #333; -} -.shuoshuo-navigation .shuoshuo-page-input.invalid { - border-color: #ff4757; - background-color: #ffeaea; - color: #ff4757; - -webkit-animation: shake 0.5s ease-in-out; - -moz-animation: shake 0.5s ease-in-out; - -o-animation: shake 0.5s ease-in-out; - -ms-animation: shake 0.5s ease-in-out; - animation: shake 0.5s ease-in-out; -} -@-moz-keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-2px); - -moz-transform: translateX(-2px); - -o-transform: translateX(-2px); - -ms-transform: translateX(-2px); - transform: translateX(-2px); - } - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(2px); - -moz-transform: translateX(2px); - -o-transform: translateX(2px); - -ms-transform: translateX(2px); - transform: translateX(2px); - } -} -@-webkit-keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-2px); - -moz-transform: translateX(-2px); - -o-transform: translateX(-2px); - -ms-transform: translateX(-2px); - transform: translateX(-2px); - } - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(2px); - -moz-transform: translateX(2px); - -o-transform: translateX(2px); - -ms-transform: translateX(2px); - transform: translateX(2px); - } -} -@-o-keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-2px); - -moz-transform: translateX(-2px); - -o-transform: translateX(-2px); - -ms-transform: translateX(-2px); - transform: translateX(-2px); - } - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(2px); - -moz-transform: translateX(2px); - -o-transform: translateX(2px); - -ms-transform: translateX(2px); - transform: translateX(2px); - } -} -@keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-2px); - -moz-transform: translateX(-2px); - -o-transform: translateX(-2px); - -ms-transform: translateX(-2px); - transform: translateX(-2px); - } - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(2px); - -moz-transform: translateX(2px); - -o-transform: translateX(2px); - -ms-transform: translateX(2px); - transform: translateX(2px); - } -} -.tag-cloud-list { - -webkit-animation: tagsFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); - -moz-animation: tagsFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); - -o-animation: tagsFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); - -ms-animation: tagsFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); - animation: tagsFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1); -} -.tag-cloud-list:hover a:not(:hover) { - opacity: 0.7; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; - filter: alpha(opacity=70); - -webkit-transform: scale(0.98); - -moz-transform: scale(0.98); - -o-transform: scale(0.98); - -ms-transform: scale(0.98); - transform: scale(0.98); -} -.tag-cloud-list a { - position: relative; - display: inline-block; - margin: 5px; - padding: 3px 12px; - line-height: 1.7; - -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - border-radius: 7px; - overflow: hidden; - color: #fff; - -webkit-transform: translateY(0) scale(1); - -moz-transform: translateY(0) scale(1); - -o-transform: translateY(0) scale(1); - -ms-transform: translateY(0) scale(1); - transform: translateY(0) scale(1); - will-change: transform, background-color, box-shadow; -} -.tag-cloud-list a::before { - position: absolute; - top: 0; - left: -100%; - z-index: -1; - width: 100%; - height: 100%; - background: -webkit-linear-gradient(0deg, transparent, rgba(255,255,255,0.1), transparent); - background: -moz-linear-gradient(0deg, transparent, rgba(255,255,255,0.1), transparent); - background: -o-linear-gradient(0deg, transparent, rgba(255,255,255,0.1), transparent); - background: -ms-linear-gradient(0deg, transparent, rgba(255,255,255,0.1), transparent); - background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); - content: ''; - -webkit-transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1); - transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1); -} -.tag-cloud-list a:hover { - background: var(--btn-hover-color) !important; - -webkit-box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(255,255,255,0.05); - box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(255,255,255,0.05); - color: var(--btn-color) !important; - -webkit-transform: translateY(-2px) scale(1.02); - -moz-transform: translateY(-2px) scale(1.02); - -o-transform: translateY(-2px) scale(1.02); - -ms-transform: translateY(-2px) scale(1.02); - transform: translateY(-2px) scale(1.02); -} -.tag-cloud-list a:hover::before { - left: 100%; -} -.tag-cloud-list a:active { - -webkit-box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1); - box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1); - -webkit-transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); - transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); - -webkit-transform: translateY(-1px) scale(0.98); - -moz-transform: translateY(-1px) scale(0.98); - -o-transform: translateY(-1px) scale(0.98); - -ms-transform: translateY(-1px) scale(0.98); - transform: translateY(-1px) scale(0.98); -} -@media screen and (max-width: 768px) { - .tag-cloud-list a { - zoom: 0.85; - } - .tag-cloud-list a:hover { - -webkit-transform: translateY(-1px) scale(1.01); - -moz-transform: translateY(-1px) scale(1.01); - -o-transform: translateY(-1px) scale(1.01); - -ms-transform: translateY(-1px) scale(1.01); - transform: translateY(-1px) scale(1.01); - } - .tag-cloud-list a:active { - -webkit-transform: translateY(0) scale(0.99); - -moz-transform: translateY(0) scale(0.99); - -o-transform: translateY(0) scale(0.99); - -ms-transform: translateY(0) scale(0.99); - transform: translateY(0) scale(0.99); - } - .tag-cloud-list a::before { - display: none; - } -} -.tag-cloud-title { - font-size: 2.57em; - -webkit-animation: titleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1); - -moz-animation: titleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1); - -o-animation: titleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1); - -ms-animation: titleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1); - animation: titleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1); -} -@media screen and (max-width: 768px) { - .tag-cloud-title { - font-size: 2em; - } -} -.page-title + .tag-cloud-list { - text-align: left; -} -@-moz-keyframes tagsFadeIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateY(20px); - -moz-transform: translateY(20px); - -o-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} -@-webkit-keyframes tagsFadeIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateY(20px); - -moz-transform: translateY(20px); - -o-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} -@-o-keyframes tagsFadeIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateY(20px); - -moz-transform: translateY(20px); - -o-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} -@keyframes tagsFadeIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateY(20px); - -moz-transform: translateY(20px); - -o-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } -} -@-moz-keyframes titleSlideIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateX(-30px); - -moz-transform: translateX(-30px); - -o-transform: translateX(-30px); - -ms-transform: translateX(-30px); - transform: translateX(-30px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} -@-webkit-keyframes titleSlideIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateX(-30px); - -moz-transform: translateX(-30px); - -o-transform: translateX(-30px); - -ms-transform: translateX(-30px); - transform: translateX(-30px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } -} -@-o-keyframes titleSlideIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateX(-30px); - -moz-transform: translateX(-30px); - -o-transform: translateX(-30px); - -ms-transform: translateX(-30px); - transform: translateX(-30px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } +.tag-cloud-title { + font-size: 2.57em; } -@keyframes titleSlideIn { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateX(-30px); - -moz-transform: translateX(-30px); - -o-transform: translateX(-30px); - -ms-transform: translateX(-30px); - transform: translateX(-30px); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateX(0); - -moz-transform: translateX(0); - -o-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); +@media screen and (max-width: 768px) { + .tag-cloud-title { + font-size: 2em; } } #aside-content { - width: 26%; + width: 25%; } @media screen and (min-width: 900px) { #aside-content { @@ -3514,33 +2671,69 @@ figure.highlight pre .javascript .function { } @media screen and (max-width: 900px) { #aside-content { - margin-top: 20px; width: 100%; } } +#aside-content > .card-widget:first-child { + margin-top: 0; +} +@media screen and (max-width: 900px) { + #aside-content > .card-widget:first-child { + margin-top: 1rem; + } +} #aside-content .card-widget { position: relative; overflow: hidden; - margin-bottom: 20px; - padding: 20px 24px; + margin-top: 1rem; + padding: 1rem 1.2rem; + border-radius: 8px; + background: var(--card-bg); + -webkit-box-shadow: var(--card-box-shadow); + box-shadow: var(--card-box-shadow); + -webkit-transition: box-shadow 0.3s; + -moz-transition: box-shadow 0.3s; + -o-transition: box-shadow 0.3s; + -ms-transition: box-shadow 0.3s; + transition: box-shadow 0.3s; +} +#aside-content .card-widget:hover { + -webkit-box-shadow: var(--card-hover-box-shadow); + box-shadow: var(--card-hover-box-shadow); } -#aside-content .card-info .author-info-name { +#aside-content .card-info .author-info__name { font-weight: 500; font-size: 1.57em; } -#aside-content .card-info .author-info-description { - margin-top: -0.42em; +#aside-content .card-info .author-info__description { + margin-top: -0.3rem; +} +#aside-content .card-info .card-info-data { + display: table; + margin: 0.7rem 0 0.2rem; + width: 100%; + table-layout: fixed; +} +#aside-content .card-info .card-info-data > .card-info-data-item { + display: table-cell; +} +#aside-content .card-info .card-info-data > .card-info-data-item a .headline { + color: var(--font-color); + font-size: 1em; } -#aside-content .card-info .site-data { - margin: 14px 0 4px; +#aside-content .card-info .card-info-data > .card-info-data-item a .length-num { + margin-top: -0.3rem; + color: var(--text-highlight-color); + font-size: 1.4em; } #aside-content .card-info .card-info-social-icons { - margin: 6px 0 -6px; + margin: 0.3rem 0 -0.3rem; } #aside-content .card-info .card-info-social-icons .social-icon { - margin: 0 10px; + margin: 0 0.5rem; color: var(--font-color); font-size: 1.4em; + cursor: pointer; } #aside-content .card-info .card-info-social-icons i { -webkit-transition: all 0.3s; @@ -3550,33 +2743,29 @@ figure.highlight pre .javascript .function { transition: all 0.3s; } #aside-content .card-info .card-info-social-icons i:hover { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); + -webkit-transform: rotate(540deg); + -moz-transform: rotate(540deg); + -o-transform: rotate(540deg); + -ms-transform: rotate(540deg); + transform: rotate(540deg); } #aside-content .card-info #card-info-btn { display: block; - margin-top: 14px; + margin-top: 0.7rem; background-color: var(--btn-bg); color: var(--btn-color); text-align: center; line-height: 2.4; - border-radius: 7px; -} -#aside-content .card-info #card-info-btn:hover { - background-color: var(--btn-hover-color); } #aside-content .card-info #card-info-btn span { - padding-left: 10px; + padding-left: 0.5rem; } #aside-content .item-headline { - padding-bottom: 6px; + padding-bottom: 0.3rem; font-size: 1.2em; } #aside-content .item-headline span { - margin-left: 6px; + margin-left: 0.3rem; } @media screen and (min-width: 900px) { #aside-content .sticky_layout { @@ -3592,15 +2781,14 @@ figure.highlight pre .javascript .function { } #aside-content .card-tag-cloud a { display: inline-block; - padding: 0 4px; - line-height: 1.8; + padding: 0 0.2rem; } #aside-content .card-tag-cloud a:hover { color: #49b1f5 !important; } #aside-content .aside-list > span { display: block; - margin-bottom: 10px; + margin-bottom: 0.5rem; text-align: center; } #aside-content .aside-list > .aside-list-item { @@ -3616,7 +2804,7 @@ figure.highlight pre .javascript .function { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - padding: 6px 0; + padding: 0.3rem 0; } #aside-content .aside-list > .aside-list-item:first-child { padding-top: 0; @@ -3629,9 +2817,25 @@ figure.highlight pre .javascript .function { } #aside-content .aside-list > .aside-list-item .thumbnail { overflow: hidden; - width: 4em; - height: 4em; - border-radius: 6px; + width: 4.2em; + height: 4.2em; +} +#aside-content .aside-list > .aside-list-item .thumbnail > img { + width: 100%; + height: 100%; + -webkit-transition: all 0.6s; + -moz-transition: all 0.6s; + -o-transition: all 0.6s; + -ms-transition: all 0.6s; + transition: all 0.6s; + object-fit: cover; +} +#aside-content .aside-list > .aside-list-item .thumbnail > img:hover { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); } #aside-content .aside-list > .aside-list-item .content { -webkit-box-flex: 1; @@ -3650,12 +2854,13 @@ figure.highlight pre .javascript .function { #aside-content .aside-list > .aside-list-item .content > time, #aside-content .aside-list > .aside-list-item .content > .name { display: block; - color: var(--card-meta); - font-size: 0.85em; + color: #858585; + font-size: 85%; } #aside-content .aside-list > .aside-list-item .content > .title, #aside-content .aside-list > .aside-list-item .content > .comment { color: var(--font-color); + font-size: 95%; line-height: 1.5; -webkit-line-clamp: 2; } @@ -3674,71 +2879,37 @@ figure.highlight pre .javascript .function { } #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a, #aside-content .card-categories ul.card-category-list > .card-category-list-item a { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -o-box-orient: horizontal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - margin: 2px 0; - padding: 2px 8px; + display: inline-block; + padding: 0.15rem 0.5rem; + width: 100%; color: var(--font-color); - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; - border-radius: 6px; + -webkit-transition: all 0.4s; + -moz-transition: all 0.4s; + -o-transition: all 0.4s; + -ms-transition: all 0.4s; + transition: all 0.4s; } #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:hover, #aside-content .card-categories ul.card-category-list > .card-category-list-item a:hover { - padding: 2px 12px; + padding: 0.15rem 0.85rem; background-color: var(--text-bg-hover); - color: var(--white); +} +#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span, +#aside-content .card-categories ul.card-category-list > .card-category-list-item a span { + display: inline-block; + vertical-align: bottom; } #aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span:first-child, #aside-content .card-categories ul.card-category-list > .card-category-list-item a span:first-child { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; -} -#aside-content .card-categories .card-category-list.child { - padding: 0 0 0 16px; - overflow: hidden; - max-height: 0; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - visibility: hidden; - -webkit-transition: max-height 0.3s ease, opacity 0.3s ease; - -moz-transition: max-height 0.3s ease, opacity 0.3s ease; - -o-transition: max-height 0.3s ease, opacity 0.3s ease; - -ms-transition: max-height 0.3s ease, opacity 0.3s ease; - transition: max-height 0.3s ease, opacity 0.3s ease; + width: 80%; } -#aside-content .card-categories .card-category-list > .parent > a.expand i { - -webkit-transform: rotate(-90deg); - -moz-transform: rotate(-90deg); - -o-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); +#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a span:last-child, +#aside-content .card-categories ul.card-category-list > .card-category-list-item a span:last-child { + width: 20%; + text-align: right; } -#aside-content .card-categories .card-category-list > .parent > a.expand + .child { - max-height: 1000px; - opacity: 1; - -ms-filter: none; - filter: none; - visibility: visible; +#aside-content .card-categories .card-category-list.child { + padding: 0 0 0 0.8rem; } #aside-content .card-categories .card-category-list > .parent > a .card-category-list-name { width: 70% !important; @@ -3747,10 +2918,10 @@ figure.highlight pre .javascript .function { width: calc(100% - 70% - 20px); text-align: right; } -#aside-content .card-categories .card-category-list > .parent > a i { +#aside-content .card-categories .card-category-list > .parent i { float: right; - margin-right: -0.5em; - padding: 0.5em; + margin-right: -0.35rem; + padding: 0.35rem; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; -o-transition: -o-transform 0.3s; @@ -3762,6 +2933,13 @@ figure.highlight pre .javascript .function { -ms-transform: rotate(0); transform: rotate(0); } +#aside-content .card-categories .card-category-list > .parent i.expand { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); +} #aside-content .card-webinfo .webinfo .webinfo-item { display: -webkit-box; display: -moz-box; @@ -3775,7 +2953,7 @@ figure.highlight pre .javascript .function { -ms-flex-align: center; -webkit-align-items: center; align-items: center; - padding: 2px 10px 0; + padding: 0.1rem 0.5rem 0; } #aside-content .card-webinfo .webinfo .webinfo-item div:first-child { -webkit-box-flex: 1; @@ -3785,7 +2963,7 @@ figure.highlight pre .javascript .function { -webkit-flex: 1; -ms-flex: 1; flex: 1; - padding-right: 20px; + padding-right: 1rem; } @media screen and (min-width: 901px) { #aside-content #card-toc { @@ -3795,72 +2973,39 @@ figure.highlight pre .javascript .function { @media screen and (max-width: 900px) { #aside-content #card-toc { position: fixed; - right: 55px; + right: -100%; bottom: 30px; z-index: 100; - max-width: 380px; max-height: calc(100% - 60px); - width: calc(100% - 80px); - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - -ms-transition: none; - transition: none; - -webkit-transform: scale(0); - -moz-transform: scale(0); - -o-transform: scale(0); - -ms-transform: scale(0); - transform: scale(0); + width: 300px; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); -webkit-transform-origin: right bottom; -moz-transform-origin: right bottom; -o-transform-origin: right bottom; -ms-transform-origin: right bottom; transform-origin: right bottom; } - #aside-content #card-toc.open { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} -#aside-content #card-toc .toc-percentage { - float: right; - margin-top: -9px; - color: #a9a9a9; - font-style: italic; - font-size: 140%; } #aside-content #card-toc .toc-content { - overflow-y: scroll; - overflow-y: overlay; - margin: 0 -24px; + overflow-y: auto; max-height: calc(100vh - 120px); - width: calc(100% + 48px); } @media screen and (max-width: 900px) { #aside-content #card-toc .toc-content { max-height: calc(100vh - 140px); } } -#aside-content #card-toc .toc-content > * { - margin: 0 20px !important; -} -#aside-content #card-toc .toc-content > * > .toc-item > .toc-child { - margin-left: 10px; - padding-left: 10px; - border-left: 1px solid var(--dark-grey); -} -#aside-content #card-toc .toc-content:not(.is-expand) .toc-child { +#aside-content #card-toc .toc-content .toc-child { display: none; } @media screen and (max-width: 900px) { - #aside-content #card-toc .toc-content:not(.is-expand) .toc-child { + #aside-content #card-toc .toc-content .toc-child { display: block !important; } } -#aside-content #card-toc .toc-content:not(.is-expand) .toc-item.active .toc-child { +#aside-content #card-toc .toc-content .toc-item.active .toc-child { display: block; } #aside-content #card-toc .toc-content ol, @@ -3872,28 +3017,34 @@ figure.highlight pre .javascript .function { } #aside-content #card-toc .toc-content ol { margin: 0; - padding-left: 18px; + padding-left: 0.4rem; } #aside-content #card-toc .toc-content .toc-link { display: block; - margin: 4px 0; - padding: 1px 8px; + padding-left: 0.3rem; + border-left: 3px solid transparent; color: var(--toc-link-color); -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; - border-radius: 6px; -} -#aside-content #card-toc .toc-content .toc-link:hover { - color: #49b1f5; } #aside-content #card-toc .toc-content .toc-link.active { + border-left-color: #009d92; background: #00c4b6; color: #fff; } -#aside-content .sticky_layout:only-child > :first-child { +#aside-content #card-toc .toc-content:before { + position: absolute; + top: 0.6rem; + right: 1.2rem; + color: #a9a9a9; + content: attr(progress-percentage); + font-style: italic; + font-size: 1.2rem; +} +#aside-content :only-child > .card-widget { margin-top: 0; } #aside-content .card-more-btn { @@ -3907,9 +3058,6 @@ figure.highlight pre .javascript .function { -ms-animation: more-btn-move 1s infinite; animation: more-btn-move 1s infinite; } -#aside-content .card-announcement .item-headline i { - color: #f00; -} .avatar-img { overflow: hidden; margin: 0 auto; @@ -3918,13 +3066,12 @@ figure.highlight pre .javascript .function { border-radius: 70px; } .avatar-img img { - width: 100%; height: 100%; - -webkit-transition: filter 375ms ease-in 0.2s, -webkit-transform 0.3s; - -moz-transition: filter 375ms ease-in 0.2s, -moz-transform 0.3s; - -o-transition: filter 375ms ease-in 0.2s, -o-transform 0.3s; - -ms-transition: filter 375ms ease-in 0.2s, -ms-transform 0.3s; - transition: filter 375ms ease-in 0.2s, transform 0.3s; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + -ms-transition: all 0.5s; + transition: all 0.5s; object-fit: cover; } .avatar-img img:hover { @@ -3934,33 +3081,6 @@ figure.highlight pre .javascript .function { -ms-transform: rotate(360deg); transform: rotate(360deg); } -.site-data { - display: table; - width: 100%; - table-layout: fixed; -} -.site-data > a { - display: table-cell; -} -.site-data > a div { - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; -} -.site-data > a:hover div { - color: #49b1f5 !important; -} -.site-data > a .headline { - color: var(--font-color); - font-size: 0.95em; -} -.site-data > a .length-num { - margin-top: -0.45em; - color: var(--text-highlight-color); - font-size: 1.2em; -} @media screen and (min-width: 900px) { html.hide-aside .layout { -webkit-box-pack: center; @@ -4184,12 +3304,7 @@ figure.highlight pre .javascript .function { } } #post-comment .comment-head { - margin-bottom: 20px; -} -#post-comment .comment-head:after { - display: block; - clear: both; - content: ''; + margin-bottom: 1rem; } #post-comment .comment-head .comment-headline { display: inline-block; @@ -4197,23 +3312,23 @@ figure.highlight pre .javascript .function { font-weight: 700; font-size: 1.43em; } -#post-comment .comment-head .comment-switch { +#post-comment .comment-head #comment-switch { display: inline-block; vertical-align: middle; } -#post-comment .comment-head .comment-switch > span { +#post-comment .comment-head #comment-switch > span { display: none; } -#post-comment .comment-head .comment-switch .first-comment { +#post-comment .comment-head #comment-switch .first-comment { color: #49b1f5; } -#post-comment .comment-head .comment-switch .second-comment { +#post-comment .comment-head #comment-switch .second-comment { color: #ff7242; } -#post-comment .comment-head .comment-switch #switch-btn { +#post-comment .comment-head #comment-switch .switch-btn { position: relative; display: inline-block; - margin: -4px 8px 0; + margin: -4px 0.4rem 0; width: 42px; height: 22px; border-radius: 34px; @@ -4226,7 +3341,7 @@ figure.highlight pre .javascript .function { -ms-transition: 0.4s; transition: 0.4s; } -#post-comment .comment-head .comment-switch #switch-btn:before { +#post-comment .comment-head #comment-switch .switch-btn:before { position: absolute; bottom: 4px; left: 4px; @@ -4241,149 +3356,63 @@ figure.highlight pre .javascript .function { -ms-transition: 0.4s; transition: 0.4s; } -#post-comment .comment-wrap > div { - -webkit-animation: tabshow 0.5s; - -moz-animation: tabshow 0.5s; - -o-animation: tabshow 0.5s; - -ms-animation: tabshow 0.5s; - animation: tabshow 0.5s; -} -#post-comment .comment-wrap > div:nth-child(2) { - display: none; -} -#post-comment.move #switch-btn { +#post-comment .comment-head #comment-switch .switch-btn.move { background-color: #ff7242; } -#post-comment.move #switch-btn:before { +#post-comment .comment-head #comment-switch .switch-btn.move:before { -webkit-transform: translateX(20px); -moz-transform: translateX(20px); -o-transform: translateX(20px); -ms-transform: translateX(20px); transform: translateX(20px); } -#post-comment.move .comment-wrap > div:first-child { +#post-comment .comment-wrap > div:nth-child(2) { display: none; } -#post-comment.move .comment-wrap > div:last-child { - display: block; -} #footer { position: relative; - background-color: #49b1f5; - background-attachment: scroll; + background: #49b1f5; + background-attachment: local; background-position: bottom; + -webkit-background-size: cover; + -moz-background-size: cover; background-size: cover; } -#footer > * { +#footer-wrap { position: relative; + padding: 2rem 1rem; color: var(--light-grey); + text-align: center; } -#footer a { +#footer-wrap a { color: var(--light-grey); - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - transition: all 0.3s ease-in-out; } -#footer a:hover { - color: #49b1f5; +#footer-wrap a:hover { + text-decoration: underline; } -#footer .footer-separator { - margin: 0 4px; +#footer-wrap .footer-separator { + margin: 0 0.2rem; } -#footer .icp-icon { +#footer-wrap .icp-icon { padding: 0 4px; + vertical-align: text-bottom; max-height: 1.4em; width: auto; - vertical-align: text-bottom; -} -#footer .footer-flex { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-orient: horizontal; - -moz-box-orient: horizontal; - -o-box-orient: horizontal; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-lines: multiple; - -moz-box-lines: multiple; - -o-box-lines: multiple; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-pack: justify; - -moz-box-pack: justify; - -o-box-pack: justify; - -ms-flex-pack: justify; - -webkit-justify-content: space-between; - justify-content: space-between; - margin: 0 auto; - padding: 40px 60px; - max-width: 1200px; - width: 100%; - text-align: left; - gap: 13px; -} -@media screen and (max-width: 768px) { - #footer .footer-flex { - padding: 30px; - gap: 10px; - } -} -#footer .footer-flex .footer-flex-items { - -webkit-flex-shrink: 0; - flex-shrink: 0; - min-width: 100px; - text-align: left; - white-space: nowrap; -} -#footer .footer-flex .footer-flex-title { - margin-bottom: 5px; - white-space: nowrap; - font-weight: 600; - font-size: 1.4em; -} -#footer .footer-flex .footer-flex-item { - margin: 10px 0; - white-space: nowrap; -} -#footer .footer-flex a { - display: block; - white-space: nowrap; -} -#footer .footer-other { - padding: 40px 20px; - width: 100%; - text-align: center; -} -#footer .footer-other .framework-info { - display: block; } #page-header { position: relative; width: 100%; background-color: #49b1f5; background-position: center center; + -webkit-background-size: cover; + -moz-background-size: cover; background-size: cover; background-repeat: no-repeat; -webkit-transition: all 0.5s; - -moz-transition: all 0.5s; - -o-transition: all 0.5s; - -ms-transition: all 0.5s; - transition: all 0.5s; -} -#page-header:not(.not-top-img):before { - position: absolute; - width: 100%; - height: 100%; - background-color: var(--mark-bg); - content: ''; + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + -ms-transition: all 0.5s; + transition: all 0.5s; } #page-header.full_page { height: 100vh; @@ -4392,14 +3421,14 @@ figure.highlight pre .javascript .function { #page-header.full_page #site-info { position: absolute; top: 43%; - padding: 0 10px; + padding: 0 0.5rem; width: 100%; } #page-header #site-title, #page-header #site-subtitle, #page-header #scroll-down .scroll-down-effects { text-align: center; - text-shadow: 2px 2px 4px rgba(0,0,0,0.15); + text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15); line-height: 1.5; } #page-header #site-title { @@ -4424,6 +3453,7 @@ figure.highlight pre .javascript .function { #page-header #site_social_icons { display: none; margin: 0 auto; + width: 15rem; text-align: center; } @media screen and (max-width: 768px) { @@ -4432,14 +3462,15 @@ figure.highlight pre .javascript .function { } } #page-header #site_social_icons .social-icon { - margin: 0 10px; + margin: 0 0.5rem; color: var(--light-grey); - text-shadow: 2px 2px 4px rgba(0,0,0,0.15); + text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15); font-size: 1.43em; + cursor: pointer; } #page-header #scroll-down { position: absolute; - bottom: 10px; + bottom: 0; width: 100%; cursor: pointer; } @@ -4447,71 +3478,75 @@ figure.highlight pre .javascript .function { position: relative; width: 100%; color: var(--light-grey); - font-size: 20px; + font-size: 30px; } #page-header.not-home-page { - height: 400px; + height: 20rem; } @media screen and (max-width: 768px) { #page-header.not-home-page { - height: 280px; + height: 14rem; } } #page-header #page-site-info { position: absolute; - top: 200px; - padding: 0 10px; + top: 10rem; + padding: 0 0.5rem; width: 100%; } @media screen and (max-width: 768px) { #page-header #page-site-info { - top: 140px; + top: 7rem; } } #page-header.post-bg { - height: 400px; + height: 20rem; } @media screen and (max-width: 768px) { #page-header.post-bg { - height: 360px; + height: 18rem; } } -#page-header #post-info { +#page-header.post-bg:before { position: absolute; + top: 0; + left: 0; + display: block; width: 100%; - bottom: 30px; + height: 100%; + background-color: rgba(0,0,0,0.5); + content: ''; } -#page-header #post-info > * { - margin: 0 auto; - padding: 0 15px; - max-width: 1200px; +#page-header #post-info { + position: absolute; + bottom: 5rem; + padding: 0 8%; + width: 100%; + text-align: center; } -@media screen and (min-width: 768px) and (max-width: 1300px) { - #page-header #post-info > * { - padding: 0 30px; +@media screen and (max-width: 900px) { + #page-header #post-info { + bottom: 1.5rem; + text-align: left; } } -@media screen and (min-width: 2000px) { - #page-header #post-info > * { - max-width: 70%; +@media screen and (max-width: 768px) { + #page-header #post-info { + bottom: 1.1rem; + padding: 0 1.1rem; } } #page-header.not-top-img { - margin-bottom: 10px; + margin-bottom: 0.5rem; height: 60px; background: 0; } -#page-header.not-top-img .title-seo { - display: none; -} #page-header.not-top-img #nav { background: rgba(255,255,255,0.8); -webkit-box-shadow: 0 5px 6px -5px rgba(133,133,133,0.6); box-shadow: 0 5px 6px -5px rgba(133,133,133,0.6); } -#page-header.not-top-img #nav a, -#page-header.not-top-img #nav span.site-page, -#page-header.not-top-img #nav .site-name { +#page-header.not-top-img #nav a { color: var(--font-color); text-shadow: none; } @@ -4519,7 +3554,7 @@ figure.highlight pre .javascript .function { position: fixed; top: -60px; z-index: 91; - background: rgba(255,255,255,0.7); + background: rgba(255,255,255,0.8); -webkit-box-shadow: 0 5px 6px -5px rgba(133,133,133,0.6); box-shadow: 0 5px 6px -5px rgba(133,133,133,0.6); -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in-out; @@ -4527,44 +3562,19 @@ figure.highlight pre .javascript .function { -o-transition: -o-transform 0.2s ease-in-out, opacity 0.2s ease-in-out; -ms-transition: -ms-transform 0.2s ease-in-out, opacity 0.2s ease-in-out; transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out; - will-change: transform; - backdrop-filter: blur(7px); -} -#page-header.nav-fixed #nav #blog-info { - color: var(--font-color); -} -#page-header.nav-fixed #nav #blog-info:hover { - color: #49b1f5; -} -#page-header.nav-fixed #nav #blog-info .site-name { - text-shadow: none; -} -#page-header.nav-fixed #nav #blog-info > a:first-child { - display: none; -} -#page-header.nav-fixed #nav #blog-info > a:last-child { - display: inline; } #page-header.nav-fixed #nav a, -#page-header.nav-fixed #nav span.site-page, +#page-header.nav-fixed #nav #site-name, #page-header.nav-fixed #nav #toggle-menu { color: var(--font-color); text-shadow: none; } #page-header.nav-fixed #nav a:hover, -#page-header.nav-fixed #nav span.site-page:hover, +#page-header.nav-fixed #nav #site-name:hover, #page-header.nav-fixed #nav #toggle-menu:hover { color: #49b1f5; } -#page-header.nav-fixed.fixed #nav { - top: 0; - -webkit-transition: all 0.5s; - -moz-transition: all 0.5s; - -o-transition: all 0.5s; - -ms-transition: all 0.5s; - transition: all 0.5s; -} -#page-header.nav-visible:not(.fixed) #nav { +#page-header.nav-visible #nav { -webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s; @@ -4576,18 +3586,7 @@ figure.highlight pre .javascript .function { -ms-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0); } -#page-header.nav-visible:not(.fixed) + .layout > .aside-content > .sticky_layout { - top: 70px; - -webkit-transition: top 0.5s; - -moz-transition: top 0.5s; - -o-transition: top 0.5s; - -ms-transition: top 0.5s; - transition: top 0.5s; -} -#page-header.fixed #nav { - position: fixed; -} -#page-header.fixed + .layout > .aside-content > .sticky_layout { +#page-header.nav-visible + .layout > .aside-content > .sticky_layout { top: 70px; -webkit-transition: top 0.5s; -moz-transition: top 0.5s; @@ -4595,19 +3594,17 @@ figure.highlight pre .javascript .function { -ms-transition: top 0.5s; transition: top 0.5s; } -#page-header.fixed + .layout #card-toc .toc-content { - max-height: calc(100vh - 170px); +.apple #page-header.full_page { + background-attachment: scroll !important; } -#page .page-title { - margin: 0 0 10px; - font-weight: bold; - font-size: 2em; +#page h1.page-title { + margin: 0.4rem 0 1rem; } #post > #post-info { - margin-bottom: 30px; + margin-bottom: 1.5rem; } #post > #post-info .post-title { - padding-bottom: 4px; + padding-bottom: 0.2rem; border-bottom: 1px solid var(--light-grey); color: var(--text-highlight-color); } @@ -4619,7 +3616,7 @@ figure.highlight pre .javascript .function { color: #78818a; } #post-info .post-title { - margin-bottom: 8px; + margin-bottom: 0.4rem; color: var(--white); font-weight: normal; font-size: 2.5em; @@ -4628,11 +3625,11 @@ figure.highlight pre .javascript .function { } @media screen and (max-width: 768px) { #post-info .post-title { - font-size: 2.1em; + font-size: 1.72em; } } #post-info .post-title .post-edit-link { - padding-left: 10px; + padding-left: 0.5rem; } #post-info #post-meta { color: var(--light-grey); @@ -4653,13 +3650,13 @@ figure.highlight pre .javascript .function { } } #post-info #post-meta .post-meta-separator { - margin: 0 5px; + margin: 0 0.25rem; } #post-info #post-meta .post-meta-icon { - margin-right: 4px; + margin-right: 0.2rem; } #post-info #post-meta .post-meta-label { - margin-right: 4px; + margin-right: 0.2rem; } #post-info #post-meta a { color: var(--light-grey); @@ -4683,6 +3680,12 @@ figure.highlight pre .javascript .function { display: -ms-flexbox; display: box; display: flex; + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -o-box-lines: multiple; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; @@ -4712,7 +3715,7 @@ figure.highlight pre .javascript .function { -ms-filter: none; filter: none; } -#nav #blog-info { +#nav #blog_name { -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; @@ -4720,35 +3723,25 @@ figure.highlight pre .javascript .function { -webkit-flex: 1; -ms-flex: 1; flex: 1; - color: var(--light-grey); -} -#nav #blog-info .site-icon { - margin-right: 6px; - height: 36px; - vertical-align: middle; -} -#nav #blog-info .nav-page-title { - display: none; } #nav #toggle-menu { display: none; - padding: 2px 0 0 6px; + padding: 0.1rem 0 0 0.3rem; vertical-align: top; } #nav #toggle-menu:hover { color: var(--white); } -#nav a, -#nav span.site-page { +#nav a { color: var(--light-grey); } -#nav a:hover, -#nav span.site-page:hover { +#nav a:hover { color: var(--white); } -#nav .site-name { - text-shadow: 2px 2px 4px rgba(0,0,0,0.15); +#nav #site-name { + text-shadow: 0.1rem 0.1rem 0.2rem rgba(0,0,0,0.15); font-weight: bold; + cursor: pointer; } #nav .menus_items { display: inline; @@ -4756,19 +3749,19 @@ figure.highlight pre .javascript .function { #nav .menus_items .menus_item { position: relative; display: inline-block; - padding: 0 0 0 14px; + padding: 0 0 0 0.7rem; } #nav .menus_items .menus_item:hover .menus_item_child { display: block; } -#nav .menus_items .menus_item:hover > span > i:last-child { - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -o-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); +#nav .menus_items .menus_item:hover i.expand { + -webkit-transform: rotate(180deg) !important; + -moz-transform: rotate(180deg) !important; + -o-transform: rotate(180deg) !important; + -ms-transform: rotate(180deg) !important; + transform: rotate(180deg) !important; } -#nav .menus_items .menus_item > span > i:last-child { +#nav .menus_items .menus_item i.expand { padding: 4px; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; @@ -4791,7 +3784,6 @@ figure.highlight pre .javascript .function { -o-animation: sub_menus 0.3s 0.1s ease both; -ms-animation: sub_menus 0.3s 0.1s ease both; animation: sub_menus 0.3s 0.1s ease both; - border-radius: 5px; } #nav .menus_items .menus_item .menus_item_child:before { position: absolute; @@ -4807,17 +3799,9 @@ figure.highlight pre .javascript .function { #nav .menus_items .menus_item .menus_item_child li:hover { background: var(--text-bg-hover); } -#nav .menus_items .menus_item .menus_item_child li:first-child { - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} -#nav .menus_items .menus_item .menus_item_child li:last-child { - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} #nav .menus_items .menus_item .menus_item_child li a { display: inline-block; - padding: 8px 16px; + padding: 0.3rem 0.7rem; width: 100%; color: var(--font-color) !important; text-shadow: none !important; @@ -4829,19 +3813,24 @@ figure.highlight pre .javascript .function { font-size: inherit; } #nav.hide-menu .menus_items { - display: none; + position: absolute; + left: 0; + visibility: hidden; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); } -#nav.hide-menu #search-button span:not(.site-page) { - display: none; +#nav.hide-menu #search-button span { + display: none !important; } #nav #search-button { display: inline; - padding: 0 0 0 14px; + padding: 0 0 0 0.7rem; } #nav .site-page { position: relative; - padding-bottom: 6px; - text-shadow: 1px 1px 2px rgba(0,0,0,0.3); + padding-bottom: 0.3rem; + text-shadow: 0.05rem 0.05rem 0.1rem rgba(0,0,0,0.3); font-size: 0.78em; cursor: pointer; } @@ -4859,371 +3848,177 @@ figure.highlight pre .javascript .function { -o-transition: all 0.3s ease-in-out; -ms-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; - border-radius: 6px; } #nav .site-page:not(.child):hover:after { width: 100%; } -#nav .nav-page-title { - position: relative; +#pagination { overflow: hidden; -} -#nav .nav-page-title > :first-child, -#nav .nav-page-title > :last-child { - display: inline-block; - -webkit-transition: all 0.3s ease-in-out; - -moz-transition: all 0.3s ease-in-out; - -o-transition: all 0.3s ease-in-out; - -ms-transition: all 0.3s ease-in-out; - transition: all 0.3s ease-in-out; -} -#nav .nav-page-title > :last-child { - position: absolute; - top: 50%; - left: 0; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateY(-50%) translateY(-10px); - -moz-transform: translateY(-50%) translateY(-10px); - -o-transform: translateY(-50%) translateY(-10px); - -ms-transform: translateY(-50%) translateY(-10px); - transform: translateY(-50%) translateY(-10px); -} -#nav .nav-page-title:hover > :last-child { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translateY(-50%) translateY(0); - -moz-transform: translateY(-50%) translateY(0); - -o-transform: translateY(-50%) translateY(0); - -ms-transform: translateY(-50%) translateY(0); - transform: translateY(-50%) translateY(0); -} -#nav .nav-page-title:hover > :first-child { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translateY(10px); - -moz-transform: translateY(10px); - -o-transform: translateY(10px); - -ms-transform: translateY(10px); - transform: translateY(10px); + margin-top: 1rem; + width: 100%; } #pagination .pagination { - margin-top: 20px; text-align: center; } +#pagination .page-number { + display: inline-block; + margin: 0 0.2rem; + min-width: 1.2rem; + height: 1.2rem; + text-align: center; + line-height: 1.2rem; + cursor: pointer; +} #pagination .page-number.current { background: #00c4b6; color: var(--white); + cursor: default; } -#pagination .full-width { - width: 100% !important; -} -#pagination .pagination-related { - height: 150px; -} -@media screen and (min-width: 768px) { - #pagination .pagination-related { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - } -} -#pagination .pagination-related .info-1 .info-item-2 { - -webkit-line-clamp: 1; -} -#pagination .pagination-related .info-2 .info-item-1 { - -webkit-line-clamp: 2; -} -#pagination.pagination-post { - overflow: hidden; - margin-top: 40px; +#pagination img.prev-cover, +#pagination img.next-cover { + position: absolute; width: 100%; - border-radius: 6px; - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; -} -@media screen and (max-width: 768px) { - #pagination.pagination-post { - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - -o-box-orient: vertical; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - } -} -.layout .pagination > * { - display: inline-block; - margin: 0 6px; - width: 2.5em; - height: 2.5em; - line-height: 2.5em; -} -.layout .pagination > *:not(.space):hover { - background: var(--btn-hover-color); - color: var(--btn-color); -} -#archive .pagination { - margin-top: 30px; -} -#archive .pagination > *:not(.space) { - -webkit-box-shadow: none; - box-shadow: none; -} -.pagination-related { - position: relative; - display: inline-block; - overflow: hidden; - background: #000; - vertical-align: bottom; -} -.pagination-related.next-post .info { - text-align: right; -} -.pagination-related .info .info-1, -.pagination-related .info .info-2 { - padding: 20px 40px; - color: var(--white); - -webkit-transition: -webkit-transform 0.3s, opacity 0.3s; - -moz-transition: -moz-transform 0.3s, opacity 0.3s; - -o-transition: -o-transform 0.3s, opacity 0.3s; - -ms-transition: -ms-transform 0.3s, opacity 0.3s; - transition: transform 0.3s, opacity 0.3s; -} -.pagination-related .info .info-1 .info-item-1 { - color: var(--light-grey); - text-transform: uppercase; - font-size: 90%; -} -.pagination-related .info .info-1 .info-item-2 { - color: var(--white); - font-weight: 500; -} -.pagination-related .info .info-2 { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); -} -.pagination-related:not(.no-desc):hover .info-1 { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: translate(0, -100%); - -moz-transform: translate(0, -100%); - -o-transform: translate(0, -100%); - -ms-transform: translate(0, -100%); - transform: translate(0, -100%); + height: 100%; + opacity: 0.4; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; + filter: alpha(opacity=40); + -webkit-transition: all 0.6s; + -moz-transition: all 0.6s; + -o-transition: all 0.6s; + -ms-transition: all 0.6s; + transition: all 0.6s; + object-fit: cover; } -.pagination-related:not(.no-desc):hover .info-2 { - opacity: 1; - -ms-filter: none; - filter: none; +#pagination .pagination-info { + position: absolute; + top: 50%; + padding: 1rem 2rem; + width: 100%; -webkit-transform: translate(0, -50%); -moz-transform: translate(0, -50%); -o-transform: translate(0, -50%); -ms-transform: translate(0, -50%); transform: translate(0, -50%); } -.container { - word-wrap: break-word; - overflow-wrap: break-word; -} -.container a { - color: #49b1f5; -} -.container a:hover { - text-decoration: underline; -} -.container img { - display: block; - margin: 0 auto 20px; - max-width: 100%; - -webkit-transition: filter 375ms ease-in 0.2s; - -moz-transition: filter 375ms ease-in 0.2s; - -o-transition: filter 375ms ease-in 0.2s; - -ms-transition: filter 375ms ease-in 0.2s; - transition: filter 375ms ease-in 0.2s; - border-radius: 6px; -} -.container p { - margin: 0 0 16px; -} -.container iframe { - margin: 0 0 20px; -} -.container kbd { - margin: 0 3px; - padding: 3px 5px; - border: 1px solid #b4b4b4; - background-color: #f8f8f8; - -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 2px 1px 0 rgba(255,255,255,0.6) inset; - box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 2px 1px 0 rgba(255,255,255,0.6) inset; - color: #34495e; - white-space: nowrap; - font-weight: 600; - font-size: 0.9em; - font-family: Monaco, 'Ubuntu Mono', monospace; - line-height: 1em; - border-radius: 3px; -} -.container ol ol, -.container ul ol, -.container ol ul, -.container ul ul { - padding-left: 20px; -} -.container ol li, -.container ul li { - margin: 4px 0; -} -.container ol p, -.container ul p { - margin: 0 0 8px; -} -.container > :last-child { - margin-bottom: 0 !important; -} -.container hr { - margin: 20px 0; -} -.container h1, -.container h2, -.container h3, -.container h4, -.container h5, -.container h6 { - -webkit-transition: all 0.2s ease-out; - -moz-transition: all 0.2s ease-out; - -o-transition: all 0.2s ease-out; - -ms-transition: all 0.2s ease-out; - transition: all 0.2s ease-out; -} -.container h1:before, -.container h2:before, -.container h3:before, -.container h4:before, -.container h5:before, -.container h6:before { - position: absolute; - top: calc(50% - 7px); - left: 0; - color: #f47466; - content: '\f0c1'; - line-height: 1; - -webkit-transition: all 0.2s ease-out; - -moz-transition: all 0.2s ease-out; - -o-transition: all 0.2s ease-out; - -ms-transition: all 0.2s ease-out; - transition: all 0.2s ease-out; -} -.container h1:hover:before, -.container h2:hover:before, -.container h3:hover:before, -.container h4:hover:before, -.container h5:hover:before, -.container h6:hover:before { - color: #49b1f5; -} -.container h1 { - padding-left: 28px; -} -.container h1:before { - font-size: 18px; -} -.container h1:hover { - padding-left: 32px; +#pagination .prev_info, +#pagination .next_info { + color: var(--white); + font-weight: 500; } -.container h2 { - padding-left: 26px; +#pagination .next-post .pagination-info { + text-align: right; } -.container h2:before { - font-size: 16px; +#pagination .pull-full { + width: 100% !important; } -.container h2:hover { - padding-left: 30px; +#pagination .prev-post .label, +#pagination .next-post .label { + color: var(--light-grey); + text-transform: uppercase; + font-size: 90%; } -.container h3 { - padding-left: 24px; +#pagination .prev-post, +#pagination .next-post { + width: 50%; } -.container h3:before { - font-size: 14px; +@media screen and (max-width: 768px) { + #pagination .prev-post, + #pagination .next-post { + width: 100%; + } } -.container h3:hover { - padding-left: 28px; +#pagination .prev-post a, +#pagination .next-post a { + position: relative; + display: block; + overflow: hidden; + height: 150px; } -.container h4 { - padding-left: 22px; +#pagination .prev-post:hover img.prev-cover, +#pagination .next-post:hover img.prev-cover, +#pagination .prev-post:hover img.next-cover, +#pagination .next-post:hover img.next-cover { + opacity: 0.8; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; + filter: alpha(opacity=80); + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); } -.container h4:before { - font-size: 12px; +#pagination.pagination-post { + margin-top: 2rem; + background: #000; } -.container h4:hover { - padding-left: 26px; +#article-container { + word-wrap: break-word; + overflow-wrap: break-word; } -.container h5 { - padding-left: 20px; +#article-container a { + color: #49b1f5; } -.container h5:before { - font-size: 10px; +#article-container a:hover { + text-decoration: underline; } -.container h5:hover { - padding-left: 24px; +#article-container img { + display: block; + margin: 0 auto 0.8rem; } -.container h6 { - padding-left: 20px; +#article-container p { + margin: 0 0 0.8rem; } -.container h6:before { - font-size: 10px; +#article-container iframe { + margin: 0 0 1rem; } -.container h6:hover { - padding-left: 24px; +#article-container kbd { + margin: 0 3px; + padding: 3px 5px; + border: 1px solid #b4b4b4; + border-radius: 3px; + background-color: #f8f8f8; + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 2px 1px 0 rgba(255,255,255,0.6) inset; + box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 2px 1px 0 rgba(255,255,255,0.6) inset; + color: #34495e; + white-space: nowrap; + font-weight: 600; + font-size: 0.9em; + font-family: Monaco, 'Ubuntu Mono', monospace; + line-height: 1em; } -.container ol p, -.container ul p { - margin: 0 0 8px; +#article-container ol, +#article-container ul { + margin-top: 0.4rem; } -.container li::marker { - color: #49b1f5; - font-weight: 600; - font-size: 1.05em; +#article-container ol p, +#article-container ul p { + margin: 0 0 0.5rem; } -.container li:hover::marker { - color: var(--pseudo-hover); +#article-container ol ol, +#article-container ul ol, +#article-container ol ul, +#article-container ul ul { + padding-left: 0.5rem; } -.container ul > li { - list-style-type: circle; +#article-container ol li, +#article-container ul li { + position: relative; + margin: 0.3rem 0; + padding-left: 0.3rem; } -#post .tag_share:after { - display: block; - clear: both; - content: ''; +#article-container > :last-child { + margin-bottom: 0 !important; } #post .tag_share .post-meta__tag-list { display: inline-block; } #post .tag_share .post-meta__tags { display: inline-block; - margin: 8px 8px 8px 0; - padding: 0 12px; + margin: 0.4rem 0.4rem 0.4rem 0; + padding: 0 0.6rem; width: fit-content; border: 1px solid #49b1f5; - border-radius: 12px; + border-radius: 0.6rem; color: #49b1f5; font-size: 0.85em; -webkit-transition: all 0.2s ease-in-out; @@ -5236,16 +4031,16 @@ figure.highlight pre .javascript .function { background: #49b1f5; color: var(--white); } -#post .tag_share .post-share { +#post .tag_share .post_share { display: inline-block; float: right; - margin: 8px 0 0; + margin: 0.4rem 0; width: fit-content; } -#post .tag_share .post-share .social-share { +#post .tag_share .post_share .social-share { font-size: 0.85em; } -#post .tag_share .post-share .social-share .social-share-icon { +#post .tag_share .post_share .social-share .social-share-icon { margin: 0 4px; width: 1.85em; height: 1.85em; @@ -5254,23 +4049,22 @@ figure.highlight pre .javascript .function { } #post .post-copyright { position: relative; - margin: 40px 0 10px; - padding: 10px 16px; + margin: 2rem 0 0.5rem; + padding: 0.5rem 0.8rem; border: 1px solid var(--light-grey); -webkit-transition: box-shadow 0.3s ease-in-out; -moz-transition: box-shadow 0.3s ease-in-out; -o-transition: box-shadow 0.3s ease-in-out; -ms-transition: box-shadow 0.3s ease-in-out; transition: box-shadow 0.3s ease-in-out; - border-radius: 6px; } #post .post-copyright:before { position: absolute; - top: 2px; - right: 12px; + top: 0.1rem; + right: 0.6rem; color: #49b1f5; content: '\f1f9'; - font-size: 1.3em; + font-size: 1rem; } #post .post-copyright:hover { -webkit-box-shadow: 0 0 8px 0 rgba(232,237,250,0.6), 0 2px 4px 0 rgba(232,237,250,0.5); @@ -5280,11 +4074,8 @@ figure.highlight pre .javascript .function { color: #49b1f5; font-weight: bold; } -#post .post-copyright .post-copyright-meta i { - margin-right: 3px; -} #post .post-copyright .post-copyright-info { - padding-left: 6px; + padding-left: 0.3rem; } #post .post-copyright .post-copyright-info a { text-decoration: underline; @@ -5293,20 +4084,17 @@ figure.highlight pre .javascript .function { #post .post-copyright .post-copyright-info a:hover { text-decoration: none; } -#post #post-outdate-notice { +#post .post-outdate-notice { position: relative; - margin: 0 0 20px; + margin: 0 0 1rem; padding: 0.5em 1.2em; + border-radius: 3px; background-color: #ffe6e6; color: #f66; - border-radius: 3px; padding: 0.5em 1em 0.5em 2.6em; border-left: 5px solid #ff8080; } -#post #post-outdate-notice .num { - padding: 0 4px; -} -#post #post-outdate-notice:before { +#post .post-outdate-notice:before { position: absolute; top: 50%; left: 0.9em; @@ -5319,82 +4107,115 @@ figure.highlight pre .javascript .function { transform: translateY(-50%); } #post .ads-wrap { - margin: 40px 0; + margin: 2rem 0; } .relatedPosts { - margin-top: 40px; + margin-top: 2rem; } .relatedPosts > .headline { margin-bottom: 5px; font-weight: 700; font-size: 1.43em; } -.relatedPosts > .relatedPosts-list > a { +.relatedPosts > .relatedPosts-list > div { + position: relative; + display: inline-block; + overflow: hidden; margin: 3px; width: calc(33.333% - 6px); height: 200px; - border-radius: 6px; + background: #000; + vertical-align: bottom; +} +.relatedPosts > .relatedPosts-list > div:hover .cover { + opacity: 0.8; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; + filter: alpha(opacity=80); + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -o-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); } @media screen and (max-width: 768px) { - .relatedPosts > .relatedPosts-list > a { + .relatedPosts > .relatedPosts-list > div { margin: 2px; width: calc(50% - 4px); height: 150px; } } @media screen and (max-width: 600px) { - .relatedPosts > .relatedPosts-list > a { + .relatedPosts > .relatedPosts-list > div { width: calc(100% - 4px); } } -.relatedPosts > .relatedPosts-list .info .info-1 .info-item-2 { - -webkit-line-clamp: 2; +.relatedPosts > .relatedPosts-list .cover { + width: 100%; + height: 100%; + opacity: 0.4; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; + filter: alpha(opacity=40); + -webkit-transition: all 0.6s; + -moz-transition: all 0.6s; + -o-transition: all 0.6s; + -ms-transition: all 0.6s; + transition: all 0.6s; + object-fit: cover; } -.relatedPosts > .relatedPosts-list .info .info-2 .info-item-1 { - -webkit-line-clamp: 3; +.relatedPosts > .relatedPosts-list .content { + position: absolute; + top: 50%; + padding: 0 1rem; + width: 100%; + -webkit-transform: translate(0, -50%); + -moz-transform: translate(0, -50%); + -o-transform: translate(0, -50%); + -ms-transform: translate(0, -50%); + transform: translate(0, -50%); +} +.relatedPosts > .relatedPosts-list .content .date { + color: var(--light-grey); + font-size: 90%; +} +.relatedPosts > .relatedPosts-list .content .title { + color: var(--white); + -webkit-line-clamp: 2; } .post-reward { position: relative; - margin-top: 80px; + margin-top: 4rem; width: 100%; text-align: center; - pointer-events: none; -} -.post-reward > * { - pointer-events: auto; } .post-reward .reward-button { display: inline-block; - padding: 4px 24px; + padding: 0.2rem 1.2rem; background: var(--btn-bg); color: var(--btn-color); cursor: pointer; - border-radius: 6px; -} -.post-reward .reward-button i { - margin-right: 5px; - vertical-align: baseline; -} -.post-reward:hover .reward-button { - background: var(--btn-hover-color); + -webkit-transition: all 0.4s; + -moz-transition: all 0.4s; + -o-transition: all 0.4s; + -ms-transition: all 0.4s; + transition: all 0.4s; } .post-reward:hover > .reward-main { display: block; } .post-reward .reward-main { position: absolute; - bottom: 50px; + bottom: 40px; left: 0; z-index: 100; display: none; padding: 0 0 15px; width: 100%; - border-radius: 6px; } .post-reward .reward-main .reward-all { display: inline-block; margin: 0; - padding: 20px 10px; + padding: 1rem 0.5rem; + border-radius: 4px; background: var(--reward-pop); } .post-reward .reward-main .reward-all:before { @@ -5429,12 +4250,13 @@ figure.highlight pre .javascript .function { height: 130px; } .post-reward .reward-main .reward-all .reward-item .post-qr-code-desc { + padding-top: 0.4rem; width: 130px; color: #858585; } #rightside { position: fixed; - right: -48px; + right: -38px; bottom: 40px; z-index: 100; opacity: 0; @@ -5446,70 +4268,40 @@ figure.highlight pre .javascript .function { -ms-transition: all 0.5s; transition: all 0.5s; } -#rightside.rightside-show { - opacity: 0.8; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; - filter: alpha(opacity=80); - -webkit-transform: translate(-58px, 0); - -moz-transform: translate(-58px, 0); - -o-transform: translate(-58px, 0); - -ms-transform: translate(-58px, 0); - transform: translate(-58px, 0); -} #rightside #rightside-config-hide { - height: 0; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); -webkit-transition: -webkit-transform 0.4s; -moz-transition: -moz-transform 0.4s; -o-transition: -o-transform 0.4s; -ms-transition: -ms-transform 0.4s; transition: transform 0.4s; - -webkit-transform: translate(45px, 0); - -moz-transform: translate(45px, 0); - -o-transform: translate(45px, 0); - -ms-transform: translate(45px, 0); - transform: translate(45px, 0); + -webkit-transform: translate(35px, 0); + -moz-transform: translate(35px, 0); + -o-transform: translate(35px, 0); + -ms-transform: translate(35px, 0); + transform: translate(35px, 0); } #rightside #rightside-config-hide.show { - height: auto; - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: translate(0, 0); - -moz-transform: translate(0, 0); - -o-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); -} -#rightside #rightside-config-hide.status { - height: auto; - opacity: 1; - -ms-filter: none; - filter: none; + -webkit-transform: translate(0, 0) !important; + -moz-transform: translate(0, 0) !important; + -o-transform: translate(0, 0) !important; + -ms-transform: translate(0, 0) !important; + transform: translate(0, 0) !important; } #rightside > div > button, #rightside > div > a { display: block; - margin-bottom: 5px; - width: 35px; - height: 35px; + margin-bottom: 2px; + width: 30px; + height: 30px; background-color: var(--btn-bg); color: var(--btn-color); text-align: center; font-size: 16px; - line-height: 35px; - border-radius: 5px; } #rightside > div > button:hover, #rightside > div > a:hover { background-color: var(--btn-hover-color); } -#rightside > div > button i, -#rightside > div > a i { - vertical-align: baseline; -} #rightside #mobile-toc-button { display: none; } @@ -5523,94 +4315,6 @@ figure.highlight pre .javascript .function { display: none; } } -@-moz-keyframes fadeInScale { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: scale(0.8); - -moz-transform: scale(0.8); - -o-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} -@-webkit-keyframes fadeInScale { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: scale(0.8); - -moz-transform: scale(0.8); - -o-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} -@-o-keyframes fadeInScale { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: scale(0.8); - -moz-transform: scale(0.8); - -o-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} -@keyframes fadeInScale { - from { - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: scale(0.8); - -moz-transform: scale(0.8); - -o-transform: scale(0.8); - -ms-transform: scale(0.8); - transform: scale(0.8); - } - to { - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: scale(1); - -moz-transform: scale(1); - -o-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } -} #sidebar #menu-mask { position: fixed; z-index: 102; @@ -5622,12 +4326,11 @@ figure.highlight pre .javascript .function { #sidebar #sidebar-menus { position: fixed; top: 0; - right: -330px; + right: -300px; z-index: 103; overflow-x: hidden; - overflow-y: scroll; - padding-left: 5px; - width: 330px; + overflow-y: auto; + width: 300px; height: 100%; background: var(--sidebar-bg); -webkit-transition: all 0.5s; @@ -5644,121 +4347,64 @@ figure.highlight pre .javascript .function { transform: translate3d(-100%, 0, 0); } #sidebar #sidebar-menus > .avatar-img { - margin: 20px auto; + margin: 1rem auto; } #sidebar #sidebar-menus .site-data { - padding: 0 10px; + display: table; + padding: 0 0.5rem; + width: 100%; + table-layout: fixed; +} +#sidebar #sidebar-menus .site-data .data-item { + display: table-cell; +} +#sidebar #sidebar-menus .site-data .data-item .data-item-link .length-num { + color: var(--text-highlight-color); + font-size: 1.28em; +} +#sidebar #sidebar-menus .site-data .data-item .data-item-link .headline { + color: var(--font-color); } #sidebar #sidebar-menus hr { - margin: 20px auto; + margin: 1rem auto; } #sidebar #sidebar-menus .menus_items { - margin: 20px; - padding: 15px; - background: var(--sidebar-menu-bg); - -webkit-box-shadow: 0 0 1px 1px rgba(7,17,27,0.05); - box-shadow: 0 0 1px 1px rgba(7,17,27,0.05); - border-radius: 10px; + padding: 0 0.5rem 2rem; } #sidebar #sidebar-menus .menus_items .site-page { position: relative; display: block; - margin: 4px 0; - padding: 2px 23px 2px 15px; + padding: 0.3rem 1.5rem 0.3rem 1.1rem; color: var(--font-color); font-size: 1.15em; - cursor: pointer; - border-radius: 6px; } #sidebar #sidebar-menus .menus_items .site-page:hover { background: var(--text-bg-hover); - -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.1); - box-shadow: 0 2px 8px rgba(0,0,0,0.1); - color: var(--white); - -webkit-transition: all 0.2s ease; - -moz-transition: all 0.2s ease; - -o-transition: all 0.2s ease; - -ms-transition: all 0.2s ease; - transition: all 0.2s ease; - -webkit-transform: translateX(3px); - -moz-transform: translateX(3px); - -o-transform: translateX(3px); - -ms-transform: translateX(3px); - transform: translateX(3px); } #sidebar #sidebar-menus .menus_items .site-page i:first-child { width: 15%; text-align: left; } -#sidebar #sidebar-menus .menus_items .site-page.group > i:last-child { +#sidebar #sidebar-menus .menus_items .expand { position: absolute; - top: 0.6em; - right: 10px; + top: 0.78em; + right: 0.9rem; -webkit-transition: -webkit-transform 0.3s; -moz-transition: -moz-transform 0.3s; -o-transition: -o-transform 0.3s; -ms-transition: -ms-transform 0.3s; transition: transform 0.3s; } -#sidebar #sidebar-menus .menus_items .site-page.group.hide > i:last-child { - -webkit-transform: rotate(90deg); - -moz-transform: rotate(90deg); - -o-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -#sidebar #sidebar-menus .menus_items .site-page.group.hide + .menus_item_child { - overflow: hidden; - max-height: 0; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transform: scaleY(0); - -moz-transform: scaleY(0); - -o-transform: scaleY(0); - -ms-transform: scaleY(0); - transform: scaleY(0); - -webkit-transform-origin: top; - -moz-transform-origin: top; - -o-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; +#sidebar #sidebar-menus .menus_items .expand.hide { + -webkit-transform: rotate(90deg) !important; + -moz-transform: rotate(90deg) !important; + -o-transform: rotate(90deg) !important; + -ms-transform: rotate(90deg) !important; + transform: rotate(90deg) !important; } #sidebar #sidebar-menus .menus_items .menus_item_child { margin: 0; - padding-left: 25px; - max-height: 0; list-style: none; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transition: -webkit-transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease; - -moz-transition: -moz-transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease; - -o-transition: -o-transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease; - -ms-transition: -ms-transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease; - transition: transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease; - -webkit-transform: scaleY(0); - -moz-transform: scaleY(0); - -o-transform: scaleY(0); - -ms-transform: scaleY(0); - transform: scaleY(0); - -webkit-transform-origin: top; - -moz-transform-origin: top; - -o-transform-origin: top; - -ms-transform-origin: top; - transform-origin: top; - will-change: transform, opacity, max-height; -} -#sidebar #sidebar-menus .site-page.group:not(.hide) + .menus_item_child { - max-height: 1000px; - opacity: 1; - -ms-filter: none; - filter: none; - -webkit-transform: scaleY(1); - -moz-transform: scaleY(1); - -o-transform: scaleY(1); - -ms-transform: scaleY(1); - transform: scaleY(1); } #vcomment { font-size: 1.1em; @@ -5793,12 +4439,21 @@ figure.highlight pre .javascript .function { --waline-font-size: 1.1em; --waline-theme-color: #49b1f5; --waline-active-color: #ff7242; + --waline-avatar-size: 2.75rem; } -#waline-wrap .wl-comment-actions > button:not(last-child) { - padding-right: 4px; +#waline-wrap .vuser { + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + -ms-transition: all 0.5s; + transition: all 0.5s; } -.twikoo .tk-content p { - margin: 3px 0; +#waline-wrap .vuser:hover { + -webkit-transform: rotate(360deg); + -moz-transform: rotate(360deg); + -o-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); } .fireworks { position: fixed; @@ -5814,166 +4469,180 @@ figure.highlight pre .javascript .function { .medium-zoom-overlay { z-index: 99999 !important; } +.mermaid { + overflow: auto; + margin: 0 0 1rem; + background: #fff; + text-align: center; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; +} +.mermaid[data-processed] { + opacity: 1; + -ms-filter: none; + filter: none; +} .utterances, .fb-comments iframe { width: 100% !important; } #gitalk-container .gt-meta { margin: 0 0 0.8em; - padding: 6px 0 16px; + padding: 0.3rem 0 0.8em; +} +.katex-wrap { + overflow: auto; +} +.katex-wrap::-webkit-scrollbar { + display: none; +} +mjx-container[display], +.has-jax { + overflow-x: auto; + overflow-y: hidden; } .aplayer { color: #4c4948; } -.container .aplayer { - margin: 0 0 20px; +#article-container .aplayer { + margin: 0 0 1rem; } -.container .aplayer ol, -.container .aplayer ul { - margin: 0; - padding: 0; +#article-container .btn-center { + margin: 0 0 1rem; + text-align: center; } -.container .aplayer ol li, -.container .aplayer ul li { - margin: 0; - padding: 0 15px; +#article-container .btn-beautify { + display: inline-block; + margin: 0 0.2rem 0.3rem; + padding: 0 1rem; + background-color: #777; + color: #fff; + line-height: 2; } -.container .aplayer ol li:before, -.container .aplayer ul li:before { - content: none; +#article-container .btn-beautify i + span { + margin-left: 0.3rem; } -.snackbar-container.snackbar-css { - border-radius: 5px; - opacity: 0.85 !important; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)" !important; - filter: alpha(opacity=85) !important; +#article-container .btn-beautify:not(.block) + .btn-beautify:not(.block) { + margin: 0 0.2rem 1rem; } -.abc-music-sheet { - margin: 0 0 20px; - opacity: 0; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - -webkit-transition: opacity 0.3s; - -moz-transition: opacity 0.3s; - -o-transition: opacity 0.3s; - -ms-transition: opacity 0.3s; - transition: opacity 0.3s; +#article-container .btn-beautify.block { + display: block; + margin: 0 0 1rem; + width: fit-content; + width: -moz-fit-content; } -.abc-music-sheet.abcjs-container { - opacity: 1; - -ms-filter: none; - filter: none; +#article-container .btn-beautify.block.center { + margin: 0 auto 1rem; } -@media screen and (max-width: 768px) { - .fancybox__toolbar__column.is-middle { - display: none; - } +#article-container .btn-beautify.block.right { + margin: 0 0 1rem auto; } -.container .btn-center { - margin: 0 0 20px; - text-align: center; +#article-container .btn-beautify.larger { + padding: 0.3rem 1.3rem; } -.container .btn-beautify { - display: inline-block; - margin: 0 4px 6px; - padding: 0 15px; - background-color: var(--btn-beautify-color, var(--btn-default-color)); - color: var(--btn-color, #fff); - vertical-align: top; - line-height: 2; - border-radius: 6px; +#article-container .btn-beautify:hover { + text-decoration: none; } -.container .btn-beautify.blue { - --btn-beautify-color: var(--tags-blue-color); +#article-container .btn-beautify.blue { + background-color: #428bca; } -.container .btn-beautify.pink { - --btn-beautify-color: var(--tags-pink-color); +#article-container .btn-beautify.pink { + background-color: #ff69b4; } -.container .btn-beautify.red { - --btn-beautify-color: var(--tags-red-color); +#article-container .btn-beautify.red { + background-color: #f00; } -.container .btn-beautify.purple { - --btn-beautify-color: var(--tags-purple-color); +#article-container .btn-beautify.purple { + background-color: #6f42c1; } -.container .btn-beautify.orange { - --btn-beautify-color: var(--tags-orange-color); +#article-container .btn-beautify.orange { + background-color: #ff8c00; } -.container .btn-beautify.green { - --btn-beautify-color: var(--tags-green-color); +#article-container .btn-beautify.green { + background-color: #5cb85c; +} +#article-container .btn-beautify.outline { + border: 1px solid transparent; + border-color: #777; + background-color: transparent; + color: #777; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; +} +#article-container .btn-beautify.outline.button--animated:before { + background: #777; +} +#article-container .btn-beautify.outline:hover { + color: #fff !important; +} +#article-container .btn-beautify.outline.blue { + border-color: #428bca; + color: #428bca; +} +#article-container .btn-beautify.outline.blue.button--animated:before { + background: #428bca; +} +#article-container .btn-beautify.outline.pink { + border-color: #ff69b4; + color: #ff69b4; +} +#article-container .btn-beautify.outline.pink.button--animated:before { + background: #ff69b4; +} +#article-container .btn-beautify.outline.red { + border-color: #f00; + color: #f00; } -.container .btn-beautify:hover { - background-color: var(--btn-hover-color); +#article-container .btn-beautify.outline.red.button--animated:before { + background: #f00; } -.container .btn-beautify:not(.block) + .btn-beautify:not(.block) { - margin: 0 4px 20px; +#article-container .btn-beautify.outline.purple { + border-color: #6f42c1; + color: #6f42c1; } -.container .btn-beautify.block { - display: block; - margin: 0 0 20px; - width: fit-content; - width: -moz-fit-content; +#article-container .btn-beautify.outline.purple.button--animated:before { + background: #6f42c1; } -.container .btn-beautify.block.center { - margin: 0 auto 20px; +#article-container .btn-beautify.outline.orange { + border-color: #ff8c00; + color: #ff8c00; } -.container .btn-beautify.block.right { - margin: 0 0 20px auto; +#article-container .btn-beautify.outline.orange.button--animated:before { + background: #ff8c00; } -.container .btn-beautify.larger { - padding: 6px 15px; +#article-container .btn-beautify.outline.green { + border-color: #5cb85c; + color: #5cb85c; } -.container .btn-beautify.outline { - border: 1px solid transparent; - border-color: var(--btn-beautify-color, var(--btn-default-color)); - background-color: transparent; - color: var(--btn-beautify-color, var(--btn-default-color)); -} -.container .btn-beautify.outline i, -.container .btn-beautify.outline span { - -webkit-transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -moz-transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -o-transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); - -ms-transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); - transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} -.container .btn-beautify.outline::before { - background: -webkit-linear-gradient(0deg, transparent, rgba(0,0,0,0.1), transparent); - background: -moz-linear-gradient(0deg, transparent, rgba(0,0,0,0.1), transparent); - background: -o-linear-gradient(0deg, transparent, rgba(0,0,0,0.1), transparent); - background: -ms-linear-gradient(0deg, transparent, rgba(0,0,0,0.1), transparent); - background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent); -} -.container .btn-beautify.outline:hover { - border-color: var(--btn-beautify-color, var(--btn-default-color)); - background-color: var(--btn-beautify-color, var(--btn-default-color)); - color: var(--btn-color) !important; -} -.container .btn-beautify.outline:hover i, -.container .btn-beautify.outline:hover span { - color: var(--btn-color); +#article-container .btn-beautify.outline.green.button--animated:before { + background: #5cb85c; } -.container figure.gallery-group { +figure.gallery-group { position: relative; float: left; overflow: hidden; - margin: 6px 4px; - width: calc(50% - 8px); + margin: 0.3rem 0.2rem; + width: calc(50% - 0.4rem); height: 250px; - border-radius: 10px; + border-radius: 8px; background: #000; -webkit-transform: translate3d(0, 0, 0); } @media screen and (max-width: 600px) { - .container figure.gallery-group { - width: calc(100% - 8px); + figure.gallery-group { + width: calc(100% - 0.4rem); } } -@media screen and (min-width: 1024px) { - .container figure.gallery-group { - width: calc(100% / 3 - 8px); - } -} -.container figure.gallery-group:hover img { +figure.gallery-group:hover img { opacity: 0.4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); @@ -5983,14 +4652,14 @@ figure.highlight pre .javascript .function { -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -.container figure.gallery-group:hover .gallery-group-name::after { +figure.gallery-group:hover .gallery-group-name::after { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -.container figure.gallery-group:hover p { +figure.gallery-group:hover p { opacity: 1; -ms-filter: none; filter: none; @@ -6000,9 +4669,9 @@ figure.highlight pre .javascript .function { -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } -.container figure.gallery-group img { +figure.gallery-group img { position: relative; - margin: 0; + margin: 0 !important; max-width: none; width: calc(100% + 20px); height: 250px; @@ -6013,11 +4682,11 @@ figure.highlight pre .javascript .function { opacity: 0.8; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter: alpha(opacity=80); - -webkit-transition: all 0.3s, filter 375ms ease-in 0.2s; - -moz-transition: all 0.3s, filter 375ms ease-in 0.2s; - -o-transition: all 0.3s, filter 375ms ease-in 0.2s; - -ms-transition: all 0.3s, filter 375ms ease-in 0.2s; - transition: all 0.3s, filter 375ms ease-in 0.2s; + -webkit-transition: opacity 0.35s, -webkit-transform 0.35s; + -moz-transition: opacity 0.35s, -moz-transform 0.35s; + -o-transition: opacity 0.35s, -o-transform 0.35s; + -ms-transition: opacity 0.35s, -ms-transform 0.35s; + transition: opacity 0.35s, transform 0.35s; -webkit-transform: translate3d(-10px, 0, 0); -moz-transform: translate3d(-10px, 0, 0); -o-transform: translate3d(-10px, 0, 0); @@ -6025,11 +4694,11 @@ figure.highlight pre .javascript .function { transform: translate3d(-10px, 0, 0); object-fit: cover; } -.container figure.gallery-group figcaption { +figure.gallery-group figcaption { position: absolute; top: 0; left: 0; - padding: 30px; + padding: 1.5rem; width: 100%; height: 100%; color: #fff; @@ -6039,7 +4708,7 @@ figure.highlight pre .javascript .function { -ms-backface-visibility: hidden; backface-visibility: hidden; } -.container figure.gallery-group figcaption > a { +figure.gallery-group figcaption > a { position: absolute; top: 0; right: 0; @@ -6050,9 +4719,9 @@ figure.highlight pre .javascript .function { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } -.container figure.gallery-group p { +figure.gallery-group p { margin: 0; - padding: 8px 0 0; + padding: 0.4rem 0 0; letter-spacing: 1px; font-size: 1.1em; line-height: 1.5; @@ -6071,16 +4740,16 @@ figure.highlight pre .javascript .function { transform: translate3d(100%, 0, 0); -webkit-line-clamp: 4; } -.container figure.gallery-group .gallery-group-name { +figure.gallery-group .gallery-group-name { position: relative; margin: 0; - padding: 8px 0; + padding: 0.4rem 0; font-weight: bold; font-size: 1.65em; line-height: 1.5; -webkit-line-clamp: 2; } -.container figure.gallery-group .gallery-group-name:after { +figure.gallery-group .gallery-group-name:after { position: absolute; bottom: 0; left: 0; @@ -6099,425 +4768,24 @@ figure.highlight pre .javascript .function { -ms-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } -.container .gallery-group-main { +.gallery-group-main { overflow: auto; - padding: 0 0 16px; + padding: 0 0 0.8rem; } -.container .gallery-container { - margin: 0 0 20px; - text-align: center; +.justified-gallery { + margin: 0 0 0.8rem; +} +.justified-gallery img { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } -.container .gallery-container.loaded { - opacity: 1; - -ms-filter: none; - filter: none; -} -.container .gallery-container img { - display: initial; - margin: 0; - width: 100%; - height: 100%; -} -.container .gallery-container .gallery-data { +.justified-gallery .img-alt { display: none; } -.container .gallery-container button { - margin-top: 25px; - padding: 8px 14px; - background: var(--btn-bg); - color: var(--btn-color); - font-weight: bold; - font-size: 1.1em; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; - border-radius: 5px; -} -.container .gallery-container button:hover { - background: var(--btn-hover-color); -} -.container .gallery-container button:hover i { - margin-left: 8px; -} -.container .gallery-container button i { - margin-left: 4px; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; -} -.container .loading-container { - display: inline-block; - overflow: hidden; - width: 154px; - height: 154px; -} -.container .loading-container .loading-item { - position: relative; - width: 100%; - height: 100%; - -webkit-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -ms-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-transform: translateZ(0) scale(1); - -moz-transform: translateZ(0) scale(1); - -o-transform: translateZ(0) scale(1); - -ms-transform: translateZ(0) scale(1); - transform: translateZ(0) scale(1); - -webkit-transform-origin: 0 0; - -moz-transform-origin: 0 0; - -o-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; -} -.container .loading-container .loading-item div { - position: absolute; - width: 30.8px; - height: 30.8px; - border-radius: 50%; - background: #e15b64; - -webkit-transform: translate(61.6px, 61.6px) scale(1); - -moz-transform: translate(61.6px, 61.6px) scale(1); - -o-transform: translate(61.6px, 61.6px) scale(1); - -ms-transform: translate(61.6px, 61.6px) scale(1); - transform: translate(61.6px, 61.6px) scale(1); - -webkit-animation: loading-ball 1.92s infinite cubic-bezier(0, 0.5, 0.5, 1); - -moz-animation: loading-ball 1.92s infinite cubic-bezier(0, 0.5, 0.5, 1); - -o-animation: loading-ball 1.92s infinite cubic-bezier(0, 0.5, 0.5, 1); - -ms-animation: loading-ball 1.92s infinite cubic-bezier(0, 0.5, 0.5, 1); - animation: loading-ball 1.92s infinite cubic-bezier(0, 0.5, 0.5, 1); -} -.container .loading-container .loading-item div:nth-child(1) { - background: #f47e60; - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - -webkit-animation: loading-ball-r 0.48s infinite cubic-bezier(0, 0.5, 0.5, 1), loading-ball-c 1.92s infinite step-start; - -moz-animation: loading-ball-r 0.48s infinite cubic-bezier(0, 0.5, 0.5, 1), loading-ball-c 1.92s infinite step-start; - -o-animation: loading-ball-r 0.48s infinite cubic-bezier(0, 0.5, 0.5, 1), loading-ball-c 1.92s infinite step-start; - -ms-animation: loading-ball-r 0.48s infinite cubic-bezier(0, 0.5, 0.5, 1), loading-ball-c 1.92s infinite step-start; - animation: loading-ball-r 0.48s infinite cubic-bezier(0, 0.5, 0.5, 1), loading-ball-c 1.92s infinite step-start; -} -.container .loading-container .loading-item div:nth-child(2) { - background: #e15b64; - -webkit-animation-delay: -0.48s; - -moz-animation-delay: -0.48s; - -o-animation-delay: -0.48s; - -ms-animation-delay: -0.48s; - animation-delay: -0.48s; -} -.container .loading-container .loading-item div:nth-child(3) { - background: #f47e60; - -webkit-animation-delay: -0.96s; - -moz-animation-delay: -0.96s; - -o-animation-delay: -0.96s; - -ms-animation-delay: -0.96s; - animation-delay: -0.96s; -} -.container .loading-container .loading-item div:nth-child(4) { - background: #f8b26a; - -webkit-animation-delay: -1.44s; - -moz-animation-delay: -1.44s; - -o-animation-delay: -1.44s; - -ms-animation-delay: -1.44s; - animation-delay: -1.44s; -} -.container .loading-container .loading-item div:nth-child(5) { - background: #abbd81; - -webkit-animation-delay: -1.92s; - -moz-animation-delay: -1.92s; - -o-animation-delay: -1.92s; - -ms-animation-delay: -1.92s; - animation-delay: -1.92s; -} -@-moz-keyframes loading-ball { - 0% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 25% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 50% { - -webkit-transform: translate(9.24px, 61.6px) scale(1); - -moz-transform: translate(9.24px, 61.6px) scale(1); - -o-transform: translate(9.24px, 61.6px) scale(1); - -ms-transform: translate(9.24px, 61.6px) scale(1); - transform: translate(9.24px, 61.6px) scale(1); - } - 75% { - -webkit-transform: translate(61.6px, 61.6px) scale(1); - -moz-transform: translate(61.6px, 61.6px) scale(1); - -o-transform: translate(61.6px, 61.6px) scale(1); - -ms-transform: translate(61.6px, 61.6px) scale(1); - transform: translate(61.6px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } -} -@-webkit-keyframes loading-ball { - 0% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 25% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 50% { - -webkit-transform: translate(9.24px, 61.6px) scale(1); - -moz-transform: translate(9.24px, 61.6px) scale(1); - -o-transform: translate(9.24px, 61.6px) scale(1); - -ms-transform: translate(9.24px, 61.6px) scale(1); - transform: translate(9.24px, 61.6px) scale(1); - } - 75% { - -webkit-transform: translate(61.6px, 61.6px) scale(1); - -moz-transform: translate(61.6px, 61.6px) scale(1); - -o-transform: translate(61.6px, 61.6px) scale(1); - -ms-transform: translate(61.6px, 61.6px) scale(1); - transform: translate(61.6px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } -} -@-o-keyframes loading-ball { - 0% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 25% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 50% { - -webkit-transform: translate(9.24px, 61.6px) scale(1); - -moz-transform: translate(9.24px, 61.6px) scale(1); - -o-transform: translate(9.24px, 61.6px) scale(1); - -ms-transform: translate(9.24px, 61.6px) scale(1); - transform: translate(9.24px, 61.6px) scale(1); - } - 75% { - -webkit-transform: translate(61.6px, 61.6px) scale(1); - -moz-transform: translate(61.6px, 61.6px) scale(1); - -o-transform: translate(61.6px, 61.6px) scale(1); - -ms-transform: translate(61.6px, 61.6px) scale(1); - transform: translate(61.6px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } -} -@keyframes loading-ball { - 0% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 25% { - -webkit-transform: translate(9.24px, 61.6px) scale(0); - -moz-transform: translate(9.24px, 61.6px) scale(0); - -o-transform: translate(9.24px, 61.6px) scale(0); - -ms-transform: translate(9.24px, 61.6px) scale(0); - transform: translate(9.24px, 61.6px) scale(0); - } - 50% { - -webkit-transform: translate(9.24px, 61.6px) scale(1); - -moz-transform: translate(9.24px, 61.6px) scale(1); - -o-transform: translate(9.24px, 61.6px) scale(1); - -ms-transform: translate(9.24px, 61.6px) scale(1); - transform: translate(9.24px, 61.6px) scale(1); - } - 75% { - -webkit-transform: translate(61.6px, 61.6px) scale(1); - -moz-transform: translate(61.6px, 61.6px) scale(1); - -o-transform: translate(61.6px, 61.6px) scale(1); - -ms-transform: translate(61.6px, 61.6px) scale(1); - transform: translate(61.6px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } -} -@-moz-keyframes loading-ball-r { - 0% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(0); - -moz-transform: translate(113.96px, 61.6px) scale(0); - -o-transform: translate(113.96px, 61.6px) scale(0); - -ms-transform: translate(113.96px, 61.6px) scale(0); - transform: translate(113.96px, 61.6px) scale(0); - } -} -@-webkit-keyframes loading-ball-r { - 0% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(0); - -moz-transform: translate(113.96px, 61.6px) scale(0); - -o-transform: translate(113.96px, 61.6px) scale(0); - -ms-transform: translate(113.96px, 61.6px) scale(0); - transform: translate(113.96px, 61.6px) scale(0); - } -} -@-o-keyframes loading-ball-r { - 0% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(0); - -moz-transform: translate(113.96px, 61.6px) scale(0); - -o-transform: translate(113.96px, 61.6px) scale(0); - -ms-transform: translate(113.96px, 61.6px) scale(0); - transform: translate(113.96px, 61.6px) scale(0); - } -} -@keyframes loading-ball-r { - 0% { - -webkit-transform: translate(113.96px, 61.6px) scale(1); - -moz-transform: translate(113.96px, 61.6px) scale(1); - -o-transform: translate(113.96px, 61.6px) scale(1); - -ms-transform: translate(113.96px, 61.6px) scale(1); - transform: translate(113.96px, 61.6px) scale(1); - } - 100% { - -webkit-transform: translate(113.96px, 61.6px) scale(0); - -moz-transform: translate(113.96px, 61.6px) scale(0); - -o-transform: translate(113.96px, 61.6px) scale(0); - -ms-transform: translate(113.96px, 61.6px) scale(0); - transform: translate(113.96px, 61.6px) scale(0); - } -} -@-moz-keyframes loading-ball-c { - 0% { - background: #e15b64; - } - 25% { - background: #abbd81; - } - 50% { - background: #f8b26a; - } - 75% { - background: #f47e60; - } - 100% { - background: #e15b64; - } -} -@-webkit-keyframes loading-ball-c { - 0% { - background: #e15b64; - } - 25% { - background: #abbd81; - } - 50% { - background: #f8b26a; - } - 75% { - background: #f47e60; - } - 100% { - background: #e15b64; - } -} -@-o-keyframes loading-ball-c { - 0% { - background: #e15b64; - } - 25% { - background: #abbd81; - } - 50% { - background: #f8b26a; - } - 75% { - background: #f47e60; - } - 100% { - background: #e15b64; - } -} -@keyframes loading-ball-c { - 0% { - background: #e15b64; - } - 25% { - background: #abbd81; - } - 50% { - background: #f8b26a; - } - 75% { - background: #f47e60; - } - 100% { - background: #e15b64; - } +.justified-gallery .fancybox { + width: auto; + text-align: inherit; } blockquote.pullquote { position: relative; @@ -6530,12 +4798,12 @@ blockquote.pullquote.left { } blockquote.pullquote.right { float: right; - margin: 1em 0 0 0.5em; + margin: 1em 0 0 0.5rem; } .video-container { position: relative; overflow: hidden; - margin-bottom: 16px; + margin-bottom: 0.8rem; padding-top: 56.25%; height: 0; } @@ -6550,14 +4818,9 @@ blockquote.pullquote.right { .hide-inline > .hide-button, .hide-block > .hide-button { display: inline-block; - padding: 5px 18px; + padding: 0.3rem 1rem; background: #49b1f5; color: var(--white); - border-radius: 6px; -} -.hide-inline > .hide-button:hover, -.hide-block > .hide-button:hover { - background-color: var(--btn-hover-color); } .hide-inline > .hide-button.open, .hide-block > .hide-button.open { @@ -6576,30 +4839,47 @@ blockquote.pullquote.right { display: none; } .hide-inline > .hide-button { - margin: 0 6px; + margin: 0 0.3rem; } .hide-inline > .hide-content { - margin: 0 6px; + margin: 0 0.3rem; } .hide-block { - margin: 0 0 16px; + margin: 0 0 0.8rem; } -.toggle { - margin-bottom: 20px; +.hide-toggle { + margin-bottom: 1rem; border: 1px solid #f0f0f0; - border-radius: 5px; - overflow: hidden; } -.toggle > .toggle-button { - padding: 6px 15px; +.hide-toggle > .hide-button { + padding: 0.3rem 0.5rem; background: #f0f0f0; color: #1f2d3d; cursor: pointer; } -.toggle > .toggle-content { - margin: 30px 24px; +.hide-toggle > .hide-button > i { + font-size: 1.2em; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -ms-transition: all 0.3s; + transition: all 0.3s; +} +.hide-toggle > .hide-button.open i { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.hide-toggle > .hide-button.open + div { + display: block; +} +.hide-toggle > .hide-content { + display: none; + margin: 1.5rem 1.2rem; } -.container .inline-img { +#article-container .inline-img { display: inline; margin: 0 3px; height: 1.1em; @@ -6607,137 +4887,137 @@ blockquote.pullquote.right { } .hl-label { padding: 2px 4px; - color: var(--btn-color, #fff); border-radius: 3px; + color: #fff; } .hl-label.default { - background-color: var(--btn-default-color); + background-color: #777; } .hl-label.blue { - background-color: var(--tags-blue-color); + background-color: #428bca; } .hl-label.pink { - background-color: var(--tags-pink-color); + background-color: #ff69b4; } .hl-label.red { - background-color: var(--tags-red-color); + background-color: #f00; } .hl-label.purple { - background-color: var(--tags-purple-color); + background-color: #6f42c1; } .hl-label.orange { - background-color: var(--tags-orange-color); + background-color: #ff8c00; } .hl-label.green { - background-color: var(--tags-green-color); + background-color: #5cb85c; } .note { position: relative; - margin: 0 0 20px; + margin: 0 0 1rem; padding: 15px; border-radius: 3px; } -.note.icon-padding { - padding-left: 3em; +.note.icon { + padding-left: 2.25rem; } .note > .note-icon { position: absolute; - top: calc(50% - 0.5em); - left: 0.8em; + top: calc(50% - 0.4rem); + left: 0.7rem; font-size: larger; } .note.blue:not(.disabled) { - border-left-color: var(--tags-blue-color) !important; + border-left-color: #428bca !important; } .note.blue:not(.disabled).modern { border-left-color: transparent !important; - color: var(--tags-blue-color); + color: #428bca; } .note.blue:not(.disabled):not(.simple) { - background: var(--tags-blue-color-lighten); + background: #e3eef7 !important; } .note.blue > .note-icon { - color: var(--tags-blue-color); + color: #428bca; } .note.pink:not(.disabled) { - border-left-color: var(--tags-pink-color) !important; + border-left-color: #ff69b4 !important; } .note.pink:not(.disabled).modern { border-left-color: transparent !important; - color: var(--tags-pink-color); + color: #ff69b4; } .note.pink:not(.disabled):not(.simple) { - background: var(--tags-pink-color-lighten); + background: #ffe9f4 !important; } .note.pink > .note-icon { - color: var(--tags-pink-color); + color: #ff69b4; } .note.red:not(.disabled) { - border-left-color: var(--tags-red-color) !important; + border-left-color: #f00 !important; } .note.red:not(.disabled).modern { border-left-color: transparent !important; - color: var(--tags-red-color); + color: #f00; } .note.red:not(.disabled):not(.simple) { - background: var(--tags-red-color-lighten); + background: #ffd9d9 !important; } .note.red > .note-icon { - color: var(--tags-red-color); + color: #f00; } .note.purple:not(.disabled) { - border-left-color: var(--tags-purple-color) !important; + border-left-color: #6f42c1 !important; } .note.purple:not(.disabled).modern { border-left-color: transparent !important; - color: var(--tags-purple-color); + color: #6f42c1; } .note.purple:not(.disabled):not(.simple) { - background: var(--tags-purple-color-lighten); + background: #e9e3f6 !important; } .note.purple > .note-icon { - color: var(--tags-purple-color); + color: #6f42c1; } .note.orange:not(.disabled) { - border-left-color: var(--tags-orange-color) !important; + border-left-color: #ff8c00 !important; } .note.orange:not(.disabled).modern { border-left-color: transparent !important; - color: var(--tags-orange-color); + color: #ff8c00; } .note.orange:not(.disabled):not(.simple) { - background: var(--tags-orange-color-lighten); + background: #ffeed9 !important; } .note.orange > .note-icon { - color: var(--tags-orange-color); + color: #ff8c00; } .note.green:not(.disabled) { - border-left-color: var(--tags-green-color) !important; + border-left-color: #5cb85c !important; } .note.green:not(.disabled).modern { border-left-color: transparent !important; - color: var(--tags-green-color); + color: #5cb85c; } .note.green:not(.disabled):not(.simple) { - background: var(--tags-green-color-lighten); + background: #e7f4e7 !important; } .note.green > .note-icon { - color: var(--tags-green-color); + color: #5cb85c; } .note.simple { - border: 1px solid var(--note-default-border); + border: 1px solid #eee; border-left-width: 5px; } .note.modern { border: 1px solid transparent !important; - background-color: var(--note-modern-default-bg); - color: var(--note-modern-default-text); + background-color: #f5f5f5; + color: #4c4948; } .note.flat { border: initial; - border-left: 5px solid var(--note-default-border); - background-color: var(--note-default-bg); - color: var(--note-default-text); + border-left: 5px solid #eee; + background-color: #f9f9f9; + color: #4c4948; } .note h2, .note h3, @@ -6767,217 +5047,203 @@ blockquote.pullquote.right { .note img:last-child { margin-bottom: 0 !important; } -.note .img-alt { - margin: 5px 0 10px; -} .note:not(.no-icon) { - padding-left: 3em; + padding-left: 2.25rem; } .note:not(.no-icon)::before { position: absolute; - top: calc(50% - 0.95em); - left: 0.8em; + top: calc(50% - 0.8rem); + left: 0.7rem; font-size: larger; } .note.default.flat { - background: var(--note-default-bg); - color: var(--font-color); + background: #f7f7f7; } .note.default.modern { - border-color: var(--note-modern-default-border) !important; - background: var(--note-modern-default-bg); - color: var(--note-modern-default-text); + border-color: #e1e1e1; + background: #f3f3f3; + color: #666; } .note.default.modern a:not(.btn) { - color: var(--note-modern-default-text); + color: #666; } .note.default.modern a:not(.btn):hover { - color: var(--note-modern-default-hover); + color: #454545; } .note.default:not(.modern) { - border-left-color: var(--note-default-border); + border-left-color: #777; } .note.default:not(.modern) h2, .note.default:not(.modern) h3, .note.default:not(.modern) h4, .note.default:not(.modern) h5, .note.default:not(.modern) h6 { - color: var(--note-default-text); + color: #777; } .note.default:not(.no-icon)::before { content: '\f0a9'; } .note.default:not(.no-icon):not(.modern)::before { - color: var(--note-default-text); + color: #777; } .note.primary.flat { - background: var(--note-primary-bg); - color: var(--font-color); + background: #f5f0fa; } .note.primary.modern { - border-color: var(--note-modern-primary-border) !important; - background: var(--note-modern-primary-bg); - color: var(--note-modern-primary-text); + border-color: #e1c2ff; + background: #f3daff; + color: #6f42c1; } .note.primary.modern a:not(.btn) { - color: var(--note-modern-primary-text); + color: #6f42c1; } .note.primary.modern a:not(.btn):hover { - color: var(--note-modern-primary-hover); + color: #453298; } .note.primary:not(.modern) { - border-left-color: var(--note-primary-border); + border-left-color: #6f42c1; } .note.primary:not(.modern) h2, .note.primary:not(.modern) h3, .note.primary:not(.modern) h4, .note.primary:not(.modern) h5, .note.primary:not(.modern) h6 { - color: var(--note-primary-text); + color: #6f42c1; } .note.primary:not(.no-icon)::before { content: '\f055'; } .note.primary:not(.no-icon):not(.modern)::before { - color: var(--note-primary-text); + color: #6f42c1; } .note.info.flat { - background: var(--note-info-bg); - color: var(--font-color); + background: #eef7fa; } .note.info.modern { - border-color: var(--note-modern-info-border) !important; - background: var(--note-modern-info-bg); - color: var(--note-modern-info-text); + border-color: #b3e5ef; + background: #d9edf7; + color: #31708f; } .note.info.modern a:not(.btn) { - color: var(--note-modern-info-text); + color: #31708f; } .note.info.modern a:not(.btn):hover { - color: var(--note-modern-info-hover); + color: #215761; } .note.info:not(.modern) { - border-left-color: var(--note-info-border); + border-left-color: #428bca; } .note.info:not(.modern) h2, .note.info:not(.modern) h3, .note.info:not(.modern) h4, .note.info:not(.modern) h5, .note.info:not(.modern) h6 { - color: var(--note-info-text); + color: #428bca; } .note.info:not(.no-icon)::before { content: '\f05a'; } .note.info:not(.no-icon):not(.modern)::before { - color: var(--note-info-text); + color: #428bca; } .note.success.flat { - background: var(--note-success-bg); - color: var(--font-color); + background: #eff8f0; } .note.success.modern { - border-color: var(--note-modern-success-border) !important; - background: var(--note-modern-success-bg); - color: var(--note-modern-success-text); + border-color: #d0e6be; + background: #dff0d8; + color: #3c763d; } .note.success.modern a:not(.btn) { - color: var(--note-modern-success-text); + color: #3c763d; } .note.success.modern a:not(.btn):hover { - color: var(--note-modern-success-hover); + color: #32562c; } .note.success:not(.modern) { - border-left-color: var(--note-success-border); + border-left-color: #5cb85c; } .note.success:not(.modern) h2, .note.success:not(.modern) h3, .note.success:not(.modern) h4, .note.success:not(.modern) h5, .note.success:not(.modern) h6 { - color: var(--note-success-text); + color: #5cb85c; } .note.success:not(.no-icon)::before { content: '\f058'; } .note.success:not(.no-icon):not(.modern)::before { - color: var(--note-success-text); + color: #5cb85c; } .note.warning.flat { - background: var(--note-warning-bg); - color: var(--font-color); + background: #fdf8ea; } .note.warning.modern { - border-color: var(--note-modern-warning-border) !important; - background: var(--note-modern-warning-bg); - color: var(--note-modern-warning-text); + border-color: #fae4cd; + background: #fcf4e3; + color: #8a6d3b; } .note.warning.modern a:not(.btn) { - color: var(--note-modern-warning-text); + color: #8a6d3b; } .note.warning.modern a:not(.btn):hover { - color: var(--note-modern-warning-hover); + color: #714f30; } .note.warning:not(.modern) { - border-left-color: var(--note-warning-border); + border-left-color: #f0ad4e; } .note.warning:not(.modern) h2, .note.warning:not(.modern) h3, .note.warning:not(.modern) h4, .note.warning:not(.modern) h5, .note.warning:not(.modern) h6 { - color: var(--note-warning-text); + color: #f0ad4e; } .note.warning:not(.no-icon)::before { content: '\f06a'; } .note.warning:not(.no-icon):not(.modern)::before { - color: var(--note-warning-text); + color: #f0ad4e; } .note.danger.flat { - background: var(--note-danger-bg); - color: var(--font-color); + background: #fcf1f2; } .note.danger.modern { - border-color: var(--note-modern-danger-border) !important; - background: var(--note-modern-danger-bg); - color: var(--note-modern-danger-text); + border-color: #ebcdd2; + background: #f2dfdf; + color: #a94442; } .note.danger.modern a:not(.btn) { - color: var(--note-modern-danger-text); + color: #a94442; } .note.danger.modern a:not(.btn):hover { - color: var(--note-modern-danger-hover); + color: #84333f; } .note.danger:not(.modern) { - border-left-color: var(--note-danger-border); + border-left-color: #d9534f; } .note.danger:not(.modern) h2, .note.danger:not(.modern) h3, .note.danger:not(.modern) h4, .note.danger:not(.modern) h5, .note.danger:not(.modern) h6 { - color: var(--note-danger-text); + color: #d9534f; } .note.danger:not(.no-icon)::before { content: '\f056'; } .note.danger:not(.no-icon):not(.modern)::before { - color: var(--note-danger-text); + color: #d9534f; } -.container .series-items a:hover { - color: var(--pseudo-hover); -} -.container .tabs { +#article-container .tabs { position: relative; - margin: 0 0 20px; + margin: 0 0 1rem; border-right: 1px solid var(--tab-border-color); border-bottom: 1px solid var(--tab-border-color); border-left: 1px solid var(--tab-border-color); - border-radius: 6px; - overflow: hidden; } -.container .tabs > .nav-tabs { +#article-container .tabs > .nav-tabs { display: -webkit-box; display: -moz-box; display: -webkit-flex; @@ -6992,20 +5258,31 @@ blockquote.pullquote.right { flex-wrap: wrap; margin: 0; padding: 0; - background: var(--tab-button-bg); + background: var(--tab-botton-bg); } -.container .tabs > .nav-tabs > .tab { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - -ms-box-flex: 1; - box-flex: 1; - -webkit-flex-grow: 1; - flex-grow: 1; - padding: 8px 18px; +#article-container .tabs > .nav-tabs > .tab { + margin: 0; + padding: 0; + list-style: none; +} +@media screen and (max-width: 768px) { + #article-container .tabs > .nav-tabs > .tab { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + -ms-box-flex: 1; + box-flex: 1; + -webkit-flex-grow: 1; + flex-grow: 1; + } +} +#article-container .tabs > .nav-tabs > .tab button { + display: block; + padding: 0.5rem 1rem; + width: 100%; border-top: 2px solid var(--tab-border-color); - background: var(--tab-button-bg); - color: var(--tab-button-color); + background: var(--tab-botton-bg); + color: var(--tab-botton-color); line-height: 2; -webkit-transition: all 0.4s; -moz-transition: all 0.4s; @@ -7013,32 +5290,29 @@ blockquote.pullquote.right { -ms-transition: all 0.4s; transition: all 0.4s; } -.container .tabs > .nav-tabs > .tab i { +#article-container .tabs > .nav-tabs > .tab button i { width: 1.5em; } -.container .tabs > .nav-tabs > .tab.active { +#article-container .tabs > .nav-tabs > .tab.active button { border-top: 2px solid #49b1f5; background: var(--tab-button-active-bg); cursor: default; } -.container .tabs > .nav-tabs > .tab:not(.active):hover { +#article-container .tabs > .nav-tabs > .tab:not(.active) button:hover { border-top: 2px solid var(--tab-button-hover-bg); background: var(--tab-button-hover-bg); } -.container .tabs > .nav-tabs.no-default ~ .tab-to-top { - display: none; -} -.container .tabs > .tab-contents .tab-item-content { +#article-container .tabs > .tab-contents .tab-item-content { position: relative; display: none; - padding: 36px 24px 10px; + padding: 1.8rem 1.2rem; } @media screen and (max-width: 768px) { - .container .tabs > .tab-contents .tab-item-content { - padding: 24px 14px; + #article-container .tabs > .tab-contents .tab-item-content { + padding: 1.2rem 0.7rem; } } -.container .tabs > .tab-contents .tab-item-content.active { +#article-container .tabs > .tab-contents .tab-item-content.active { display: block; -webkit-animation: tabshow 0.5s; -moz-animation: tabshow 0.5s; @@ -7046,20 +5320,12 @@ blockquote.pullquote.right { -ms-animation: tabshow 0.5s; animation: tabshow 0.5s; } -.container .tabs > .tab-contents .tab-item-content > :last-child { - margin-bottom: 0; -} -.container .tabs > .tab-to-top { - padding: 0 16px 10px 0; - width: 100%; - text-align: right; -} -.container .tabs > .tab-to-top button { +#article-container .tabs .tab-to-top { + position: relative; + display: block; + margin: 0 0 0 auto; color: #99a9bf; } -.container .tabs > .tab-to-top button:hover { - color: #49b1f5; -} @-moz-keyframes tabshow { 0% { -webkit-transform: translateY(15px); @@ -7124,93 +5390,6 @@ blockquote.pullquote.right { transform: translateY(0); } } -.container .timeline { - margin: 0 10px 20px; - padding: 14px 0 5px 20px; - border-left: 2px solid var(--timeline-color, #49b1f5); -} -.container .timeline.blue { - --timeline-color: #428bca; - --timeline-bg: rgba(66,139,202, 0.2); -} -.container .timeline.pink { - --timeline-color: #ff69b4; - --timeline-bg: rgba(255,105,180, 0.2); -} -.container .timeline.red { - --timeline-color: #f00; - --timeline-bg: rgba(255,0,0, 0.2); -} -.container .timeline.purple { - --timeline-color: #6f42c1; - --timeline-bg: rgba(111,66,193, 0.2); -} -.container .timeline.orange { - --timeline-color: #ff8c00; - --timeline-bg: rgba(255,140,0, 0.2); -} -.container .timeline.green { - --timeline-color: #5cb85c; - --timeline-bg: rgba(92,184,92, 0.2); -} -.container .timeline .timeline-item { - margin: 0 0 15px; -} -.container .timeline .timeline-item:hover .item-circle:before { - border-color: var(--timeline-color, #49b1f5); -} -.container .timeline .timeline-item.headline .timeline-item-title .item-circle > p { - font-weight: 600; - font-size: 1.2em; -} -.container .timeline .timeline-item.headline .timeline-item-title .item-circle:before { - left: -28px; - border: 4px solid var(--timeline-color, #49b1f5); -} -.container .timeline .timeline-item.headline:hover .item-circle:before { - border-color: var(--pseudo-hover); -} -.container .timeline .timeline-item .timeline-item-title { - position: relative; -} -.container .timeline .timeline-item .item-circle:before { - position: absolute; - top: 50%; - left: -27px; - width: 6px; - height: 6px; - border: 3px solid var(--pseudo-hover); - border-radius: 50%; - background: var(--card-bg); - content: ''; - -webkit-transition: all 0.3s; - -moz-transition: all 0.3s; - -o-transition: all 0.3s; - -ms-transition: all 0.3s; - transition: all 0.3s; - -webkit-transform: translate(0, -50%); - -moz-transform: translate(0, -50%); - -o-transform: translate(0, -50%); - -ms-transform: translate(0, -50%); - transform: translate(0, -50%); -} -.container .timeline .timeline-item .item-circle > p { - margin: 0 0 8px; - font-weight: 500; -} -.container .timeline .timeline-item .timeline-item-content { - position: relative; - padding: 12px 15px; - border-radius: 8px; - background: var(--timeline-bg, #e4f3fd); - font-size: 0.93em; -} -.container .timeline .timeline-item .timeline-item-content > :last-child { - margin-bottom: 0; -} -.container .timeline + .timeline { - margin-top: -20px; -} [data-theme='dark'] { --global-bg: #0d0d0d; --font-color: rgba(255,255,255,0.7); @@ -7218,108 +5397,62 @@ blockquote.pullquote.right { --hr-before-color: rgba(255,255,255,0.7); --search-bg: #121212; --search-input-color: rgba(255,255,255,0.7); - --search-a-color: rgba(255,255,255,0.7); + --search-result-title: rgba(255,255,255,0.9); --preloader-bg: #0d0d0d; --preloader-color: rgba(255,255,255,0.7); --tab-border-color: #2c2c2c; - --tab-button-bg: #2c2c2c; - --tab-button-color: rgba(255,255,255,0.7); + --tab-botton-bg: #2c2c2c; + --tab-botton-color: rgba(255,255,255,0.7); --tab-button-hover-bg: #383838; --tab-button-active-bg: #121212; --card-bg: #121212; --sidebar-bg: #121212; - --sidebar-menu-bg: #1f1f1f; --btn-hover-color: #787878; --btn-color: rgba(255,255,255,0.7); --btn-bg: #1f1f1f; --text-bg-hover: #383838; --light-grey: rgba(255,255,255,0.7); - --dark-grey: rgba(255,255,255,0.2); --white: rgba(255,255,255,0.9); --text-highlight-color: rgba(255,255,255,0.9); --blockquote-color: rgba(255,255,255,0.7); --blockquote-bg: #2c2c2c; --reward-pop: #2c2c2c; --toc-link-color: rgba(255,255,255,0.6); - --scrollbar-color: #525252; - --timeline-bg: #1f1f1f; - --zoom-bg: #121212; - --mark-bg: rgba(0,0,0,0.6); - --btn-color: #ccc; - --btn-default-color: #929292; - --tags-blue-color: #3e6f98; - --tags-blue-color-lighten: rgba(66,139,202,0.15); - --tags-pink-color: #dd3c8c; - --tags-pink-color-lighten: rgba(255,105,180,0.15); - --tags-red-color: #a41b1b; - --tags-red-color-lighten: rgba(255,0,0,0.15); - --tags-orange-color: #a76a20; - --tags-orange-color-lighten: rgba(255,140,0,0.15); - --tags-purple-color: #5f4490; - --tags-purple-color-lighten: rgba(111,66,193,0.15); - --tags-green-color: #4f8e4f; - --tags-green-color-lighten: rgba(92,184,92,0.15); - --note-default-border: #5a5a5a; - --note-default-bg: #2b2b2b; - --note-default-text: #b3b3b3; - --note-modern-default-border: #9a9a9a; - --note-modern-default-bg: #353535; - --note-modern-default-text: #c4c4c4; - --note-primary-border: #5935a1; - --note-primary-bg: #2e1c3e; - --note-primary-text: #a47dd4; - --note-modern-primary-border: #9985cc; - --note-modern-primary-bg: #3c2d4c; - --note-modern-primary-text: #b693e6; - --note-info-border: #346fa2; - --note-info-bg: #1f2e3b; - --note-info-text: #7bb3db; - --note-modern-info-border: #7ca8b5; - --note-modern-info-bg: #2b3c44; - --note-modern-info-text: #8fc6e0; - --note-success-border: #4a944a; - --note-success-bg: #202e20; - --note-success-text: #82c682; - --note-modern-success-border: #8bb087; - --note-modern-success-bg: #2c3d2c; - --note-modern-success-text: #96d196; - --note-warning-border: #c08a3e; - --note-warning-bg: #3e301f; - --note-warning-text: #e6ba6b; - --note-modern-warning-border: #b8a285; - --note-modern-warning-bg: #4b3c2b; - --note-modern-warning-text: #d4b373; - --note-danger-border: #b34440; - --note-danger-bg: #3b201f; - --note-danger-text: #e67572; - --note-modern-danger-border: #c7898c; - --note-modern-danger-bg: #4d2b2e; - --note-modern-danger-text: #d98b8e; -} -[data-theme='dark'] #web_bg:before { + --hl-color: rgba(255,255,255,0.7); + --hl-bg: #171717; + --hltools-bg: #1a1a1a; + --hltools-color: #90a4ae; + --hlnumber-bg: #171717; + --hlnumber-color: rgba(255,255,255,0.4); + --hlscrollbar-bg: #1f1f1f; + --hlexpand-bg: linear-gradient(180deg, rgba(23,23,23,0.6), rgba(23,23,23,0.9)); +} +[data-theme='dark'] #web_bg:before, +[data-theme='dark'] #footer:before, +[data-theme='dark'] #page-header:before { position: absolute; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); content: ''; } -[data-theme='dark'] .container code { +[data-theme='dark'] #article-container code { background: #2c2c2c; } -[data-theme='dark'] .container pre > code { +[data-theme='dark'] #article-container pre > code { background: #171717; } -[data-theme='dark'] .container figure.highlight { +[data-theme='dark'] #article-container figure.highlight { -webkit-box-shadow: none; box-shadow: none; } -[data-theme='dark'] .container .note code { +[data-theme='dark'] #article-container .note code { background: rgba(27,31,35,0.05); } -[data-theme='dark'] .container .aplayer { +[data-theme='dark'] #article-container .aplayer { filter: brightness(0.8); } -[data-theme='dark'] .container kbd { +[data-theme='dark'] #article-container kbd { border-color: #696969; background-color: #525252; color: #e2f1ff; @@ -7330,19 +5463,24 @@ blockquote.pullquote.right { -webkit-box-shadow: 0 5px 6px -5px rgba(133,133,133,0); box-shadow: 0 5px 6px -5px rgba(133,133,133,0); } -[data-theme='dark'] #post-comment .comment-switch #switch-btn { +[data-theme='dark'] #post-comment #comment-switch .switch-btn { + filter: brightness(0.8); +} +[data-theme='dark'] .note { filter: brightness(0.8); } [data-theme='dark'] .hide-button, -[data-theme='dark'] #post-outdate-notice, +[data-theme='dark'] .btn-beautify, +[data-theme='dark'] .mermaid, +[data-theme='dark'] .hl-label, +[data-theme='dark'] .post-outdate-notice, [data-theme='dark'] .error-img, -[data-theme='dark'] .container iframe, +[data-theme='dark'] #article-container iframe, [data-theme='dark'] .gist, -[data-theme='dark'] .ads-wrap, -[data-theme='dark'] .tag-cloud-list > a { +[data-theme='dark'] .ads-wrap { filter: brightness(0.8); } -[data-theme='dark'] img:not(.cover) { +[data-theme='dark'] img { filter: brightness(0.8); } [data-theme='dark'] #aside-content .aside-list > .aside-list-item:not(:last-child) { @@ -7354,23 +5492,21 @@ blockquote.pullquote.right { [data-theme='dark'] #gitalk-container svg { fill: rgba(255,255,255,0.9) !important; } -[data-theme='dark'] #disqusjs #dsqjs:hover, -[data-theme='dark'] #disqusjs #dsqjs:focus, -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-tab-active, -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-no-comment { +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-tab-active, +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-no-comment { color: rgba(255,255,255,0.7); } -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-order-label { +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-order-label { background-color: #1f1f1f; } -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-post-body { +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-post-body { color: rgba(255,255,255,0.7); } -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-post-body code, -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-post-body pre { +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-post-body code, +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-post-body pre { background: #2c2c2c; } -[data-theme='dark'] #disqusjs #dsqjs .dsqjs-post-body blockquote { +[data-theme='dark'] #disqus_thread #dsqjs .dsqjs-post-body blockquote { color: rgba(255,255,255,0.7); } [data-theme='dark'] #artitalk_main #lazy { @@ -7379,26 +5515,6 @@ blockquote.pullquote.right { [data-theme='dark'] #operare_artitalk .c2 { background: #121212; } -@media screen and (max-width: 900px) { - [data-theme='dark'] #card-toc { - background: #1f1f1f; - } -} -[data-theme='dark'] .artalk.atk-dark-mode, -[data-theme='dark'] .atk-layer-wrap.atk-dark-mode { - --at-color-font: rgba(255,255,255,0.7); - --at-color-meta: rgba(255,255,255,0.7); - --at-color-grey: rgba(255,255,255,0.7); -} -[data-theme='dark'] .atk-send-btn, -[data-theme='dark'] .atk-badge { - color: rgba(255,255,255,0.7) !important; -} -[data-theme='dark'] #waline-wrap { - --waline-color: rgba(255,255,255,0.7); - --waline-dark-grey: rgba(255,255,255,0.7); - --waline-info-color: rgba(255,255,255,0.5); -} .read-mode { --font-color: #4c4948; --readmode-light-color: #fff; @@ -7411,7 +5527,6 @@ blockquote.pullquote.right { --exit-btn-bg: #c0c0c0; --exit-btn-color: #fff; --exit-btn-hover: #8d8d8d; - --pseudo-hover: none; } [data-theme='dark'] .read-mode { --font-color: rgba(255,255,255,0.7); @@ -7433,9 +5548,9 @@ blockquote.pullquote.right { position: fixed; top: 30px; right: 30px; - z-index: 100; width: 40px; height: 40px; + border-radius: 8px; background: var(--exit-btn-bg); color: var(--exit-btn-color); font-size: 16px; @@ -7444,13 +5559,6 @@ blockquote.pullquote.right { -o-transition: background 0.3s; -ms-transition: background 0.3s; transition: background 0.3s; - border-radius: 8px; -} -@media screen and (max-width: 768px) { - .read-mode .exit-readmode { - top: initial; - bottom: 30px; - } } .read-mode .exit-readmode:hover { background: var(--exit-btn-hover); @@ -7459,7 +5567,8 @@ blockquote.pullquote.right { display: none; } .read-mode #page-header.post-bg { - background: none !important; + background-color: transparent; + background-image: none !important; } .read-mode #page-header.post-bg:before { opacity: 0; @@ -7486,141 +5595,158 @@ blockquote.pullquote.right { .read-mode #footer, .read-mode #post > *:not(#post-info):not(.post-content), .read-mode #nav, -.read-mode #post-outdate-notice, +.read-mode .post-outdate-notice, .read-mode #web_bg, .read-mode #rightside, .read-mode .not-top-img { display: none !important; } -.read-mode .container a { +.read-mode #article-container a { color: #99a9bf; } -.read-mode .container pre, -.read-mode .container .highlight:not(.js-file-line-container) { +.read-mode #article-container pre, +.read-mode #article-container .highlight:not(.js-file-line-container) { background: var(--highlight-bg) !important; } -.read-mode .container pre *, -.read-mode .container .highlight:not(.js-file-line-container) * { +.read-mode #article-container pre *, +.read-mode #article-container .highlight:not(.js-file-line-container) * { color: var(--font-color) !important; } -.read-mode .container figure.highlight { +.read-mode #article-container figure.highlight { border-radius: 0 !important; -webkit-box-shadow: none !important; box-shadow: none !important; } -.read-mode .container figure.highlight > :not(.highlight-tools) { +.read-mode #article-container figure.highlight > :not(.highlight-tools) { display: block !important; } -.read-mode .container figure.highlight .line:before { +.read-mode #article-container figure.highlight .line:before { color: var(--font-color) !important; } -.read-mode .container figure.highlight .hljs { - background: var(--highlight-bg) !important; +.read-mode #article-container figure.highlight .hljs { + background: var(-highlight-bg) !important; } -.read-mode .container h1, -.read-mode .container h2, -.read-mode .container h3, -.read-mode .container h4, -.read-mode .container h5, -.read-mode .container h6 { +.read-mode #article-container h1, +.read-mode #article-container h2, +.read-mode #article-container h3, +.read-mode #article-container h4, +.read-mode #article-container h5, +.read-mode #article-container h6 { padding: 0; } -.read-mode .container h1:before, -.read-mode .container h2:before, -.read-mode .container h3:before, -.read-mode .container h4:before, -.read-mode .container h5:before, -.read-mode .container h6:before { +.read-mode #article-container h1:before, +.read-mode #article-container h2:before, +.read-mode #article-container h3:before, +.read-mode #article-container h4:before, +.read-mode #article-container h5:before, +.read-mode #article-container h6:before { content: ''; } -.read-mode .container h1:hover, -.read-mode .container h2:hover, -.read-mode .container h3:hover, -.read-mode .container h4:hover, -.read-mode .container h5:hover, -.read-mode .container h6:hover { +.read-mode #article-container h1:hover, +.read-mode #article-container h2:hover, +.read-mode #article-container h3:hover, +.read-mode #article-container h4:hover, +.read-mode #article-container h5:hover, +.read-mode #article-container h6:hover { padding: 0; } -.read-mode .container ul:hover:before, -.read-mode .container li:hover:before, -.read-mode .container ol:hover:before { +.read-mode #article-container ul:hover:before, +.read-mode #article-container li:hover:before, +.read-mode #article-container ol:hover:before { -webkit-transform: none !important; -moz-transform: none !important; -o-transform: none !important; -ms-transform: none !important; transform: none !important; } -.read-mode .container ol:before, -.read-mode .container li:before { +.read-mode #article-container ol:before, +.read-mode #article-container li:before { background: transparent !important; color: var(--font-color) !important; } -.read-mode .container ul >li:before { - border-color: var(--gray) !important; +.read-mode #article-container ul >li:before { + border: 0.15rem solid var(--gray) !important; } -.read-mode .container .tabs { +.read-mode #article-container .tabs { border: 2px solid var(--tab-border-color); } -.read-mode .container .tabs > .nav-tabs { +.read-mode #article-container .tabs > .nav-tabs { background: transparent; } -.read-mode .container .tabs > .nav-tabs > .tab { +.read-mode #article-container .tabs > .nav-tabs > .tab { + border-bottom: 0; +} +.read-mode #article-container .tabs > .nav-tabs > .tab button { border-top: none !important; + background: transparent; +} +.read-mode #article-container .tabs > .nav-tabs > .tab button:hover { + background: none !important; } -.read-mode .container .tabs > .tab-contents .tab-item-content.active { +.read-mode #article-container .tabs > .nav-tabs > .tab.active button { + text-decoration: underline; +} +.read-mode #article-container .tabs > .tab-contents .tab-item-content.active { -webkit-animation: none; -moz-animation: none; -o-animation: none; -ms-animation: none; animation: none; } -.read-mode .container code { +.read-mode #article-container code { color: var(--font-color); } -.read-mode .container blockquote { - border-color: var(--gray); +.read-mode #article-container blockquote { + border-left: 0.2rem solid var(--gray); background-color: var(--readmode-light-color); } -.read-mode .container kbd { +.read-mode #article-container kbd { border: 1px solid var(--gray); background-color: transparent; -webkit-box-shadow: none; box-shadow: none; color: var(--font-color); } -.read-mode .container .hide-toggle { +.read-mode #article-container .hide-toggle { border: 1px solid var(--gray) !important; } -.read-mode .container .hide-button, -.read-mode .container .btn-beautify, -.read-mode .container .hl-label { +.read-mode #article-container .hide-button, +.read-mode #article-container .btn-beautify, +.read-mode #article-container .hl-label { border: 1px solid var(--gray) !important; background: var(--readmode-light-color) !important; color: var(--font-color) !important; } -.read-mode .container .note { +.read-mode #article-container .button--animated:before { + background: var(--readmode-light-color) !important; +} +.read-mode #article-container .note { border: 2px solid var(--gray); border-left-color: var(--gray) !important; filter: none; background-color: var(--readmode-light-color) !important; color: var(--font-color); } -.read-mode .container .note:before, -.read-mode .container .note .note-icon { +.read-mode #article-container .note:before, +.read-mode #article-container .note .note-icon { color: var(--font-color); } .search-dialog { position: fixed; - top: 10%; + top: 5rem; left: 50%; z-index: 1001; display: none; - margin-left: -300px; - padding: 20px; - width: 600px; - background: var(--search-bg); - --search-height: 100vh; + margin-left: -15rem; + padding: 1rem; + width: 30rem; border-radius: 8px; + background: var(--search-bg); + -webkit-animation: titlescale 0.5s; + -moz-animation: titlescale 0.5s; + -o-animation: titlescale 0.5s; + -ms-animation: titlescale 0.5s; + animation: titlescale 0.5s; } @media screen and (max-width: 768px) { .search-dialog { @@ -7632,421 +5758,106 @@ blockquote.pullquote.right { border-radius: 0; } } -.search-dialog .search-nav { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-pack: justify; - -moz-box-pack: justify; - -o-box-pack: justify; - -ms-flex-pack: justify; - -webkit-justify-content: space-between; - justify-content: space-between; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - margin-bottom: 14px; - color: #49b1f5; +.search-dialog hr { + margin: 1rem auto; +} +.search-dialog span.search-close-button { + position: absolute; + top: 0.8rem; + right: 1rem; + color: #858585; font-size: 1.4em; line-height: 1; + cursor: pointer; + -webkit-transition: color 0.2s ease-in-out; + -moz-transition: color 0.2s ease-in-out; + -o-transition: color 0.2s ease-in-out; + -ms-transition: color 0.2s ease-in-out; + transition: color 0.2s ease-in-out; } -.search-dialog .search-nav .search-dialog-title { - margin-right: 4px; -} -.search-dialog .search-nav #loading-status[hidden] { - display: none !important; -} -.search-dialog .search-nav .search-close-button { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - color: #858585; - text-align: right; - -webkit-transition: all 0.2s ease; - -moz-transition: all 0.2s ease; - -o-transition: all 0.2s ease; - -ms-transition: all 0.2s ease; - transition: all 0.2s ease; +.search-dialog span.search-close-button:hover { + color: #49b1f5; } -.search-dialog .search-nav .search-close-button:hover { +.search-dialog__title { + padding: 0 0 0.7rem; color: #49b1f5; + font-size: 1.4em; + line-height: 1; +} +#search-mask { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1000; + display: none; + background: rgba(0,0,0,0.6); } -.search-dialog .local-search-input, -.search-dialog #algolia-search-input { +#local-search .search-dialog .local-search-box { margin: 0 auto; max-width: 100%; width: 100%; } -.search-dialog .local-search-input input, -.search-dialog #algolia-search-input input, -.search-dialog .local-search-input .ais-SearchBox-input, -.search-dialog #algolia-search-input .ais-SearchBox-input { - padding: 5px 14px; +#local-search .search-dialog .local-search-box input { + padding: 0.25rem 0.7rem; width: 100%; outline: none; border: 2px solid #49b1f5; - border-radius: 40px; + border-radius: 2rem; background: var(--search-bg); color: var(--search-input-color); -webkit-appearance: none; } -.search-dialog .local-search-input input::placeholder, -.search-dialog #algolia-search-input input::placeholder, -.search-dialog .local-search-input .ais-SearchBox-input::placeholder, -.search-dialog #algolia-search-input .ais-SearchBox-input::placeholder { - color: var(--text-color); -} -.search-dialog .search-result-list, -.search-dialog .ais-Hits-list { - overflow-y: overlay; - margin: 0 -20px; - padding: 0 22px; - max-height: calc(80vh - 220px); -} -.search-dialog .search-result-list .local-search-hit-item, -.search-dialog .ais-Hits-list .local-search-hit-item, -.search-dialog .search-result-list .ais-Hits-item, -.search-dialog .ais-Hits-list .ais-Hits-item { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-align: start; - -moz-box-align: start; - -o-box-align: start; - -ms-flex-align: start; - -webkit-align-items: flex-start; - align-items: flex-start; - margin: 3px 0; - line-height: 1.8; +#local-search .search-dialog .local-search__hit-item { + position: relative; + padding-left: 1.2rem; + line-height: 1.7; +} +#local-search .search-dialog .local-search__hit-item:hover:before { + border-color: #ff7242; +} +#local-search .search-dialog .local-search__hit-item:before { + position: absolute; + top: 0.45em; + left: 0; + width: 0.5em; + height: 0.5em; + border: 0.15rem solid #49b1f5; + border-radius: 0.5em; + background: transparent; + content: ''; + line-height: 0.5em; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } -.search-dialog .search-result-list .local-search-hit-item:hover, -.search-dialog .ais-Hits-list .local-search-hit-item:hover, -.search-dialog .search-result-list .ais-Hits-item:hover, -.search-dialog .ais-Hits-list .ais-Hits-item:hover { - -webkit-transform: translateY(-1px); - -moz-transform: translateY(-1px); - -o-transform: translateY(-1px); - -ms-transform: translateY(-1px); - transform: translateY(-1px); -} -.search-dialog .search-result-list .local-search-hit-item:not([value])::before, -.search-dialog .ais-Hits-list .local-search-hit-item:not([value])::before, -.search-dialog .search-result-list .ais-Hits-item:not([value])::before, -.search-dialog .ais-Hits-list .ais-Hits-item:not([value])::before { - display: none; -} -.search-dialog .search-result-list .local-search-hit-item[value]::before, -.search-dialog .ais-Hits-list .local-search-hit-item[value]::before, -.search-dialog .search-result-list .ais-Hits-item[value]::before, -.search-dialog .ais-Hits-list .ais-Hits-item[value]::before { - display: -webkit-inline-box; - display: -moz-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-box; - display: inline-flex; - -webkit-flex-shrink: 0; - flex-shrink: 0; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - margin-right: 6px; - min-width: 24px; - color: #49b1f5; - content: attr(value) '.'; - font-weight: bold; - font-style: italic; - font-size: 0.9em; -} -.search-dialog .search-result-list .local-search-hit-item::marker, -.search-dialog .ais-Hits-list .local-search-hit-item::marker, -.search-dialog .search-result-list .ais-Hits-item::marker, -.search-dialog .ais-Hits-list .ais-Hits-item::marker { - content: none; -} -.search-dialog .search-result-list .local-search-hit-item a, -.search-dialog .ais-Hits-list .local-search-hit-item a, -.search-dialog .search-result-list .ais-Hits-item a, -.search-dialog .ais-Hits-list .ais-Hits-item a { - -webkit-box-flex: 1; - -moz-box-flex: 1; - -o-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - color: var(--search-a-color); +#local-search .search-dialog .local-search__hit-item a { + display: block; + color: var(--search-result-title); + font-weight: 600; + cursor: pointer; } -.search-dialog .search-result-list .local-search-hit-item a:hover, -.search-dialog .ais-Hits-list .local-search-hit-item a:hover, -.search-dialog .search-result-list .ais-Hits-item a:hover, -.search-dialog .ais-Hits-list .ais-Hits-item a:hover { +#local-search .search-dialog .local-search__hit-item a:hover { color: #49b1f5; } -.search-dialog .search-result-list .local-search-hit-item .search-result-title, -.search-dialog .ais-Hits-list .local-search-hit-item .search-result-title, -.search-dialog .search-result-list .ais-Hits-item .search-result-title, -.search-dialog .ais-Hits-list .ais-Hits-item .search-result-title, -.search-dialog .search-result-list .local-search-hit-item .algolia-hits-item-title, -.search-dialog .ais-Hits-list .local-search-hit-item .algolia-hits-item-title, -.search-dialog .search-result-list .ais-Hits-item .algolia-hits-item-title, -.search-dialog .ais-Hits-list .ais-Hits-item .algolia-hits-item-title { - font-weight: 600; -} -.search-dialog .search-result-list .local-search-hit-item .search-result, -.search-dialog .ais-Hits-list .local-search-hit-item .search-result, -.search-dialog .search-result-list .ais-Hits-item .search-result, -.search-dialog .ais-Hits-list .ais-Hits-item .search-result, -.search-dialog .search-result-list .local-search-hit-item .algolia-hit-item-content, -.search-dialog .ais-Hits-list .local-search-hit-item .algolia-hit-item-content, -.search-dialog .search-result-list .ais-Hits-item .algolia-hit-item-content, -.search-dialog .ais-Hits-list .ais-Hits-item .algolia-hit-item-content { - margin: 0 0 8px; +#local-search .search-dialog .local-search__hit-item .search-result { + margin: 0 0 0.4rem; word-break: break-all; - font-size: 0.9em; -} -.search-dialog .ais-Pagination { - margin: 15px 0 0; - padding: 0; - text-align: center; -} -.search-dialog .ais-Pagination .ais-Pagination-list { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-lines: multiple; - -moz-box-lines: multiple; - -o-box-lines: multiple; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - margin: 0; - padding: 0; - list-style: none; - gap: 6px; -} -.search-dialog .ais-Pagination .ais-Pagination-item { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - padding: 0; -} -.search-dialog .ais-Pagination .ais-Pagination-item:not(.ais-Pagination-item--selected):not(.ais-Pagination-item--ellipsis):not(.ais-Pagination-item--disabled) .ais-Pagination-link:hover { - background: var(--btn-hover-color); - -webkit-transform: translateY(-1px); - -moz-transform: translateY(-1px); - -o-transform: translateY(-1px); - -ms-transform: translateY(-1px); - transform: translateY(-1px); -} -.search-dialog .ais-Pagination .ais-Pagination-item .ais-Pagination-link { - display: -webkit-inline-box; - display: -moz-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-box; - display: inline-flex; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - padding: 4px 8px; - min-width: 28px; - height: 28px; - border-radius: 6px; - background: var(--btn-bg); - color: var(--btn-color); - -webkit-transition: all 0.2s ease; - -moz-transition: all 0.2s ease; - -o-transition: all 0.2s ease; - -ms-transition: all 0.2s ease; - transition: all 0.2s ease; -} -.search-dialog .ais-Pagination .ais-Pagination-item .ais-Pagination-link.ais-Pagination-link--disabled { - opacity: 0.3; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; - filter: alpha(opacity=30); - cursor: not-allowed; -} -.search-dialog .ais-Pagination .ais-Pagination-item .ais-Pagination-link i { - font-size: 12px; -} -.search-dialog .ais-Pagination .ais-Pagination-item--selected .ais-Pagination-link { - background: #00c4b6; - font-weight: 600; - cursor: default; -} -.search-dialog .ais-Pagination .ais-Pagination-item--ellipsis .ais-Pagination-link { - padding: 4px 2px; - border: none; - background: transparent; - color: var(--text-color); - cursor: default; -} -.search-dialog .ais-Pagination .ais-Pagination-item--ellipsis .ais-Pagination-link:hover { - background: transparent; - -webkit-transform: none; - -moz-transform: none; - -o-transform: none; - -ms-transform: none; - transform: none; -} -.search-dialog .ais-Pagination .ais-Pagination-item--disabled .ais-Pagination-link { - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); -} -@media screen and (max-width: 768px) { - .search-dialog .ais-Pagination .ais-Pagination-list { - gap: 4px; - } -} -.search-dialog hr { - margin: 15px auto; -} -#search-mask { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1000; - display: none; - background: rgba(0,0,0,0.6); -} -.search-result-stats, -.ais-Stats-text { - margin: 15px 0 0; - color: var(--text-color); - text-align: center; - font-size: 0.9em; } -.search-keyword { - background: transparent; +#local-search .search-dialog .local-search__hit-item .search-keyword { color: #f47466; - font-weight: 600; -} -.search-loading { - display: -webkit-box; - display: -moz-box; - display: -webkit-flex; - display: -ms-flexbox; - display: box; - display: flex; - -webkit-box-pack: center; - -moz-box-pack: center; - -o-box-pack: center; - -ms-flex-pack: center; - -webkit-justify-content: center; - justify-content: center; - -webkit-box-align: center; - -moz-box-align: center; - -o-box-align: center; - -ms-flex-align: center; - -webkit-align-items: center; - align-items: center; - padding: 20px; - color: var(--text-color); -} -.search-loading::before { - width: 16px; - height: 16px; - border: 2px solid var(--text-color); - border-top-color: transparent; - border-radius: 50%; - content: ''; - -webkit-animation: spin 1s linear infinite; - -moz-animation: spin 1s linear infinite; - -o-animation: spin 1s linear infinite; - -ms-animation: spin 1s linear infinite; - animation: spin 1s linear infinite; -} -@-moz-keyframes spin { - to { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@-webkit-keyframes spin { - to { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); - } + font-weight: bold; } -@-o-keyframes spin { - to { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); - } +#local-search .search-dialog .search-result-list { + overflow-y: auto; + max-height: 10.5rem; } -@keyframes spin { - to { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -o-transform: rotate(360deg); - -ms-transform: rotate(360deg); - transform: rotate(360deg); +@media screen and (max-width: 768px) { + #local-search .search-dialog .search-result-list { + padding-bottom: 2rem; + max-height: 75vh !important; } } diff --git a/disable-or-replace-google-font.html b/disable-or-replace-google-font.html index a5443a02..0b9539ab 100644 --- a/disable-or-replace-google-font.html +++ b/disable-or-replace-google-font.html @@ -1,165 +1,153 @@ -禁用或替换博客google字体 | all4fun blog +禁用或替换博客google字体 | 王恒's Blog - + - + - - + + -

禁用或替换博客google字体

+ })(window)

禁用或替换博客google字体

由于在Wordpress中很多地方用到了google的字体,加上最近我朝又在全面禁用google的服务,直接导致了博客访问慢的无法忍受。没办法只有割爱,先临时禁用google的字体。方法如下:

方法一:在functions.php中注释掉,vim打开functions.php文件,搜索googleapis, 加//注释即可,代码如下:

@@ -173,61 +161,37 @@

使用插件Remove Open Sans font from WP core,非常给力。使用插件也有一定的好处,就是你下次更新wordpress 的时候不需要再重新更改functions.php代码。

以上两种方式均能明显改善博客打开的速度,有需要的朋友不妨试试。

-
文章作者: all4fun
文章链接: http://wangheng.org/disable-or-replace-google-font.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/domestic-and-foreign-agents-ip-server-list.html b/domestic-and-foreign-agents-ip-server-list.html new file mode 100644 index 00000000..5e587699 --- /dev/null +++ b/domestic-and-foreign-agents-ip-server-list.html @@ -0,0 +1,190 @@ +国内外代理IP服务器列表 | 王恒's Blog + + + + + + + + + + + + + +

国内外代理IP服务器列表

+不保证都能用,你可以挨个试试! + +

ID 地址                 端口 类型  地区     验证时间                    响应
1 177.19.245.62 3128 HTTP 巴西 Sooip.CN 05-16 14:29 0.998
2 186.194.7.185 8080 HTTP 巴西 Sooip.CN 05-16 14:29 2.008
3 89.102.106.33 3128 HTTP 捷克 Sooip.CN 05-16 14:29 1.996
4 190.182.18.109 3128 HTTP 哥伦比亚 Sooip.CN 05-16 14:29 4.012
5 207.219.7.136 80 HTTP 加拿大 Sooip.CN 05-16 14:29 6.009
6 212.62.116.82 8080 HTTP 沙特阿拉伯 Sooip.CN 05-16 14:28 8.998
7 190.206.50.100 3128 HTTP 委内瑞拉 Sooip.CN 05-16 14:28 2.004
8 210.212.150.84 8080 HTTP 印度 Sooip.CN 05-16 14:28 2.001
9 177.19.132.75 3128 HTTP 巴西 Sooip.CN 05-16 14:28 7.008
10 112.65.219.72 80 HTTP 上海市 联通IDC机房 05-16 14:28 1.994
11 120.35.31.101 8080 HTTP 福建省福州市 电信 05-16 14:28 1.012
12 124.193.109.117 80 HTTP 北京市 电信通 05-16 14:28 0.997
13 178.135.59.11 8080 HTTP 黎巴嫩 Sooip.CN 05-16 14:28 3.001
14 184.154.55.239 80 HTTP 美国 芝加哥市SingleHop公司 05-16 14:28 1.001
15 186.3.71.155 8080 HTTP 厄瓜多尔 Sooip.CN 05-16 14:28 3.997

+ +

16 212.93.195.229 3128 HTTP 沙特阿拉伯 Sooip.CN 05-16 14:28 2.002
17 213.197.81.53 3128 HTTP 匈牙利 Sooip.CN 05-16 14:28 2.001
18 82.222.49.81 8080 HTTP 土耳其 Sabanci电信公司 05-16 14:28 1.008
19 201.57.146.136 3128 HTTP 巴西 Sooip.CN 05-16 14:28 6.996
20 211.76.97.152 80 HTTP 台湾省 台北市 05-16 14:28 4.007
21 101.44.1.107 80 HTTP 上海市 鹏博士宽带 05-16 14:28 9.003
22 218.6.13.35 80 HTTP 福建省莆田市 电信LAN 05-16 14:27 0.999
23 217.112.212.74 3128 HTTP 乌克兰 Sooip.CN 05-16 14:27 0.995
24 118.97.94.194 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:27 1.002
25 122.72.2.186 80 HTTP 甘肃省 铁通 05-16 14:27 2.999
26 190.220.250.34 8080 HTTP 阿根廷 Sooip.CN 05-16 14:27 4.005
27 207.219.7.136 3128 HTTP 加拿大 Sooip.CN 05-16 14:27 3.004
28 220.243.7.126 3128 HTTP 广东省广州市 视讯宽带 05-16 14:27 0.997
29 61.157.217.31 80 HTTP 四川省雅安市 电信IDC机房 05-16 14:26 1.009
30 177.86.20.59 8080 HTTP 巴西 Sooip.CN 05-16 14:26 2.004
31 178.168.58.100 8081 HTTP 摩尔多瓦 Sooip.CN 05-16 14:26 2.013
32 192.162.150.77 3128 HTTP 波兰 Sooip.CN 05-16 14:26 2.004
33 118.96.153.181 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:26 6.999
34 178.48.2.237 80 HTTP 匈牙利 Sooip.CN 05-16 14:26 1.004
35 187.63.203.166 3128 HTTP 巴西 Sooip.CN 05-16 14:26 1.988
36 88.41.153.22 80 HTTP 意大利 Sooip.CN 05-16 14:26 1.007
37 122.72.12.88 80 HTTP 甘肃省 铁通 05-16 14:26 7.005
38 125.162.170.42 3128 HTTP 印度尼西亚 PTTelekomunikasi网络 05-16 14:26 3.019
39 202.51.113.81 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:26 1.003
40 203.66.83.46 3128 HTTP 台湾省 中华电信 05-16 14:26 1.010
41 109.205.114.2 8000 HTTP 伊拉克 Sooip.CN 05-16 14:26 1.006
42 212.33.200.174 80 HTTP 伊朗 Sooip.CN 05-16 14:26 2.007
43 188.127.230.133 3128 HTTP 俄罗斯 Sooip.CN 05-16 14:26 1.002
44 103.22.248.99 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:26 9.001
45 189.123.220.192 8080 HTTP 巴西 Sooip.CN 05-16 14:25 3.007
46 212.80.21.219 8080 HTTP 伊朗 Sooip.CN 05-16 14:25 1.997
47 85.114.132.49 3128 HTTP 德国 Sooip.CN 05-16 14:25 0.997
48 118.97.209.218 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:25 1.005
49 189.254.250.34 80 HTTP 墨西哥 Sooip.CN 05-16 14:25 10.004
50 202.115.207.25 80 HTTP [C]四川省成都市 四川师范大学 05-16 14:25 1.015
51 82.222.19.54 8080 HTTP 土耳其 Sabanci电信公司 05-16 14:25 0.993
52 122.129.102.92 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:25 7.000
53 190.0.41.78 80 HTTP 哥伦比亚 Sooip.CN 05-16 14:25 8.001
54 123.234.215.230 81 HTTP 山东省青岛市莱西市 启晟网吧一分店 05-16 14:25 1.002
55 125.93.180.234 8081 HTTP 广东省东莞市南城区 淘乐网吧(石鼓综合市场二楼) 05-16 14:25 0.997
56 180.137.45.86 8080 HTTP 广西崇左市 电信 05-16 14:25 1.004
57 180.139.91.27 8080 HTTP 广西南宁市 电信 05-16 14:25 11.006
58 188.128.6.150 8080 HTTP 俄罗斯 Sooip.CN 05-16 14:24 2.002
59 188.128.118.177 8080 HTTP 俄罗斯 Sooip.CN 05-16 14:24 3.999
60 201.174.18.170 8080 HTTP 墨西哥 Sooip.CN 05-16 14:24 1.017
61 202.43.173.21 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:24 4.000
62 202.103.215.199 80 HTTP 广西北海市 电信 05-16 14:24 0.995
63 189.74.129.10 8080 HTTP 巴西 Sooip.CN 05-16 14:24 1.005
64 202.105.233.40 80 HTTP 广东省肇庆市 电信 05-16 14:24 0.997
65 82.222.49.65 8080 HTTP 土耳其 Sabanci电信公司 05-16 14:24 0.994
66 180.211.180.194 8080 HTTP 孟加拉 Sooip.CN 05-16 14:24 1.000
67 213.217.58.25 80 HTTP 伊朗 Sooip.CN 05-16 14:24 3.003
68 187.75.129.184 3128 HTTP 巴西 Sooip.CN 05-16 14:24 7.997
69 122.226.240.233 80 HTTP 浙江省金华市 电信 05-16 14:24 1.008
70 221.12.89.189 80 HTTP 浙江省金华市 /丽水市联通 05-16 14:24 0.995
71 221.133.238.138 8080 HTTP 上海市 长城宽带 05-16 14:24 1.021
72 221.224.20.210 8080 HTTP 江苏省苏州市常熟市 登胜流体动力有限公司 05-16 14:23 4.996
73 222.73.25.121 6666 HTTP 上海市 电信(外高桥)IDC机房 05-16 14:23 0.997
74 217.146.208.162 8080 HTTP 伊朗 Sooip.CN 05-16 14:23 2.994
75 222.165.175.118 80 HTTP 斯里兰卡 电信公司 05-16 14:23 1.004
76 118.212.129.175 80 HTTP 江西省 联通 05-16 14:23 5.004
77 116.236.205.100 80 HTTP 上海市长宁区 /普陀区电信 05-16 14:23 1.006
78 119.97.146.152 80 HTTP 湖北省武汉市 电信 05-16 14:23 3.000
79 123.234.31.130 8090 HTTP 山东省青岛市 联通 05-16 14:23 0.999
80 222.184.9.242 3128 HTTP 江苏省淮安市 (楚州区)电信ADSL 05-16 14:23 1.006
81 122.226.240.235 80 HTTP 浙江省金华市 电信 05-16 14:23 4.994
82 64.85.181.45 8080 HTTP 美国 加洲 05-16 14:23 1.006
83 113.53.240.90 3128 HTTP 泰国 05-16 14:23 2.016
84 222.165.175.118 3128 HTTP 斯里兰卡 电信公司 05-16 14:23 0.996
85 79.120.107.6 80 HTTP 俄罗斯 Sooip.CN 05-16 14:23 0.996
86 79.120.107.6 8080 HTTP 俄罗斯 Sooip.CN 05-16 14:23 5.003
87 190.121.20.131 3128 HTTP 智利 05-16 14:23 8.010
88 190.128.192.202 8080 HTTP 巴拉圭 05-16 14:22 1.007
89 88.85.125.78 8080 HTTP 马其顿 05-16 14:22 2.002
90 88.85.108.16 8080 HTTP 马其顿 05-16 14:22 3.008
91 118.97.165.234 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:22 1.001
92 190.249.188.186 8080 HTTP 哥伦比亚 Sooip.CN 05-16 14:22 5.999
93 217.76.35.238 3128 HTTP 俄罗斯 Sooip.CN 05-16 14:22 1.010
94 79.175.158.156 8080 HTTP 伊朗 Sooip.CN 05-16 14:22 3.005
95 190.253.213.196 3128 HTTP 哥伦比亚 Sooip.CN 05-16 14:22 0.999
96 92.60.227.17 8080 HTTP 塞尔维亚 Sooip.CN 05-16 14:22 1.005
97 93.78.214.219 3128 HTTP 乌克兰 Sooip.CN 05-16 14:22 1.994
98 109.224.50.162 80 HTTP 伊拉克 Sooip.CN 05-16 14:22 1.996
99 201.54.230.75 3128 HTTP 巴西 05-16 14:22 5.996
100 77.245.210.161 3128 HTTP 俄罗斯 05-16 14:22 5.001

+
文章作者: 王恒
文章链接: http://wangheng.org/domestic-and-foreign-agents-ip-server-list.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file diff --git a/efficient-office-support-tool-autohotkey.html b/efficient-office-support-tool-autohotkey.html index 47ed78bf..6869be65 100644 --- a/efficient-office-support-tool-autohotkey.html +++ b/efficient-office-support-tool-autohotkey.html @@ -1,174 +1,158 @@ -高效办公辅助工具Autohotkey | all4fun blog +高效办公辅助工具Autohotkey | 王恒's Blog - + - + - - + + -

高效办公辅助工具Autohotkey

-

序:工欲善其事,必先利其器。近期工作中要对公司的AFP软件进行汉化,由此也带来了大量的重复性工作,海量的字符串提取,组合,规整,键盘鼠标表示压力颇大~ 为此特别找回了大学玩魔兽对战用的改键插件Autohotkey,嘿嘿。

AutoHotKey 软件可以实现很多有趣的功能,可以简化你的重复性工作。这里下载

选择一个适合你的版本,办公环境稳定的可以选择安装版,需要便携要求的可以下载绿色版本,当然安装版的好处是:系统会自动关联 .ahk 文件。安装完成后打开Autohotkey软件,然后你会在系统托盘处看到一个H字样的小图标。现在右击托盘处图标,选择Edit this Script来设置。 - -image -

-

在打开的配置文件中加入你需要的功能。例如:加入

#w::Run wangheng.org
+ })(window)

高效办公辅助工具Autohotkey

+

序:工欲善其事,必先利其器。近期工作中要对公司的AFP软件进行汉化,由此也带来了大量的重复性工作,海量的字符串提取,组合,规整,键盘鼠标表示压力颇大~ 为此特别找回了大学玩魔兽对战用的改键插件Autohotkey,嘿嘿。

AutoHotKey 软件可以实现很多有趣的功能,可以简化你的重复性工作。这里下载

选择一个适合你的版本,办公环境稳定的可以选择安装版,需要便携要求的可以下载绿色版本,当然安装版的好处是:系统会自动关联 .ahk 文件。安装完成后打开Autohotkey软件,然后你会在系统托盘处看到一个H字样的小图标。现在右击托盘处图标,选择Edit this Script来设置。image

在打开的配置文件中加入你需要的功能。例如:加入

#w::Run wangheng.org

然后选择Reload This Script,现在按win键(小旗标识那个键)+w,怎么样是不是直接在浏览器打开本博的主页呢?

@@ -212,61 +196,37 @@

这样平时也能节省自己不少时间~分秒必争嘛~

-
文章作者: all4fun
文章链接: http://wangheng.org/efficient-office-support-tool-autohotkey.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/files/index.html b/files/index.html index 1ad7a412..b45e3411 100644 --- a/files/index.html +++ b/files/index.html @@ -1,218 +1,150 @@ -文件分享 | all4fun blog +文件分享 | 王恒's Blog - + - + - - + + -
文件分享
\ No newline at end of file + })(window)

文件分享

\ No newline at end of file diff --git a/files/mydns.txt b/files/mydns.txt new file mode 100644 index 00000000..e6ab4660 --- /dev/null +++ b/files/mydns.txt @@ -0,0 +1,14 @@ +192.168.1.111 nas.apiof.com +192.168.1.111 code.apiof.com +192.168.1.111 drone.apiof.com +192.168.1.111 vscode.apiof.com +192.168.1.111 registry.apiof.com +192.168.1.111 maven.apiof.com +192.168.1.111 docker.apiof.com +192.168.1.111 gitlab.apiof.com +192.168.1.111 jenkins.apiof.com + +192.168.1.111 ddns.apiof.com +192.168.2.200 hass.apiof.com +192.168.1.111 pt.apiof.com +192.168.1.111 code.apiof.com \ No newline at end of file diff --git a/globus-toolkit-install.html b/globus-toolkit-install.html index f0cc944c..8f7952fb 100644 --- a/globus-toolkit-install.html +++ b/globus-toolkit-install.html @@ -1,180 +1,165 @@ -Globus Toolkit 安装与配置 | all4fun blog +Globus Toolkit 安装与配置 | 王恒's Blog - + - + - - + + -

Globus Toolkit 安装与配置

+ })(window)

Globus Toolkit 安装与配置

1. 安装前准备工作

-准备工作包括软件的准备和环境变量的设置。操作系统选用ubuntu 11.10,Globus Toolkit的安装包为:gt4.0.8-all-source-installer.tar.gz(或者使用适用于ubuntu的gt4.0.8-x86_deb_3.1-installer.tar.gz)下载地址:http://globus.org/toolkit/downloads/,此外还需安装JDK、ANT 下载地址: -http://ant.apache.org/bindownload.cgi、JUNIT最新版本。 -图1表示了各软件之间的层级关系。 - -pic1 +准备工作包括软件的准备和环境变量的设置。操作系统选用ubuntu 11.10,Globus Toolkit的安装包为:gt4.0.8-all-source-installer.tar.gz(或者使用适用于ubuntu的gt4.0.8-x86_deb_3.1-installer.tar.gz)下载地址:http://globus.org/toolkit/downloads/,此外还需安装JDK、ANT 下载地址:http://ant.apache.org/bindownload.cgi、JUNIT最新版本。 +

图1表示了各软件之间的层级关系。

+

pic1

图1 各软件层级关系

图2为GT4的安装流程图。

-pic2 - +

pic2

图2 GT 安装流程图

辅助软件安装完成之后,需要设置系统环境变量。具体方法是修改系统变量配置文件 /etc/profile。

参考:

@@ -324,16 +309,16 @@

3.2           让本机请求证书并得到SimpleCA的认证。The private key is
stored in /etc/grid-security/hostkey.pem

The request is
stored in /etc/grid-security/hostcert_request.pem

 

-

Please e-mail the
request to the Globus Simple CA cy_xiaoxiao@yahoo.com.cn

+

Please e-mail the
request to the Globus Simple CA cy_xiaoxiao@yahoo.com.cn

You may use a
command similar to the following:

 

-

cat /etc/grid-security/hostcert_request.pem |
mail cy_xiaoxiao@yahoo.com.cn

+

cat /etc/grid-security/hostcert_request.pem |
mail cy_xiaoxiao@yahoo.com.cn

 

Only use the above
if this machine can send AND receive e-mail. if not, please

mail using some
other method.

 

Your certificate
will be mailed to you within two working days.

-

If you receive no
response, contact Globus Simple CA at cy_xiaoxiao@yahoo.com.cn

+

If you receive no
response, contact Globus Simple CA at cy_xiaoxiao@yahoo.com.cn

 

[root@xx1
grid-security]# pwd

/etc/grid-security

@@ -378,61 +363,37 @@

3.2           让本机请求证书并得到SimpleCA的认证。[root@xx1
grid-security]# cp hostkey.pem containerkey.pem

 

[root@xx1 grid-security]#
chown globus.globus container*.pem

-

文章作者: all4fun
文章链接: http://wangheng.org/globus-toolkit-install.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
\ No newline at end of file +} + \ No newline at end of file diff --git a/hello-world.html b/hello-world.html new file mode 100644 index 00000000..c529ef15 --- /dev/null +++ b/hello-world.html @@ -0,0 +1,188 @@ +WP博客的第一篇文章 | 王恒's Blog + + + + + + + + + + + + + +

WP博客的第一篇文章

+

纪念博客的成立!

+ +
+
文章作者: 王恒
文章链接: http://wangheng.org/hello-world.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file diff --git a/hi-2014.html b/hi-2014.html new file mode 100644 index 00000000..c5b50b35 --- /dev/null +++ b/hi-2014.html @@ -0,0 +1,184 @@ +Hi 2014 | 王恒's Blog + + + + + + + + + + +

Hi 2014

+ + +
文章作者: 王恒
文章链接: http://wangheng.org/hi-2014.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file diff --git a/html-page-several-methods-of-jump.html b/html-page-several-methods-of-jump.html index cf9b3320..3d4afad6 100644 --- a/html-page-several-methods-of-jump.html +++ b/html-page-several-methods-of-jump.html @@ -1,167 +1,155 @@ -HTML 页面跳转的几种方法 | all4fun blog +HTML 页面跳转的几种方法 | 王恒's Blog - + - + - - + + -

HTML 页面跳转的几种方法

+ })(window)

HTML 页面跳转的几种方法

1、使用Html实现

 
@@ -188,61 +176,37 @@
 

当然还有很多中实现的方法,写到博客仅仅是为了方便查询,欢迎各位高手指教!

-
文章作者: all4fun
文章链接: http://wangheng.org/html-page-several-methods-of-jump.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/if-i-am-an-programmer.html b/if-i-am-an-programmer.html new file mode 100644 index 00000000..923b82b9 --- /dev/null +++ b/if-i-am-an-programmer.html @@ -0,0 +1,205 @@ +是否该自称为程序员 | 王恒's Blog + + + + + + + + + + + + +

是否该自称为程序员

+作者: 阮一峰 + +

日期: 2011年10月31日

+

每年都有无数年轻程序员,加入软件行业。 他们在学校里学过编程,但是对这个行业的现实一无所知。 Patrick McKenzie是美国一家小软件公司的老板,他写了一篇长文,介绍这个行业的一些实际情况。我看了以后很感慨,有些地方很受启发。我选择了一部分,翻译如下。

+

 一、90%的编程工作来自内部软件

+

(90% of programming jobs are in creating Line of Business software) 计算机专业的学生,可能有一种印象,觉得大部分程序员,都在编写公开出售的软件或者通用软件。 这种看法是不对的。大部分程序员,实际上编写的是不公开的企业内部软件,比如追踪费用的软件、优化装运成本的软件、帮助记账的软件、设计新部件的软件、计算保单价格的软件、识别恶意订单的软件等等。 各种各样的商业公司,开发内部软件,解决它们自己的问题。市场上对程序员的大部分需求来源于此,只有极少数程序员直接编写面向外部顾客的软件。 内部软件的开发,通常非常乏味,令人厌倦。因为它们的技术复杂性低、技术决策非常保守、预算很少、缺乏长远考虑。但是,世界上大部分编程工作都是这种。

+

二、别人雇你的目的,是让你创造利润,不是让你编程 (Engineers are hired to create business value, not to program things)

+

商业公司最关心的(或者说唯一在乎的)事情,就是增加收入、降低成本。因此,它们实际上需要的不是程序员,而是能够帮助它们增加收入、降低成本的人。 开发优美的软件,解决技术难题,编写没有bug的代码,这些都不是商业公司的目的。它们雇佣你,是为了让你帮它们完成某个可以增加收入、降低成本的项目,而不是因为你是geek。 你个人对于公司的唯一价值,就在于你能多大程度上为它们增加收入、降低成本。

+

三、不要自称为程序员 (Don’t call yourself a programmer)

+

很多公司的经理不懂计算机,在他们心目中,”程序员”就是一群高成本的劳动力,只会在一台复杂的机器上干一些难懂的事情。 如果你自称为”程序员”,当公司需要压缩成本的时候,某些经理首先就会想到解雇你。有一家公司叫Salesforce,口号是”没有软件”,意思就是如果经理们购买了他们的服务,就不再需要别的软件管理销售业务了,也就是说,不再需要自己雇佣程序员了。 正确的做法是,你应该把自己描述成与增加收入、降低成本有关系的人,比如”xx产品的开发者”或”改进者”。有一个Google Adsense程序员的自我介绍,是这样写的:”Google公司97%的收入,与我的代码有关。”

+

四、不要限定自己 (You are not defined by your chosen software stack)

+

年轻学生经常会问,应该选择哪种语言或平台?学会Java,是不是比学会.NET容易找工作? 过分强调某一种语言或平台,都是不必要的。如果你把自己限定为Java程序员或.NET程序员,你就已经输了,因为首先你不应该自称为程序员(理由见上一点),其次这种限定使得你自动被排除在世界上大多数编程工作之外。 现实生活中,学会一种新语言,只需要几个星期,然后再过半年到一年,你就会变成老手。那时,根本没人在乎你以前用什么语言。 天才程序员是很少的,可是需要天才程序员的工作机会却很多很多,大多数场合都是需求远远大于供给。这意味着,即使你不是天才程序员,只要你是一个优秀工程师,那些招聘公司也会立刻录用你,因为它们知道招聘到天才程序员的机会微乎其微。(重复一遍,所谓”优秀工程师”,就是你的履历上有一连串增加收入、降低成本的记录。) 某些公司的人事部门,会根据某个关键词(比如Java或.NET)过滤简历。虽然这样的公司根本不值得去,但是如果你真的想过这一关,也很容易:投入几个晚上和周末,在你当前的项目中设法用到这个关键词,然后再把它写进简历就行了。

+

 五、如何提高求职时的谈判能力? (How do I become better at negotiation?)

+

(1)记住你不是在求职,不是在展示编程技巧,而是在推销某种商业需求(增加收入或降低成本)的解决方案。 (2)面试时,要有自信,要平等的对话。你要的是一个互利的录用合同,不要每次对方提出要求,你都说Yes。 (3)雇主可能会问”你的上一份工资是多少”,他们其实在说”给我一个理由,压低你的报酬”。你要想好如何适当地回答这个问题。 (4)要还价。这里不仅仅指钱,还指其它你关心的方面。如果你无法要求更高的薪水,那就试着要求更多的假期。 (5)在对方决定录用你以后,才开始讨论薪水。因为那时,他们已经在你身上,投入了大量的时间和金钱,产生了一定的成本,此时他们可能觉得一些小问题已经不值得再纠缠了,比如每年的工资增加几千元。

+

六、创业公司是否适合应届毕业生? (Are startups great for your career as a fresh graduate?)

+

如果你一毕业就加入创业公司,最可能的结果是,接下来几年你都工作得非常辛苦,然后公司悲惨地失败了,你失业了,不得不又去另一家创业公司工作。 如果你真的想去创业公司,应该首先找一家大公司干上两年,攒一点钱,积累一些经验,然后精心挑选后再去创业公司。 在创业公司工作,一般情况下,你遇到的都是创业者。他们大多数人没有能力在两年后雇佣你;而在大公司工作,你遇到的都是其他大公司的人,他们中很多人将来有能力雇用你或者帮你介绍工作。

+

七、在创业公司工作是否值得推荐? (So would you recommend working at a startup? )

+

选择创业公司,就是选择一条职业道路,而不是选择一种生活方式。可惜很多人把这两者颠倒了,他们推荐创业公司,实际上是在推荐一种你感兴趣的生活方式。 如果你确实喜欢这种生活方式,老实说,你在大公司里也可以得到它们。在许许多多大公司里,你都有机会钻研最新的技术,而且还能5点半准时回家照顾孩子。

+

 八、沟通技能是最重要的职业技能 (Your most important professional skill is communication)

+

前面说过,工程师被雇佣,不是因为会编程,而是因为能够创造商业价值。所以,你让人们相信你能创造价值,这是帮助你找到工作的最重要的能力。这种能力与你真的能创造多少价值,实际上联系不是很紧密。 我认识的一些最优秀的程序员,往往拙于表达。因此,别人不是不想与他们一起工作,就是低估了他们的价值。相反地,如果你看上去很会编程,并且很善于表达,别人就会真的这样看待你。 (完)

+

原文网址:阮一峰的网络日志

+
文章作者: 王恒
文章链接: http://wangheng.org/if-i-am-an-programmer.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file diff --git a/iis-identify-attributes-targetframework-managedpipelinehandler.html b/iis-identify-attributes-targetframework-managedpipelinehandler.html index 19d047c2..f000bd3d 100644 --- a/iis-identify-attributes-targetframework-managedpipelinehandler.html +++ b/iis-identify-attributes-targetframework-managedpipelinehandler.html @@ -1,247 +1,205 @@ -IIS无法识别的属性targetFramework、错误模块ManagedPipelineHandler | all4fun blog +IIS无法识别的属性targetFramework、错误模块ManagedPipelineHandler | 王恒's Blog - + - + - - + + -

IIS无法识别的属性targetFramework、错误模块ManagedPipelineHandler

-微软服务器与开发工具事业部 黄捷 原文地址 + })(window)

IIS无法识别的属性targetFramework、错误模块ManagedPipelineHandler

+微软服务器与开发工具事业部 黄捷 原文地址

如果你创建寄宿在IIS中的WCF Service网站项目,(图1显示怎样创建这样的网站项目),或者你把你的WCF Web Application项目或者WCF Service网站项目发布或部署到IIS网站服务器上后,你可以用网页浏览器去访问你的网站。如果你在尝试打开这些网页时无法看到正确的页面显示,或者看到错误提示页面(图2是错误提示页面的一个例子: HTTP Error 500.21 – Internal Server Error Handler “svc-Integrated” has a bad module “ManagedPipelineHandler” in its module list),下面是最常见的问题和解决办法。

-
Image +
Image

图1

-image - +

image

图2


常见问题与解决办法:

1. 检查IIS是否正确安装和运行

-

你需要保证你的IIS服务器已经正确安装并正常运行。这里我们不讨论IIS安装的方法(你可你根据你的Windows版本和需要的IIS版本去bing中搜索), 只给出简单的验证方法。如图2所示,在IE地址栏中输入http://localhost, 如果你看到如图所示的页面或者类似的其他版本IIS的默认页面。那么就说明IIS已经在正常运行了。

-image -图3 - +

你需要保证你的IIS服务器已经正确安装并正常运行。这里我们不讨论IIS安装的方法(你可你根据你的Windows版本和需要的IIS版本去bing中搜索), 只给出简单的验证方法。如图2所示,在IE地址栏中输入http://localhost, 如果你看到如图所示的页面或者类似的其他版本IIS的默认页面。那么就说明IIS已经在正常运行了。

+

image
图3

2. 正确注册安装ASP.net

打开Visual Studio命令行提示工具(Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt, 如果你的OS是Windows Vista及以后的版本,你需要以管理员身份打开),运行”aspnet_regiis.exe -i”。在命令运行完成后重新尝试你的网站。

3. 在IIS中配置正确的Application Pool

在IIS管理工具(IIS Manager)中找到你的Website, 选中。在右侧的面板中点击Basic Settings。 你将看到如图3所示的弹出窗口,其中有你正在使用的Application Pool的信息。 选择IIS管理工具中的Applications Pools节点。选中你在使用的Application Pool, 点击右侧的Basic Settings。 你将看到如图4所示的弹出窗口。确定其中的.NET Framework版本是v4.0.xxxxx。如果不是,这也许就是你看到错误页面的原因。尝试在图2中把它改成v4.0或者在图3中选择”Select…”, 更改成其他的使用.NET Framework v4.0的Application Pool。

-image - +

image

图4

-image -图5 - +

image
图5

4. 安装注册WCF组件

WCF没有正确的在IIS中注册也许是导致看到错误页面的最常见原因。如果你在安装Visual Studio后才安装IIS, 那么你就很可能遇到这样的问题。打开Visual Studio命令行提示工具(Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt, 如果你的OS是Windows Vista及以后的版本,你需要以管理员身份打开),运行” ServiceModelReg.exe –ia”。 命令完成后再次访问你的WCF 网站。

-
文章作者: all4fun
文章链接: http://wangheng.org/iis-identify-attributes-targetframework-managedpipelinehandler.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/images/alipay.png b/images/alipay.png deleted file mode 100644 index 76129b68..00000000 Binary files a/images/alipay.png and /dev/null differ diff --git a/images/wechat.png b/images/wechat.png deleted file mode 100644 index 654cc4f6..00000000 Binary files a/images/wechat.png and /dev/null differ diff --git a/img/algolia.svg b/img/algolia.svg new file mode 100644 index 00000000..47024234 --- /dev/null +++ b/img/algolia.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/img/butterfly-icon.png b/img/butterfly-icon.png deleted file mode 100644 index 3992d774..00000000 Binary files a/img/butterfly-icon.png and /dev/null differ diff --git a/img/error-page.png b/img/error-page.png deleted file mode 100644 index 9d1de965..00000000 Binary files a/img/error-page.png and /dev/null differ diff --git a/implement-ssh-without-password.html b/implement-ssh-without-password.html index c86b2a3c..8278ab02 100644 --- a/implement-ssh-without-password.html +++ b/implement-ssh-without-password.html @@ -1,175 +1,162 @@ -实现SSH无密码登录 | all4fun blog +实现SSH无密码登录 | 王恒's Blog - - + + - + - - + + -

实现SSH无密码登录

+ })(window)

实现SSH无密码登录

好久没有写博客了,前一阵子工作实在是太忙,回来也没有了写博的激情。这几天给自己放了个假,出去玩了两天,状态好了不少。

一、在Linux中

有机器A[192.168.1.1],B[192.168.1.2]。现想A通过ssh免密码登录到B。
第一步,在A机下生成公钥/私钥对。

[root@A ~]$ ssh-keygen

-image - +

image

直接三次回车,它将在~/下生成.ssh目录,.ssh下有id_rsa和id_rsa.pub。

第二步,把A机下的id_rsa.pub复制到B机下

完成后还需要将id_rsa.pub内容追加到B机的.ssh/authorized_keys文件里。

@@ -182,71 +169,46 @@
[root@B ~]$ cat id_rsa.pub >> .ssh/authorized_keys 
 [root@B ~]$ chmod 600 .ssh/authorized_keys
authorized_keys的权限必须是600。(要保证.ssh和authorized_keys都只有用户自己有写权限。否则验证无效。) -

第四步、验证A机无密码登录B机。

[root@A ~]$ ssh root@192.168.1.2

第一次登录时如果询问是否将B机器加到A机器的list of known hosts,还需要你输入yes。现在A机可以无密码登录B机了。

+

第四步、验证A机无密码登录B机。

[root@A ~]$ ssh root@192.168.1.2

第一次登录时如果询问是否将B机器加到A机器的list of known hosts,还需要你输入yes。现在A机可以无密码登录B机了。

小结:私钥文件也可以保存下来在别的机器上面使用,被登录的机子要有登录机子的公钥。这个公钥/私钥对一般在私钥宿主机产生。想让A,B机无密码互登录,B机器上重复以上步骤即可~

二、在Windows中

-

在Windows中要想实现无密码登录Linux主机也很简单。一般在Windows中远程ssh连接Linux主机大家都会使用putty 或者Tunnelier这样的工具,我一般使用Tunnelier比较多,因为它集成了sftp工具和其他一些很实用的功能。例如使用Tunnelier很容易实现Firefox+SSH+AutoProxy智能翻墙,想试试的同学可以翻翻我以前发过的文章。下面具体介绍Windows下使用putty无密码登录Linux

+

在Windows中要想实现无密码登录Linux主机也很简单。一般在Windows中远程ssh连接Linux主机大家都会使用putty 或者Tunnelier这样的工具,我一般使用Tunnelier比较多,因为它集成了sftp工具和其他一些很实用的功能。例如使用Tunnelier很容易实现Firefox+SSH+AutoProxy智能翻墙,想试试的同学可以翻翻我以前发过的文章。下面具体介绍Windows下使用putty无密码登录Linux

1、首先使用PUTTYGEN.EXE这个工具生成公钥/私钥对,点击Generate,并在空白处移动鼠标几次就行了,如下:

-image - +

image

2、选择Save public key和Save private key可以分别保存公钥和私钥,然后将public key的内容追加到Linux主机中的.ssh/authorzied_keys文件里。

3、使用putty这个工具创建自动登录的session

首先在Session节点填写Host Name和你Linux VPS的ssh端口,然后在/Connection/SSH/Auth节点选择你Private key文件的保存位置,然后在/Connection/Data节点填写自动登录的用户名,最后在Session节点为Session起一个名字并保存,以后就可以直接双击保存的Session名字来自动无密码登录Linux主机了。

-
文章作者: all4fun
文章链接: http://wangheng.org/implement-ssh-without-password.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/implementation-windows-version-the-the-the-cron.html b/implementation-windows-version-the-the-the-cron.html index 3b74e76b..c7125535 100644 --- a/implementation-windows-version-the-the-the-cron.html +++ b/implementation-windows-version-the-the-the-cron.html @@ -1,230 +1,194 @@ -C#实现Windows版Cron | all4fun blog +C#实现Windows版Cron | 王恒's Blog - + - + - - + + - + -

C#实现Windows版Cron

+ })(window)

C#实现Windows版Cron

由于用惯了Linux下面的Cron工具,平时在Windows下面工作却总是不适应Task Schedule,于是自己写了一个Cron for Windows。功能已经基本实现,不过可能有一些小bug。思路很简单,利用线程起一个Timer,然后每分钟去检查一下是不是有符合的规则,添加符合则执行crontab最后的command参数。源码托管在https://github.com/wujiwh/Cron,欢迎各位同学批评指正。 具体核心代码如下:(加到github项目托管)

我把Cron作为了一个Windows Service并且把ServiceInstaller的StartType设置为了Automatic来保证每次重启系统后能自动启动服务。同时serviceProcessInstaller的Account属性设置成LocalSystem来保证服务对于的进程有较高的系统权限。

使用方法很简单,将cron.exe利用.net的installutil.exe安装到系统服务(需要.net4 framework),然后在c:\cron目录中新建一个crontab文件,对照cron说明写一条规则后启动服务,就OK了。服务执行的log文件也在c:\cron目录。这里是我写的一个安装/卸载脚本,想尝试一下Windows版Cron的同学可以直接下载,解压后执行setup.bat来安装服务。服务安装好默认是stop的,需要手动启动,请确保执行前写好你的crontab文件,启动可以在命令行执行sc start cron或者在任务管理器的服务标签右击cron来启动。

-
文章作者: all4fun
文章链接: http://wangheng.org/implementation-windows-version-the-the-the-cron.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/index.html b/index.html index a6d31225..a632d178 100644 --- a/index.html +++ b/index.html @@ -1,225 +1,282 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
\ No newline at end of file + })(window)
\ No newline at end of file diff --git a/install-darwin-streaming-server-6-0-3-on-linux.html b/install-darwin-streaming-server-6-0-3-on-linux.html index c8031396..3a6602ba 100644 --- a/install-darwin-streaming-server-6-0-3-on-linux.html +++ b/install-darwin-streaming-server-6-0-3-on-linux.html @@ -1,168 +1,156 @@ -Linux编译安装Darwin Streaming Server 6.0.3 | all4fun blog +Linux编译安装Darwin Streaming Server 6.0.3 | 王恒's Blog - + - + - - + + -

Linux编译安装Darwin Streaming Server 6.0.3

+ })(window)

Linux编译安装Darwin Streaming Server 6.0.3

    买回来VPS后就一直想在上面搭建一个流媒体服务,在网上搜索了很多资料,大部分都是介绍Linux中安装Darwin Streaming Server 5.5.5版本,因为这个版本提供了针对linux的安装脚本。但既然官网有了6.0.3版本,于是果断尝试安装最新的版本。

1、什么是Darwin Streaming Server

    目前主流的流媒体服务器有微软的windows media server、RealNetworks的Helixserver和苹果公司的Darwin Streaming Server. 微软的windows media server只能在windows2000 server和windows 2003 server下使用,不在考虑之列。RealNetworks的Helixserver是一款跨平台的软件,功能也很强大,但并非免费软件。

    Darwin Streaming Server简称DSS。DSS是Apple公司提供的开源实时流媒体播放服务器程序。整个程序使用C++编写,在设计上遵循高性能,简单,模块化等程序设计原则,务求做到程序高效,可扩充性好。并且DSS是一个开放源代码的,基于标准的流媒体服务器,可以运行在Windows NT和Windows 2000,以及几个UNIX实现上,包括Mac OS X,Linux,FreeBSD,和Solaris操作系统上的。

2、在Linux中编译安装Darwin Streaming Server

首先需要进行一些必要的准备工作:

apt-get install patch make gcc g++ 

准备好软件暂存的目录,并从官网下载软件的源码:

@@ -204,7 +192,7 @@

将-M修改成-m

-

clip_image001[4]

+

clip_image001[4]

执行./Install 
@@ -222,7 +210,7 @@


qtss … … … /usr/local/sbin/DarwinStreamingServer

netstat -ntulp | grep Darwin(查看流媒体服务器的端口)
-

 clip_image002[4]

+

 clip_image002[4]

3、启动 Darwin Streaming Server

@@ -240,7 +228,7 @@

最后在服务器输入 http://你的IP:1220/来访问web管理

-

image

+

image

默认的媒体文件存放在/usr/local/movies

@@ -254,61 +242,37 @@

来播放默认的测试视频。如果你的网速够给力的话效果还不错 :)

-
文章作者: all4fun
文章链接: http://wangheng.org/install-darwin-streaming-server-6-0-3-on-linux.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/install-nvidia-official-drivers.html b/install-nvidia-official-drivers.html index 54afc0cc..07c08f81 100644 --- a/install-nvidia-official-drivers.html +++ b/install-nvidia-official-drivers.html @@ -1,223 +1,187 @@ -安装nvidia官方驱动 | all4fun blog +安装nvidia官方驱动 | 王恒's Blog - + - + - - + + -

安装nvidia官方驱动

+ })(window)

安装nvidia官方驱动

以前未发布的文章,现在一块贴出来吧。Ubuntu10.10 安装nvidia官方驱动

1. 下载最新版的nVidia驱动,命名为NVIDIA.run。

http://www.nvidia.com/page/drivers.html

2.编辑blacklist.conf。

sudo gedit /etc/modprobe.d/blacklist.conf

添加以下部分并保存:

blacklist vga16fb

blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv

3. 删除之前所安装的nVidia驱动。

sudo apt-get –purge remove nvidia-* sudo apt-get --purge remove xserver-xorg-video-nouveau

4. 重启电脑。

5. 按Ctrl + Alt +F1到第一控制台。

6. 输入用户名和密码后,登录后执行:

sudo /etc/init.d/gdm stop

7. 进入驱动所在的文件夹,安装驱动。

sudo sh NVIDIA.run –k $(uname –r)

8.启动GDM :

sudo /etc/init.d/gdm start

9.重启电脑。

sudo reboot

10.如果存在花屏等问题,执行:

sudo nvidia-xconfig sudo nvidia-settings

11.根据自己的电脑配置设置分辨率和刷新频率。

-
文章作者: all4fun
文章链接: http://wangheng.org/install-nvidia-official-drivers.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
\ No newline at end of file +} + \ No newline at end of file diff --git a/install-oracle12c-on-centos6-5.html b/install-oracle12c-on-centos6-5.html index c668fb93..071fc99a 100644 --- a/install-oracle12c-on-centos6-5.html +++ b/install-oracle12c-on-centos6-5.html @@ -1,165 +1,153 @@ -Centos 6.5 安装 Oracle 12C | all4fun blog +Centos 6.5 安装 Oracle 12C | 王恒's Blog - + - + - - + + -

Centos 6.5 安装 Oracle 12C

+ })(window)

Centos 6.5 安装 Oracle 12C

Oracle已经发布Oracle 12C 一段时间了,Oracle此次发布只有64位版本,并无32位版本。我们的系统安装环境为CentOS 6.5 x86_64 。

1、安装Oracle依赖包

修改yum配置,默认同时安装32位和64位rpm @@ -273,61 +261,37 @@

5 疑难问题:

umount /dev/shm

umount: /dev/shm: device is busy.

用fuser处理

fuser -km /dev/shm

此时再启动oracle,就没有问题了。

-
文章作者: all4fun
文章链接: http://wangheng.org/install-oracle12c-on-centos6-5.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
\ No newline at end of file +} + \ No newline at end of file diff --git a/internet-common-open-api-resources.html b/internet-common-open-api-resources.html new file mode 100644 index 00000000..913bc12c --- /dev/null +++ b/internet-common-open-api-resources.html @@ -0,0 +1,234 @@ +互联网常见Open API文档资源(转载) | 王恒's Blog + + + + + + + + + + + + +

互联网常见Open API文档资源(转载)

+所谓的开放API(OpenAPI)是服务型网站常见的一种应用,网站的服务商将自己的网站服务封装成一系列API(Application Programming Interface,应用编程接口)开放出去,供第三方开发者使用,这种行为就叫做开放网站的API,所开放的API就被称作OpenAPI(开放API)。 + +

网站提供开放平台的API后,可以吸引一些第三方的开发人员在该平台上开发商业应用,平台提供商可以获得更多的流量与市场份额,第三方开发者不需要庞大的硬件与技术投资就可以轻松快捷的创业,从而达到双赢的目的,开放API是大平台发展、共享的途径,让开发者开发一个有价值应用,付出的成本更少,成功的机会更多。今天,OpenAPI作为互联网在线服务的发展基础,已经成为越来越多互联网企业发展服务的必然选择。下面我就列举一些常见网站服务的Open API文档资源索引。

+

SNS类网站API

+

Facebook - http://developers.facebook.com/

+

人人网开放平台 - http://dev.renren.com/

+

51.com开放平台 - http://developers.51.com/

+

MySpace开发者平台 - http://developer.myspace.cn/

+

Opensocial - http://wiki.opensocial.org/

+

Google Gadgets 小工具 API 开发人员指南 - http://www.google.com/intl/zh-TW/apis/gadgets/docs-home.html

+

Gadgets API 开发人员指南 - http://code.google.com/intl/zh-CN/apis/gadgets/docs/dev_guide.html

+

Gadgets API - http://code.google.com/intl/zh-CN/apis/gadgets/

+

电子商务类

+

Amazon API - http://aws.amazon.com/

+

eBay API - http://developer.ebay.com/

+

淘宝开放平台 - http://www.taobao.com/theme/tao_source/

+

微博API

+

Twitter API - http://apiwiki.twitter.com/Twitter-API-Documentation

+

Status.Net(Laconica) API - http://status.net/wiki/Twitter-compatible_API

+

新浪微博开发者平台 - http://open.t.sina.com.cn

+

注:需要授权的开发者才能访问,其API调用格式类似Twitter,但需要一个API Key用于认证管理。

+

搜狐博客开放平台 - http://ow.blog.sohu.com/

+

Follow5 API - http://www.follow5.com/f5/jsp/other/api/api.jsp

+

嘀咕API - http://code.google.com/p/digu-api/wiki/DiguApi

+

做啥API - http://code.google.com/p/zuosa-api/wiki/ZuosaApiDoc

+

人间网API - http://renjian.com/api.html

+

9911微博API - http://www.9911.com/api.php

+

Google Maps API

+

Google Maps API Developer Guide - http://code.google.com/intl/en/apis/maps/documentation/

+

Google Maps API Tutorial - http://econym.org.uk/gmap/extensions.htm

+

GMaps Utility Library - http://code.google.com/p/gmaps-utility-library-dev/wiki/Libraries

+

GMaps Utility Examples - http://gmaps-utility-library.googlecode.com/svn/trunk/labeledmarker/release/examples/

+

Saving User-Added Form Data - http://code.google.com/intl/zh-CN/apis/maps/articles/phpsqlinfo.html

+

Firefox类

+

Mozilla 开发者中心的扩展开发专题 - https://developer.mozilla.org/en/Extensions

+

XUL 1.0 规范 - http://www-archive.mozilla.org/projects/xul/xul.html

+

更多地了解这种基于 XML 的用户界面语言,它可以构建各种富跨平台应用程序。

+

Mozilla Development Center 的 XUL 教程 - http://developer.mozilla.org/en/docs/XUL_Tutorial

+

Getting started with extension development 编写一个最简单的Firefox扩展 - http://kb.mozillazine.org/Getting_started_with_extension_development

+

Setting up extension development environment - http://developer.mozilla.org/en/docs/Setting_up_extension_development_environment

+

实战 Firefox 扩展开发 - http://www.ibm.com/developerworks/cn/web/wa-lo-firefox-ext/

+

使用 XUL 实现浏览器扩展 (1) - http://www.ibm.com/developerworks/cn/web/wa-xul1/

+

使用 XUL 实现浏览器扩展 (2) - http://www.ibm.com/developerworks/cn/web/wa-xul2/

+

应用类

+

豆瓣API - http://www.douban.com/service/apidoc/

+

Flickr API - http://www.flickr.com/services/api/

+

Last.fm API - http://www.last.fm/api

+

Box.net API - http://developers.box.net/

+

Delicious API - http://delicious.com/help/api

+

API统计 - http://www.programmableweb.com/apis

+
文章作者: 王恒
文章链接: http://wangheng.org/internet-common-open-api-resources.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file diff --git a/ipad2-by-vim-installation-and-configuration.html b/ipad2-by-vim-installation-and-configuration.html index c0690179..e7b2cf51 100644 --- a/ipad2-by-vim-installation-and-configuration.html +++ b/ipad2-by-vim-installation-and-configuration.html @@ -1,168 +1,156 @@ -ipad2下的vim安装和配置 | all4fun blog +ipad2下的vim安装和配置 | 王恒's Blog - + - + - - + + -

ipad2下的vim安装和配置

+ })(window)

ipad2下的vim安装和配置

前面写了给ipad2配置gcc编译环境的过程,中间用到了vim这款文字编辑工具,默认安装的vim需要一些配置才能对语句正确着色和自动折行。

vim可以通过cydia中搜索安装,或者ssh到ipad,直接执行命令:

@@ -181,65 +169,40 @@ set laststatus=2 set statusline=\ %

使用:wq或者ZZ保存并退出

- -image +image

重新使用vim编辑文件,看看是不是有语法高亮了。: )

-
文章作者: all4fun
文章链接: http://wangheng.org/ipad2-by-vim-installation-and-configuration.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/javascript-coding-decoding-method.html b/javascript-coding-decoding-method.html index 80659595..b597cff8 100644 --- a/javascript-coding-decoding-method.html +++ b/javascript-coding-decoding-method.html @@ -1,166 +1,154 @@ -Javascript编码解码方法 | all4fun blog +Javascript编码解码方法 | 王恒's Blog - + - + - - + + -

Javascript编码解码方法

+ })(window)

Javascript编码解码方法

ASP(Server.UrlEncode)、PHP(urlencode())函数编码结果,或是经过asp、php等动态语言直接写入COOKIES的中文字符,用JS读取的时候,都会碰到一个编码的问题,那就是最终字符串被urlencode编码了,而又时有需要从JS在客户端去读取这些数据。而本文,就大概说说如何在js中通过系统自带的函数去解决这个问题。

而相信碰到过此问题的朋友应该都有所了解,目前网络上流行一些js下的自定义函数去解决这个问题,如说vbscript(URLDecode())、javascript(UrlDecode())等。而这两个函数,都无法很好的与asp(Server.UrlEncode)、php(urlencode())这两个函数相互通讯。

@@ -183,61 +171,37 @@ 解码(原=%E7%83%A6%E6%81%BC):烦恼 注意:在UTF-8编码环境下测试通过。
-
文章作者: all4fun
文章链接: http://wangheng.org/javascript-coding-decoding-method.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/javascript-mouse-wheel-event.html b/javascript-mouse-wheel-event.html index e25f3246..3cd04c2f 100644 --- a/javascript-mouse-wheel-event.html +++ b/javascript-mouse-wheel-event.html @@ -1,166 +1,154 @@ -JavaScript中的鼠标滚轮事件 | all4fun blog +JavaScript中的鼠标滚轮事件 | 王恒's Blog - + - + - - + + -

JavaScript中的鼠标滚轮事件

+ })(window)

JavaScript中的鼠标滚轮事件

Firefox使用DOMMouseScroll,其他的浏览器使用mousewheel。滚动事件触发时Firefox使用detail属性捕捉滚轮信息,其他的浏览器使用wheelDelta。不知道为何在该问题上其他厂商和微软的如此一致。Firefox可以使用addEventListener方法绑定DomMouseScroll事件。
elem.addEventListener('DOMMouseScroll', func, false);
IE和其他的主流浏览器可以使用传统的事件绑定模型。但不要使用IE专有的attachEvent方法,其他主流浏览器并不识别微软的这个方法。下面先测试一下。 @@ -206,61 +194,37 @@ 鼠标滚轮向上滚动是120,向下滚动是-120</pre>

有人在Safari下做了一些测试:”只是滚动一圈的话,值为+-0.1,如果滚动地稍微快点的话(多滚动几圈),这个值也会变大。 这是因为Mac OS下有鼠标滚轮加速功能。滚动一次,浏览器滚动1像素,滚动3次,浏览器却滚动30像素”。同时他也对Camino(基于Gecko的内核引擎)进行研究:“与Safari相似(+- 0.3 to +-Infinity),虽然使用了与firefox相同的内核引擎,但结果这个delta值却只在+-2.666666里浮动,无论滚动速度如何。”

-
文章作者: all4fun
文章链接: http://wangheng.org/javascript-mouse-wheel-event.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
赞助
  • 微信
    微信
  • 支付宝
    支付宝

评论

评论
avatar
王恒
make progress little day by day.
关注
\ No newline at end of file +} + \ No newline at end of file diff --git a/js/main.js b/js/main.js index fa41a4c5..41a21e4a 100644 --- a/js/main.js +++ b/js/main.js @@ -1,709 +1,660 @@ -document.addEventListener('DOMContentLoaded', () => { - let headerContentWidth, $nav - let mobileSidebarOpen = false - - const adjustMenu = init => { - const getAllWidth = ele => Array.from(ele).reduce((width, i) => width + i.offsetWidth, 0) - - if (init) { - const blogInfoWidth = getAllWidth(document.querySelector('#blog-info > a').children) - const menusWidth = getAllWidth(document.getElementById('menus').children) - headerContentWidth = blogInfoWidth + menusWidth - $nav = document.getElementById('nav') +document.addEventListener('DOMContentLoaded', function () { + const $blogName = document.getElementById('site-name') + let blogNameWidth = $blogName && $blogName.offsetWidth + const $menusEle = document.querySelector('#menus .menus_items') + let menusWidth = $menusEle && $menusEle.offsetWidth + const $searchEle = document.querySelector('#search-button') + let searchWidth = $searchEle && $searchEle.offsetWidth + + const adjustMenu = (change = false) => { + if (change) { + blogNameWidth = $blogName && $blogName.offsetWidth + menusWidth = $menusEle && $menusEle.offsetWidth + searchWidth = $searchEle && $searchEle.offsetWidth + } + const $nav = document.getElementById('nav') + let t + if (window.innerWidth < 768) t = true + else t = blogNameWidth + menusWidth + searchWidth > $nav.offsetWidth - 120 + + if (t) { + $nav.classList.add('hide-menu') + } else { + $nav.classList.remove('hide-menu') } - - const hideMenuIndex = window.innerWidth <= 768 || headerContentWidth > $nav.offsetWidth - 120 - $nav.classList.toggle('hide-menu', hideMenuIndex) } // 初始化header const initAdjust = () => { - adjustMenu(true) - $nav.classList.add('show') + adjustMenu() + document.getElementById('nav').classList.add('show') } // sidebar menus - const sidebarFn = { - open: () => { - btf.overflowPaddingR.add() - btf.animateIn(document.getElementById('menu-mask'), 'to_show 0.5s') - document.getElementById('sidebar-menus').classList.add('open') - mobileSidebarOpen = true - }, - close: () => { - btf.overflowPaddingR.remove() - btf.animateOut(document.getElementById('menu-mask'), 'to_hide 0.5s') - document.getElementById('sidebar-menus').classList.remove('open') - mobileSidebarOpen = false + const sidebarFn = () => { + const $toggleMenu = document.getElementById('toggle-menu') + const $mobileSidebarMenus = document.getElementById('sidebar-menus') + const $menuMask = document.getElementById('menu-mask') + const $body = document.body + + function openMobileSidebar () { + btf.sidebarPaddingR() + $body.style.overflow = 'hidden' + btf.fadeIn($menuMask, 0.5) + $mobileSidebarMenus.classList.add('open') + } + + function closeMobileSidebar () { + $body.style.overflow = '' + $body.style.paddingRight = '' + btf.fadeOut($menuMask, 0.5) + $mobileSidebarMenus.classList.remove('open') } + + $toggleMenu.addEventListener('click', openMobileSidebar) + + $menuMask.addEventListener('click', e => { + if ($mobileSidebarMenus.classList.contains('open')) { + closeMobileSidebar() + } + }) + + window.addEventListener('resize', e => { + if (btf.isHidden($toggleMenu)) { + if ($mobileSidebarMenus.classList.contains('open')) closeMobileSidebar() + } + }) } /** - * 首頁top_img底下的箭頭 - */ + * 首頁top_img底下的箭頭 + */ const scrollDownInIndex = () => { - const handleScrollToDest = () => { - btf.scrollToDest(document.getElementById('content-inner').offsetTop, 300) - } - const $scrollDownEle = document.getElementById('scroll-down') - $scrollDownEle && btf.addEventListenerPjax($scrollDownEle, 'click', handleScrollToDest) + $scrollDownEle && $scrollDownEle.addEventListener('click', function () { + btf.scrollToDest(document.getElementById('content-inner').offsetTop, 300) + }) } /** - * 代碼 - * 只適用於Hexo默認的代碼渲染 - */ - const addHighlightTool = () => { + * 代碼 + * 只適用於Hexo默認的代碼渲染 + */ + const addHighlightTool = function () { const highLight = GLOBAL_CONFIG.highlight if (!highLight) return - const { highlightCopy, highlightLang, highlightHeightLimit, highlightFullpage, highlightMacStyle, plugin } = highLight + const isHighlightCopy = highLight.highlightCopy + const isHighlightLang = highLight.highlightLang const isHighlightShrink = GLOBAL_CONFIG_SITE.isHighlightShrink - const isShowTool = highlightCopy || highlightLang || isHighlightShrink !== undefined || highlightFullpage || highlightMacStyle - const $figureHighlight = plugin === 'highlight.js' ? document.querySelectorAll('figure.highlight') : document.querySelectorAll('pre[class*="language-"]') + const highlightHeightLimit = highLight.highlightHeightLimit + const isShowTool = isHighlightCopy || isHighlightLang || isHighlightShrink !== undefined + const $figureHighlight = highLight.plugin === 'highlighjs' ? document.querySelectorAll('figure.highlight') : document.querySelectorAll('pre[class*="language-"]') if (!((isShowTool || highlightHeightLimit) && $figureHighlight.length)) return - const isPrismjs = plugin === 'prismjs' + const isPrismjs = highLight.plugin === 'prismjs' + + let highlightShrinkEle = '' + let highlightCopyEle = '' const highlightShrinkClass = isHighlightShrink === true ? 'closed' : '' - const highlightShrinkEle = isHighlightShrink !== undefined ? '' : '' - const highlightCopyEle = highlightCopy ? '
' : '' - const highlightMacStyleEle = '
' - const highlightFullpageEle = highlightFullpage ? '' : '' - - const alertInfo = (ele, text) => { - if (GLOBAL_CONFIG.Snackbar !== undefined) { - btf.snackbarShow(text) - } else { - ele.textContent = text - ele.style.opacity = 1 - setTimeout(() => { ele.style.opacity = 0 }, 800) - } + + if (isHighlightShrink !== undefined) { + highlightShrinkEle = `` } - const copy = async (text, ctx) => { - try { - await navigator.clipboard.writeText(text) - alertInfo(ctx, GLOBAL_CONFIG.copy.success) - } catch (err) { - console.error('Failed to copy: ', err) - alertInfo(ctx, GLOBAL_CONFIG.copy.noSupport) + if (isHighlightCopy) { + highlightCopyEle = '
' + } + + const copy = (text, ctx) => { + if (document.queryCommandSupported && document.queryCommandSupported('copy')) { + document.execCommand('copy') + if (GLOBAL_CONFIG.Snackbar !== undefined) { + btf.snackbarShow(GLOBAL_CONFIG.copy.success) + } else { + const prevEle = ctx.previousElementSibling + prevEle.innerText = GLOBAL_CONFIG.copy.success + prevEle.style.opacity = 1 + setTimeout(() => { prevEle.style.opacity = 0 }, 700) + } + } else { + if (GLOBAL_CONFIG.Snackbar !== undefined) { + btf.snackbarShow(GLOBAL_CONFIG.copy.noSupport) + } else { + ctx.previousElementSibling.innerText = GLOBAL_CONFIG.copy.noSupport + } } } // click events - const highlightCopyFn = (ele, clickEle) => { + const highlightCopyFn = (ele) => { const $buttonParent = ele.parentNode $buttonParent.classList.add('copy-true') - const preCodeSelector = isPrismjs ? 'pre code' : 'table .code pre' - const codeElement = $buttonParent.querySelector(preCodeSelector) - if (!codeElement) return - copy(codeElement.innerText, clickEle.previousElementSibling) + const selection = window.getSelection() + const range = document.createRange() + if (isPrismjs) range.selectNodeContents($buttonParent.querySelectorAll('pre code')[0]) + else range.selectNodeContents($buttonParent.querySelectorAll('table .code pre')[0]) + selection.removeAllRanges() + selection.addRange(range) + const text = selection.toString() + copy(text, ele.lastChild) + selection.removeAllRanges() $buttonParent.classList.remove('copy-true') } - const highlightShrinkFn = ele => ele.classList.toggle('closed') - - const codeFullpage = (item, clickEle) => { - const wrapEle = item.closest('figure.highlight') - const isFullpage = wrapEle.classList.toggle('code-fullpage') - - document.body.style.overflow = isFullpage ? 'hidden' : '' - clickEle.classList.toggle('fa-down-left-and-up-right-to-center', isFullpage) - clickEle.classList.toggle('fa-up-right-and-down-left-from-center', !isFullpage) + const highlightShrinkFn = (ele) => { + const $nextEle = [...ele.parentNode.children].slice(1) + ele.firstChild.classList.toggle('closed') + if (btf.isHidden($nextEle[$nextEle.length - 1])) { + $nextEle.forEach(e => { e.style.display = 'block' }) + } else { + $nextEle.forEach(e => { e.style.display = 'none' }) + } } - const highlightToolsFn = e => { + const highlightToolsFn = function (e) { const $target = e.target.classList - const currentElement = e.currentTarget - if ($target.contains('expand')) highlightShrinkFn(currentElement) - else if ($target.contains('copy-button')) highlightCopyFn(currentElement, e.target) - else if ($target.contains('fullpage-button')) codeFullpage(currentElement, e.target) + if ($target.contains('expand')) highlightShrinkFn(this) + else if ($target.contains('copy-button')) highlightCopyFn(this) } - const expandCode = e => e.currentTarget.classList.toggle('expand-done') - - // 獲取隱藏狀態下元素的真實高度 - const getActualHeight = item => { - const hiddenElements = new Map() - - const fix = () => { - let current = item - while (current !== document.body && current != null) { - if (window.getComputedStyle(current).display === 'none') { - hiddenElements.set(current, current.getAttribute('style') || '') - } - current = current.parentNode - } - - const style = 'visibility: hidden !important; display: block !important;' - hiddenElements.forEach((originalStyle, elem) => { - elem.setAttribute('style', originalStyle ? originalStyle + ';' + style : style) - }) - } - - const restore = () => { - hiddenElements.forEach((originalStyle, elem) => { - if (originalStyle === '') elem.removeAttribute('style') - else elem.setAttribute('style', originalStyle) - }) - } - - fix() - const height = item.offsetHeight - restore() - return height + const expandCode = function () { + this.classList.toggle('expand-done') } - const createEle = (lang, item) => { + function createEle (lang, item, service) { const fragment = document.createDocumentFragment() if (isShowTool) { const hlTools = document.createElement('div') hlTools.className = `highlight-tools ${highlightShrinkClass}` - hlTools.innerHTML = highlightMacStyleEle + highlightShrinkEle + lang + highlightCopyEle + highlightFullpageEle - btf.addEventListenerPjax(hlTools, 'click', highlightToolsFn) + hlTools.innerHTML = highlightShrinkEle + lang + highlightCopyEle + hlTools.addEventListener('click', highlightToolsFn) fragment.appendChild(hlTools) } - if (highlightHeightLimit && getActualHeight(item) > highlightHeightLimit + 30) { + if (highlightHeightLimit && item.offsetHeight > highlightHeightLimit + 30) { const ele = document.createElement('div') ele.className = 'code-expand-btn' ele.innerHTML = '' - btf.addEventListenerPjax(ele, 'click', expandCode) + ele.addEventListener('click', expandCode) fragment.appendChild(ele) } - isPrismjs ? item.parentNode.insertBefore(fragment, item) : item.insertBefore(fragment, item.firstChild) + if (service === 'hl') { + item.insertBefore(fragment, item.firstChild) + } else { + item.parentNode.insertBefore(fragment, item) + } } - $figureHighlight.forEach(item => { - let langName = '' - if (isPrismjs) btf.wrap(item, 'figure', { class: 'highlight' }) - - if (!highlightLang) { - createEle('', item) - return + if (isHighlightLang) { + if (isPrismjs) { + $figureHighlight.forEach(function (item) { + const langName = item.getAttribute('data-language') ? item.getAttribute('data-language') : 'Code' + const highlightLangEle = `
${langName}
` + btf.wrap(item, 'figure', { class: 'highlight' }) + createEle(highlightLangEle, item) + }) + } else { + $figureHighlight.forEach(function (item) { + let langName = item.getAttribute('class').split(' ')[1] + if (langName === 'plain' || langName === undefined) langName = 'Code' + const highlightLangEle = `
${langName}
` + createEle(highlightLangEle, item, 'hl') + }) } - + } else { if (isPrismjs) { - langName = item.getAttribute('data-language') || 'Code' + $figureHighlight.forEach(function (item) { + btf.wrap(item, 'figure', { class: 'highlight' }) + createEle('', item) + }) } else { - langName = item.getAttribute('class').split(' ')[1] - if (langName === 'plain' || langName === undefined) langName = 'Code' + $figureHighlight.forEach(function (item) { + createEle('', item, 'hl') + }) } - createEle(`
${langName}
`, item) - }) + } } /** - * PhotoFigcaption - */ - const addPhotoFigcaption = () => { - if (!GLOBAL_CONFIG.isPhotoFigcaption) return - document.querySelectorAll('#article-container img').forEach(item => { - const altValue = item.title || item.alt - if (!altValue) return - const ele = document.createElement('div') - ele.className = 'img-alt text-center' - ele.textContent = altValue - item.insertAdjacentElement('afterend', ele) + * PhotoFigcaption + */ + function addPhotoFigcaption () { + document.querySelectorAll('#article-container img').forEach(function (item) { + const parentEle = item.parentNode + const altValue = item.alt + if (altValue && !parentEle.parentNode.classList.contains('justified-gallery')) { + const ele = document.createElement('div') + ele.className = 'img-alt is-center' + ele.textContent = altValue + parentEle.insertBefore(ele, item.nextSibling) + } }) } /** - * Lightbox - */ - const runLightbox = () => { - btf.loadLightbox(document.querySelectorAll('#article-container img:not(.no-lightbox)')) - } - - /** - * justified-gallery 圖庫排版 - */ - - const fetchUrl = async url => { - try { - const response = await fetch(url) - return await response.json() - } catch (error) { - console.error('Failed to fetch URL:', error) - return [] - } - } - - const runJustifiedGallery = (container, data, config) => { - const { isButton, limit, firstLimit, tabs } = config - - const dataLength = data.length - const maxGroupKey = Math.ceil((dataLength - firstLimit) / limit + 1) - - // Gallery configuration - const igConfig = { - gap: 5, - isConstantSize: true, - sizeRange: [150, 600], - // useResizeObserver: true, - // observeChildren: true, - useTransform: true - // useRecycle: false - } - - const ig = new InfiniteGrid.JustifiedInfiniteGrid(container, igConfig) - let isLayoutHidden = false - - // Utility functions - const sanitizeString = str => (str && str.replace(/"/g, '"')) || '' - - const createImageItem = item => { - const alt = item.alt ? `alt="${sanitizeString(item.alt)}"` : '' - const title = item.title ? `title="${sanitizeString(item.title)}"` : '' - return `
- -
` - } - - const getItems = (nextGroupKey, count, isFirst = false) => { - const startIndex = isFirst ? (nextGroupKey - 1) * count : (nextGroupKey - 2) * count + firstLimit - return data.slice(startIndex, startIndex + count).map(createImageItem) - } - - // Load more button - const addLoadMoreButton = container => { - const button = document.createElement('button') - button.innerHTML = `${GLOBAL_CONFIG.infinitegrid.buttonText}` - - button.addEventListener('click', () => { - button.remove() - btf.setLoading.add(container) - appendItems(ig.getGroups().length + 1, limit) - }, { once: true }) + * justified-gallery 圖庫排版 + * 需要 jQuery + */ - container.insertAdjacentElement('afterend', button) + let detectJgJsLoad = false + const runJustifiedGallery = function (ele) { + const $justifiedGallery = $(ele) + const $imgList = $justifiedGallery.find('img') + $imgList.unwrap() + if ($imgList.length) { + $imgList.each(function (i, o) { + if ($(o).attr('data-lazy-src')) $(o).attr('src', $(o).attr('data-lazy-src')) + $(o).wrap('
') + }) } - const appendItems = (nextGroupKey, count, isFirst) => { - ig.append(getItems(nextGroupKey, count, isFirst), nextGroupKey) + if (detectJgJsLoad) btf.initJustifiedGallery($justifiedGallery) + else { + $('head').append(``) + $.getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`, function () { + btf.initJustifiedGallery($justifiedGallery) + }) + detectJgJsLoad = true } + } - // Event handlers - const handleRenderComplete = e => { - if (tabs) { - const parentNode = container.parentNode - if (isLayoutHidden) { - parentNode.style.visibility = 'visible' - } - if (container.offsetHeight === 0) { - parentNode.style.visibility = 'hidden' - isLayoutHidden = true - } - } - - const { updated, isResize, mounted } = e - if (!updated.length || !mounted.length || isResize) return - - btf.loadLightbox(container.querySelectorAll('img:not(.medium-zoom-image)')) - - if (ig.getGroups().length === maxGroupKey) { - btf.setLoading.remove(container) - !tabs && ig.off('renderComplete', handleRenderComplete) - return - } + /** + * fancybox和 mediumZoom + */ + const addFancybox = function (ele) { + const runFancybox = (ele) => { + ele.each(function (i, o) { + const $this = $(o) + const lazyloadSrc = $this.attr('data-lazy-src') || $this.attr('src') + const dataCaption = $this.attr('alt') || '' + $this.wrap(``) + }) - if (isButton) { - btf.setLoading.remove(container) - addLoadMoreButton(container) - } + $().fancybox({ + selector: '[data-fancybox]', + loop: true, + transitionEffect: 'slide', + protect: true, + buttons: ['slideShow', 'fullScreen', 'thumbs', 'close'], + hash: false + }) } - const handleRequestAppend = btf.debounce(e => { - const nextGroupKey = (+e.groupKey || 0) + 1 - - if (nextGroupKey === 1) appendItems(nextGroupKey, firstLimit, true) - else appendItems(nextGroupKey, limit) - - if (nextGroupKey === maxGroupKey) ig.off('requestAppend', handleRequestAppend) - }, 300) - - btf.setLoading.add(container) - ig.on('renderComplete', handleRenderComplete) - - if (isButton) { - appendItems(1, firstLimit, true) + if (typeof $.fancybox === 'undefined') { + $('head').append(``) + $.getScript(`${GLOBAL_CONFIG.source.fancybox.js}`, function () { + runFancybox($(ele)) + }) } else { - ig.on('requestAppend', handleRequestAppend) - ig.renderItems() + runFancybox($(ele)) } - - btf.addGlobalFn('pjaxSendOnce', () => ig.destroy()) } - const addJustifiedGallery = async (elements, tabs = false) => { - if (!elements.length) return - - const initGallery = async () => { - for (const element of elements) { - if (btf.isHidden(element) || element.classList.contains('loaded')) continue - - const config = { - isButton: element.getAttribute('data-button') === 'true', - limit: parseInt(element.getAttribute('data-limit'), 10), - firstLimit: parseInt(element.getAttribute('data-first'), 10), - tabs - } - - const container = element.firstElementChild - const content = container.textContent - container.textContent = '' - element.classList.add('loaded') - - try { - const data = element.getAttribute('data-type') === 'url' ? await fetchUrl(content) : JSON.parse(content) - runJustifiedGallery(container, data, config) - } catch (error) { - console.error('Gallery data parsing failed:', error) - } - } - } - - if (typeof InfiniteGrid === 'function') { - await initGallery() - } else { - await btf.getScript(GLOBAL_CONFIG.infinitegrid.js) - await initGallery() - } + const addMediumZoom = () => { + const zoom = mediumZoom(document.querySelectorAll('#article-container :not(a):not(.flink-item-icon) > img')) + zoom.on('open', e => { + const photoBg = document.documentElement.getAttribute('data-theme') === 'dark' ? '#121212' : '#fff' + zoom.update({ + background: photoBg + }) + }) } - /** - * rightside scroll percent - */ - const rightsideScrollPercent = currentTop => { - const scrollPercent = btf.getScrollPercent(currentTop, document.body) - const goUpElement = document.getElementById('go-up') - - if (scrollPercent < 95) { - goUpElement.classList.add('show-percent') - goUpElement.querySelector('.scroll-percent').textContent = scrollPercent - } else { - goUpElement.classList.remove('show-percent') + const jqLoadAndRun = () => { + const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox' + ? document.querySelectorAll('#article-container :not(a):not(.gallery-group):not(.flink-item-icon) > img, #article-container > img') + : [] + const fbLengthNoZero = $fancyboxEle.length > 0 + const $jgEle = document.querySelectorAll('#article-container .justified-gallery') + const jgLengthNoZero = $jgEle.length > 0 + + if (jgLengthNoZero || fbLengthNoZero) { + btf.isJqueryLoad(() => { + jgLengthNoZero && runJustifiedGallery($jgEle) + fbLengthNoZero && addFancybox($fancyboxEle) + }) } } /** - * 滾動處理 - */ - const scrollFn = () => { + * 滾動處理 + */ + const scrollFn = function () { const $rightside = document.getElementById('rightside') const innerHeight = window.innerHeight + 56 - let initTop = 0 - const $header = document.getElementById('page-header') - const isChatBtn = typeof chatBtn !== 'undefined' - const isShowPercent = GLOBAL_CONFIG.percent.rightside - - // 檢查文檔高度是否小於視窗高度 - const checkDocumentHeight = () => { - if (document.body.scrollHeight <= innerHeight) { - $rightside.classList.add('rightside-show') - return true - } - return false - } - // 如果文檔高度小於視窗高度,直接返回 - if (checkDocumentHeight()) return + // 當滾動條小于 56 的時候 + if (document.body.scrollHeight <= innerHeight) { + $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' + return + } // find the scroll direction - const scrollDirection = currentTop => { + function scrollDirection (currentTop) { const result = currentTop > initTop // true is down & false is up initTop = currentTop return result } - let flag = '' - const scrollTask = btf.throttle(() => { - const currentTop = window.scrollY || document.documentElement.scrollTop - const isDown = scrollDirection(currentTop) - if (currentTop > 56) { - if (flag === '') { + let initTop = 0 + let isChatShow = true + const $header = document.getElementById('page-header') + const isChatBtnHide = typeof chatBtnHide === 'function' + const isChatBtnShow = typeof chatBtnShow === 'function' + + window.scrollCollect = () => { + return btf.throttle(function (e) { + const currentTop = window.scrollY || document.documentElement.scrollTop + const isDown = scrollDirection(currentTop) + if (currentTop > 56) { + if (isDown) { + if ($header.classList.contains('nav-visible')) $header.classList.remove('nav-visible') + if (isChatBtnShow && isChatShow === true) { + chatBtnHide() + isChatShow = false + } + } else { + if (!$header.classList.contains('nav-visible')) $header.classList.add('nav-visible') + if (isChatBtnHide && isChatShow === false) { + chatBtnShow() + isChatShow = true + } + } $header.classList.add('nav-fixed') - $rightside.classList.add('rightside-show') - } - - if (isDown) { - if (flag !== 'down') { - $header.classList.remove('nav-visible') - isChatBtn && window.chatBtn.hide() - flag = 'down' + if (window.getComputedStyle($rightside).getPropertyValue('opacity') === '0') { + $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' } } else { - if (flag !== 'up') { - $header.classList.add('nav-visible') - isChatBtn && window.chatBtn.show() - flag = 'up' + if (currentTop === 0) { + $header.classList.remove('nav-fixed', 'nav-visible') } + $rightside.style.cssText = "opacity: ''; transform: ''" } - } else { - flag = '' - if (currentTop === 0) { - $header.classList.remove('nav-fixed', 'nav-visible') - } - $rightside.classList.remove('rightside-show') - } - isShowPercent && rightsideScrollPercent(currentTop) - checkDocumentHeight() - }, 300) + if (document.body.scrollHeight <= innerHeight) { + $rightside.style.cssText = 'opacity: 1; transform: translateX(-38px)' + } + }, 200)() + } - btf.addEventListenerPjax(window, 'scroll', scrollTask, { passive: true }) + window.addEventListener('scroll', scrollCollect) } /** - * toc,anchor - */ - const scrollFnToDo = () => { - const isToc = GLOBAL_CONFIG_SITE.isToc - const isAnchor = GLOBAL_CONFIG.isAnchor + * toc + */ + const tocFn = function () { + const $cardTocLayout = document.getElementById('card-toc') + const $cardToc = $cardTocLayout.getElementsByClassName('toc-content')[0] + const $tocLink = $cardToc.querySelectorAll('.toc-link') const $article = document.getElementById('article-container') - if (!($article && (isToc || isAnchor))) return - - let $tocLink, $cardToc, autoScrollToc, $tocPercentage, isExpand - - if (isToc) { - const $cardTocLayout = document.getElementById('card-toc') - $cardToc = $cardTocLayout.querySelector('.toc-content') - $tocLink = $cardToc.querySelectorAll('.toc-link') - $tocPercentage = $cardTocLayout.querySelector('.toc-percentage') - isExpand = $cardToc.classList.contains('is-expand') + // main of scroll + window.tocScrollFn = function () { + return btf.throttle(function () { + const currentTop = window.scrollY || document.documentElement.scrollTop + scrollPercent(currentTop) + findHeadPosition(currentTop) + }, 100)() + } + window.addEventListener('scroll', tocScrollFn) + + const scrollPercent = function (currentTop) { + const docHeight = $article.clientHeight + const winHeight = document.documentElement.clientHeight + const headerHeight = $article.offsetTop + const contentMath = (docHeight > winHeight) ? (docHeight - winHeight) : (document.documentElement.scrollHeight - winHeight) + const scrollPercent = (currentTop - headerHeight) / (contentMath) + const scrollPercentRounded = Math.round(scrollPercent * 100) + const percentage = (scrollPercentRounded > 100) ? 100 : (scrollPercentRounded <= 0) ? 0 : scrollPercentRounded + $cardToc.setAttribute('progress-percentage', percentage) + } + + // anchor + const isAnchor = GLOBAL_CONFIG.isanchor + const updateAnchor = function (anchor) { + if (window.history.replaceState && anchor !== window.location.hash) { + if (!anchor) anchor = location.pathname + const title = GLOBAL_CONFIG_SITE.title + window.history.replaceState({ + url: location.href, + title: title + }, title, anchor) + } + } - // toc元素點擊 - const tocItemClickFn = e => { - const target = e.target.closest('.toc-link') - if (!target) return + const mobileToc = { + open: () => { + $cardTocLayout.style.cssText = 'animation: toc-open .3s; opacity: 1; right: 45px' + }, - e.preventDefault() - btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(target.getAttribute('href')).replace('#', ''))), 300) - if (window.innerWidth < 900) { - $cardTocLayout.classList.remove('open') - } + close: () => { + $cardTocLayout.style.animation = 'toc-close .2s' + setTimeout(() => { + $cardTocLayout.style.cssText = "opacity:''; animation: ''; right: ''" + }, 100) } + } - btf.addEventListenerPjax($cardToc, 'click', tocItemClickFn) - - autoScrollToc = item => { - const sidebarHeight = $cardToc.clientHeight - const itemOffsetTop = item.offsetTop - const itemHeight = item.clientHeight - const scrollTop = $cardToc.scrollTop - const offset = itemOffsetTop - scrollTop - const middlePosition = (sidebarHeight - itemHeight) / 2 + document.getElementById('mobile-toc-button').addEventListener('click', () => { + if (window.getComputedStyle($cardTocLayout).getPropertyValue('opacity') === '0') mobileToc.open() + else mobileToc.close() + }) - if (offset !== middlePosition) { - $cardToc.scrollTop = scrollTop + (offset - middlePosition) - } + // toc元素點擊 + $cardToc.addEventListener('click', (e) => { + e.preventDefault() + const $target = e.target.classList.contains('toc-link') + ? e.target + : e.target.parentElement + btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI($target.getAttribute('href')).replace('#', ''))), 300) + if (window.innerWidth < 900) { + mobileToc.close() } + }) - // 處理 hexo-blog-encrypt 事件 - $cardToc.style.display = 'block' + const autoScrollToc = function (item) { + const activePosition = item.getBoundingClientRect().top + const sidebarScrollTop = $cardToc.scrollTop + if (activePosition > (document.documentElement.clientHeight - 100)) { + $cardToc.scrollTop = sidebarScrollTop + 150 + } + if (activePosition < 100) { + $cardToc.scrollTop = sidebarScrollTop - 150 + } } // find head position & add active class - const $articleList = $article.querySelectorAll('h1,h2,h3,h4,h5,h6') + const list = $article.querySelectorAll('h1,h2,h3,h4,h5,h6') let detectItem = '' - - const findHeadPosition = top => { - if (top === 0) return false + const findHeadPosition = function (top) { + if ($tocLink.length === 0 || top === 0) { + return false + } let currentId = '' let currentIndex = '' - for (let i = 0; i < $articleList.length; i++) { - const ele = $articleList[i] + list.forEach(function (ele, index) { if (top > btf.getEleTop(ele) - 80) { - const id = ele.id - currentId = id ? '#' + encodeURI(id) : '' - currentIndex = i - } else { - break + currentId = '#' + encodeURI(ele.getAttribute('id')) + currentIndex = index } - } + }) if (detectItem === currentIndex) return - if (isAnchor) btf.updateAnchor(currentId) + if (isAnchor) updateAnchor(currentId) - detectItem = currentIndex + if (currentId === '') { + $cardToc.querySelectorAll('.active').forEach(i => { i.classList.remove('active') }) + detectItem = currentIndex + return + } - if (isToc) { - $cardToc.querySelectorAll('.active').forEach(i => i.classList.remove('active')) + detectItem = currentIndex - if (currentId) { - const currentActive = $tocLink[currentIndex] - currentActive.classList.add('active') + $cardToc.querySelectorAll('.active').forEach(item => { item.classList.remove('active') }) + const currentActive = $tocLink[currentIndex] + currentActive.classList.add('active') - setTimeout(() => autoScrollToc(currentActive), 0) + setTimeout(() => { + autoScrollToc(currentActive) + }, 0) - if (!isExpand) { - let parent = currentActive.parentNode - while (!parent.matches('.toc')) { - if (parent.matches('li')) parent.classList.add('active') - parent = parent.parentNode - } - } - } - } - } + let parent = currentActive.parentNode - // main of scroll - const tocScrollFn = btf.throttle(() => { - const currentTop = window.scrollY || document.documentElement.scrollTop - if (isToc && GLOBAL_CONFIG.percent.toc) { - $tocPercentage.textContent = btf.getScrollPercent(currentTop, $article) + for (; !parent.matches('.toc'); parent = parent.parentNode) { + if (parent.matches('li')) parent.classList.add('active') } - findHeadPosition(currentTop) - }, 100) - - btf.addEventListenerPjax(window, 'scroll', tocScrollFn, { passive: true }) - } - - const handleThemeChange = mode => { - const globalFn = window.globalFn || {} - const themeChange = globalFn.themeChange || {} - if (!themeChange) { - return } - - Object.keys(themeChange).forEach(key => { - const themeChangeFn = themeChange[key] - if (['disqus', 'disqusjs'].includes(key)) { - setTimeout(() => themeChangeFn(mode), 300) - } else { - themeChangeFn(mode) - } - }) } /** - * Rightside - */ + * Rightside + */ const rightSideFn = { - readmode: () => { // read mode + switchReadMode: () => { // read-mode const $body = document.body + $body.classList.add('read-mode') const newEle = document.createElement('button') + newEle.type = 'button' + newEle.className = 'fas fa-sign-out-alt exit-readmode' + $body.appendChild(newEle) - const exitReadMode = () => { + function clickFn () { $body.classList.remove('read-mode') newEle.remove() - newEle.removeEventListener('click', exitReadMode) + newEle.removeEventListener('click', clickFn) } - $body.classList.add('read-mode') - newEle.type = 'button' - newEle.className = 'fas fa-sign-out-alt exit-readmode' - newEle.addEventListener('click', exitReadMode) - $body.appendChild(newEle) + newEle.addEventListener('click', clickFn) }, - darkmode: () => { // switch between light and dark mode - const willChangeMode = document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark' - if (willChangeMode === 'dark') { - btf.activateDarkMode() + switchDarkMode: () => { // Switch Between Light And Dark Mode + const nowMode = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light' + if (nowMode === 'light') { + activateDarkMode() + saveToLocal.set('theme', 'dark', 2) GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night) } else { - btf.activateLightMode() + activateLightMode() + saveToLocal.set('theme', 'light', 2) GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day) } - btf.saveToLocal.set('theme', willChangeMode, 2) - handleThemeChange(willChangeMode) + // handle some cases + typeof utterancesTheme === 'function' && utterancesTheme() + typeof FB === 'object' && window.loadFBComment() + window.DISQUS && document.getElementById('disqus_thread').children.length && setTimeout(() => window.disqusReset(), 200) }, - 'rightside-config': item => { // Show or hide rightside-hide-btn - const hideLayout = item.firstElementChild - if (hideLayout.classList.contains('show')) { - hideLayout.classList.add('status') - setTimeout(() => { - hideLayout.classList.remove('status') - }, 300) - } - - hideLayout.classList.toggle('show') + showOrHideBtn: () => { // rightside 點擊設置 按鈕 展開 + document.getElementById('rightside-config-hide').classList.toggle('show') }, - 'go-up': () => { // Back to top + scrollToTop: () => { // Back to top btf.scrollToDest(0, 500) }, - 'hide-aside-btn': () => { // Hide aside + hideAsideBtn: () => { // Hide aside const $htmlDom = document.documentElement.classList - const saveStatus = $htmlDom.contains('hide-aside') ? 'show' : 'hide' - btf.saveToLocal.set('aside-status', saveStatus, 2) + $htmlDom.contains('hide-aside') + ? saveToLocal.set('aside-status', 'show', 2) + : saveToLocal.set('aside-status', 'hide', 2) $htmlDom.toggle('hide-aside') }, - 'mobile-toc-button': (p, item) => { // Show mobile toc - const tocEle = document.getElementById('card-toc') - tocEle.style.transition = 'transform 0.3s ease-in-out' - - const tocEleHeight = tocEle.clientHeight - const btData = item.getBoundingClientRect() - const tocEleBottom = window.innerHeight - btData.bottom - 30 - if (tocEleHeight > tocEleBottom) { - tocEle.style.transformOrigin = `right ${tocEleHeight - tocEleBottom - btData.height / 2}px` + adjustFontSize: (plus) => { + const fontSizeVal = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--global-font-size')) + let newValue = '' + if (plus) { + if (fontSizeVal >= 20) return + newValue = fontSizeVal + 1 + document.documentElement.style.setProperty('--global-font-size', newValue + 'px') + !document.getElementById('nav').classList.contains('hide-menu') && adjustMenu(true) + } else { + if (fontSizeVal <= 10) return + newValue = fontSizeVal - 1 + document.documentElement.style.setProperty('--global-font-size', newValue + 'px') + document.getElementById('nav').classList.contains('hide-menu') && adjustMenu(true) } - tocEle.classList.toggle('open') - tocEle.addEventListener('transitionend', () => { - tocEle.style.cssText = '' - }, { once: true }) - }, - 'chat-btn': () => { // Show chat - window.chatBtnFn() - }, - translateLink: () => { // switch between traditional and simplified chinese - window.translateFn.translatePage() + saveToLocal.set('global-font-size', newValue, 2) + // document.getElementById('font-text').innerText = newValue } } - document.getElementById('rightside').addEventListener('click', e => { - const $target = e.target.closest('[id]') - if ($target && rightSideFn[$target.id]) { - rightSideFn[$target.id](e.currentTarget, $target) + document.getElementById('rightside').addEventListener('click', function (e) { + const $target = e.target.id || e.target.parentNode.id + switch ($target) { + case 'go-up': + rightSideFn.scrollToTop() + break + case 'rightside_config': + rightSideFn.showOrHideBtn() + break + case 'readmode': + rightSideFn.switchReadMode() + break + case 'darkmode': + rightSideFn.switchDarkMode() + break + case 'hide-aside-btn': + rightSideFn.hideAsideBtn() + break + case 'font-plus': + rightSideFn.adjustFontSize(true) + break + case 'font-minus': + rightSideFn.adjustFontSize() + break + default: + break } }) /** - * menu - * 側邊欄sub-menu 展開/收縮 - */ - const clickFnOfSubMenu = () => { - const handleClickOfSubMenu = e => { - const target = e.target.closest('.site-page.group') - if (!target) return - target.classList.toggle('hide') - } - - const menusItems = document.querySelector('#sidebar-menus .menus_items') - menusItems && menusItems.addEventListener('click', handleClickOfSubMenu) - } + * menu + * 側邊欄sub-menu 展開/收縮 + * 解決menus在觸摸屏下,滑動屏幕menus_item_child不消失的問題(手機hover的bug) + */ + const clickFnOfSubMenu = function () { + document.querySelectorAll('#sidebar-menus .expand').forEach(function (e) { + e.addEventListener('click', function () { + this.classList.toggle('hide') + const $dom = this.parentNode.nextElementSibling + if (btf.isHidden($dom)) { + $dom.style.display = 'block' + } else { + $dom.style.display = 'none' + } + }) + }) - /** - * 手机端目录点击 - */ - const openMobileMenu = () => { - const toggleMenu = document.getElementById('toggle-menu') - if (!toggleMenu) return - btf.addEventListenerPjax(toggleMenu, 'click', () => { sidebarFn.open() }) + window.addEventListener('touchmove', function (e) { + const $menusChild = document.querySelectorAll('#nav .menus_item_child') + $menusChild.forEach(item => { + if (!btf.isHidden(item)) item.style.display = 'none' + }) + }) } /** * 複製時加上版權信息 */ const addCopyright = () => { - const { limitCount, languages } = GLOBAL_CONFIG.copyright - - const handleCopy = e => { + const copyright = GLOBAL_CONFIG.copyright + document.body.oncopy = (e) => { e.preventDefault() - const copyFont = window.getSelection(0).toString() - let textFont = copyFont - if (copyFont.length > limitCount) { - textFont = `${copyFont}\n\n\n${languages.author}\n${languages.link}${window.location.href}\n${languages.source}\n${languages.info}` + let textFont; const copyFont = window.getSelection(0).toString() + if (copyFont.length > copyright.limitCount) { + textFont = copyFont + '\n' + '\n' + '\n' + + copyright.languages.author + '\n' + + copyright.languages.link + window.location.href + '\n' + + copyright.languages.source + '\n' + + copyright.languages.info + } else { + textFont = copyFont } if (e.clipboardData) { return e.clipboardData.setData('text', textFont) @@ -711,117 +662,150 @@ document.addEventListener('DOMContentLoaded', () => { return window.clipboardData.setData('text', textFont) } } - - document.body.addEventListener('copy', handleCopy) } /** - * 網頁運行時間 - */ + * 網頁運行時間 + */ const addRuntime = () => { const $runtimeCount = document.getElementById('runtimeshow') if ($runtimeCount) { const publishDate = $runtimeCount.getAttribute('data-publishDate') - $runtimeCount.textContent = `${btf.diffDate(publishDate)} ${GLOBAL_CONFIG.runtime}` + $runtimeCount.innerText = btf.diffDate(publishDate) + ' ' + GLOBAL_CONFIG.runtime } } /** - * 最後一次更新時間 - */ + * 最後一次更新時間 + */ const addLastPushDate = () => { const $lastPushDateItem = document.getElementById('last-push-date') if ($lastPushDateItem) { const lastPushDate = $lastPushDateItem.getAttribute('data-lastPushDate') - $lastPushDateItem.textContent = btf.diffDate(lastPushDate, true) + $lastPushDateItem.innerText = btf.diffDate(lastPushDate, true) } } /** - * table overflow - */ - const addTableWrap = () => { - const $table = document.querySelectorAll('#article-container table') - if (!$table.length) return - - $table.forEach(item => { - if (!item.closest('.highlight')) { + * table overflow + */ + const addTableWrap = function () { + const $table = document.querySelectorAll('#article-container :not(.highlight) > table, #article-container > table') + if ($table.length) { + $table.forEach(item => { btf.wrap(item, 'div', { class: 'table-wrap' }) - } - }) + }) + } } /** - * tag-hide - */ - const clickFnOfTagHide = () => { - const hideButtons = document.querySelectorAll('#article-container .hide-button') - if (!hideButtons.length) return - hideButtons.forEach(item => item.addEventListener('click', e => { - const currentTarget = e.currentTarget - currentTarget.classList.add('open') - addJustifiedGallery(currentTarget.nextElementSibling.querySelectorAll('.gallery-container')) - }, { once: true })) - } - - const tabsFn = () => { - const navTabsElements = document.querySelectorAll('#article-container .tabs') - if (!navTabsElements.length) return - - const setActiveClass = (elements, activeIndex) => { - elements.forEach((el, index) => { - el.classList.toggle('active', index === activeIndex) + * tag-hide + */ + const clickFnOfTagHide = function () { + const $hideInline = document.querySelectorAll('#article-container .hide-button') + if ($hideInline.length) { + $hideInline.forEach(function (item) { + item.addEventListener('click', function (e) { + const $this = this + const $hideContent = $this.nextElementSibling + $this.classList.toggle('open') + if ($this.classList.contains('open')) { + if ($hideContent.querySelectorAll('.justified-gallery').length > 0) { + btf.initJustifiedGallery($hideContent.querySelectorAll('.justified-gallery')) + } + } + }) }) } + } - const handleNavClick = e => { - const target = e.target.closest('button') - if (!target || target.classList.contains('active')) return - - const navItems = [...e.currentTarget.children] - const tabContents = [...e.currentTarget.nextElementSibling.children] - const indexOfButton = navItems.indexOf(target) - setActiveClass(navItems, indexOfButton) - e.currentTarget.classList.remove('no-default') - setActiveClass(tabContents, indexOfButton) - addJustifiedGallery(tabContents[indexOfButton].querySelectorAll('.gallery-container'), true) + const tabsFn = { + clickFnOfTabs: function () { + document.querySelectorAll('#article-container .tab > button').forEach(function (item) { + item.addEventListener('click', function (e) { + const $this = this + const $tabItem = $this.parentNode + + if (!$tabItem.classList.contains('active')) { + const $tabContent = $tabItem.parentNode.nextElementSibling + const $siblings = btf.siblings($tabItem, '.active')[0] + $siblings && $siblings.classList.remove('active') + $tabItem.classList.add('active') + const tabId = $this.getAttribute('data-href').replace('#', '') + const childList = [...$tabContent.children] + childList.forEach(item => { + if (item.id === tabId) item.classList.add('active') + else item.classList.remove('active') + }) + const $isTabJustifiedGallery = $tabContent.querySelectorAll(`#${tabId} .justified-gallery`) + if ($isTabJustifiedGallery.length > 0) { + btf.initJustifiedGallery($isTabJustifiedGallery) + } + } + }) + }) + }, + backToTop: () => { + document.querySelectorAll('#article-container .tabs .tab-to-top').forEach(function (item) { + item.addEventListener('click', function () { + btf.scrollToDest(btf.getEleTop(btf.getParents(this, '.tabs')), 300) + }) + }) } + } - const handleToTopClick = tabElement => e => { - if (e.target.closest('button')) { - btf.scrollToDest(btf.getEleTop(tabElement), 300) - } + const toggleCardCategory = function () { + const $cardCategory = document.querySelectorAll('#aside-cat-list .card-category-list-item.parent i') + if ($cardCategory.length) { + $cardCategory.forEach(function (item) { + item.addEventListener('click', function (e) { + e.preventDefault() + const $this = this + $this.classList.toggle('expand') + const $parentEle = $this.parentNode.nextElementSibling + if (btf.isHidden($parentEle)) { + $parentEle.style.display = 'block' + } else { + $parentEle.style.display = 'none' + } + }) + }) } - - navTabsElements.forEach(tabElement => { - btf.addEventListenerPjax(tabElement.firstElementChild, 'click', handleNavClick) - btf.addEventListenerPjax(tabElement.lastElementChild, 'click', handleToTopClick(tabElement)) - }) } - const toggleCardCategory = () => { - const cardCategory = document.querySelector('#aside-cat-list.expandBtn') - if (!cardCategory) return + const switchComments = function () { + let switchDone = false + const $switchBtn = document.querySelector('#comment-switch > .switch-btn') + $switchBtn && $switchBtn.addEventListener('click', function () { + this.classList.toggle('move') + document.querySelectorAll('#post-comment > .comment-wrap > div').forEach(function (item) { + if (btf.isHidden(item)) { + item.style.cssText = 'display: block;animation: tabshow .5s' + } else { + item.style.cssText = "display: none;animation: ''" + } + }) - const handleToggleBtn = e => { - const target = e.target - if (target.nodeName === 'I') { - e.preventDefault() - target.parentNode.classList.toggle('expand') + if (!switchDone && typeof loadOtherComment === 'function') { + switchDone = true + loadOtherComment() } - } - btf.addEventListenerPjax(cardCategory, 'click', handleToggleBtn, true) + }) } - const addPostOutdateNotice = () => { - const ele = document.getElementById('post-outdate-notice') - if (!ele) return - - const { limitDay, messagePrev, messageNext, postUpdate } = JSON.parse(ele.getAttribute('data')) - const diffDay = btf.diffDate(postUpdate) - if (diffDay >= limitDay) { - ele.textContent = `${messagePrev} ${diffDay} ${messageNext}` - ele.hidden = false + const addPostOutdateNotice = function () { + const data = GLOBAL_CONFIG.noticeOutdate + const diffDay = btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate) + if (diffDay >= data.limitDay) { + const ele = document.createElement('div') + ele.className = 'post-outdate-notice' + ele.textContent = data.messagePrev + ' ' + diffDay + ' ' + data.messageNext + const $targetEle = document.getElementById('article-container') + if (data.position === 'top') { + $targetEle.insertBefore(ele, $targetEle.firstChild) + } else { + $targetEle.appendChild(ele) + } } } @@ -831,74 +815,32 @@ document.addEventListener('DOMContentLoaded', () => { threshold: 0, data_src: 'lazy-src' }) - - btf.addGlobalFn('pjaxComplete', () => { - window.lazyLoadInstance.update() - }, 'lazyload') } - const relativeDate = selector => { + const relativeDate = function (selector) { selector.forEach(item => { - item.textContent = btf.diffDate(item.getAttribute('datetime'), true) - item.style.display = 'inline' + const $this = item + const timeVal = $this.getAttribute('datetime') + $this.innerText = btf.diffDate(timeVal, true) + $this.style.display = 'inline' }) } - const justifiedIndexPostUI = () => { - const recentPostsElement = document.getElementById('recent-posts') - if (!(recentPostsElement && recentPostsElement.classList.contains('masonry'))) return - - const init = () => { - const masonryItem = new InfiniteGrid.MasonryInfiniteGrid('.recent-post-items', { - gap: { horizontal: 10, vertical: 20 }, - useTransform: true, - useResizeObserver: true - }) - masonryItem.renderItems() - btf.addGlobalFn('pjaxCompleteOnce', () => { masonryItem.destroy() }, 'removeJustifiedIndexPostUI') - } - - typeof InfiniteGrid === 'function' ? init() : btf.getScript(`${GLOBAL_CONFIG.infinitegrid.js}`).then(init) - } - - const unRefreshFn = () => { - window.addEventListener('resize', () => { - adjustMenu(false) - mobileSidebarOpen && btf.isHidden(document.getElementById('toggle-menu')) && sidebarFn.close() - }) - - const menuMask = document.getElementById('menu-mask') - menuMask && menuMask.addEventListener('click', () => { sidebarFn.close() }) + const unRefreshFn = function () { + window.addEventListener('resize', adjustMenu) + window.addEventListener('orientationchange', () => { setTimeout(adjustMenu(true), 100) }) clickFnOfSubMenu() - GLOBAL_CONFIG.islazyloadPlugin && lazyloadImg() + GLOBAL_CONFIG.islazyload && lazyloadImg() GLOBAL_CONFIG.copyright !== undefined && addCopyright() - - if (GLOBAL_CONFIG.autoDarkmode) { - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => { - if (btf.saveToLocal.get('theme') !== undefined) return - e.matches ? handleThemeChange('dark') : handleThemeChange('light') - }) - } } - const forPostFn = () => { - addHighlightTool() - addPhotoFigcaption() - addJustifiedGallery(document.querySelectorAll('#article-container .gallery-container')) - runLightbox() - scrollFnToDo() - addTableWrap() - clickFnOfTagHide() - tabsFn() - } - - const refreshFn = () => { + window.refreshFn = function () { initAdjust() - justifiedIndexPostUI() - if (GLOBAL_CONFIG_SITE.pageType === 'post') { - addPostOutdateNotice() + if (GLOBAL_CONFIG_SITE.isPost) { + GLOBAL_CONFIG_SITE.isToc && tocFn() + GLOBAL_CONFIG.noticeOutdate !== undefined && addPostOutdateNotice() GLOBAL_CONFIG.relativeDate.post && relativeDate(document.querySelectorAll('#post-meta time')) } else { GLOBAL_CONFIG.relativeDate.homepage && relativeDate(document.querySelectorAll('#recent-posts time')) @@ -907,24 +849,20 @@ document.addEventListener('DOMContentLoaded', () => { toggleCardCategory() } - GLOBAL_CONFIG_SITE.pageType === 'home' && scrollDownInIndex() + sidebarFn() + GLOBAL_CONFIG_SITE.isHome && scrollDownInIndex() + addHighlightTool() + GLOBAL_CONFIG.isPhotoFigcaption && addPhotoFigcaption() + jqLoadAndRun() + GLOBAL_CONFIG.lightbox === 'mediumZoom' && addMediumZoom() scrollFn() - - forPostFn() - GLOBAL_CONFIG_SITE.pageType !== 'shuoshuo' && btf.switchComments(document) - openMobileMenu() + addTableWrap() + clickFnOfTagHide() + tabsFn.clickFnOfTabs() + tabsFn.backToTop() + switchComments() } - btf.addGlobalFn('pjaxComplete', refreshFn, 'refreshFn') refreshFn() unRefreshFn() - - // 處理 hexo-blog-encrypt 事件 - window.addEventListener('hexo-blog-decrypt', e => { - forPostFn() - window.translateFn.translateInitialization() - Object.values(window.globalFn.encrypt).forEach(fn => { - fn() - }) - }) }) diff --git a/js/search/algolia.js b/js/search/algolia.js index ed69d2ec..d1de45fb 100644 --- a/js/search/algolia.js +++ b/js/search/algolia.js @@ -1,562 +1,138 @@ window.addEventListener('load', () => { - const { algolia } = GLOBAL_CONFIG - const { appId, apiKey, indexName, hitsPerPage = 5, languages } = algolia - - if (!appId || !apiKey || !indexName) { - return console.error('Algolia setting is invalid!') - } - - const $searchMask = document.getElementById('search-mask') - const $searchDialog = document.querySelector('#algolia-search .search-dialog') - - const animateElements = show => { - const action = show ? 'animateIn' : 'animateOut' - const maskAnimation = show ? 'to_show 0.5s' : 'to_hide 0.5s' - const dialogAnimation = show ? 'titleScale 0.5s' : 'search_close .5s' - btf[action]($searchMask, maskAnimation) - btf[action]($searchDialog, dialogAnimation) - } - - const fixSafariHeight = () => { - if (window.innerWidth < 768) { - $searchDialog.style.setProperty('--search-height', `${window.innerHeight}px`) - } - } - const openSearch = () => { - btf.overflowPaddingR.add() - animateElements(true) - showLoading(false) - - setTimeout(() => { - const searchInput = document.querySelector('#algolia-search-input .ais-SearchBox-input') - if (searchInput) searchInput.focus() - }, 100) - - const handleEscape = event => { + document.body.style.cssText = 'width: 100%;overflow: hidden' + document.querySelector('#algolia-search .search-dialog').style.display = 'block' + document.querySelector('#algolia-search .ais-search-box--input').focus() + btf.fadeIn(document.getElementById('search-mask'), 0.5) + // shortcut: ESC + document.addEventListener('keydown', function f (event) { if (event.code === 'Escape') { closeSearch() - document.removeEventListener('keydown', handleEscape) + document.removeEventListener('keydown', f) } - } - - document.addEventListener('keydown', handleEscape) - fixSafariHeight() - window.addEventListener('resize', fixSafariHeight) + }) } const closeSearch = () => { - btf.overflowPaddingR.remove() - animateElements(false) - window.removeEventListener('resize', fixSafariHeight) + document.body.style.cssText = "width: '';overflow: ''" + const $searchDialog = document.querySelector('#algolia-search .search-dialog') + $searchDialog.style.animation = 'search_close .5s' + setTimeout(() => { $searchDialog.style.cssText = "display: none; animation: ''" }, 500) + btf.fadeOut(document.getElementById('search-mask'), 0.5) } const searchClickFn = () => { - btf.addEventListenerPjax(document.querySelector('#search-button > .search'), 'click', openSearch) - } - - const searchFnOnce = () => { - $searchMask.addEventListener('click', closeSearch) + document.querySelector('#search-button > .search').addEventListener('click', openSearch) + document.getElementById('search-mask').addEventListener('click', closeSearch) document.querySelector('#algolia-search .search-close-button').addEventListener('click', closeSearch) } - const cutContent = content => { - if (!content) return '' - - let contentStr = '' - if (typeof content === 'string') { - contentStr = content.trim() - } else if (typeof content === 'object') { - if (content.value !== undefined) { - contentStr = String(content.value).trim() - if (!contentStr) return '' - } else if (content.matchedWords || content.matchLevel || content.fullyHighlighted !== undefined) { - return '' - } else { - try { - contentStr = JSON.stringify(content).trim() - if (contentStr === '{}' || contentStr === '[]' || contentStr === '""') { - return '' - } - } catch (e) { - return '' - } - } - } else if (content.toString && typeof content.toString === 'function') { - contentStr = content.toString().trim() - if (contentStr === '[object Object]' || contentStr === '[object Array]') { - return '' - } - } else { - return '' - } - - const firstOccur = contentStr.indexOf('') - let start = firstOccur - 30 - let end = firstOccur + 120 - let pre = '' - let post = '' - - if (start <= 0) { - start = 0 - end = 140 - } else { - pre = '...' - } - - if (end > contentStr.length) { - end = contentStr.length - } else { - post = '...' - } - - // Ensure we don't cut off HTML tags in the middle - let substr = contentStr.substring(start, end) - - // Handle tag completeness - // Check for incomplete opening tags at the beginning - const firstCloseBracket = substr.indexOf('>') - const firstOpenBracket = substr.indexOf('<') - - // If there's a closing bracket but no opening bracket before it, we've cut a tag - if (firstCloseBracket !== -1 && (firstOpenBracket === -1 || firstCloseBracket < firstOpenBracket)) { - substr = substr.substring(firstCloseBracket + 1) - } - - // Check for incomplete closing tags at the end - const lastOpenBracket = substr.lastIndexOf('<') - const lastCloseBracket = substr.lastIndexOf('>') - - // If there's an opening bracket after the last closing bracket, we've cut a tag - if (lastOpenBracket !== -1 && lastOpenBracket > lastCloseBracket) { - substr = substr.substring(0, lastOpenBracket) - } - - // Balance tags in the substring - const tagStack = [] - let balancedStr = '' - let i = 0 - - while (i < substr.length) { - if (substr[i] === '<') { - // Check if it's a closing tag - if (substr[i + 1] === '/') { - const closeTagEnd = substr.indexOf('>', i) - if (closeTagEnd !== -1) { - const closeTagName = substr.substring(i + 2, closeTagEnd) - // Remove matching opening tag from stack - for (let j = tagStack.length - 1; j >= 0; j--) { - if (tagStack[j] === closeTagName) { - tagStack.splice(j, 1) - break - } - } - balancedStr += substr.substring(i, closeTagEnd + 1) - i = closeTagEnd + 1 - continue - } - } else if (substr.substr(i, 2) === '', i) !== -1 && substr.indexOf('/>', i) < substr.indexOf('>', i))) { - const tagEnd = substr.indexOf('>', i) - if (tagEnd !== -1) { - balancedStr += substr.substring(i, tagEnd + 1) - i = tagEnd + 1 - continue - } - } else { - const tagEnd = substr.indexOf('>', i) - if (tagEnd !== -1) { - const tagName = substr.substring(i + 1, (substr.indexOf(' ', i) > -1 && substr.indexOf(' ', i) < tagEnd) - ? substr.indexOf(' ', i) - : tagEnd).split(/\s/)[0] - tagStack.push(tagName) - balancedStr += substr.substring(i, tagEnd + 1) - i = tagEnd + 1 - continue - } - } - } - balancedStr += substr[i] - i++ - } - - // Close any unclosed tags - while (tagStack.length > 0) { - const tagName = tagStack.pop() - balancedStr += `` - } - - // If we removed content from the beginning, add prefix - if (start > 0 || pre) { - const actualFirstOpenBracket = contentStr.indexOf('<', start > 0 ? start - 30 : 0) - const actualFirstMark = contentStr.indexOf('', start > 0 ? start - 30 : 0) - - if (actualFirstOpenBracket !== -1 && - (actualFirstMark === -1 || actualFirstOpenBracket < actualFirstMark)) { - pre = '...' - } - } - - substr = balancedStr - return `${pre}${substr}${post}` - } - - // Helper function to handle Algolia highlight results - const extractHighlightValue = highlightObj => { - if (!highlightObj) return '' - - if (typeof highlightObj === 'string') { - return highlightObj.trim() - } - - if (typeof highlightObj === 'object' && highlightObj.value !== undefined) { - return String(highlightObj.value).trim() - } - - return '' - } - - // Initialize Algolia client - let searchClient - - if (window['algoliasearch/lite'] && typeof window['algoliasearch/lite'].liteClient === 'function') { - searchClient = window['algoliasearch/lite'].liteClient(appId, apiKey) - } else if (typeof window.algoliasearch === 'function') { - searchClient = window.algoliasearch(appId, apiKey) - } else { - return console.error('Algolia search client not found!') - } - - if (!searchClient) { - return console.error('Failed to initialize Algolia search client') - } - - // Search state - let currentQuery = '' + searchClickFn() - // Show loading state - const showLoading = show => { - const loadingIndicator = document.getElementById('loading-status') - if (loadingIndicator) { - loadingIndicator.hidden = !show - } - } + window.addEventListener('pjax:complete', function () { + getComputedStyle(document.querySelector('#algolia-search .search-dialog')).display === 'block' && closeSearch() + searchClickFn() + }) - // Cache frequently used elements - const elements = { - get searchInput () { return document.querySelector('#algolia-search-input .ais-SearchBox-input') }, - get hits () { return document.getElementById('algolia-hits') }, - get hitsEmpty () { return document.getElementById('algolia-hits-empty') }, - get hitsList () { return document.querySelector('#algolia-hits .ais-Hits-list') }, - get hitsWrapper () { return document.querySelector('#algolia-hits .ais-Hits') }, - get pagination () { return document.getElementById('algolia-pagination') }, - get paginationList () { return document.querySelector('#algolia-pagination .ais-Pagination-list') }, - get stats () { return document.querySelector('#algolia-info .ais-Stats-text') }, + const algolia = GLOBAL_CONFIG.algolia + const isAlgoliaValid = algolia.appId && algolia.apiKey && algolia.indexName + if (!isAlgoliaValid) { + return console.error('Algolia setting is invalid!') } - // Show/hide search results area - const toggleResultsVisibility = hasResults => { - elements.pagination.style.display = hasResults ? '' : 'none' - elements.stats.style.display = hasResults ? '' : 'none' - } + const search = instantsearch({ + appId: algolia.appId, + apiKey: algolia.apiKey, + indexName: algolia.indexName, + searchParameters: { + hitsPerPage: algolia.hits.per_page || 10 + }, + searchFunction: function (helper) { + const searchInput = document.querySelector('#algolia-search-input input') - // Render search results - const renderHits = (hits, query, page = 0) => { - if (hits.length === 0 && query) { - elements.hitsEmpty.textContent = languages.hits_empty.replace(/\$\{query}/, query) - elements.hitsEmpty.style.display = '' - elements.hitsWrapper.style.display = 'none' - elements.stats.style.display = 'none' - return + if (searchInput.value) { + helper.search() + } } + }) - elements.hitsEmpty.style.display = 'none' - - const hitsHTML = hits.map((hit, index) => { - const itemNumber = page * hitsPerPage + index + 1 - const link = hit.permalink || (GLOBAL_CONFIG.root + hit.path) - const result = hit._highlightResult || hit - - // Content extraction - let content = '' - try { - if (result.contentStripTruncate) { - content = cutContent(result.contentStripTruncate) - } else if (result.contentStrip) { - content = cutContent(result.contentStrip) - } else if (result.content) { - content = cutContent(result.content) - } else if (hit.contentStripTruncate) { - content = cutContent(hit.contentStripTruncate) - } else if (hit.contentStrip) { - content = cutContent(hit.contentStrip) - } else if (hit.content) { - content = cutContent(hit.content) + search.addWidget( + instantsearch.widgets.searchBox({ + container: '#algolia-search-input', + reset: false, + magnifier: false, + placeholder: GLOBAL_CONFIG.algolia.languages.input_placeholder + }) + ) + search.addWidget( + instantsearch.widgets.hits({ + container: '#algolia-hits', + templates: { + item: function (data) { + const link = data.permalink ? data.permalink : (GLOBAL_CONFIG.root + data.path) + return ( + '' + + data._highlightResult.title.value + + '' + ) + }, + empty: function (data) { + return ( + '
' + + GLOBAL_CONFIG.algolia.languages.hits_empty.replace(/\$\{query}/, data.query) + + '
' + ) } - } catch (error) { - content = '' + }, + cssClasses: { + item: 'algolia-hit-item' } - - // Title handling - let title = 'no-title' - try { - if (result.title) { - title = extractHighlightValue(result.title) || 'no-title' - } else if (hit.title) { - title = extractHighlightValue(hit.title) || 'no-title' - } - - if (!title || title === 'no-title') { - if (typeof hit.title === 'string' && hit.title.trim()) { - title = hit.title.trim() - } else if (hit.title && typeof hit.title === 'object' && hit.title.value) { - title = String(hit.title.value).trim() || 'no-title' - } else { - title = 'no-title' - } + }) + ) + + search.addWidget( + instantsearch.widgets.stats({ + container: '#algolia-stats', + templates: { + body: function (data) { + const stats = GLOBAL_CONFIG.algolia.languages.hits_stats + .replace(/\$\{hits}/, data.nbHits) + .replace(/\$\{time}/, data.processingTimeMS) + return ( + '
' + + stats + + '' + ) } - } catch (error) { - title = 'no-title' - } - - return ` -
  • - - ${title} - ${content ? `
    ${content}
    ` : ''} -
    -
  • ` - }).join('') - - elements.hitsList.innerHTML = hitsHTML - elements.hitsWrapper.style.display = query ? '' : 'none' - - if (hits.length > 0) { - elements.stats.style.display = '' - } - } - - // Render pagination - const renderPagination = (page, nbPages) => { - if (nbPages <= 1) { - elements.pagination.style.display = 'none' - elements.paginationList.innerHTML = '' - return - } - - elements.pagination.style.display = 'block' - - const isFirstPage = page === 0 - const isLastPage = page === nbPages - 1 - - // Responsive page display - const isMobile = window.innerWidth < 768 - const maxVisiblePages = isMobile ? 3 : 5 - let startPage = Math.max(0, page - Math.floor(maxVisiblePages / 2)) - const endPage = Math.min(nbPages - 1, startPage + maxVisiblePages - 1) - - // Adjust starting page to maintain max visible pages - if (endPage - startPage + 1 < maxVisiblePages) { - startPage = Math.max(0, endPage - maxVisiblePages + 1) - } - - let pagesHTML = '' - - // Only add ellipsis and first page when there are many pages - if (nbPages > maxVisiblePages && startPage > 0) { - pagesHTML += ` -
  • - 1 -
  • ` - if (startPage > 1) { - pagesHTML += ` -
  • - ... -
  • ` - } - } - - // Add middle page numbers - for (let i = startPage; i <= endPage; i++) { - const isSelected = i === page - if (isSelected) { - pagesHTML += ` -
  • - ${i + 1} -
  • ` - } else { - pagesHTML += ` -
  • - ${i + 1} -
  • ` - } - } - - // Only add ellipsis and last page when there are many pages - if (nbPages > maxVisiblePages && endPage < nbPages - 1) { - if (endPage < nbPages - 2) { - pagesHTML += ` -
  • - ... -
  • ` - } - pagesHTML += ` -
  • - ${nbPages} -
  • ` - } - - if (nbPages > 1) { - elements.paginationList.innerHTML = ` -
  • - ${isFirstPage - ? '' - : `` - } -
  • - ${pagesHTML} -
  • - ${isLastPage - ? '' - : `` - } -
  • ` - elements.pagination.style.display = currentQuery ? '' : 'none' - } else { - elements.pagination.style.display = 'none' - } - } - - // Render statistics - const renderStats = (nbHits, processingTimeMS, query) => { - if (query) { - const stats = languages.hits_stats - .replace(/\$\{hits}/, nbHits) - .replace(/\$\{time}/, processingTimeMS) - elements.stats.innerHTML = `
    ${stats}` - elements.stats.style.display = '' - } else { - elements.stats.style.display = 'none' - } - } - - // Perform search - const performSearch = async (query, page = 0) => { - if (!query.trim()) { - currentQuery = '' - renderHits([], '', 0) - renderPagination(0, 0) - renderStats(0, 0, '') - toggleResultsVisibility(false) - return - } - - showLoading(true) - currentQuery = query - - try { - let result - - if (searchClient && typeof searchClient.search === 'function') { - // v5 multi-index search - const searchResult = await searchClient.search([{ - indexName, - query, - params: { - page, - hitsPerPage, - highlightPreTag: '', - highlightPostTag: '', - attributesToHighlight: ['title', 'content', 'contentStrip', 'contentStripTruncate'] - } - }]) - result = searchResult.results[0] - } else if (searchClient && typeof searchClient.initIndex === 'function') { - // v4 single-index search - const index = searchClient.initIndex(indexName) - result = await index.search(query, { - page, - hitsPerPage, - highlightPreTag: '', - highlightPostTag: '', - attributesToHighlight: ['title', 'content', 'contentStrip', 'contentStripTruncate'] - }) - } else { - throw new Error('Algolia: No compatible search method available') - } - - renderHits(result.hits || [], query, page) - - const actualNbPages = result.nbHits <= hitsPerPage ? 1 : (result.nbPages || 0) - renderPagination(page, actualNbPages) - renderStats(result.nbHits || 0, result.processingTimeMS || 0, query) - - const hasResults = result.hits && result.hits.length > 0 - toggleResultsVisibility(hasResults) - - // Refresh Pjax links - if (window.pjax) { - window.pjax.refresh(document.getElementById('algolia-hits')) } - } catch (error) { - console.error('Algolia search error:', error) - renderHits([], query, page) - renderPagination(0, 0) - renderStats(0, 0, query) - } finally { - showLoading(false) - } - } - - // Debounced search - let searchTimeout - const debouncedSearch = (query, delay = 300) => { - clearTimeout(searchTimeout) - searchTimeout = setTimeout(() => performSearch(query), delay) - } - - // Initialize search box and events - const initializeSearch = () => { - showLoading(false) - - if (elements.searchInput) { - elements.searchInput.addEventListener('input', e => { - const query = e.target.value - debouncedSearch(query) - }) - } - - const searchForm = document.querySelector('#algolia-search-input .ais-SearchBox-form') - if (searchForm) { - searchForm.addEventListener('submit', e => { - e.preventDefault() - const query = elements.searchInput.value - performSearch(query) - }) - } - - // Pagination event delegation - elements.pagination.addEventListener('click', e => { - e.preventDefault() - const link = e.target.closest('a[data-page]') - if (link) { - const page = parseInt(link.dataset.page, 10) - if (!isNaN(page) && currentQuery) { - performSearch(currentQuery, page) - } + }) + ) + + search.addWidget( + instantsearch.widgets.pagination({ + container: '#algolia-pagination', + scrollTo: false, + showFirstLast: false, + labels: { + first: '', + last: '', + previous: '', + next: '' + }, + cssClasses: { + root: 'pagination', + item: 'pagination-item', + link: 'page-number', + active: 'current', + disabled: 'disabled-item' } }) + ) + search.start() - // Initial state - toggleResultsVisibility(false) - } - - // Initialize - initializeSearch() - searchClickFn() - searchFnOnce() - - window.addEventListener('pjax:complete', () => { - if (!btf.isHidden($searchMask)) closeSearch() - searchClickFn() + window.pjax && search.on('render', () => { + window.pjax.refresh(document.getElementById('algolia-hits')) }) }) diff --git a/js/search/local-search.js b/js/search/local-search.js index 3f168389..5b134457 100644 --- a/js/search/local-search.js +++ b/js/search/local-search.js @@ -1,502 +1,12 @@ -/** - * Refer to hexo-generator-searchdb - * https://github.com/next-theme/hexo-generator-searchdb/blob/main/dist/search.js - * Modified by hexo-theme-butterfly - */ - -class LocalSearch { - constructor ({ - path = '', - unescape = false, - top_n_per_article = 1 - }) { - this.path = path - this.unescape = unescape - this.top_n_per_article = top_n_per_article - this.isfetched = false - this.datas = null - } - - getIndexByWord (words, text, caseSensitive = false) { - const index = [] - const included = new Set() - - if (!caseSensitive) { - text = text.toLowerCase() - } - words.forEach(word => { - if (this.unescape) { - const div = document.createElement('div') - div.innerText = word - word = div.innerHTML - } - const wordLen = word.length - if (wordLen === 0) return - let startPosition = 0 - let position = -1 - if (!caseSensitive) { - word = word.toLowerCase() - } - while ((position = text.indexOf(word, startPosition)) > -1) { - index.push({ position, word }) - included.add(word) - startPosition = position + wordLen - } - }) - // Sort index by position of keyword - index.sort((left, right) => { - if (left.position !== right.position) { - return left.position - right.position - } - return right.word.length - left.word.length - }) - return [index, included] - } - - // Merge hits into slices - mergeIntoSlice (start, end, index) { - let item = index[0] - let { position, word } = item - const hits = [] - const count = new Set() - while (position + word.length <= end && index.length !== 0) { - count.add(word) - hits.push({ - position, - length: word.length - }) - const wordEnd = position + word.length - - // Move to next position of hit - index.shift() - while (index.length !== 0) { - item = index[0] - position = item.position - word = item.word - if (wordEnd > position) { - index.shift() - } else { - break - } - } - } - return { - hits, - start, - end, - count: count.size - } - } - - // Highlight title and content - highlightKeyword (val, slice) { - let result = '' - let index = slice.start - for (const { position, length } of slice.hits) { - result += val.substring(index, position) - index = position + length - result += `${val.substr(position, length)}` - } - result += val.substring(index, slice.end) - return result - } - - getResultItems (keywords) { - const resultItems = [] - this.datas.forEach(({ title, content, url }) => { - // The number of different keywords included in the article. - const [indexOfTitle, keysOfTitle] = this.getIndexByWord(keywords, title) - const [indexOfContent, keysOfContent] = this.getIndexByWord(keywords, content) - const includedCount = new Set([...keysOfTitle, ...keysOfContent]).size - - // Show search results - const hitCount = indexOfTitle.length + indexOfContent.length - if (hitCount === 0) return - - const slicesOfTitle = [] - if (indexOfTitle.length !== 0) { - slicesOfTitle.push(this.mergeIntoSlice(0, title.length, indexOfTitle)) - } - - let slicesOfContent = [] - while (indexOfContent.length !== 0) { - const item = indexOfContent[0] - const { position } = item - // Cut out 120 characters. The maxlength of .search-input is 80. - const start = Math.max(0, position - 20) - const end = Math.min(content.length, position + 100) - slicesOfContent.push(this.mergeIntoSlice(start, end, indexOfContent)) - } - - // Sort slices in content by included keywords' count and hits' count - slicesOfContent.sort((left, right) => { - if (left.count !== right.count) { - return right.count - left.count - } else if (left.hits.length !== right.hits.length) { - return right.hits.length - left.hits.length - } - return left.start - right.start - }) - - // Select top N slices in content - const upperBound = parseInt(this.top_n_per_article, 10) - if (upperBound >= 0) { - slicesOfContent = slicesOfContent.slice(0, upperBound) - } - - let resultItem = '' - - url = new URL(url, location.origin) - url.searchParams.append('highlight', keywords.join(' ')) - - if (slicesOfTitle.length !== 0) { - resultItem += `
  • ${this.highlightKeyword(title, slicesOfTitle[0])}` - } else { - resultItem += `
  • ${title}` - } - - slicesOfContent.forEach(slice => { - resultItem += `

    ${this.highlightKeyword(content, slice)}...

    ` - }) - - resultItem += '
  • ' - resultItems.push({ - item: resultItem, - id: resultItems.length, - hitCount, - includedCount - }) - }) - return resultItems - } - - fetchData () { - const isXml = !this.path.endsWith('json') - fetch(this.path) - .then(response => response.text()) - .then(res => { - // Get the contents from search data - this.isfetched = true - this.datas = isXml - ? [...new DOMParser().parseFromString(res, 'text/xml').querySelectorAll('entry')].map(element => ({ - title: element.querySelector('title').textContent, - content: element.querySelector('content').textContent, - url: element.querySelector('url').textContent - })) - : JSON.parse(res) - // Only match articles with non-empty titles - this.datas = this.datas.filter(data => data.title).map(data => { - data.title = data.title.trim() - data.content = data.content ? data.content.trim().replace(/<[^>]+>/g, '') : '' - data.url = decodeURIComponent(data.url).replace(/\/{2,}/g, '/') - return data - }) - // Remove loading animation - window.dispatchEvent(new Event('search:loaded')) - }) - } - - // Highlight by wrapping node in mark elements with the given class name - highlightText (node, slice, className) { - const val = node.nodeValue - let index = slice.start - const children = [] - for (const { position, length } of slice.hits) { - const text = document.createTextNode(val.substring(index, position)) - index = position + length - const mark = document.createElement('mark') - mark.className = className - mark.appendChild(document.createTextNode(val.substr(position, length))) - children.push(text, mark) - } - node.nodeValue = val.substring(index, slice.end) - children.forEach(element => { - node.parentNode.insertBefore(element, node) - }) - } - - // Highlight the search words provided in the url in the text - highlightSearchWords (body) { - const params = new URL(location.href).searchParams.get('highlight') - const keywords = params ? params.split(' ') : [] - if (!keywords.length || !body) return - const walk = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null) - const allNodes = [] - while (walk.nextNode()) { - if (!walk.currentNode.parentNode.matches('button, select, textarea, .mermaid')) allNodes.push(walk.currentNode) - } - allNodes.forEach(node => { - const [indexOfNode] = this.getIndexByWord(keywords, node.nodeValue) - if (!indexOfNode.length) return - const slice = this.mergeIntoSlice(0, node.nodeValue.length, indexOfNode) - this.highlightText(node, slice, 'search-keyword') - }) - } -} - window.addEventListener('load', () => { -// Search - const { path, top_n_per_article, unescape, languages, pagination } = GLOBAL_CONFIG.localSearch - const enablePagination = pagination && pagination.enable - const localSearch = new LocalSearch({ - path, - top_n_per_article, - unescape - }) - - const input = document.querySelector('.local-search-input input') - const statsItem = document.getElementById('local-search-stats') - const $loadingStatus = document.getElementById('loading-status') - const isXml = !path.endsWith('json') - - // Pagination variables (only initialize if pagination is enabled) - let currentPage = 0 - const hitsPerPage = pagination.hitsPerPage || 10 - - let currentResultItems = [] - - if (!enablePagination) { - // If pagination is disabled, we don't need these variables - currentPage = undefined - currentResultItems = undefined - } - - // Cache frequently used elements - const elements = { - get pagination () { return document.getElementById('local-search-pagination') }, - get paginationList () { return document.querySelector('#local-search-pagination .ais-Pagination-list') } - } - - // Show/hide search results area - const toggleResultsVisibility = hasResults => { - if (enablePagination) { - elements.pagination.style.display = hasResults ? '' : 'none' - } else { - elements.pagination.style.display = 'none' - } - } - - // Render search results for current page - const renderResults = (searchText, resultItems) => { - const container = document.getElementById('local-search-results') - - // Determine items to display based on pagination mode - const itemsToDisplay = enablePagination - ? currentResultItems.slice(currentPage * hitsPerPage, (currentPage + 1) * hitsPerPage) - : resultItems - - // Handle empty page in pagination mode - if (enablePagination && itemsToDisplay.length === 0 && currentResultItems.length > 0) { - currentPage = 0 - renderResults(searchText, resultItems) - return - } - - // Add numbering to items - const numberedItems = itemsToDisplay.map((result, index) => { - const itemNumber = enablePagination - ? currentPage * hitsPerPage + index + 1 - : index + 1 - return result.item.replace( - '
  • ', - `
  • ` - ) - }) - - container.innerHTML = `
      ${numberedItems.join('')}
    ` - - // Update stats - const displayCount = enablePagination ? currentResultItems.length : resultItems.length - const stats = languages.hits_stats.replace(/\$\{hits}/, displayCount) - statsItem.innerHTML = `
    ${stats}
    ` - - // Handle pagination - if (enablePagination) { - const nbPages = Math.ceil(currentResultItems.length / hitsPerPage) - renderPagination(currentPage, nbPages, searchText) - } - - const hasResults = resultItems.length > 0 - toggleResultsVisibility(hasResults) - - window.pjax && window.pjax.refresh(container) - } - - // Render pagination - const renderPagination = (page, nbPages, query) => { - if (nbPages <= 1) { - elements.pagination.style.display = 'none' - elements.paginationList.innerHTML = '' - return - } - - elements.pagination.style.display = 'block' - - const isFirstPage = page === 0 - const isLastPage = page === nbPages - 1 - - // Responsive page display - const isMobile = window.innerWidth < 768 - const maxVisiblePages = isMobile ? 3 : 5 - let startPage = Math.max(0, page - Math.floor(maxVisiblePages / 2)) - const endPage = Math.min(nbPages - 1, startPage + maxVisiblePages - 1) - - // Adjust starting page to maintain max visible pages - if (endPage - startPage + 1 < maxVisiblePages) { - startPage = Math.max(0, endPage - maxVisiblePages + 1) - } - - let pagesHTML = '' - - // Only add ellipsis and first page when there are many pages - if (nbPages > maxVisiblePages && startPage > 0) { - pagesHTML += ` -
  • - 1 -
  • ` - if (startPage > 1) { - pagesHTML += ` -
  • - ... -
  • ` - } - } - - // Add middle page numbers - for (let i = startPage; i <= endPage; i++) { - const isSelected = i === page - if (isSelected) { - pagesHTML += ` -
  • - ${i + 1} -
  • ` - } else { - pagesHTML += ` -
  • - ${i + 1} -
  • ` - } - } - - // Only add ellipsis and last page when there are many pages - if (nbPages > maxVisiblePages && endPage < nbPages - 1) { - if (endPage < nbPages - 2) { - pagesHTML += ` -
  • - ... -
  • ` - } - pagesHTML += ` -
  • - ${nbPages} -
  • ` - } - - if (nbPages > 1) { - elements.paginationList.innerHTML = ` -
  • - ${isFirstPage - ? '' - : `` - } -
  • - ${pagesHTML} -
  • - ${isLastPage - ? '' - : `` - } -
  • ` - } else { - elements.pagination.style.display = 'none' - } - } - - // Clear search results and stats - const clearSearchResults = () => { - const container = document.getElementById('local-search-results') - container.textContent = '' - statsItem.textContent = '' - toggleResultsVisibility(false) - if (enablePagination) { - currentResultItems = [] - currentPage = 0 - } - } - - // Show no results message - const showNoResults = searchText => { - const container = document.getElementById('local-search-results') - container.textContent = '' - const statsDiv = document.createElement('div') - statsDiv.className = 'search-result-stats' - statsDiv.textContent = languages.hits_empty.replace(/\$\{query}/, searchText) - statsItem.innerHTML = statsDiv.outerHTML - toggleResultsVisibility(false) - if (enablePagination) { - currentResultItems = [] - currentPage = 0 - } - } - - const inputEventFunction = () => { - if (!localSearch.isfetched) return - let searchText = input.value.trim().toLowerCase() - isXml && (searchText = searchText.replace(//g, '>')) - - if (searchText !== '') $loadingStatus.hidden = false - - const keywords = searchText.split(/[-\s]+/) - let resultItems = [] - - if (searchText.length > 0) { - resultItems = localSearch.getResultItems(keywords) - } - - if (keywords.length === 1 && keywords[0] === '') { - clearSearchResults() - } else if (resultItems.length === 0) { - showNoResults(searchText) - } else { - // Sort results by relevance - resultItems.sort((left, right) => { - if (left.includedCount !== right.includedCount) { - return right.includedCount - left.includedCount - } else if (left.hitCount !== right.hitCount) { - return right.hitCount - left.hitCount - } - return right.id - left.id - }) - - if (enablePagination) { - currentResultItems = resultItems - currentPage = 0 - } - renderResults(searchText, resultItems) - } - - $loadingStatus.hidden = true - } - let loadFlag = false - const $searchMask = document.getElementById('search-mask') - const $searchDialog = document.querySelector('#local-search .search-dialog') - - // fix safari - const fixSafariHeight = () => { - if (window.innerWidth < 768) { - $searchDialog.style.setProperty('--search-height', window.innerHeight + 'px') - } - } - - const openSearch = () => { - btf.overflowPaddingR.add() - btf.animateIn($searchMask, 'to_show 0.5s') - btf.animateIn($searchDialog, 'titleScale 0.5s') - setTimeout(() => { input.focus() }, 300) + const openSearch = function () { + document.body.style.cssText = 'width: 100%;overflow: hidden' + document.querySelector('#local-search .search-dialog').style.display = 'block' + document.querySelector('#local-search-input input').focus() + btf.fadeIn(document.getElementById('search-mask'), 0.5) if (!loadFlag) { - !localSearch.isfetched && localSearch.fetchData() - input.addEventListener('input', inputEventFunction) + search(GLOBAL_CONFIG.localSearch.path) loadFlag = true } // shortcut: ESC @@ -506,62 +16,132 @@ window.addEventListener('load', () => { document.removeEventListener('keydown', f) } }) - - fixSafariHeight() - window.addEventListener('resize', fixSafariHeight) } - const closeSearch = () => { - btf.overflowPaddingR.remove() - btf.animateOut($searchDialog, 'search_close .5s') - btf.animateOut($searchMask, 'to_hide 0.5s') - window.removeEventListener('resize', fixSafariHeight) + const closeSearch = function () { + document.body.style.cssText = "width: '';overflow: ''" + const $searchDialog = document.querySelector('#local-search .search-dialog') + $searchDialog.style.animation = 'search_close .5s' + setTimeout(() => { $searchDialog.style.cssText = "display: none; animation: ''" }, 500) + btf.fadeOut(document.getElementById('search-mask'), 0.5) } + // click function const searchClickFn = () => { - btf.addEventListenerPjax(document.querySelector('#search-button > .search'), 'click', openSearch) - } - - const searchFnOnce = () => { + document.querySelector('#search-button > .search').addEventListener('click', openSearch) + document.getElementById('search-mask').addEventListener('click', closeSearch) document.querySelector('#local-search .search-close-button').addEventListener('click', closeSearch) - $searchMask.addEventListener('click', closeSearch) - if (GLOBAL_CONFIG.localSearch.preload) { - localSearch.fetchData() - } - localSearch.highlightSearchWords(document.getElementById('article-container')) - - // Pagination event delegation - only add if pagination is enabled - if (enablePagination) { - elements.pagination.addEventListener('click', e => { - e.preventDefault() - const link = e.target.closest('a[data-page]') - if (link) { - const page = parseInt(link.dataset.page, 10) - if (!isNaN(page) && currentResultItems.length > 0) { - currentPage = page - renderResults(input.value.trim().toLowerCase(), currentResultItems) - } - } - }) - } - - // Initial state - toggleResultsVisibility(false) } - window.addEventListener('search:loaded', () => { - const $loadDataItem = document.getElementById('loading-database') - $loadDataItem.nextElementSibling.style.visibility = 'visible' - $loadDataItem.remove() - }) - searchClickFn() - searchFnOnce() // pjax - window.addEventListener('pjax:complete', () => { - !btf.isHidden($searchMask) && closeSearch() - localSearch.highlightSearchWords(document.getElementById('article-container')) + window.addEventListener('pjax:complete', function () { + getComputedStyle(document.querySelector('#local-search .search-dialog')).display === 'block' && closeSearch() searchClickFn() }) + + function search (path) { + fetch(GLOBAL_CONFIG.root + path) + .then(response => response.text()) + .then(str => new window.DOMParser().parseFromString(str, 'text/xml')) + .then(data => { + const datas = [...data.querySelectorAll('entry')].map(function (item) { + const content = item.querySelector('content') + return { + title: item.querySelector('title').textContent, + content: content ? content.textContent : '', + url: item.querySelector('url').textContent + } + }) + + const $input = document.querySelector('#local-search-input input') + const $resultContent = document.getElementById('local-search-results') + $input.addEventListener('input', function () { + let str = '
    ' + const keywords = this.value.trim().toLowerCase().split(/[\s]+/) + $resultContent.innerHTML = '' + if (this.value.trim().length <= 0) return + let count = 0 + // perform local searching + datas.forEach(function (data) { + let isMatch = true + if (!data.title || data.title.trim() === '') { + data.title = 'Untitled' + } + let dataTitle = data.title.trim().toLowerCase() + const dataContent = data.content.trim().replace(/<[^>]+>/g, '').toLowerCase() + const dataUrl = data.url.startsWith('/') ? data.url : GLOBAL_CONFIG.root + data.url + let indexTitle = -1 + let indexContent = -1 + let firstOccur = -1 + // only match artiles with not empty titles and contents + if (dataTitle !== '' || dataContent !== '') { + keywords.forEach(function (keyword, i) { + indexTitle = dataTitle.indexOf(keyword) + indexContent = dataContent.indexOf(keyword) + if (indexTitle < 0 && indexContent < 0) { + isMatch = false + } else { + if (indexContent < 0) { + indexContent = 0 + } + if (i === 0) { + firstOccur = indexContent + } + } + }) + } else { + isMatch = false + } + + // show search results + if (isMatch) { + const content = data.content.trim().replace(/<[^>]+>/g, '') + if (firstOccur >= 0) { + // cut out 130 characters + let start = firstOccur - 30 + let end = firstOccur + 100 + + if (start < 0) { + start = 0 + } + + if (start === 0) { + end = 100 + } + + if (end > content.length) { + end = content.length + } + + let matchContent = content.substring(start, end) + + // highlight all keywords + keywords.forEach(function (keyword) { + const regS = new RegExp(keyword, 'gi') + matchContent = matchContent.replace(regS, '' + keyword + '') + dataTitle = dataTitle.replace(regS, '' + keyword + '') + }) + + str += '
    ' + dataTitle + '' + count += 1 + + if (dataContent !== '') { + str += '

    ' + matchContent + '...

    ' + } + } + str += '
    ' + } + }) + if (count === 0) { + str += '
    ' + GLOBAL_CONFIG.localSearch.languages.hits_empty.replace(/\$\{query}/, this.value.trim()) + + '
    ' + } + str += '
    ' + $resultContent.innerHTML = str + window.pjax && window.pjax.refresh($resultContent) + }) + }) + } }) diff --git a/js/tw_cn.js b/js/tw_cn.js index 43228dd1..78dbd6d9 100644 --- a/js/tw_cn.js +++ b/js/tw_cn.js @@ -1,117 +1,100 @@ -document.addEventListener('DOMContentLoaded', () => { - const { defaultEncoding, translateDelay, msgToTraditionalChinese, msgToSimplifiedChinese } = GLOBAL_CONFIG.translate +/* eslint-disable no-undef */ +document.addEventListener('DOMContentLoaded', function () { + const translate = GLOBAL_CONFIG.translate const snackbarData = GLOBAL_CONFIG.Snackbar - const targetEncodingCookie = 'translate-chn-cht' - + const defaultEncoding = translate.defaultEncoding // 網站默認語言,1: 繁體中文, 2: 簡體中文 + const translateDelay = translate.translateDelay // 延遲時間,若不在前, 要設定延遲翻譯時間, 如100表示100ms,默認為0 + const msgToTraditionalChinese = translate.msgToTraditionalChinese // 此處可以更改為你想要顯示的文字 + const msgToSimplifiedChinese = translate.msgToSimplifiedChinese // 同上,但兩處均不建議更改 let currentEncoding = defaultEncoding - let targetEncoding = Number(btf.saveToLocal.get(targetEncodingCookie)) || defaultEncoding - const translateButtonObject = document.getElementById('translateLink') - const isSnackbar = snackbarData !== undefined - - const setLang = () => { - document.documentElement.lang = targetEncoding === 1 ? 'zh-TW' : 'zh-CN' - } - - const translateText = txt => { - if (!txt) return '' + const targetEncodingCookie = 'translate-chn-cht' + let targetEncoding = + saveToLocal.get(targetEncodingCookie) === undefined + ? defaultEncoding + : Number(saveToLocal.get('translate-chn-cht')) + let translateButtonObject + const isSnackbar = GLOBAL_CONFIG.Snackbar !== undefined + + function translateText (txt) { + if (txt === '' || txt == null) return '' if (currentEncoding === 1 && targetEncoding === 2) return Simplized(txt) - if (currentEncoding === 2 && targetEncoding === 1) return Traditionalized(txt) - return txt + else if (currentEncoding === 2 && targetEncoding === 1) { return Traditionalized(txt) } else return txt } - - const translateBody = fobj => { - const nodes = typeof fobj === 'object' ? fobj.childNodes : document.body.childNodes - - for (const node of nodes) { - // Skip BR, HR tags, or the translate button object - if (['BR', 'HR'].includes(node.tagName) || node === translateButtonObject) continue - - if (node.nodeType === Node.ELEMENT_NODE) { - const { tagName, title, alt, placeholder, value, type } = node - - // Translate title, alt, placeholder - if (title) node.title = translateText(title) - if (alt) node.alt = translateText(alt) - if (placeholder) node.placeholder = translateText(placeholder) - - // Translate input value except text and hidden types - if (tagName === 'INPUT' && value && type !== 'text' && type !== 'hidden') { - node.value = translateText(value) - } - - // Recursively translate child nodes - translateBody(node) - } else if (node.nodeType === Node.TEXT_NODE) { - // Translate text node data - node.data = translateText(node.data) - } + function translateBody (fobj) { + let objs + if (typeof fobj === 'object') objs = fobj.childNodes + else objs = document.body.childNodes + for (let i = 0; i < objs.length; i++) { + const obj = objs.item(i) + if ( + '||BR|HR|'.indexOf('|' + obj.tagName + '|') > 0 || + obj === translateButtonObject + ) { continue } + if (obj.title !== '' && obj.title != null) { obj.title = translateText(obj.title) } + if (obj.alt !== '' && obj.alt != null) obj.alt = translateText(obj.alt) + if (obj.placeholder !== '' && obj.placeholder != null) obj.placeholder = translateText(obj.placeholder) + if ( + obj.tagName === 'INPUT' && + obj.value !== '' && + obj.type !== 'text' && + obj.type !== 'hidden' + ) { obj.value = translateText(obj.value) } + if (obj.nodeType === 3) obj.data = translateText(obj.data) + else translateBody(obj) } } - - const translatePage = () => { + function translatePage () { if (targetEncoding === 1) { currentEncoding = 1 targetEncoding = 2 - translateButtonObject.textContent = msgToTraditionalChinese - isSnackbar && btf.snackbarShow(snackbarData.cht_to_chs) + translateButtonObject.innerHTML = msgToTraditionalChinese + saveToLocal.set(targetEncodingCookie, targetEncoding, 2) + translateBody() + if (isSnackbar) btf.snackbarShow(snackbarData.cht_to_chs) } else if (targetEncoding === 2) { currentEncoding = 2 targetEncoding = 1 - translateButtonObject.textContent = msgToSimplifiedChinese - isSnackbar && btf.snackbarShow(snackbarData.chs_to_cht) + translateButtonObject.innerHTML = msgToSimplifiedChinese + saveToLocal.set(targetEncodingCookie, targetEncoding, 2) + translateBody() + if (isSnackbar) btf.snackbarShow(snackbarData.chs_to_cht) } - btf.saveToLocal.set(targetEncodingCookie, targetEncoding, 2) - setLang() - translateBody() } - - const JTPYStr = () => '万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号叹叽吁后吓吕吗吣吨听启吴呒呓呕呖呗员呙呛呜咏咔咙咛咝咤咴咸哌响哑哒哓哔哕哗哙哜哝哟唛唝唠唡唢唣唤唿啧啬啭啮啰啴啸喷喽喾嗫呵嗳嘘嘤嘱噜噼嚣嚯团园囱围囵国图圆圣圹场坂坏块坚坛坜坝坞坟坠垄垅垆垒垦垧垩垫垭垯垱垲垴埘埙埚埝埯堑堕塆墙壮声壳壶壸处备复够头夸夹夺奁奂奋奖奥妆妇妈妩妪妫姗姜娄娅娆娇娈娱娲娴婳婴婵婶媪嫒嫔嫱嬷孙学孪宁宝实宠审宪宫宽宾寝对寻导寿将尔尘尧尴尸尽层屃屉届属屡屦屿岁岂岖岗岘岙岚岛岭岳岽岿峃峄峡峣峤峥峦崂崃崄崭嵘嵚嵛嵝嵴巅巩巯币帅师帏帐帘帜带帧帮帱帻帼幂幞干并广庄庆庐庑库应庙庞废庼廪开异弃张弥弪弯弹强归当录彟彦彻径徕御忆忏忧忾怀态怂怃怄怅怆怜总怼怿恋恳恶恸恹恺恻恼恽悦悫悬悭悯惊惧惨惩惫惬惭惮惯愍愠愤愦愿慑慭憷懑懒懔戆戋戏戗战戬户扎扑扦执扩扪扫扬扰抚抛抟抠抡抢护报担拟拢拣拥拦拧拨择挂挚挛挜挝挞挟挠挡挢挣挤挥挦捞损捡换捣据捻掳掴掷掸掺掼揸揽揿搀搁搂搅携摄摅摆摇摈摊撄撑撵撷撸撺擞攒敌敛数斋斓斗斩断无旧时旷旸昙昼昽显晋晒晓晔晕晖暂暧札术朴机杀杂权条来杨杩杰极构枞枢枣枥枧枨枪枫枭柜柠柽栀栅标栈栉栊栋栌栎栏树栖样栾桊桠桡桢档桤桥桦桧桨桩梦梼梾检棂椁椟椠椤椭楼榄榇榈榉槚槛槟槠横樯樱橥橱橹橼檐檩欢欤欧歼殁殇残殒殓殚殡殴毁毂毕毙毡毵氇气氢氩氲汇汉污汤汹沓沟没沣沤沥沦沧沨沩沪沵泞泪泶泷泸泺泻泼泽泾洁洒洼浃浅浆浇浈浉浊测浍济浏浐浑浒浓浔浕涂涌涛涝涞涟涠涡涢涣涤润涧涨涩淀渊渌渍渎渐渑渔渖渗温游湾湿溃溅溆溇滗滚滞滟滠满滢滤滥滦滨滩滪漤潆潇潋潍潜潴澜濑濒灏灭灯灵灾灿炀炉炖炜炝点炼炽烁烂烃烛烟烦烧烨烩烫烬热焕焖焘煅煳熘爱爷牍牦牵牺犊犟状犷犸犹狈狍狝狞独狭狮狯狰狱狲猃猎猕猡猪猫猬献獭玑玙玚玛玮环现玱玺珉珏珐珑珰珲琎琏琐琼瑶瑷璇璎瓒瓮瓯电画畅畲畴疖疗疟疠疡疬疮疯疱疴痈痉痒痖痨痪痫痴瘅瘆瘗瘘瘪瘫瘾瘿癞癣癫癯皑皱皲盏盐监盖盗盘眍眦眬着睁睐睑瞒瞩矫矶矾矿砀码砖砗砚砜砺砻砾础硁硅硕硖硗硙硚确硷碍碛碜碱碹磙礼祎祢祯祷祸禀禄禅离秃秆种积称秽秾稆税稣稳穑穷窃窍窑窜窝窥窦窭竖竞笃笋笔笕笺笼笾筑筚筛筜筝筹签简箓箦箧箨箩箪箫篑篓篮篱簖籁籴类籼粜粝粤粪粮糁糇紧絷纟纠纡红纣纤纥约级纨纩纪纫纬纭纮纯纰纱纲纳纴纵纶纷纸纹纺纻纼纽纾线绀绁绂练组绅细织终绉绊绋绌绍绎经绐绑绒结绔绕绖绗绘给绚绛络绝绞统绠绡绢绣绤绥绦继绨绩绪绫绬续绮绯绰绱绲绳维绵绶绷绸绹绺绻综绽绾绿缀缁缂缃缄缅缆缇缈缉缊缋缌缍缎缏缐缑缒缓缔缕编缗缘缙缚缛缜缝缞缟缠缡缢缣缤缥缦缧缨缩缪缫缬缭缮缯缰缱缲缳缴缵罂网罗罚罢罴羁羟羡翘翙翚耢耧耸耻聂聋职聍联聩聪肃肠肤肷肾肿胀胁胆胜胧胨胪胫胶脉脍脏脐脑脓脔脚脱脶脸腊腌腘腭腻腼腽腾膑臜舆舣舰舱舻艰艳艹艺节芈芗芜芦苁苇苈苋苌苍苎苏苘苹茎茏茑茔茕茧荆荐荙荚荛荜荞荟荠荡荣荤荥荦荧荨荩荪荫荬荭荮药莅莜莱莲莳莴莶获莸莹莺莼萚萝萤营萦萧萨葱蒇蒉蒋蒌蓝蓟蓠蓣蓥蓦蔷蔹蔺蔼蕲蕴薮藁藓虏虑虚虫虬虮虽虾虿蚀蚁蚂蚕蚝蚬蛊蛎蛏蛮蛰蛱蛲蛳蛴蜕蜗蜡蝇蝈蝉蝎蝼蝾螀螨蟏衅衔补衬衮袄袅袆袜袭袯装裆裈裢裣裤裥褛褴襁襕见观觃规觅视觇览觉觊觋觌觍觎觏觐觑觞触觯詟誉誊讠计订讣认讥讦讧讨让讪讫训议讯记讱讲讳讴讵讶讷许讹论讻讼讽设访诀证诂诃评诅识诇诈诉诊诋诌词诎诏诐译诒诓诔试诖诗诘诙诚诛诜话诞诟诠诡询诣诤该详诧诨诩诪诫诬语诮误诰诱诲诳说诵诶请诸诹诺读诼诽课诿谀谁谂调谄谅谆谇谈谊谋谌谍谎谏谐谑谒谓谔谕谖谗谘谙谚谛谜谝谞谟谠谡谢谣谤谥谦谧谨谩谪谫谬谭谮谯谰谱谲谳谴谵谶谷豮贝贞负贠贡财责贤败账货质贩贪贫贬购贮贯贰贱贲贳贴贵贶贷贸费贺贻贼贽贾贿赀赁赂赃资赅赆赇赈赉赊赋赌赍赎赏赐赑赒赓赔赕赖赗赘赙赚赛赜赝赞赟赠赡赢赣赪赵赶趋趱趸跃跄跖跞践跶跷跸跹跻踊踌踪踬踯蹑蹒蹰蹿躏躜躯车轧轨轩轪轫转轭轮软轰轱轲轳轴轵轶轷轸轹轺轻轼载轾轿辀辁辂较辄辅辆辇辈辉辊辋辌辍辎辏辐辑辒输辔辕辖辗辘辙辚辞辩辫边辽达迁过迈运还这进远违连迟迩迳迹适选逊递逦逻遗遥邓邝邬邮邹邺邻郁郄郏郐郑郓郦郧郸酝酦酱酽酾酿释里鉅鉴銮錾钆钇针钉钊钋钌钍钎钏钐钑钒钓钔钕钖钗钘钙钚钛钝钞钟钠钡钢钣钤钥钦钧钨钩钪钫钬钭钮钯钰钱钲钳钴钵钶钷钸钹钺钻钼钽钾钿铀铁铂铃铄铅铆铈铉铊铋铍铎铏铐铑铒铕铗铘铙铚铛铜铝铞铟铠铡铢铣铤铥铦铧铨铪铫铬铭铮铯铰铱铲铳铴铵银铷铸铹铺铻铼铽链铿销锁锂锃锄锅锆锇锈锉锊锋锌锍锎锏锐锑锒锓锔锕锖锗错锚锜锞锟锠锡锢锣锤锥锦锨锩锫锬锭键锯锰锱锲锳锴锵锶锷锸锹锺锻锼锽锾锿镀镁镂镃镆镇镈镉镊镌镍镎镏镐镑镒镕镖镗镙镚镛镜镝镞镟镠镡镢镣镤镥镦镧镨镩镪镫镬镭镮镯镰镱镲镳镴镶长门闩闪闫闬闭问闯闰闱闲闳间闵闶闷闸闹闺闻闼闽闾闿阀阁阂阃阄阅阆阇阈阉阊阋阌阍阎阏阐阑阒阓阔阕阖阗阘阙阚阛队阳阴阵阶际陆陇陈陉陕陧陨险随隐隶隽难雏雠雳雾霁霉霭靓静靥鞑鞒鞯鞴韦韧韨韩韪韫韬韵页顶顷顸项顺须顼顽顾顿颀颁颂颃预颅领颇颈颉颊颋颌颍颎颏颐频颒颓颔颕颖颗题颙颚颛颜额颞颟颠颡颢颣颤颥颦颧风飏飐飑飒飓飔飕飖飗飘飙飚飞飨餍饤饥饦饧饨饩饪饫饬饭饮饯饰饱饲饳饴饵饶饷饸饹饺饻饼饽饾饿馀馁馂馃馄馅馆馇馈馉馊馋馌馍馎馏馐馑馒馓馔馕马驭驮驯驰驱驲驳驴驵驶驷驸驹驺驻驼驽驾驿骀骁骂骃骄骅骆骇骈骉骊骋验骍骎骏骐骑骒骓骔骕骖骗骘骙骚骛骜骝骞骟骠骡骢骣骤骥骦骧髅髋髌鬓魇魉鱼鱽鱾鱿鲀鲁鲂鲄鲅鲆鲇鲈鲉鲊鲋鲌鲍鲎鲏鲐鲑鲒鲓鲔鲕鲖鲗鲘鲙鲚鲛鲜鲝鲞鲟鲠鲡鲢鲣鲤鲥鲦鲧鲨鲩鲪鲫鲬鲭鲮鲯鲰鲱鲲鲳鲴鲵鲶鲷鲸鲹鲺鲻鲼鲽鲾鲿鳀鳁鳂鳃鳄鳅鳆鳇鳈鳉鳊鳋鳌鳍鳎鳏鳐鳑鳒鳓鳔鳕鳖鳗鳘鳙鳛鳜鳝鳞鳟鳠鳡鳢鳣鸟鸠鸡鸢鸣鸤鸥鸦鸧鸨鸩鸪鸫鸬鸭鸮鸯鸰鸱鸲鸳鸴鸵鸶鸷鸸鸹鸺鸻鸼鸽鸾鸿鹀鹁鹂鹃鹄鹅鹆鹇鹈鹉鹊鹋鹌鹍鹎鹏鹐鹑鹒鹓鹔鹕鹖鹗鹘鹚鹛鹜鹝鹞鹟鹠鹡鹢鹣鹤鹥鹦鹧鹨鹩鹪鹫鹬鹭鹯鹰鹱鹲鹳鹴鹾麦麸黄黉黡黩黪黾龙历志制一台皋准复猛钟注范签' - const FTPYStr = () => '萬與醜專業叢東絲丟兩嚴喪個爿豐臨為麗舉麼義烏樂喬習鄉書買亂爭於虧雲亙亞產畝親褻嚲億僅從侖倉儀們價眾優夥會傴傘偉傳傷倀倫傖偽佇體餘傭僉俠侶僥偵側僑儈儕儂俁儔儼倆儷儉債傾傯僂僨償儻儐儲儺兒兌兗黨蘭關興茲養獸囅內岡冊寫軍農塚馮衝決況凍淨淒涼淩減湊凜幾鳳鳧憑凱擊氹鑿芻劃劉則剛創刪別剗剄劊劌剴劑剮劍剝劇勸辦務勱動勵勁勞勢勳猛勩勻匭匱區醫華協單賣盧鹵臥衛卻巹廠廳曆厲壓厭厙廁廂厴廈廚廄廝縣參靉靆雙發變敘疊葉號歎嘰籲後嚇呂嗎唚噸聽啟吳嘸囈嘔嚦唄員咼嗆嗚詠哢嚨嚀噝吒噅鹹呱響啞噠嘵嗶噦嘩噲嚌噥喲嘜嗊嘮啢嗩唕喚呼嘖嗇囀齧囉嘽嘯噴嘍嚳囁嗬噯噓嚶囑嚕劈囂謔團園囪圍圇國圖圓聖壙場阪壞塊堅壇壢壩塢墳墜壟壟壚壘墾坰堊墊埡墶壋塏堖塒塤堝墊垵塹墮壪牆壯聲殼壺壼處備複夠頭誇夾奪奩奐奮獎奧妝婦媽嫵嫗媯姍薑婁婭嬈嬌孌娛媧嫻嫿嬰嬋嬸媼嬡嬪嬙嬤孫學孿寧寶實寵審憲宮寬賓寢對尋導壽將爾塵堯尷屍盡層屭屜屆屬屢屨嶼歲豈嶇崗峴嶴嵐島嶺嶽崠巋嶨嶧峽嶢嶠崢巒嶗崍嶮嶄嶸嶔崳嶁脊巔鞏巰幣帥師幃帳簾幟帶幀幫幬幘幗冪襆幹並廣莊慶廬廡庫應廟龐廢廎廩開異棄張彌弳彎彈強歸當錄彠彥徹徑徠禦憶懺憂愾懷態慫憮慪悵愴憐總懟懌戀懇惡慟懨愷惻惱惲悅愨懸慳憫驚懼慘懲憊愜慚憚慣湣慍憤憒願懾憖怵懣懶懍戇戔戲戧戰戩戶紮撲扡執擴捫掃揚擾撫拋摶摳掄搶護報擔擬攏揀擁攔擰撥擇掛摯攣掗撾撻挾撓擋撟掙擠揮撏撈損撿換搗據撚擄摑擲撣摻摜摣攬撳攙擱摟攪攜攝攄擺搖擯攤攖撐攆擷擼攛擻攢敵斂數齋斕鬥斬斷無舊時曠暘曇晝曨顯晉曬曉曄暈暉暫曖劄術樸機殺雜權條來楊榪傑極構樅樞棗櫪梘棖槍楓梟櫃檸檉梔柵標棧櫛櫳棟櫨櫟欄樹棲樣欒棬椏橈楨檔榿橋樺檜槳樁夢檮棶檢欞槨櫝槧欏橢樓欖櫬櫚櫸檟檻檳櫧橫檣櫻櫫櫥櫓櫞簷檁歡歟歐殲歿殤殘殞殮殫殯毆毀轂畢斃氈毿氌氣氫氬氳彙漢汙湯洶遝溝沒灃漚瀝淪滄渢溈滬濔濘淚澩瀧瀘濼瀉潑澤涇潔灑窪浹淺漿澆湞溮濁測澮濟瀏滻渾滸濃潯濜塗湧濤澇淶漣潿渦溳渙滌潤澗漲澀澱淵淥漬瀆漸澠漁瀋滲溫遊灣濕潰濺漵漊潷滾滯灩灄滿瀅濾濫灤濱灘澦濫瀠瀟瀲濰潛瀦瀾瀨瀕灝滅燈靈災燦煬爐燉煒熗點煉熾爍爛烴燭煙煩燒燁燴燙燼熱煥燜燾煆糊溜愛爺牘犛牽犧犢強狀獷獁猶狽麅獮獰獨狹獅獪猙獄猻獫獵獼玀豬貓蝟獻獺璣璵瑒瑪瑋環現瑲璽瑉玨琺瓏璫琿璡璉瑣瓊瑤璦璿瓔瓚甕甌電畫暢佘疇癤療瘧癘瘍鬁瘡瘋皰屙癰痙癢瘂癆瘓癇癡癉瘮瘞瘺癟癱癮癭癩癬癲臒皚皺皸盞鹽監蓋盜盤瞘眥矓著睜睞瞼瞞矚矯磯礬礦碭碼磚硨硯碸礪礱礫礎硜矽碩硤磽磑礄確鹼礙磧磣堿镟滾禮禕禰禎禱禍稟祿禪離禿稈種積稱穢穠穭稅穌穩穡窮竊竅窯竄窩窺竇窶豎競篤筍筆筧箋籠籩築篳篩簹箏籌簽簡籙簀篋籜籮簞簫簣簍籃籬籪籟糴類秈糶糲粵糞糧糝餱緊縶糸糾紆紅紂纖紇約級紈纊紀紉緯紜紘純紕紗綱納紝縱綸紛紙紋紡紵紖紐紓線紺絏紱練組紳細織終縐絆紼絀紹繹經紿綁絨結絝繞絰絎繪給絢絳絡絕絞統綆綃絹繡綌綏絛繼綈績緒綾緓續綺緋綽緔緄繩維綿綬繃綢綯綹綣綜綻綰綠綴緇緙緗緘緬纜緹緲緝縕繢緦綞緞緶線緱縋緩締縷編緡緣縉縛縟縝縫縗縞纏縭縊縑繽縹縵縲纓縮繆繅纈繚繕繒韁繾繰繯繳纘罌網羅罰罷羆羈羥羨翹翽翬耮耬聳恥聶聾職聹聯聵聰肅腸膚膁腎腫脹脅膽勝朧腖臚脛膠脈膾髒臍腦膿臠腳脫腡臉臘醃膕齶膩靦膃騰臏臢輿艤艦艙艫艱豔艸藝節羋薌蕪蘆蓯葦藶莧萇蒼苧蘇檾蘋莖蘢蔦塋煢繭荊薦薘莢蕘蓽蕎薈薺蕩榮葷滎犖熒蕁藎蓀蔭蕒葒葤藥蒞蓧萊蓮蒔萵薟獲蕕瑩鶯蓴蘀蘿螢營縈蕭薩蔥蕆蕢蔣蔞藍薊蘺蕷鎣驀薔蘞藺藹蘄蘊藪槁蘚虜慮虛蟲虯蟣雖蝦蠆蝕蟻螞蠶蠔蜆蠱蠣蟶蠻蟄蛺蟯螄蠐蛻蝸蠟蠅蟈蟬蠍螻蠑螿蟎蠨釁銜補襯袞襖嫋褘襪襲襏裝襠褌褳襝褲襇褸襤繈襴見觀覎規覓視覘覽覺覬覡覿覥覦覯覲覷觴觸觶讋譽謄訁計訂訃認譏訐訌討讓訕訖訓議訊記訒講諱謳詎訝訥許訛論訩訟諷設訪訣證詁訶評詛識詗詐訴診詆謅詞詘詔詖譯詒誆誄試詿詩詰詼誠誅詵話誕詬詮詭詢詣諍該詳詫諢詡譸誡誣語誚誤誥誘誨誑說誦誒請諸諏諾讀諑誹課諉諛誰諗調諂諒諄誶談誼謀諶諜謊諫諧謔謁謂諤諭諼讒諮諳諺諦謎諞諝謨讜謖謝謠謗諡謙謐謹謾謫譾謬譚譖譙讕譜譎讞譴譫讖穀豶貝貞負貟貢財責賢敗賬貨質販貪貧貶購貯貫貳賤賁貰貼貴貺貸貿費賀貽賊贄賈賄貲賃賂贓資賅贐賕賑賚賒賦賭齎贖賞賜贔賙賡賠賧賴賵贅賻賺賽賾贗讚贇贈贍贏贛赬趙趕趨趲躉躍蹌蹠躒踐躂蹺蹕躚躋踴躊蹤躓躑躡蹣躕躥躪躦軀車軋軌軒軑軔轉軛輪軟轟軲軻轤軸軹軼軤軫轢軺輕軾載輊轎輈輇輅較輒輔輛輦輩輝輥輞輬輟輜輳輻輯轀輸轡轅轄輾轆轍轔辭辯辮邊遼達遷過邁運還這進遠違連遲邇逕跡適選遜遞邐邏遺遙鄧鄺鄔郵鄒鄴鄰鬱郤郟鄶鄭鄆酈鄖鄲醞醱醬釅釃釀釋裏钜鑒鑾鏨釓釔針釘釗釙釕釷釺釧釤鈒釩釣鍆釹鍚釵鈃鈣鈈鈦鈍鈔鍾鈉鋇鋼鈑鈐鑰欽鈞鎢鉤鈧鈁鈥鈄鈕鈀鈺錢鉦鉗鈷缽鈳鉕鈽鈸鉞鑽鉬鉭鉀鈿鈾鐵鉑鈴鑠鉛鉚鈰鉉鉈鉍鈹鐸鉶銬銠鉺銪鋏鋣鐃銍鐺銅鋁銱銦鎧鍘銖銑鋌銩銛鏵銓鉿銚鉻銘錚銫鉸銥鏟銃鐋銨銀銣鑄鐒鋪鋙錸鋱鏈鏗銷鎖鋰鋥鋤鍋鋯鋨鏽銼鋝鋒鋅鋶鐦鐧銳銻鋃鋟鋦錒錆鍺錯錨錡錁錕錩錫錮鑼錘錐錦鍁錈錇錟錠鍵鋸錳錙鍥鍈鍇鏘鍶鍔鍤鍬鍾鍛鎪鍠鍰鎄鍍鎂鏤鎡鏌鎮鎛鎘鑷鐫鎳鎿鎦鎬鎊鎰鎔鏢鏜鏍鏰鏞鏡鏑鏃鏇鏐鐔钁鐐鏷鑥鐓鑭鐠鑹鏹鐙鑊鐳鐶鐲鐮鐿鑔鑣鑞鑲長門閂閃閆閈閉問闖閏闈閑閎間閔閌悶閘鬧閨聞闥閩閭闓閥閣閡閫鬮閱閬闍閾閹閶鬩閿閽閻閼闡闌闃闠闊闋闔闐闒闕闞闤隊陽陰陣階際陸隴陳陘陝隉隕險隨隱隸雋難雛讎靂霧霽黴靄靚靜靨韃鞽韉韝韋韌韍韓韙韞韜韻頁頂頃頇項順須頊頑顧頓頎頒頌頏預顱領頗頸頡頰頲頜潁熲頦頤頻頮頹頷頴穎顆題顒顎顓顏額顳顢顛顙顥纇顫顬顰顴風颺颭颮颯颶颸颼颻飀飄飆飆飛饗饜飣饑飥餳飩餼飪飫飭飯飲餞飾飽飼飿飴餌饒餉餄餎餃餏餅餑餖餓餘餒餕餜餛餡館餷饋餶餿饞饁饃餺餾饈饉饅饊饌饢馬馭馱馴馳驅馹駁驢駔駛駟駙駒騶駐駝駑駕驛駘驍罵駰驕驊駱駭駢驫驪騁驗騂駸駿騏騎騍騅騌驌驂騙騭騤騷騖驁騮騫騸驃騾驄驏驟驥驦驤髏髖髕鬢魘魎魚魛魢魷魨魯魴魺鮁鮃鯰鱸鮋鮓鮒鮊鮑鱟鮍鮐鮭鮚鮳鮪鮞鮦鰂鮜鱠鱭鮫鮮鮺鯗鱘鯁鱺鰱鰹鯉鰣鰷鯀鯊鯇鮶鯽鯒鯖鯪鯕鯫鯡鯤鯧鯝鯢鯰鯛鯨鯵鯴鯔鱝鰈鰏鱨鯷鰮鰃鰓鱷鰍鰒鰉鰁鱂鯿鰠鼇鰭鰨鰥鰩鰟鰜鰳鰾鱈鱉鰻鰵鱅鰼鱖鱔鱗鱒鱯鱤鱧鱣鳥鳩雞鳶鳴鳲鷗鴉鶬鴇鴆鴣鶇鸕鴨鴞鴦鴒鴟鴝鴛鴬鴕鷥鷙鴯鴰鵂鴴鵃鴿鸞鴻鵐鵓鸝鵑鵠鵝鵒鷳鵜鵡鵲鶓鵪鶤鵯鵬鵮鶉鶊鵷鷫鶘鶡鶚鶻鶿鶥鶩鷊鷂鶲鶹鶺鷁鶼鶴鷖鸚鷓鷚鷯鷦鷲鷸鷺鸇鷹鸌鸏鸛鸘鹺麥麩黃黌黶黷黲黽龍歷誌製壹臺臯準復勐鐘註範籤' - - const Traditionalized = cc => { + function JTPYStr () { + return '万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号叹叽吁后吓吕吗吣吨听启吴呒呓呕呖呗员呙呛呜咏咔咙咛咝咤咴咸哌响哑哒哓哔哕哗哙哜哝哟唛唝唠唡唢唣唤唿啧啬啭啮啰啴啸喷喽喾嗫呵嗳嘘嘤嘱噜噼嚣嚯团园囱围囵国图圆圣圹场坂坏块坚坛坜坝坞坟坠垄垅垆垒垦垧垩垫垭垯垱垲垴埘埙埚埝埯堑堕塆墙壮声壳壶壸处备复够头夸夹夺奁奂奋奖奥妆妇妈妩妪妫姗姜娄娅娆娇娈娱娲娴婳婴婵婶媪嫒嫔嫱嬷孙学孪宁宝实宠审宪宫宽宾寝对寻导寿将尔尘尧尴尸尽层屃屉届属屡屦屿岁岂岖岗岘岙岚岛岭岳岽岿峃峄峡峣峤峥峦崂崃崄崭嵘嵚嵛嵝嵴巅巩巯币帅师帏帐帘帜带帧帮帱帻帼幂幞干并广庄庆庐庑库应庙庞废庼廪开异弃张弥弪弯弹强归当录彟彦彻径徕御忆忏忧忾怀态怂怃怄怅怆怜总怼怿恋恳恶恸恹恺恻恼恽悦悫悬悭悯惊惧惨惩惫惬惭惮惯愍愠愤愦愿慑慭憷懑懒懔戆戋戏戗战戬户扎扑扦执扩扪扫扬扰抚抛抟抠抡抢护报担拟拢拣拥拦拧拨择挂挚挛挜挝挞挟挠挡挢挣挤挥挦捞损捡换捣据捻掳掴掷掸掺掼揸揽揿搀搁搂搅携摄摅摆摇摈摊撄撑撵撷撸撺擞攒敌敛数斋斓斗斩断无旧时旷旸昙昼昽显晋晒晓晔晕晖暂暧札术朴机杀杂权条来杨杩杰极构枞枢枣枥枧枨枪枫枭柜柠柽栀栅标栈栉栊栋栌栎栏树栖样栾桊桠桡桢档桤桥桦桧桨桩梦梼梾检棂椁椟椠椤椭楼榄榇榈榉槚槛槟槠横樯樱橥橱橹橼檐檩欢欤欧歼殁殇残殒殓殚殡殴毁毂毕毙毡毵氇气氢氩氲汇汉污汤汹沓沟没沣沤沥沦沧沨沩沪沵泞泪泶泷泸泺泻泼泽泾洁洒洼浃浅浆浇浈浉浊测浍济浏浐浑浒浓浔浕涂涌涛涝涞涟涠涡涢涣涤润涧涨涩淀渊渌渍渎渐渑渔渖渗温游湾湿溃溅溆溇滗滚滞滟滠满滢滤滥滦滨滩滪漤潆潇潋潍潜潴澜濑濒灏灭灯灵灾灿炀炉炖炜炝点炼炽烁烂烃烛烟烦烧烨烩烫烬热焕焖焘煅煳熘爱爷牍牦牵牺犊犟状犷犸犹狈狍狝狞独狭狮狯狰狱狲猃猎猕猡猪猫猬献獭玑玙玚玛玮环现玱玺珉珏珐珑珰珲琎琏琐琼瑶瑷璇璎瓒瓮瓯电画畅畲畴疖疗疟疠疡疬疮疯疱疴痈痉痒痖痨痪痫痴瘅瘆瘗瘘瘪瘫瘾瘿癞癣癫癯皑皱皲盏盐监盖盗盘眍眦眬着睁睐睑瞒瞩矫矶矾矿砀码砖砗砚砜砺砻砾础硁硅硕硖硗硙硚确硷碍碛碜碱碹磙礼祎祢祯祷祸禀禄禅离秃秆种积称秽秾稆税稣稳穑穷窃窍窑窜窝窥窦窭竖竞笃笋笔笕笺笼笾筑筚筛筜筝筹签简箓箦箧箨箩箪箫篑篓篮篱簖籁籴类籼粜粝粤粪粮糁糇紧絷纟纠纡红纣纤纥约级纨纩纪纫纬纭纮纯纰纱纲纳纴纵纶纷纸纹纺纻纼纽纾线绀绁绂练组绅细织终绉绊绋绌绍绎经绐绑绒结绔绕绖绗绘给绚绛络绝绞统绠绡绢绣绤绥绦继绨绩绪绫绬续绮绯绰绱绲绳维绵绶绷绸绹绺绻综绽绾绿缀缁缂缃缄缅缆缇缈缉缊缋缌缍缎缏缐缑缒缓缔缕编缗缘缙缚缛缜缝缞缟缠缡缢缣缤缥缦缧缨缩缪缫缬缭缮缯缰缱缲缳缴缵罂网罗罚罢罴羁羟羡翘翙翚耢耧耸耻聂聋职聍联聩聪肃肠肤肷肾肿胀胁胆胜胧胨胪胫胶脉脍脏脐脑脓脔脚脱脶脸腊腌腘腭腻腼腽腾膑臜舆舣舰舱舻艰艳艹艺节芈芗芜芦苁苇苈苋苌苍苎苏苘苹茎茏茑茔茕茧荆荐荙荚荛荜荞荟荠荡荣荤荥荦荧荨荩荪荫荬荭荮药莅莜莱莲莳莴莶获莸莹莺莼萚萝萤营萦萧萨葱蒇蒉蒋蒌蓝蓟蓠蓣蓥蓦蔷蔹蔺蔼蕲蕴薮藁藓虏虑虚虫虬虮虽虾虿蚀蚁蚂蚕蚝蚬蛊蛎蛏蛮蛰蛱蛲蛳蛴蜕蜗蜡蝇蝈蝉蝎蝼蝾螀螨蟏衅衔补衬衮袄袅袆袜袭袯装裆裈裢裣裤裥褛褴襁襕见观觃规觅视觇览觉觊觋觌觍觎觏觐觑觞触觯詟誉誊讠计订讣认讥讦讧讨让讪讫训议讯记讱讲讳讴讵讶讷许讹论讻讼讽设访诀证诂诃评诅识诇诈诉诊诋诌词诎诏诐译诒诓诔试诖诗诘诙诚诛诜话诞诟诠诡询诣诤该详诧诨诩诪诫诬语诮误诰诱诲诳说诵诶请诸诹诺读诼诽课诿谀谁谂调谄谅谆谇谈谊谋谌谍谎谏谐谑谒谓谔谕谖谗谘谙谚谛谜谝谞谟谠谡谢谣谤谥谦谧谨谩谪谫谬谭谮谯谰谱谲谳谴谵谶谷豮贝贞负贠贡财责贤败账货质贩贪贫贬购贮贯贰贱贲贳贴贵贶贷贸费贺贻贼贽贾贿赀赁赂赃资赅赆赇赈赉赊赋赌赍赎赏赐赑赒赓赔赕赖赗赘赙赚赛赜赝赞赟赠赡赢赣赪赵赶趋趱趸跃跄跖跞践跶跷跸跹跻踊踌踪踬踯蹑蹒蹰蹿躏躜躯车轧轨轩轪轫转轭轮软轰轱轲轳轴轵轶轷轸轹轺轻轼载轾轿辀辁辂较辄辅辆辇辈辉辊辋辌辍辎辏辐辑辒输辔辕辖辗辘辙辚辞辩辫边辽达迁过迈运还这进远违连迟迩迳迹适选逊递逦逻遗遥邓邝邬邮邹邺邻郁郄郏郐郑郓郦郧郸酝酦酱酽酾酿释里鉅鉴銮錾钆钇针钉钊钋钌钍钎钏钐钑钒钓钔钕钖钗钘钙钚钛钝钞钟钠钡钢钣钤钥钦钧钨钩钪钫钬钭钮钯钰钱钲钳钴钵钶钷钸钹钺钻钼钽钾钿铀铁铂铃铄铅铆铈铉铊铋铍铎铏铐铑铒铕铗铘铙铚铛铜铝铞铟铠铡铢铣铤铥铦铧铨铪铫铬铭铮铯铰铱铲铳铴铵银铷铸铹铺铻铼铽链铿销锁锂锃锄锅锆锇锈锉锊锋锌锍锎锏锐锑锒锓锔锕锖锗错锚锜锞锟锠锡锢锣锤锥锦锨锩锫锬锭键锯锰锱锲锳锴锵锶锷锸锹锺锻锼锽锾锿镀镁镂镃镆镇镈镉镊镌镍镎镏镐镑镒镕镖镗镙镚镛镜镝镞镟镠镡镢镣镤镥镦镧镨镩镪镫镬镭镮镯镰镱镲镳镴镶长门闩闪闫闬闭问闯闰闱闲闳间闵闶闷闸闹闺闻闼闽闾闿阀阁阂阃阄阅阆阇阈阉阊阋阌阍阎阏阐阑阒阓阔阕阖阗阘阙阚阛队阳阴阵阶际陆陇陈陉陕陧陨险随隐隶隽难雏雠雳雾霁霉霭靓静靥鞑鞒鞯鞴韦韧韨韩韪韫韬韵页顶顷顸项顺须顼顽顾顿颀颁颂颃预颅领颇颈颉颊颋颌颍颎颏颐频颒颓颔颕颖颗题颙颚颛颜额颞颟颠颡颢颣颤颥颦颧风飏飐飑飒飓飔飕飖飗飘飙飚飞飨餍饤饥饦饧饨饩饪饫饬饭饮饯饰饱饲饳饴饵饶饷饸饹饺饻饼饽饾饿馀馁馂馃馄馅馆馇馈馉馊馋馌馍馎馏馐馑馒馓馔馕马驭驮驯驰驱驲驳驴驵驶驷驸驹驺驻驼驽驾驿骀骁骂骃骄骅骆骇骈骉骊骋验骍骎骏骐骑骒骓骔骕骖骗骘骙骚骛骜骝骞骟骠骡骢骣骤骥骦骧髅髋髌鬓魇魉鱼鱽鱾鱿鲀鲁鲂鲄鲅鲆鲇鲈鲉鲊鲋鲌鲍鲎鲏鲐鲑鲒鲓鲔鲕鲖鲗鲘鲙鲚鲛鲜鲝鲞鲟鲠鲡鲢鲣鲤鲥鲦鲧鲨鲩鲪鲫鲬鲭鲮鲯鲰鲱鲲鲳鲴鲵鲶鲷鲸鲹鲺鲻鲼鲽鲾鲿鳀鳁鳂鳃鳄鳅鳆鳇鳈鳉鳊鳋鳌鳍鳎鳏鳐鳑鳒鳓鳔鳕鳖鳗鳘鳙鳛鳜鳝鳞鳟鳠鳡鳢鳣鸟鸠鸡鸢鸣鸤鸥鸦鸧鸨鸩鸪鸫鸬鸭鸮鸯鸰鸱鸲鸳鸴鸵鸶鸷鸸鸹鸺鸻鸼鸽鸾鸿鹀鹁鹂鹃鹄鹅鹆鹇鹈鹉鹊鹋鹌鹍鹎鹏鹐鹑鹒鹓鹔鹕鹖鹗鹘鹚鹛鹜鹝鹞鹟鹠鹡鹢鹣鹤鹥鹦鹧鹨鹩鹪鹫鹬鹭鹯鹰鹱鹲鹳鹴鹾麦麸黄黉黡黩黪黾' + } + function FTPYStr () { + return '萬與醜專業叢東絲丟兩嚴喪個爿豐臨為麗舉麼義烏樂喬習鄉書買亂爭於虧雲亙亞產畝親褻嚲億僅從侖倉儀們價眾優夥會傴傘偉傳傷倀倫傖偽佇體餘傭僉俠侶僥偵側僑儈儕儂俁儔儼倆儷儉債傾傯僂僨償儻儐儲儺兒兌兗黨蘭關興茲養獸囅內岡冊寫軍農塚馮衝決況凍淨淒涼淩減湊凜幾鳳鳧憑凱擊氹鑿芻劃劉則剛創刪別剗剄劊劌剴劑剮劍剝劇勸辦務勱動勵勁勞勢勳猛勩勻匭匱區醫華協單賣盧鹵臥衛卻巹廠廳曆厲壓厭厙廁廂厴廈廚廄廝縣參靉靆雙發變敘疊葉號歎嘰籲後嚇呂嗎唚噸聽啟吳嘸囈嘔嚦唄員咼嗆嗚詠哢嚨嚀噝吒噅鹹呱響啞噠嘵嗶噦嘩噲嚌噥喲嘜嗊嘮啢嗩唕喚呼嘖嗇囀齧囉嘽嘯噴嘍嚳囁嗬噯噓嚶囑嚕劈囂謔團園囪圍圇國圖圓聖壙場阪壞塊堅壇壢壩塢墳墜壟壟壚壘墾坰堊墊埡墶壋塏堖塒塤堝墊垵塹墮壪牆壯聲殼壺壼處備複夠頭誇夾奪奩奐奮獎奧妝婦媽嫵嫗媯姍薑婁婭嬈嬌孌娛媧嫻嫿嬰嬋嬸媼嬡嬪嬙嬤孫學孿寧寶實寵審憲宮寬賓寢對尋導壽將爾塵堯尷屍盡層屭屜屆屬屢屨嶼歲豈嶇崗峴嶴嵐島嶺嶽崠巋嶨嶧峽嶢嶠崢巒嶗崍嶮嶄嶸嶔崳嶁脊巔鞏巰幣帥師幃帳簾幟帶幀幫幬幘幗冪襆幹並廣莊慶廬廡庫應廟龐廢廎廩開異棄張彌弳彎彈強歸當錄彠彥徹徑徠禦憶懺憂愾懷態慫憮慪悵愴憐總懟懌戀懇惡慟懨愷惻惱惲悅愨懸慳憫驚懼慘懲憊愜慚憚慣湣慍憤憒願懾憖怵懣懶懍戇戔戲戧戰戩戶紮撲扡執擴捫掃揚擾撫拋摶摳掄搶護報擔擬攏揀擁攔擰撥擇掛摯攣掗撾撻挾撓擋撟掙擠揮撏撈損撿換搗據撚擄摑擲撣摻摜摣攬撳攙擱摟攪攜攝攄擺搖擯攤攖撐攆擷擼攛擻攢敵斂數齋斕鬥斬斷無舊時曠暘曇晝曨顯晉曬曉曄暈暉暫曖劄術樸機殺雜權條來楊榪傑極構樅樞棗櫪梘棖槍楓梟櫃檸檉梔柵標棧櫛櫳棟櫨櫟欄樹棲樣欒棬椏橈楨檔榿橋樺檜槳樁夢檮棶檢欞槨櫝槧欏橢樓欖櫬櫚櫸檟檻檳櫧橫檣櫻櫫櫥櫓櫞簷檁歡歟歐殲歿殤殘殞殮殫殯毆毀轂畢斃氈毿氌氣氫氬氳彙漢汙湯洶遝溝沒灃漚瀝淪滄渢溈滬濔濘淚澩瀧瀘濼瀉潑澤涇潔灑窪浹淺漿澆湞溮濁測澮濟瀏滻渾滸濃潯濜塗湧濤澇淶漣潿渦溳渙滌潤澗漲澀澱淵淥漬瀆漸澠漁瀋滲溫遊灣濕潰濺漵漊潷滾滯灩灄滿瀅濾濫灤濱灘澦濫瀠瀟瀲濰潛瀦瀾瀨瀕灝滅燈靈災燦煬爐燉煒熗點煉熾爍爛烴燭煙煩燒燁燴燙燼熱煥燜燾煆糊溜愛爺牘犛牽犧犢強狀獷獁猶狽麅獮獰獨狹獅獪猙獄猻獫獵獼玀豬貓蝟獻獺璣璵瑒瑪瑋環現瑲璽瑉玨琺瓏璫琿璡璉瑣瓊瑤璦璿瓔瓚甕甌電畫暢佘疇癤療瘧癘瘍鬁瘡瘋皰屙癰痙癢瘂癆瘓癇癡癉瘮瘞瘺癟癱癮癭癩癬癲臒皚皺皸盞鹽監蓋盜盤瞘眥矓著睜睞瞼瞞矚矯磯礬礦碭碼磚硨硯碸礪礱礫礎硜矽碩硤磽磑礄確鹼礙磧磣堿镟滾禮禕禰禎禱禍稟祿禪離禿稈種積稱穢穠穭稅穌穩穡窮竊竅窯竄窩窺竇窶豎競篤筍筆筧箋籠籩築篳篩簹箏籌簽簡籙簀篋籜籮簞簫簣簍籃籬籪籟糴類秈糶糲粵糞糧糝餱緊縶糸糾紆紅紂纖紇約級紈纊紀紉緯紜紘純紕紗綱納紝縱綸紛紙紋紡紵紖紐紓線紺絏紱練組紳細織終縐絆紼絀紹繹經紿綁絨結絝繞絰絎繪給絢絳絡絕絞統綆綃絹繡綌綏絛繼綈績緒綾緓續綺緋綽緔緄繩維綿綬繃綢綯綹綣綜綻綰綠綴緇緙緗緘緬纜緹緲緝縕繢緦綞緞緶線緱縋緩締縷編緡緣縉縛縟縝縫縗縞纏縭縊縑繽縹縵縲纓縮繆繅纈繚繕繒韁繾繰繯繳纘罌網羅罰罷羆羈羥羨翹翽翬耮耬聳恥聶聾職聹聯聵聰肅腸膚膁腎腫脹脅膽勝朧腖臚脛膠脈膾髒臍腦膿臠腳脫腡臉臘醃膕齶膩靦膃騰臏臢輿艤艦艙艫艱豔艸藝節羋薌蕪蘆蓯葦藶莧萇蒼苧蘇檾蘋莖蘢蔦塋煢繭荊薦薘莢蕘蓽蕎薈薺蕩榮葷滎犖熒蕁藎蓀蔭蕒葒葤藥蒞蓧萊蓮蒔萵薟獲蕕瑩鶯蓴蘀蘿螢營縈蕭薩蔥蕆蕢蔣蔞藍薊蘺蕷鎣驀薔蘞藺藹蘄蘊藪槁蘚虜慮虛蟲虯蟣雖蝦蠆蝕蟻螞蠶蠔蜆蠱蠣蟶蠻蟄蛺蟯螄蠐蛻蝸蠟蠅蟈蟬蠍螻蠑螿蟎蠨釁銜補襯袞襖嫋褘襪襲襏裝襠褌褳襝褲襇褸襤繈襴見觀覎規覓視覘覽覺覬覡覿覥覦覯覲覷觴觸觶讋譽謄訁計訂訃認譏訐訌討讓訕訖訓議訊記訒講諱謳詎訝訥許訛論訩訟諷設訪訣證詁訶評詛識詗詐訴診詆謅詞詘詔詖譯詒誆誄試詿詩詰詼誠誅詵話誕詬詮詭詢詣諍該詳詫諢詡譸誡誣語誚誤誥誘誨誑說誦誒請諸諏諾讀諑誹課諉諛誰諗調諂諒諄誶談誼謀諶諜謊諫諧謔謁謂諤諭諼讒諮諳諺諦謎諞諝謨讜謖謝謠謗諡謙謐謹謾謫譾謬譚譖譙讕譜譎讞譴譫讖穀豶貝貞負貟貢財責賢敗賬貨質販貪貧貶購貯貫貳賤賁貰貼貴貺貸貿費賀貽賊贄賈賄貲賃賂贓資賅贐賕賑賚賒賦賭齎贖賞賜贔賙賡賠賧賴賵贅賻賺賽賾贗讚贇贈贍贏贛赬趙趕趨趲躉躍蹌蹠躒踐躂蹺蹕躚躋踴躊蹤躓躑躡蹣躕躥躪躦軀車軋軌軒軑軔轉軛輪軟轟軲軻轤軸軹軼軤軫轢軺輕軾載輊轎輈輇輅較輒輔輛輦輩輝輥輞輬輟輜輳輻輯轀輸轡轅轄輾轆轍轔辭辯辮邊遼達遷過邁運還這進遠違連遲邇逕跡適選遜遞邐邏遺遙鄧鄺鄔郵鄒鄴鄰鬱郤郟鄶鄭鄆酈鄖鄲醞醱醬釅釃釀釋裏钜鑒鑾鏨釓釔針釘釗釙釕釷釺釧釤鈒釩釣鍆釹鍚釵鈃鈣鈈鈦鈍鈔鍾鈉鋇鋼鈑鈐鑰欽鈞鎢鉤鈧鈁鈥鈄鈕鈀鈺錢鉦鉗鈷缽鈳鉕鈽鈸鉞鑽鉬鉭鉀鈿鈾鐵鉑鈴鑠鉛鉚鈰鉉鉈鉍鈹鐸鉶銬銠鉺銪鋏鋣鐃銍鐺銅鋁銱銦鎧鍘銖銑鋌銩銛鏵銓鉿銚鉻銘錚銫鉸銥鏟銃鐋銨銀銣鑄鐒鋪鋙錸鋱鏈鏗銷鎖鋰鋥鋤鍋鋯鋨鏽銼鋝鋒鋅鋶鐦鐧銳銻鋃鋟鋦錒錆鍺錯錨錡錁錕錩錫錮鑼錘錐錦鍁錈錇錟錠鍵鋸錳錙鍥鍈鍇鏘鍶鍔鍤鍬鍾鍛鎪鍠鍰鎄鍍鎂鏤鎡鏌鎮鎛鎘鑷鐫鎳鎿鎦鎬鎊鎰鎔鏢鏜鏍鏰鏞鏡鏑鏃鏇鏐鐔钁鐐鏷鑥鐓鑭鐠鑹鏹鐙鑊鐳鐶鐲鐮鐿鑔鑣鑞鑲長門閂閃閆閈閉問闖閏闈閑閎間閔閌悶閘鬧閨聞闥閩閭闓閥閣閡閫鬮閱閬闍閾閹閶鬩閿閽閻閼闡闌闃闠闊闋闔闐闒闕闞闤隊陽陰陣階際陸隴陳陘陝隉隕險隨隱隸雋難雛讎靂霧霽黴靄靚靜靨韃鞽韉韝韋韌韍韓韙韞韜韻頁頂頃頇項順須頊頑顧頓頎頒頌頏預顱領頗頸頡頰頲頜潁熲頦頤頻頮頹頷頴穎顆題顒顎顓顏額顳顢顛顙顥纇顫顬顰顴風颺颭颮颯颶颸颼颻飀飄飆飆飛饗饜飣饑飥餳飩餼飪飫飭飯飲餞飾飽飼飿飴餌饒餉餄餎餃餏餅餑餖餓餘餒餕餜餛餡館餷饋餶餿饞饁饃餺餾饈饉饅饊饌饢馬馭馱馴馳驅馹駁驢駔駛駟駙駒騶駐駝駑駕驛駘驍罵駰驕驊駱駭駢驫驪騁驗騂駸駿騏騎騍騅騌驌驂騙騭騤騷騖驁騮騫騸驃騾驄驏驟驥驦驤髏髖髕鬢魘魎魚魛魢魷魨魯魴魺鮁鮃鯰鱸鮋鮓鮒鮊鮑鱟鮍鮐鮭鮚鮳鮪鮞鮦鰂鮜鱠鱭鮫鮮鮺鯗鱘鯁鱺鰱鰹鯉鰣鰷鯀鯊鯇鮶鯽鯒鯖鯪鯕鯫鯡鯤鯧鯝鯢鯰鯛鯨鯵鯴鯔鱝鰈鰏鱨鯷鰮鰃鰓鱷鰍鰒鰉鰁鱂鯿鰠鼇鰭鰨鰥鰩鰟鰜鰳鰾鱈鱉鰻鰵鱅鰼鱖鱔鱗鱒鱯鱤鱧鱣鳥鳩雞鳶鳴鳲鷗鴉鶬鴇鴆鴣鶇鸕鴨鴞鴦鴒鴟鴝鴛鴬鴕鷥鷙鴯鴰鵂鴴鵃鴿鸞鴻鵐鵓鸝鵑鵠鵝鵒鷳鵜鵡鵲鶓鵪鶤鵯鵬鵮鶉鶊鵷鷫鶘鶡鶚鶻鶿鶥鶩鷊鷂鶲鶹鶺鷁鶼鶴鷖鸚鷓鷚鷯鷦鷲鷸鷺鸇鷹鸌鸏鸛鸘鹺麥麩黃黌黶黷黲黽' + } + function Traditionalized (cc) { let str = '' const ss = JTPYStr() const tt = FTPYStr() for (let i = 0; i < cc.length; i++) { - if (cc.charCodeAt(i) > 10000 && ss.indexOf(cc.charAt(i)) !== -1) { - str += tt.charAt(ss.indexOf(cc.charAt(i))) - } else str += cc.charAt(i) + if (cc.charCodeAt(i) > 10000 && ss.indexOf(cc.charAt(i)) !== -1) { str += tt.charAt(ss.indexOf(cc.charAt(i))) } else str += cc.charAt(i) } return str } - - const Simplized = cc => { + function Simplized (cc) { let str = '' const ss = JTPYStr() const tt = FTPYStr() for (let i = 0; i < cc.length; i++) { - if (cc.charCodeAt(i) > 10000 && tt.indexOf(cc.charAt(i)) !== -1) { - str += ss.charAt(tt.indexOf(cc.charAt(i))) - } else str += cc.charAt(i) + if (cc.charCodeAt(i) > 10000 && tt.indexOf(cc.charAt(i)) !== -1) { str += ss.charAt(tt.indexOf(cc.charAt(i))) } else str += cc.charAt(i) } return str } - - const translateInitialization = () => { + function translateInitialization () { + translateButtonObject = document.getElementById('translateLink') if (translateButtonObject) { if (currentEncoding !== targetEncoding) { - translateButtonObject.textContent = - targetEncoding === 1 - ? msgToSimplifiedChinese - : msgToTraditionalChinese - setLang() setTimeout(translateBody, translateDelay) + if (targetEncoding === 1) translateButtonObject.innerHTML = msgToSimplifiedChinese + else translateButtonObject.innerHTML = msgToTraditionalChinese } + translateButtonObject.addEventListener('click', translatePage, false) } } - - window.translateFn = { - translatePage, - Traditionalized, - Simplized, - translateInitialization - } - translateInitialization() - btf.addGlobalFn('pjaxComplete', translateInitialization, 'translateInitialization') + document.addEventListener('pjax:complete', translateInitialization) }) diff --git a/js/utils.js b/js/utils.js index 4d61949a..8fa5d8a0 100644 --- a/js/utils.js +++ b/js/utils.js @@ -1,350 +1,251 @@ -(() => { - const btfFn = { - debounce: (func, wait = 0, immediate = false) => { - let timeout - return (...args) => { - const later = () => { - timeout = null - if (!immediate) func(...args) - } - const callNow = immediate && !timeout - clearTimeout(timeout) - timeout = setTimeout(later, wait) - if (callNow) func(...args) - } - }, - - throttle: function (func, wait, options = {}) { - let timeout, context, args - let previous = 0 - - const later = () => { - previous = options.leading === false ? 0 : new Date().getTime() +const btf = { + debounce: function (func, wait, immediate) { + let timeout + return function () { + const context = this + const args = arguments + const later = function () { timeout = null - func.apply(context, args) - if (!timeout) context = args = null + if (!immediate) func.apply(context, args) } + const callNow = immediate && !timeout + clearTimeout(timeout) + timeout = setTimeout(later, wait) + if (callNow) func.apply(context, args) + } + }, + + throttle: function (func, wait, options) { + let timeout, context, args + let previous = 0 + if (!options) options = {} + + const later = function () { + previous = options.leading === false ? 0 : new Date().getTime() + timeout = null + func.apply(context, args) + if (!timeout) context = args = null + } - const throttled = (...params) => { - const now = new Date().getTime() - if (!previous && options.leading === false) previous = now - const remaining = wait - (now - previous) - context = this - args = params - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout) - timeout = null - } - previous = now - func.apply(context, args) - if (!timeout) context = args = null - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining) + const throttled = function () { + const now = new Date().getTime() + if (!previous && options.leading === false) previous = now + const remaining = wait - (now - previous) + context = this + args = arguments + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout) + timeout = null } + previous = now + func.apply(context, args) + if (!timeout) context = args = null + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining) } + } - return throttled - }, - - overflowPaddingR: { - add: () => { - const paddingRight = window.innerWidth - document.body.clientWidth + return throttled + }, - if (paddingRight > 0) { - document.body.style.paddingRight = `${paddingRight}px` - document.body.style.overflow = 'hidden' - const menuElement = document.querySelector('#page-header.nav-fixed #menus') - if (menuElement) { - menuElement.style.paddingRight = `${paddingRight}px` - } - } - }, - remove: () => { - document.body.style.paddingRight = '' - document.body.style.overflow = '' - const menuElement = document.querySelector('#page-header.nav-fixed #menus') - if (menuElement) { - menuElement.style.paddingRight = '' - } + sidebarPaddingR: () => { + const innerWidth = window.innerWidth + const clientWidth = document.body.clientWidth + const paddingRight = innerWidth - clientWidth + if (innerWidth !== clientWidth) { + document.body.style.paddingRight = paddingRight + 'px' + } + }, + + snackbarShow: (text, showAction, duration) => { + const sa = (typeof showAction !== 'undefined') ? showAction : false + const dur = (typeof duration !== 'undefined') ? duration : 2000 + const position = GLOBAL_CONFIG.Snackbar.position + const bg = document.documentElement.getAttribute('data-theme') === 'light' ? GLOBAL_CONFIG.Snackbar.bgLight : GLOBAL_CONFIG.Snackbar.bgDark + Snackbar.show({ + text: text, + backgroundColor: bg, + showAction: sa, + duration: dur, + pos: position + }) + }, + + initJustifiedGallery: function (selector) { + if (!(selector instanceof jQuery)) { + selector = $(selector) + } + selector.each(function (i, o) { + if ($(this).is(':visible')) { + $(this).justifiedGallery({ + rowHeight: 220, + margins: 4 + }) } - }, - - snackbarShow: (text, showAction = false, duration = 2000) => { - const { position, bgLight, bgDark } = GLOBAL_CONFIG.Snackbar - const bg = document.documentElement.getAttribute('data-theme') === 'light' ? bgLight : bgDark - Snackbar.show({ - text, - backgroundColor: bg, - showAction, - duration, - pos: position, - customClass: 'snackbar-css' - }) - }, - - diffDate: (inputDate, more = false) => { - const dateNow = new Date() - const datePost = new Date(inputDate) - const diffMs = dateNow - datePost - const diffSec = diffMs / 1000 - const diffMin = diffSec / 60 - const diffHour = diffMin / 60 - const diffDay = diffHour / 24 - const diffMonth = diffDay / 30 - const { dateSuffix } = GLOBAL_CONFIG - - if (!more) return Math.floor(diffDay) - - if (diffMonth > 12) return datePost.toISOString().slice(0, 10) - if (diffMonth >= 1) return `${Math.floor(diffMonth)} ${dateSuffix.month}` - if (diffDay >= 1) return `${Math.floor(diffDay)} ${dateSuffix.day}` - if (diffHour >= 1) return `${Math.floor(diffHour)} ${dateSuffix.hour}` - if (diffMin >= 1) return `${Math.floor(diffMin)} ${dateSuffix.min}` - return dateSuffix.just - }, - - loadComment: (dom, callback) => { - if ('IntersectionObserver' in window) { - const observerItem = new IntersectionObserver(entries => { - if (entries[0].isIntersecting) { - callback() - observerItem.disconnect() - } - }, { threshold: [0] }) - observerItem.observe(dom) + }) + }, + + diffDate: (d, more = false) => { + const dateNow = new Date() + const datePost = new Date(d) + const dateDiff = dateNow.getTime() - datePost.getTime() + const minute = 1000 * 60 + const hour = minute * 60 + const day = hour * 24 + const month = day * 30 + + let result + if (more) { + const monthCount = dateDiff / month + const dayCount = dateDiff / day + const hourCount = dateDiff / hour + const minuteCount = dateDiff / minute + + if (monthCount > 12) { + result = datePost.toLocaleDateString().replace(/\//g, '-') + } else if (monthCount >= 1) { + result = parseInt(monthCount) + ' ' + GLOBAL_CONFIG.date_suffix.month + } else if (dayCount >= 1) { + result = parseInt(dayCount) + ' ' + GLOBAL_CONFIG.date_suffix.day + } else if (hourCount >= 1) { + result = parseInt(hourCount) + ' ' + GLOBAL_CONFIG.date_suffix.hour + } else if (minuteCount >= 1) { + result = parseInt(minuteCount) + ' ' + GLOBAL_CONFIG.date_suffix.min } else { - callback() + result = GLOBAL_CONFIG.date_suffix.just } - }, - - scrollToDest: (pos, time = 500) => { - const currentPos = window.scrollY - const isNavFixed = document.getElementById('page-header').classList.contains('fixed') - if (currentPos > pos || isNavFixed) pos = pos - 70 - - if ('scrollBehavior' in document.documentElement.style) { - window.scrollTo({ - top: pos, - behavior: 'smooth' - }) - return - } - - const startTime = performance.now() - const animate = currentTime => { - const timeElapsed = currentTime - startTime - const progress = Math.min(timeElapsed / time, 1) - window.scrollTo(0, currentPos + (pos - currentPos) * progress) - if (progress < 1) { - requestAnimationFrame(animate) + } else { + result = parseInt(dateDiff / day) + } + return result + }, + + loadComment: (dom, callback) => { + if ('IntersectionObserver' in window) { + const observerItem = new IntersectionObserver((entries) => { + if (entries[0].isIntersecting) { + callback() + observerItem.disconnect() } - } - requestAnimationFrame(animate) - }, - - animateIn: (ele, animation) => { - ele.style.display = 'block' - ele.style.animation = animation - }, - - animateOut: (ele, animation) => { - const handleAnimationEnd = () => { - ele.style.display = '' - ele.style.animation = '' - ele.removeEventListener('animationend', handleAnimationEnd) - } - ele.addEventListener('animationend', handleAnimationEnd) - ele.style.animation = animation - }, - - wrap: (selector, eleType, options) => { - const createEle = document.createElement(eleType) - for (const [key, value] of Object.entries(options)) { - createEle.setAttribute(key, value) - } - selector.parentNode.insertBefore(createEle, selector) - createEle.appendChild(selector) - }, - - isHidden: ele => ele.offsetHeight === 0 && ele.offsetWidth === 0, - - getEleTop: ele => { - let actualTop = ele.offsetTop - let current = ele.offsetParent - - while (current !== null) { - actualTop += current.offsetTop - current = current.offsetParent - } - - return actualTop - }, - - loadLightbox: ele => { - const service = GLOBAL_CONFIG.lightbox + }, { threshold: [0] }) + observerItem.observe(dom) + } else { + callback() + } + }, - if (service === 'medium_zoom') { - mediumZoom(ele, { background: 'var(--zoom-bg)' }) - return - } + scrollToDest: (pos, time) => { + if (pos < 0 || time < 0) { + return + } - if (service === 'fancybox') { - Array.from(ele).forEach(i => { - if (i.parentNode.tagName !== 'A') { - const dataSrc = i.dataset.lazySrc || i.src - const dataCaption = i.title || i.alt || '' - btf.wrap(i, 'a', { href: dataSrc, 'data-fancybox': 'gallery', 'data-caption': dataCaption, 'data-thumb': dataSrc }) - } - }) + const currentPos = window.scrollY || window.screenTop + if (currentPos > pos) pos = pos - 70 - if (!window.fancyboxRun) { - let options = '' - if (Fancybox.version < '6') { - options = { - Hash: false, - Thumbs: { - showOnStart: false - }, - Images: { - Panzoom: { - maxScale: 4 - } - }, - Carousel: { - transition: 'slide' - }, - Toolbar: { - display: { - left: ['infobar'], - middle: [ - 'zoomIn', - 'zoomOut', - 'toggle1to1', - 'rotateCCW', - 'rotateCW', - 'flipX', - 'flipY' - ], - right: ['slideshow', 'thumbs', 'close'] - } - } - } - } else { - options = { - Hash: false, - Carousel: { - transition: 'slide', - Thumbs: { - showOnStart: false - }, - Toolbar: { - display: { - left: ['counter'], - middle: [ - 'zoomIn', - 'zoomOut', - 'toggle1to1', - 'rotateCCW', - 'rotateCW', - 'flipX', - 'flipY', - 'reset' - ], - right: ['autoplay', 'thumbs', 'close'] - } - }, - Zoomable: { - Panzoom: { - maxScale: 4 - } - } - } - } - } + if ('CSS' in window && CSS.supports('scroll-behavior', 'smooth')) { + window.scrollTo({ + top: pos, + behavior: 'smooth' + }) + return + } - Fancybox.bind('[data-fancybox]', options) - window.fancyboxRun = true + let start = null + time = time || 500 + window.requestAnimationFrame(function step (currentTime) { + start = !start ? currentTime : start + if (currentPos < pos) { + const progress = currentTime - start + window.scrollTo(0, ((pos - currentPos) * progress / time) + currentPos) + if (progress < time) { + window.requestAnimationFrame(step) + } else { + window.scrollTo(0, pos) } - } - }, - - setLoading: { - add: ele => { - const html = ` -
    -
    -
    -
    -
    - ` - ele.insertAdjacentHTML('afterend', html) - }, - remove: ele => { - ele.nextElementSibling.remove() - } - }, - - updateAnchor: anchor => { - if (anchor !== window.location.hash) { - if (!anchor) anchor = location.pathname - const title = GLOBAL_CONFIG_SITE.title - window.history.replaceState({ - url: location.href, - title - }, title, anchor) - } - }, - - getScrollPercent: (() => { - let docHeight, winHeight, headerHeight, contentMath - - return (currentTop, ele) => { - if (!docHeight || ele.clientHeight !== docHeight) { - docHeight = ele.clientHeight - winHeight = window.innerHeight - headerHeight = ele.offsetTop - contentMath = Math.max(docHeight - winHeight, document.documentElement.scrollHeight - winHeight) + } else { + const progress = currentTime - start + window.scrollTo(0, currentPos - ((currentPos - pos) * progress / time)) + if (progress < time) { + window.requestAnimationFrame(step) + } else { + window.scrollTo(0, pos) } - - const scrollPercent = (currentTop - headerHeight) / contentMath - return Math.max(0, Math.min(100, Math.round(scrollPercent * 100))) } - })(), + }) + }, - addEventListenerPjax: (ele, event, fn, option = false) => { - ele.addEventListener(event, fn, option) - btf.addGlobalFn('pjaxSendOnce', () => { - ele.removeEventListener(event, fn, option) - }) - }, + fadeIn: (ele, time) => { + ele.style.cssText = `display:block;animation: to_show ${time}s` + }, - removeGlobalFnEvent: (key, parent = window) => { - const globalFn = parent.globalFn || {} - const keyObj = globalFn[key] - if (!keyObj) return + fadeOut: (ele, time) => { + ele.addEventListener('animationend', function f () { + ele.style.cssText = "display: none; animation: '' " + ele.removeEventListener('animationend', f) + }) + ele.style.animation = `to_hide ${time}s` + }, - Object.keys(keyObj).forEach(i => keyObj[i]()) + getParents: (elem, selector) => { + for (; elem && elem !== document; elem = elem.parentNode) { + if (elem.matches(selector)) return elem + } + return null + }, + + siblings: (ele, selector) => { + return [...ele.parentNode.children].filter((child) => { + if (selector) { + return child !== ele && child.matches(selector) + } + return child !== ele + }) + }, + + /** + * + * @param {*} selector + * @param {*} eleType the type of create element + * @param {*} options object key: value + */ + wrap: (selector, eleType, options) => { + const creatEle = document.createElement(eleType) + for (const [key, value] of Object.entries(options)) { + creatEle.setAttribute(key, value) + } + selector.parentNode.insertBefore(creatEle, selector) + creatEle.appendChild(selector) + }, + + unwrap: el => { + const elParentNode = el.parentNode + if (elParentNode !== document.body) { + elParentNode.parentNode.insertBefore(el, elParentNode) + elParentNode.parentNode.removeChild(elParentNode) + } + }, + + isJqueryLoad: fn => { + if (typeof jQuery === 'undefined') { + getScript(GLOBAL_CONFIG.source.jQuery).then(fn) + } else { + fn() + } + }, - delete globalFn[key] - }, + isHidden: ele => ele.offsetHeight === 0 && ele.offsetWidth === 0, - switchComments: (el = document, path) => { - const switchBtn = el.querySelector('#switch-btn') - if (!switchBtn) return + getEleTop: ele => { + let actualTop = ele.offsetTop + let current = ele.offsetParent - let switchDone = false - const postComment = el.querySelector('#post-comment') - const handleSwitchBtn = () => { - postComment.classList.toggle('move') - if (!switchDone && typeof loadOtherComment === 'function') { - switchDone = true - loadOtherComment(el, path) - } - } - btf.addEventListenerPjax(switchBtn, 'click', handleSwitchBtn) + while (current !== null) { + actualTop += current.offsetTop + current = current.offsetParent } + + return actualTop } - window.btf = { ...window.btf, ...btfFn } -})() +} diff --git a/kingsoft-disk-lost-files.html b/kingsoft-disk-lost-files.html index 5922cd0b..a7006f40 100644 --- a/kingsoft-disk-lost-files.html +++ b/kingsoft-disk-lost-files.html @@ -1,171 +1,159 @@ -金山快盘丢文件 | all4fun blog +金山快盘丢文件 | 王恒's Blog - + - + - - + + -

    金山快盘丢文件

    + })(window)

    金山快盘丢文件

    这几天金山快盘似乎在做服务器端的升级,今天打开快盘发现一些重要的东西都没了!话说你这个有点太扯了吧~

    我用vim写了好久的wiki文件!~ 只给我剩下了一个!

    还好快盘有个隐藏的缓存目录,折腾了半天终于算是把我的文件找回来了! 如下图:

    - +

     

     

    @@ -192,61 +180,37 @@ }
    -
    文章作者: all4fun
    文章链接: http://wangheng.org/kingsoft-disk-lost-files.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/kuaipan-uploader-dev-share.html b/kuaipan-uploader-dev-share.html index 17602e45..63801db9 100644 --- a/kuaipan-uploader-dev-share.html +++ b/kuaipan-uploader-dev-share.html @@ -1,177 +1,161 @@ -kuaipan_uploader开发分享 | all4fun blog +kuaipan_uploader开发分享 | 王恒's Blog - - + + - + - - + + + - -

    kuaipan_uploader开发分享

    - -
    -

    ⚠️ 警告提醒:本文档已过期!因金山快盘已停止服务,此脚本不再维护,请勿继续使用。

    -
    -
    -

    PS:将原来的一篇文章拆开了,上篇是安装使用讲解,这篇是开发过程讲解。

    + })(window)

    kuaipan_uploader开发分享

    +PS:将原来的一篇文章拆开了,上篇是安装使用讲解,这篇是开发过程讲解。 +

    以前使用dropbox的linux客户端备份VPS上的文件和数据,但是近来dorpbox在国内越来越难访问,加上dropbox本身的容量只有几G,于是有了自己动刀写一个网盘的客户端,首先想到的是百度网盘,2T的巨大容量肯定是够用了!

    没想到这个决定却是悲剧的开始,按照百度PCS的API文档写了半天,没想到PCS开通居然审核了一周多还不通过! 联系客服,没想到他们的PCS API已经不审核新的申请了!再次吐槽下,你不审核,申请的时候就不能给个提示么!!! 遂放弃!

    然后就想到了还是用金山快盘吧,前段时间刚被迅雷收购,速度方面应该是没有问题。找到金山快盘的官方开放平台,看了看文档似乎是…有点麻烦啊。不过本着有难度才有挑战的原则,还是开搞了。下面介绍下开发过程中遇到的一些问题。

    @@ -184,8 +168,7 @@

    图示如下:

    -授权流程 - +

    授权流程

    在每次请求中,下面几个参数是必须的

    NameRequiredType and LimitDescription
    oauth_consumer_keyYstring第1步的 consumer_key
    oauth_signatureYstring本次请求的签名,生成方法请参考附录-签名生成算法
    oauth_timestampYint时间戳,正整数,和标准时间不超过5分钟
    oauth_nonceYstring[ 0-9A-Za-z_ ]随机字符串,长度小于32字节。每次请求请使用不同的nonce
    oauth_consumer_key可以在你创建应用的时候拿到,oauth_timestamp为标准的unix时间戳格式,oauth_nonce每次都生成一个随机数,这几个参数都非常好处理,主要就是oauth_signature这个费些周章。 @@ -636,61 +619,37 @@

     

    项目开源在我的Githubhttps://github.com/wujiwh/kuaipan_uploader

    欢迎大家多多交流~~

    -
    文章作者: all4fun
    文章链接: http://wangheng.org/kuaipan-uploader-dev-share.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/kuaipan-uploader.html b/kuaipan-uploader.html index 1e641fdd..c2256e20 100644 --- a/kuaipan-uploader.html +++ b/kuaipan-uploader.html @@ -1,178 +1,162 @@ -linux版快盘上传下载脚本 | all4fun blog +linux版快盘上传下载脚本 | 王恒's Blog - - + + - + - - + + - + -

    linux版快盘上传下载脚本

    + })(window)

    linux版快盘上传下载脚本

    +PS:将脚本的开发过程移动到了这里。想了解下开发步骤的可以参考~~ -
    -

    ⚠️ 警告提醒:本文档已过期!因金山快盘已停止服务,此脚本不再维护,请勿继续使用。

    -
    -
    -

    PS:将脚本的开发过程移动到了这里。想了解下开发步骤的可以参考~~

    安装使用

    此脚本适用于大部分bash环境,已经在cygwin,ubuntu14.04,debian,centos6,mac-osx等环境通过测试。 @@ -181,7 +165,7 @@

    安装使用

    如果你想使用自己的app_key你需要首先注册一个金山快盘账号,然后到这里地址创建一个你自己的应用并把得到的 consumer_key、consumer_secret填写到脚本相应位置。
    当然此步骤可以略过,你可以直接使用脚本中填写好的consumer_key、consumer_secret,我创建的应用名称all4fun.

    3.安装

    wget https://github.com/wujiwh/kuaipan_uploader/archive/master.zip
    unzip master.zip
    cd kuaipan_uploader-master
    #或者 :
    git clone https://github.com/wujiwh/kuaipan_uploader.git
    cd kuaipan_uploader
    #上面两种方式选择一种即可
    #赋予脚本执行权限并执行
    chmod a+x kuaipan_uploader.sh
    ./kuaipan_uploader.sh

    然后根据提示完成API的授权流程,得到授权Token。脚本会自动保存得到的授权信息到CONFIG_FILE 变量对应配置文件,默认为~/.kuaipan_upload.conf 

    -

    4.使用说明

    KuaiPan Uploader v1.1.0
    wangheng - wujiwh@gmail.com

    +

    4.使用说明

    KuaiPan Uploader v1.1.0
    wangheng - wujiwh@gmail.com

    Usage: /usr/bin/kuaipan COMMAND [PARAMETERS]…

    Commands:
    upload [local file] <remote file>
    download [remote file] <local file>
    delete [remote file/remote dir]
    list <remote dir>
    info
    relink

    For more informations, please visit http://wangheng.org.


    其中[XXX]内的为必填参数,<XXX>内的为可选参数

    @@ -200,61 +184,37 @@

    安装使用

    许可证

    Kuaipan Uploader 基于GPL第二版或以后版本发布。详见LICENSE文件

    项目开源在我的Githubhttps://github.com/wujiwh/kuaipan_uploader

    -
    文章作者: all4fun
    文章链接: http://wangheng.org/kuaipan-uploader.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/link/index.html b/link/index.html index 9212c001..39ad0589 100644 --- a/link/index.html +++ b/link/index.html @@ -1,263 +1,150 @@ -友情链接 | all4fun blog +友情链接 | 王恒's Blog - + - + - - + + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/linux-dd-command-detailed.html b/linux-dd-command-detailed.html index 84989573..810a5941 100644 --- a/linux-dd-command-detailed.html +++ b/linux-dd-command-detailed.html @@ -1,165 +1,153 @@ -Linux中dd命令详解 | all4fun blog +Linux中dd命令详解 | 王恒's Blog - + - + - - + + -

    Linux中dd命令详解

    + })(window)

    Linux中dd命令详解

    一、dd命令 dd:用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换。 注意:指定数字的地方若以下列字符结尾,则乘以相应的数字:b=512;c=1;k=1024;w=2 @@ -230,61 +218,37 @@

    但是, 只能由root来缷载它.

    echo "&quot;$MOUNTPT&quot; now available for use."

    现在 ramdisk 即使普通用户也可以用来存取文件了.

    注意, ramdisk是易失的, 所以当计算机系统重启或关机时ramdisk里的内容会消失.

    拷贝所有你想保存文件到一个常规的磁盘目录下.

    重启之后, 运行这个脚本再次建立起一个 ramdisk.

    仅重新加载 /mnt/ramdisk 而没有其他的步骤将不会正确工作.

    如果加以改进, 这个脚本可以放在 /etc/rc.d/rc.local,

    #+ 以使系统启动时能自动设立一个ramdisk.

    这样很合适速度要求高的数据库服务器.

    exit 0

    -
    文章作者: all4fun
    文章链接: http://wangheng.org/linux-dd-command-detailed.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论
    avatar
    all4fun
    make progress little day by day.
    开源主页
    公告
    VPS 香港服务器推荐: VollCloud HK

    评论
    \ No newline at end of file +} + \ No newline at end of file diff --git a/linux-installed-in-oray-service.html b/linux-installed-in-oray-service.html new file mode 100644 index 00000000..942ee7d1 --- /dev/null +++ b/linux-installed-in-oray-service.html @@ -0,0 +1,219 @@ +Linux中安装oray服务 | 王恒's Blog + + + + + + + + + + + + + +

    Linux中安装oray服务

    +

    +家里面的路由器ddns经常不能用,索性在系统中直接安了一个oray的客户端。具体安装步骤如下: + +

    1、首先安装必要的开发包

    +

    [root@wangheng.org ~] apt-get install gcc g++ automake autoconf

    +

    2、下载phddns-2.0.2.16556.tar.gz到某一个目录

    +

    [root@wangheng.org ~]# wget http://download.oray.com/peanuthull/phddns-2.0.2.16556.tar.gz

    +

    3、解压所有文件

    +

    [root@wangheng.org ~]# tar zxvf phddns-2.0.2.16556.tar.gz

    +

    4、进入目录并编译
    [root@wangheng.org ~]# cd phddns-2.0.2.16556
    [root@wangheng.org phddns-2.0.2.16556]# aclocal
    [root@wangheng.org phddns-2.0.2.16556]# autoconf
    [root@wangheng.org phddns-2.0.2.16556]# automake
    [root@wangheng.org phddns-2.0.2.16556]# ./configure
    [root@wangheng.org phddns-2.0.2.16556]# make
    [root@wangheng.org phddns-2.0.2.16556]# cd src
    [root@wangheng.org src]# ls -l phddns
    -rwxr-xr-x 1 root root 80968 Aug 2 11:18 phddns

    +

    5、执行编译好的程序并配置(默认使用/etc/phlinux.conf,如果不存在这个文件则自动进入交互配置)

    +

    [root@wangheng.org src]# ./phddns
    输入服务器地址,如无特殊情况可使用默认值
    Enter server address(press ENTER use phlinux3.oray.net):

    +

    输入您的Oray帐号名称
    Enter your Oray account:

    +

    对应的Oray帐号密码
    Password:

    +

    选择帮定的网卡,如无特殊,默认即可
    Network interface(s):
    eth0:192.168.141.18
    lo:127.0.0.1
    Choose one(default eth0):

    +

    选择日志保存到哪个文件
    Log to use(default /var/log/phddns.log):

    +

    保存配置文件,选择yes则直接保存到/etc/phlinux.conf,输入other可以指定文件
    Save to configuration file (/etc/phlinux.conf)?(yes/no/other):

    +

    接下来程序将已交互模式开始运行
    192.168.141.18
    NIC bind success
    OnStatusChanged okConnecting
    OnStatusChanged okDomainListed
    OnDomainRegistered skyvense22.gicp.net
    OnStatusChanged okDomainsRegistered
    UserType: 0
    看到上面这些就表示登录成功,这个时候可以按ctrl+c先退出程序

    +6、将phddns拷贝到你希望的位置 +

    [root@wangheng.org src]# cp phddns /usr/bin/

    +

    7、以后台模式启动花生壳并检查运行情况

    +

    [root@wangheng.org ~]# /usr/bin/phddns -c /etc/phlinux.conf -d
    phlinux started as daemon!
    [root@wangheng.org ~]# tail /var/log/phddns.log
    2011/08/02 11:28:58.256| ExecuteUpdate OK, BeginKeepAlive!
    2011/08/02 11:29:59.354| SendKeepAlive() 8208
    2011/08/02 11:30:00.355| RecvKeepaliveResponse() Data comes, OPCODE:8272
    2011/08/02 11:30:00.356| Keepalive response received, client ip: 116..123.96
    2011/08/02 11:31:00.447| SendKeepAlive() 8208
    2011/08/02 11:31:01.450| RecvKeepaliveResponse() Data comes, OPCODE:8272
    2011/08/02 11:31:01.450| Keepalive response received, client ip: 116.
    .123.96

    +

    8、退出花生壳

    +

    查看进程ID
    [root@wangheng.org ~]# ps -A | grep phddns
    13731 ? 00:00:00 phlinux
    让后台进程退出
    [root@wangheng.org ~]# kill -9 13731

    +

    9、将花生壳加到系统启动时运行
    [root@wangheng.org ~]# vi /etc/rc.local
    在文件的末尾加上一行:/usr/bin/phddns -c /etc/phlinux.conf -d

    +

    二、花生壳Linux版本命令行参数说明

    +

    [root@wangheng.org ~]# /usr/bin/phlinux -h
    Peanuthull Linux-core 2.0 by oray.com, copyright 2011
    Peanuthull Linux-core Help
    –first-run
    -f, run for the first time
    用于首次启动时配置参数

    +

    –interact
    -i, run as interactive mode
    program will request for necessary parameters.
    this mode will automatically enabled at first running,
    or your configuration file has been lost.
    启动交互模式

    +

    –daemon
    -d, run as a daemon
    program will quit after put itself to background,
    and continue running even you logout,
    you can use kill -9 <PID> to terminate.
    后台模式

    +

    –config
    -c, run with configuration file
    program will run with the file
    指定使用哪一个配置文件

    +

    –user
    -u, run as the user
    program will run as the user
    以指定用户启动后台进程

    +

    –help
    -h, print this screen.
    Please visit http://www.oray.com for detail.

    +

    +
    +
    文章作者: 王恒
    文章链接: http://wangheng.org/linux-installed-in-oray-service.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file diff --git a/linux-set-up-a-proxy-server.html b/linux-set-up-a-proxy-server.html index 5a6f9373..692793df 100644 --- a/linux-set-up-a-proxy-server.html +++ b/linux-set-up-a-proxy-server.html @@ -1,131 +1,27 @@ -Linux中设置代理服务器 | all4fun blog +Linux中设置代理服务器 | 王恒's Blog - + - + - - - + + + -

    Linux中设置代理服务器

    -

          由于单位限制网络使用,给分配的一个Linux服务器是没有外网权限的,这给我配置开发调试环境造成了很大的不便。但是这怎么能难道我们一个专业的程序猿呢。下面介绍在Linux中使用代理服务器的步骤:

    全局设置
    如果您在 /etc/yum.conf 中定义代理服务器,所有 用户在使用 yum 时都会应用这个代理服务器设置。
    为单个用户配置代理服务器
    要为一个特定的用户启用代理访问,只要将实例框中的文本行加入这个用户的 shell 配置中。对于默认的 bash shell,配置是在 ~/.bash_profile 中。这一设置使得 yum 使用代理服务器 192.168.1.47:808,连接端口号 808。
    # 这个帐号使用的代理服务器
    http_proxy=”http://192.168.1.47:808”
    export http_proxy

    配置设定,为使用代理服务器
    如果代理服务器需要用户名和密码,只要将它们加入 URL。要包含用户名 a,密码 a,添加设定:
    # 这个帐号使用的代理服务器和用户名/密码
    http_proxy="http://a:a@192.168.1.47:808"
    export http_proxy

    https_proxy="https://a:a@192.168.1.47:808"
    export https_proxy

    最后用wget试一下,成功!

    - - -

    -
    -
    文章作者: all4fun
    文章链接: http://wangheng.org/linux-set-up-a-proxy-server.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    Linux中设置代理服务器

    +

          由于单位限制网络使用,给分配的一个Linux服务器是没有外网权限的,这给我配置开发调试环境造成了很大的不便。但是这怎么能难道我们一个专业的程序猿呢。下面介绍在Linux中使用代理服务器的步骤:

    全局设置
    如果您在 /etc/yum.conf 中定义代理服务器,所有 用户在使用 yum 时都会应用这个代理服务器设置。
    为单个用户配置代理服务器
    要为一个特定的用户启用代理访问,只要将实例框中的文本行加入这个用户的 shell 配置中。对于默认的 bash shell,配置是在 ~/.bash_profile 中。这一设置使得 yum 使用代理服务器 192.168.1.47:808,连接端口号 808。
    # 这个帐号使用的代理服务器
    http_proxy=”http://192.168.1.47:808”
    export http_proxy

    配置设定,为使用代理服务器
    如果代理服务器需要用户名和密码,只要将它们加入 URL。要包含用户名 a,密码 a,添加设定:
    # 这个帐号使用的代理服务器和用户名/密码
    http_proxy="http://a:a@192.168.1.47:808"
    export http_proxy

    https_proxy="https://a:a@192.168.1.47:808"
    export https_proxy

    最后用wget试一下,成功!

    +
    +
    文章作者: 王恒
    文章链接: http://wangheng.org/linux-set-up-a-proxy-server.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} +
    \ No newline at end of file diff --git a/linux-temporarily-or-permanently-modify-the-dns.html b/linux-temporarily-or-permanently-modify-the-dns.html index c40ea011..36b3fbb1 100644 --- a/linux-temporarily-or-permanently-modify-the-dns.html +++ b/linux-temporarily-or-permanently-modify-the-dns.html @@ -1,168 +1,156 @@ -Linux临时或永久修改DNS | all4fun blog +Linux临时或永久修改DNS | 王恒's Blog - + - + - - + + + - -

    Linux临时或永久修改DNS

    + })(window)

    Linux临时或永久修改DNS

    最近给VPS重装了系统,因为服务商不提供DHCP,所以只好手动设置IP和DNS Server。悲催的是系统重装的时候忘记了输入DNS Server,最后导致进去系统后,各种域名无法解析。

    Linux中修改DNS有两种方式,临时修改和永久修改,下面分别介绍。

    @@ -170,70 +158,43 @@
    nameserver 8.8.8.8 #修改成你的主DNS
     nameserver 8.8.4.4 #修改成你的备用DNS
     search localhost #你的域名
    -

    我这里用了谷歌的DNS解析服务器,修改后:wq退出,配置会实时生效,但是重启系统后可能会丢失配置。其实编辑这个文件的时候,你也应该能看到文件头部“不要手动编辑”的注释。

    - -image - +

    我这里用了谷歌的DNS解析服务器,修改后:wq退出,配置会实时生效,但是重启系统后可能会丢失配置。其实编辑这个文件的时候,你也应该能看到文件头部“不要手动编辑”的注释。image

    2、永久修改网卡DNS

    sudo –i
    cd /etc/resolvconf/resolv.conf.d
    vim base

    添加如下内容

    nameserver 8.8.8.8
     nameserver 8.8.4.4

    :wq 保存退出,这样重启后设置就不会丢失了。

    其实你cat head文件会找到图片中头部注释的那段话,不难推测resolv.conf文件就是根据/etc/resolvconf/resolv.conf.d目录中的这几个文件生成的。

    -
    文章作者: all4fun
    文章链接: http://wangheng.org/linux-temporarily-or-permanently-modify-the-dns.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/linux-windows-mac-refresh-dns.html b/linux-windows-mac-refresh-dns.html index 8c3ac7b0..41b4fa42 100644 --- a/linux-windows-mac-refresh-dns.html +++ b/linux-windows-mac-refresh-dns.html @@ -1,165 +1,153 @@ -Linux/Windows/Mac刷新DNS缓存 | all4fun blog +Linux/Windows/Mac刷新DNS缓存 | 王恒's Blog - + - + - - + + -

    Linux/Windows/Mac刷新DNS缓存

    + })(window)

    Linux/Windows/Mac刷新DNS缓存

    有时候在网络环境比较糟糕的情况下,修改了域名的A记录执行,本地DNS却迟迟不主动更新。这个时候就需要我们去手动刷新一下本地的DNS记录缓存,方法记录如下: Windows ( XP, ME, 2000, 98)系统: @@ -181,61 +169,37 @@
  • 命令执行完毕,你的DNS缓存就得到了更新。
    较新的苹果Mac OS X系统应该使用下面的命令: type  dscacheutil -flushcache

  • -
    文章作者: all4fun
    文章链接: http://wangheng.org/linux-windows-mac-refresh-dns.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/manually-compile-vim-configuration.html b/manually-compile-vim-configuration.html index 659e8dad..41989ced 100644 --- a/manually-compile-vim-configuration.html +++ b/manually-compile-vim-configuration.html @@ -1,167 +1,155 @@ -手动编译vim配置 | all4fun blog +手动编译vim配置 | 王恒's Blog - + - + - - + + -

    手动编译vim配置

    + })(window)

    手动编译vim配置

    文章作者: all4fun
    文章链接: http://wangheng.org/manually-compile-vim-configuration.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/manually-produced-vpn-login.html b/manually-produced-vpn-login.html index 9157c7d4..3f38051c 100644 --- a/manually-produced-vpn-login.html +++ b/manually-produced-vpn-login.html @@ -1,167 +1,155 @@ -手动制作VPN登录器 | all4fun blog +手动制作VPN登录器 | 王恒's Blog - + - + - - + + -

    手动制作VPN登录器

    + })(window)

    手动制作VPN登录器

    1、新建一个文本文件,重命名,文件名可以随便取但是后缀必须为.pbk。

    输入如下内容:

    [要显示的拨号名称]
    @@ -193,8 +181,7 @@
     
     

    3、重复添加这段代码可以加入多个vpn拨号到列表中,如图

    -

    -image

    +

    image

    此方法只是建立了一个vpn拨号的列表,所以可以很安全的作为一个登录列表发给别人,用户名和密码需要在拨号的时候另外输入。

    @@ -202,61 +189,37 @@
    -
    文章作者: all4fun
    文章链接: http://wangheng.org/manually-produced-vpn-login.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/migrating-from-wordpress-to-hexo.html b/migrating-from-wordpress-to-hexo.html index 385c4b8f..58c93811 100644 --- a/migrating-from-wordpress-to-hexo.html +++ b/migrating-from-wordpress-to-hexo.html @@ -1,167 +1,155 @@ -从wordpress迁移到hexo填坑 | all4fun blog +从wordpress迁移到hexo填坑 | 王恒's Blog - + - + - - + + -

    从wordpress迁移到hexo填坑

    前记

    用了好久的wordpress,说起来上次更新还是三年前。今天本想整理总结下最近的学习,却总也打不开wp-admin后台了,看了下是vps的php进程有报错 :( 想了想wordpress这套框架虽然很好,然而好多功能对我来说并不是必要的,于是动了心思从wordpress 迁移到静态化的博客框架 hexo。当然另外一个好处就是可以用 Markdown 语法写日志了 :)

    + })(window)

    从wordpress迁移到hexo填坑

    前记

    用了好久的wordpress,说起来上次更新还是三年前。今天本想整理总结下最近的学习,却总也打不开wp-admin后台了,看了下是vps的php进程有报错 :( 想了想wordpress这套框架虽然很好,然而好多功能对我来说并不是必要的,于是动了心思从wordpress 迁移到静态化的博客框架 hexo。当然另外一个好处就是可以用 Markdown 语法写日志了 :)

    迁移过程遇到一些坑,这里做下备忘…

    开始迁移

    安装hexo

    网上安装hexo的文章已经很多了,这里不再冗述,大概流程就是

      @@ -192,7 +180,7 @@

      使用python 脚本解决文章错乱问题

      使用 hexo-migrator-wordpress 插件导入的文章有很多的问题,错行,样式杂乱,内容错误。

      最无法忍受的是之前文章中因为有代码高亮,<pre><code> 标签内的文字导过来全错了,多了很多\ 以及其他转义符号,所以自己写了一个脚本来处理这个问题,代码可以参考如下:

      -
      导出wordpress文章
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      72
      73
      74
      75
      76
      77
      78
      #!/usr/bin/env python3
      # author: http://wangheng.org
      # fileName: import_wordpress_content.py
      # date: 2018-10-21

      import pymysql
      import re

      HOST = "your wordpress db host"
      DB = "your wordpress db"
      USER = "your db user"
      PASSWORD = "your db passwd"
      EXP_PATH = "wp_exp" # path to export .md files
      conn = pymysql.connect(
      host=HOST, database=DB, user=USER, password=PASSWORD, charset='utf8mb4')


      def getData(query):
      cur = conn.cursor()
      cur.execute(query)
      data = cur.fetchall()
      return data


      def getPostTags(post_id, tag_type):
      tags = getData('''
      SELECT wpt.`name`, wpt.slug, wptt.taxonomy
      FROM
      wp_terms wpt
      LEFT JOIN wp_term_relationships wptr ON wpt.term_id = wptr.term_taxonomy_id
      LEFT JOIN wp_term_taxonomy wptt ON wptt.term_taxonomy_id = wptr.term_taxonomy_id
      WHERE
      wptr.object_id = %d
      and wptt.taxonomy="%s"
      ''' % (post_id, tag_type))
      res = ""
      for tag in tags:
      res += " - %s\n" % tag[0]
      return res


      def main():
      posts = getData(
      "SELECT post_name,post_content,post_date,post_title,ID FROM `wp_posts` where post_type='post' and post_status='publish' "
      )
      for post in posts:
      content = post[1]
      content = content.replace('http://wangheng.org/wp-content/uploads',
      'uploads')
      content = content.replace('>\n<', '><')
      content = content.replace('>\r<', '><')
      content = content.replace('>\r\n<', '><')
      blog = '''
      ---
      title: %s
      tags:
      %s
      url: %s.html
      id: %d
      categories:
      %s
      date: %s
      ---

      <content>
      %s
      </content>
      ''' % (post[3], getPostTags(post[4], "post_tag"), post[0], post[4],
      getPostTags(post[4], "category"), post[2], content)
      print(blog)
      file = open("wp_exp/%s.md" % post[0], 'wb')
      file.write(blog.encode("utf-8"))
      file.flush()


      if __name__ == '__main__':
      main()

      +
      导出wordpress文章
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      72
      73
      74
      75
      76
      77
      78
      #!/usr/bin/env python3
      # author: http://wangheng.org
      # fileName: import_wordpress_content.py
      # date: 2018-10-21

      import pymysql
      import re

      HOST = "your wordpress db host"
      DB = "your wordpress db"
      USER = "your db user"
      PASSWORD = "your db passwd"
      EXP_PATH = "wp_exp" # path to export .md files
      conn = pymysql.connect(
      host=HOST, database=DB, user=USER, password=PASSWORD, charset='utf8mb4')


      def getData(query):
      cur = conn.cursor()
      cur.execute(query)
      data = cur.fetchall()
      return data


      def getPostTags(post_id, tag_type):
      tags = getData('''
      SELECT wpt.`name`, wpt.slug, wptt.taxonomy
      FROM
      wp_terms wpt
      LEFT JOIN wp_term_relationships wptr ON wpt.term_id = wptr.term_taxonomy_id
      LEFT JOIN wp_term_taxonomy wptt ON wptt.term_taxonomy_id = wptr.term_taxonomy_id
      WHERE
      wptr.object_id = %d
      and wptt.taxonomy="%s"
      ''' % (post_id, tag_type))
      res = ""
      for tag in tags:
      res += " - %s\n" % tag[0]
      return res


      def main():
      posts = getData(
      "SELECT post_name,post_content,post_date,post_title,ID FROM `wp_posts` where post_type='post' and post_status='publish' "
      )
      for post in posts:
      content = post[1]
      content = content.replace('http://wangheng.org/wp-content/uploads',
      'uploads')
      content = content.replace('>\n<', '><')
      content = content.replace('>\r<', '><')
      content = content.replace('>\r\n<', '><')
      blog = '''
      ---
      title: %s
      tags:
      %s
      url: %s.html
      id: %d
      categories:
      %s
      date: %s
      ---

      <content>
      %s
      </content>
      ''' % (post[3], getPostTags(post[4], "post_tag"), post[0], post[4],
      getPostTags(post[4], "category"), post[2], content)
      print(blog)
      file = open("wp_exp/%s.md" % post[0], 'wb')
      file.write(blog.encode("utf-8"))
      file.flush()


      if __name__ == '__main__':
      main()

      解决非常多空行的问题

      这里还遇到了个非常奇葩的问题,如果写到md 文件的两个html 标签不在同一行,那么md 再生成的文章会多出很多的 <br> 换行符。。。

      参考代码
      1
      2
      3
      content = content.replace('>\n<', '><')
      content = content.replace('>\r<', '><')
      content = content.replace('>\r\n<', '><')
      @@ -208,61 +196,37 @@

      1
      2
      3
      4
      # Code Highlight theme
      # Available values: normal | night | night eighties | night blue | night bright
      # https://github.com/chriskempson/tomorrow-theme
      highlight_theme: night eighties

      其他

      todo 暂时整理这些,其他待补充…

      -

    文章作者: all4fun
    文章链接: http://wangheng.org/migrating-from-wordpress-to-hexo.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    \ No newline at end of file +} + \ No newline at end of file diff --git a/modify-font-and-color.html b/modify-font-and-color.html index a90f1883..aea0998d 100644 --- a/modify-font-and-color.html +++ b/modify-font-and-color.html @@ -1,133 +1,29 @@ -推荐几款visual studio配色方案和字体 | all4fun blog +推荐几款visual studio配色方案和字体 | 王恒's Blog - + - + - - + + -

    推荐几款visual studio配色方案和字体

    -

    以前经常用Live Writer写博客,最近发现文章发布不上去了,google了一下发现原来GFW才是罪魁祸首。前几天把笔记本的硬盘换了,发现上次写的两篇博文还没发布,真悲剧。只好凭记忆重写一遍了…

    年假前连续三天都加班到了晚上十二点,长时间的工作导致对着电脑code时,越来越反感白色背景配色。为了缓解眼睛的刺痛,还是决定换个舒服的配色方案。经过一翻搜寻,找到了几款很不错的配色!

    1、son of obsidian(推荐)

    -son of obsidian -

    这是http://studiostyl.es/上最热门的一款的配色方案,也是我目前正在使用的配色,只是感觉选中文字时的底色太不明显,于是将底色改成了蓝色。用了一段时间后确实看着很舒服,看来用的人多总是有一定道理的。

    - -2、Bespin

    image

    很喜欢这款Bespin的配色方案,清新,温和,用着也很舒服。唯一的问题是使用 vim 查找字符时,高亮后看不到光标的位置,懒得去改,所以也就没用这款配色。

    3、wekeroad-ink

    wekeroad-ink

    也是款不错的配色方案,喜欢的朋友也可以试一下。但是背景是纯黑的,个人感觉看时间长了还是不舒服。 :)

    点击下载:配置文件

    其实配色都没有好坏之分,只要找到自己最喜欢最适合的那它就是最好的!

    编辑器的字体我选择的是系统自带的幼圆,它也是等宽字体,字形瘦长好看并且支持 ClearType,综合效果都很好!所以完全没有必要费力气再去网上下载其他的字体。

    -
    -
    文章作者: all4fun
    文章链接: http://wangheng.org/modify-font-and-color.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    推荐几款visual studio配色方案和字体

    +

    以前经常用Live Writer写博客,最近发现文章发布不上去了,google了一下发现原来GFW才是罪魁祸首。前几天把笔记本的硬盘换了,发现上次写的两篇博文还没发布,真悲剧。只好凭记忆重写一遍了…

    年假前连续三天都加班到了晚上十二点,长时间的工作导致对着电脑code时,越来越反感白色背景配色。为了缓解眼睛的刺痛,还是决定换个舒服的配色方案。经过一翻搜寻,找到了几款很不错的配色!

    1、son of obsidian(推荐)

    son of obsidian

    这是http://studiostyl.es/上最热门的一款的配色方案,也是我目前正在使用的配色,只是感觉选中文字时的底色太不明显,于是将底色改成了蓝色。用了一段时间后确实看着很舒服,看来用的人多总是有一定道理的。

    2、Bespin

    image

    很喜欢这款Bespin的配色方案,清新,温和,用着也很舒服。唯一的问题是使用 vim 查找字符时,高亮后看不到光标的位置,懒得去改,所以也就没用这款配色。

    3、wekeroad-ink

    wekeroad-ink

    也是款不错的配色方案,喜欢的朋友也可以试一下。但是背景是纯黑的,个人感觉看时间长了还是不舒服。 :)

    点击下载:配置文件

    其实配色都没有好坏之分,只要找到自己最喜欢最适合的那它就是最好的!

    编辑器的字体我选择的是系统自带的幼圆,它也是等宽字体,字形瘦长好看并且支持 ClearType,综合效果都很好!所以完全没有必要费力气再去网上下载其他的字体。

    +
    +
    文章作者: 王恒
    文章链接: http://wangheng.org/modify-font-and-color.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} +
    \ No newline at end of file diff --git a/modify-openssh-server-port-number.html b/modify-openssh-server-port-number.html index be6fd203..44cbd329 100644 --- a/modify-openssh-server-port-number.html +++ b/modify-openssh-server-port-number.html @@ -1,230 +1,194 @@ -修改openssh-server 的默认端口号 | all4fun blog +修改openssh-server 的默认端口号 | 王恒's Blog - + - + - - + + -

    修改openssh-server 的默认端口号

    + })(window)

    修改openssh-server 的默认端口号

    买来的一个VPS默认的SSH端口号是22,为了安全,防止别人恶意枚举密码,可以自己修改成别的端口号。 -

    1、首先,编辑sshd_config文件

    $ sudo nano /etc/ssh/sshd_config
    上传

    +

    1、首先,编辑sshd_config文件

    $ sudo nano /etc/ssh/sshd_config
    王恒上传

    将Port 修改成自己定义的端口号,我这里改成了8080

    2、重启sshd服务
    $ sudo service sshd restart
    如果没什么错误,就可以使用新的端口连接了
    -
    文章作者: all4fun
    文章链接: http://wangheng.org/modify-openssh-server-port-number.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html b/nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html index c9d71847..27a1bfdf 100644 --- a/nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html +++ b/nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html @@ -1,166 +1,154 @@ -nginx设置目录浏览及中文乱码问题解决 | all4fun blog +nginx设置目录浏览及中文乱码问题解决 | 王恒's Blog - + - + - - + + -

    nginx设置目录浏览及中文乱码问题解决

    + })(window)

    nginx设置目录浏览及中文乱码问题解决

    在Nginx下默认是不允许列出整个目录的。如需此功能, 先打开nginx.conf文件,在location server 或 http段中加入 @@ -169,65 +157,41 @@

    autoindex_localtime on;
    默认为off,显示的文件时间为GMT时间。
    注意:改为on后,显示的文件时间为文件的服务器时间

    - +

    但是如果有中文目录的话会出现乱码问题,所以还需要在下面添加这一句:

    charset utf-8,gbk;

    -
    文章作者: all4fun
    文章链接: http://wangheng.org/nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html
    版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
    赞助
    • 微信
      微信
    • 支付宝
      支付宝

    评论

    评论
    avatar
    王恒
    make progress little day by day.
    关注
    \ No newline at end of file +} + \ No newline at end of file diff --git a/page/2/index.html b/page/2/index.html index 3ad4fdf2..df654fde 100644 --- a/page/2/index.html +++ b/page/2/index.html @@ -1,216 +1,272 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/3/index.html b/page/3/index.html index e995588f..9555a449 100644 --- a/page/3/index.html +++ b/page/3/index.html @@ -1,216 +1,272 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/4/index.html b/page/4/index.html index 18a61880..8333e2a9 100644 --- a/page/4/index.html +++ b/page/4/index.html @@ -1,216 +1,233 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/5/index.html b/page/5/index.html index 25d9484c..ecb18e27 100644 --- a/page/5/index.html +++ b/page/5/index.html @@ -1,216 +1,238 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/6/index.html b/page/6/index.html index e912ea23..f3d384cd 100644 --- a/page/6/index.html +++ b/page/6/index.html @@ -1,216 +1,213 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/7/index.html b/page/7/index.html index b3248674..00b6fb13 100644 --- a/page/7/index.html +++ b/page/7/index.html @@ -1,216 +1,280 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/8/index.html b/page/8/index.html index 2ccd0dd6..7e68525c 100644 --- a/page/8/index.html +++ b/page/8/index.html @@ -1,216 +1,276 @@ -all4fun blog - Do one thing and do it well. +王恒's Blog - Do one thing and do it well. - + - + - + -
    \ No newline at end of file + })(window)
    \ No newline at end of file diff --git a/page/9/index.html b/page/9/index.html new file mode 100644 index 00000000..1a66821f --- /dev/null +++ b/page/9/index.html @@ -0,0 +1,225 @@ +王恒's Blog - Do one thing and do it well. + + + + + + + + + + +
    \ No newline at end of file diff --git a/pluginsSrc/@docsearch/css/dist/style.css b/pluginsSrc/@docsearch/css/dist/style.css deleted file mode 100644 index ef51c305..00000000 --- a/pluginsSrc/@docsearch/css/dist/style.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! @docsearch/css 4.1.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ -:root{--docsearch-primary-color:#003dff;--docsearch-soft-primary-color:rgba(0,61,255,.1);--docsearch-subtle-color:#d6d6e7;--docsearch-text-color:#36395a;--docsearch-error-color:#ef5350;--docsearch-success-color:#e8f5e9;--docsearch-secondary-text-color:#5a5e9a;--docsearch-background-color:#f5f5fa;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-focus-color:#005fcc;--docsearch-highlight-color:#003dff;--docsearch-muted-color:#9698c3;--docsearch-muted-color-darker:rgba(120,122,165,.25);--docsearch-icon-color:#5a5e9a;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#003dff;--docsearch-border-radius:4px;--docsearch-modal-width:800px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:rgba(0,0,0,.2) 0px 12px 28px 0px,rgba(0,0,0,.1) 0px 2px 4px 0px,hsla(0,0%,100%,.05) 0px 0px 0px 1px inset;--docsearch-searchbox-height:56px;--docsearch-searchbox-initial-height:56px;--docsearch-searchbox-background:#ffffffa6;--docsearch-searchbox-focus-background:#ffffffa6;--docsearch-actions-width:99px;--docsearch-actions-height:44px;--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-highlight-color:rgba(0,61,255,.1);--docsearch-hit-background:#fff;--docsearch-key-background:#f5f5fa;--docsearch-key-color:#5a5e9a;--docsearch-key-pressed-shadow:inset 0 2px 4px rgba(120,122,165,.25);--docsearch-footer-height:52px;--docsearch-footer-background:#ffffffa6;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--fav-out-dur:160ms;--del-dur:150ms;--ease-smooth:cubic-bezier(0.25,0.8,0.4,1);--ease-fast:cubic-bezier(0.45,0.15,0.6,0.9);--shadow-pop:0 4px 12px rgba(0,0,0,.06);--shimmer-bg:linear-gradient(90deg,#e0e3e8 0%,var(--docsearch-muted-color) 20%,var(--docsearch-muted-color) 60%,#e0e3e8 95%)}html[data-theme=dark]{--docsearch-text-color:#c4c7dc;--docsearch-secondary-text-color:#b6b7d5;--docsearch-subtle-color:#212139;--docsearch-error-color:#ef5350;--docsearch-success-color:rgba(67,160,71,.2);--docsearch-highlight-color:#457aff;--docsearch-focus-color:#9ac8ff;--docsearch-background-color:#36395a;--docsearch-icon-color:#b6b7d5;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#000000a6;--docsearch-searchbox-focus-background:#000000a6;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-background:#36395a;--docsearch-key-color:#b6b7d5;--docsearch-key-pressed-shadow:inset 0 2px 4px rgba(12,13,20,.4);--docsearch-footer-background:#000000a6;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497;--shimmer-bg:linear-gradient(90deg,#e0e3e8 0%,var(--docsearch-muted-color) 20%,var(--docsearch-muted-color) 60%,#e0e3e8 95%)}.DocSearch-Button{all:unset;align-items:center;background-color:var(--docsearch-searchbox-background);border:1px solid var(--docsearch-subtle-color);border-radius:4px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;height:36px;justify-content:space-between;padding:0 8px;user-select:none}.DocSearch-Button-Container{align-items:center;display:flex;height:100%}.DocSearch-Button-Container svg{color:var(--docsearch-muted-color)}.DocSearch-Back-Icon,.DocSearch-Search-Icon{color:var(--docsearch-highlight-color);stroke-width:1.6}.DocSearch-Button-Placeholder{color:var(--docsearch-muted-color);display:inline-block;font-size:1rem;line-height:normal;padding:0 12px 0 8px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-background);border:0;border:1px solid color-mix(in srgb,var(--docsearch-subtle-color) 20%,transparent);border-radius:4px;box-shadow:none!important;color:var(--docsearch-key-color);display:flex;font-size:14px;height:24px;justify-content:center;position:relative;transition-duration:.1s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.DocSearch-Button-Key--ctrl{width:33px}.DocSearch-Button-Key:first-child{margin-right:.4em}@media (prefers-reduced-motion){.DocSearch-Button-Key{transition:none}}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow)!important;transform:translateY(1px)}@media (max-width:768px){.DocSearch-Button{width:auto}.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:400}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:4px;box-shadow:var(--docsearch-modal-shadow);display:flex;flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex}.DocSearch-SearchBar-Magnifier{color:var(--docsearch-highlight-color)}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-bottom:1px solid var(--docsearch-subtle-color);border-radius:4px 4px 0 0;display:flex;height:var( - --docsearch-searchbox-height,var(--docsearch-searchbox-initial-height) - );margin:0;min-height:var(--docsearch-searchbox-initial-height);padding-block:var(--docsearch-spacing);padding-inline:16px;position:relative;width:100%}.DocSearch-Input{appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;font-weight:300;height:100%;line-height:1.4;outline:none;overflow-y:hidden;padding-block-start:4px;padding-inline-start:8px;resize:none;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-Actions{align-items:center;display:flex;gap:16px;height:var(--docsearch-actions-height);justify-content:flex-end;padding:0 2px;width:var(--docsearch-actions-width)}.DocSearch-Divider{border-left:1px solid var(--docsearch-subtle-color);height:16px}.DocSearch-AskAi-Return,.DocSearch-Close,.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-StreamingIndicator{margin:0;padding:0}.DocSearch-AskAi-Return{cursor:pointer}.DocSearch-AskAi-Return,.DocSearch-Close,.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-StreamingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Close,.DocSearch-StreamingIndicator{animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-AskAi-Return,.DocSearch-Close,.DocSearch-StreamingIndicator{animation:fade-in .1s ease-in forwards;appearance:none;background:none;border:none;border-radius:var(--docsearch-border-radius);color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-AskAi-Return[hidden],.DocSearch-Close[hidden],.DocSearch-StreamingIndicator[hidden]{display:none}.DocSearch-AskAi-Return:hover,.DocSearch-Close:hover,.DocSearch-StreamingIndicator:hover{background:var(--docsearch-soft-primary-color);color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{color:var(--docsearch-icon-color);height:24px;width:24px}.DocSearch-Form:focus-within .DocSearch-MagnifierLabel svg{color:var(--docsearch-highlight-color)}.DocSearch-Clear{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;flex:none;font:inherit;font-size:.9em;font-weight:300;height:28px;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;user-select:none;white-space:nowrap}.DocSearch-Clear:focus-visible,.DocSearch-Close:focus-visible{border-radius:4px;outline:2px solid var(--docsearch-focus-color);outline-offset:1px}.DocSearch-Dropdown{height:calc(var(--docsearch-modal-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown-Container ul{list-style:none;margin:0;padding:0}.DocSearch-Label{color:var(--docsearch-secondary-text-color);font-size:.875em;font-weight:400;line-height:1.6em}.DocSearch-Help,.DocSearch-NoResults-Help{color:var(--docsearch-secondary-text-color);font-size:.8em;font-weight:300;line-height:1.5em;margin:0;user-select:none}.DocSearch-Title{color:var(--docsearch-text-color);font-size:1.1em;font-weight:300;line-height:.5em;vertical-align:middle}.DocSearch-Title strong{font-weight:500}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative;scroll-margin-top:40px}.DocSearch-Hit:first-of-type{margin-top:4px}@keyframes hit-exit{0%{max-height:4rem;opacity:1;transform:translateY(0)}60%{opacity:0;transform:translateY(-6px)}to{margin:0;max-height:0;opacity:0;transform:translateY(-6px)}}@media (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{animation:none}}.DocSearch-Hit--favoriting{animation:favOut var(--fav-out-dur) var(--ease-smooth) forwards;transform-origin:center}@keyframes favOut{0%{box-shadow:none;opacity:1;transform:scale(1)}30%{box-shadow:var(--shadow-pop);transform:scale(1.01)}to{box-shadow:none;margin:0;max-height:0;opacity:0;transform:scale(.6)}}.DocSearch-Hit--deleting{animation:hitExit var(--del-dur) var(--ease-fast) forwards}@keyframes hitExit{0%{max-height:4rem;opacity:1;transform:translateY(0)}to{margin:0;max-height:0;opacity:0;transform:translateY(-6px)}}.DocSearch-Hit a,.DocSearch-Hit--AskAI{background:var(--docsearch-hit-background);border-radius:4px;cursor:pointer;display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-text-color);font-size:.9em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 4px;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit--AskAI,.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-hit-highlight-color)!important}.DocSearch-Hit mark{color:var(--docsearch-highlight-color);text-decoration:underline;text-underline-offset:.3em}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-text-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{color:var(--docsearch-secondary-text-color);height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;color:var(--docsearch-muted-color);display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:400;gap:4px;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-secondary-text-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title{color:var(--docsearch-text-color)}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-highlight-color)}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}.DocSearch-AskAiScreen,.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{align-items:center;color:var(--docsearch-secondary-text-color);display:flex;flex-direction:column;font-size:1.25em;font-weight:400;justify-content:center;margin:0 auto;text-align:center;width:80%}.DocSearch-AskAiScreen,.DocSearch-ErrorScreen,.DocSearch-NoResults{max-height:80%}.DocSearch-StartScreen{height:100%}.DocSearch-NoResults{gap:.8em;margin-top:2em}.DocSearch-NoResults--withAskAi{justify-content:flex-start;margin-top:0}.DocSearch-AskAiScreen,.DocSearch-ErrorScreen,.DocSearch-StartScreen{gap:24px}.DocSearch-StartScreen-Icon{height:64px;stroke:var(--docsearch-icon-color);width:64px}.DocSearch-Screen-Icon{color:var(--docsearch-icon-color)}.DocSearch-NoResults-Prefill-List{display:flex;flex-direction:column;gap:12px;text-align:center}.DocSearch-NoResults-Prefill-List-Items{display:flex;flex-direction:column;gap:2px}.DocSearch-NoResults-Prefill-List-Items p{align-items:center;display:flex;margin:0;text-align:left}.DocSearch-Prefill{align-items:center;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-flex;font-size:.8em;font-weight:300;gap:4px;height:40px;padding:0 4px}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 4px 4px;border-top:1px solid var(--docsearch-subtle-color);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;gap:16px;list-style:none;margin:0;padding:0}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands-Key{background-color:var(--docsearch-background-color);border:0;border-radius:2px;box-shadow:none!important;color:var(--docsearch-icon-color);height:24px;justify-content:center;margin-right:4px;width:24px}.DocSearch-Commands-Key:last-of-type{margin-right:8px}.DocSearch-Escape-Key{font-size:10px;font-weight:300;letter-spacing:normal;line-height:16px;text-align:center;text-transform:uppercase}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.DocSearch-AskAi-Section{display:flex;flex-direction:column;gap:8px;padding:12px 0}.DocSearch-Hit-AskAIButton{align-items:center;color:var(--docsearch-text-color);display:flex;flex-direction:row}.DocSearch-Hit-AskAIButton-icon{color:var(--docsearch-icon-color);flex-shrink:0;margin-right:12px}.DocSearch-Hit-AskAIButton-title{color:var(--docsearch-hit-color);display:flex;flex:1 1 auto;font-weight:400;gap:4px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-AskAIButton-title-query{background:none;margin-left:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.DocSearch-Hit-AskAIButton-title mark{text-decoration:none}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.DocSearch-AskAiScreen-Container{display:flex;flex-direction:column;gap:0;height:100%;justify-content:flex-start;padding:0;text-align:left;width:100%}.DocSearch-AskAiScreen-Disclaimer{align-self:flex-start;display:flex;font-size:.6em;font-weight:300;margin:0;padding:1.5em 0 .5em;text-align:left}.DocSearch-AskAiScreen-Body{gap:24px;width:100%}.DocSearch-AskAiScreen-Body,.DocSearch-AskAiScreen-Response,.DocSearch-AskAiScreen-Response-Container{display:flex;flex-direction:column}.DocSearch-AskAiScreen-Response{align-self:flex-start;background:var(--docsearch-hit-background);border-radius:4px;color:var(--docsearch-text-color);font-size:.8em;gap:16px;margin-bottom:8px;padding:24px;width:100%}.DocSearch-AskAiScreen-Query{font-size:1.5em;font-weight:600;line-break:anywhere;margin:0}.DocSearch-AskAiScreen-Answer{line-height:1.5}.DocSearch-AskAiScreen-Answer,.DocSearch-AskAiScreen-ThinkingDots{color:var(--docsearch-secondary-text-color);font-weight:400;margin:0}.DocSearch-AskAiScreen-ThinkingDots{font-size:.8em}.DocSearch-AskAiScreen-Answer-Footer{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:space-between}.DocSearch-AskAiScreen-Actions{align-items:center;display:flex;flex-direction:row;gap:12px;margin-left:auto}.DocSearch-AskAiScreen-ActionButton{align-items:center;background:none;border:none;border-radius:4px;cursor:pointer;display:flex;justify-content:center;margin:0;padding:4px;transition:background-color .2s ease;width:24px}.DocSearch-AskAiScreen-ActionButton:hover{background:var(--docsearch-hit-highlight-color)}.DocSearch-AskAiScreen-ActionButton svg{color:var(--docsearch-icon-color);height:20px;stroke-width:1.5;width:20px}.DocSearch-AskAiScreen-CopyButton--copied{background-color:var(--docsearch-success-color);cursor:default}.DocSearch-AskAiScreen-Error{align-items:baseline;background-color:rgba(239,83,80,.1);border-radius:4px;color:var(--docsearch-error-color);display:flex;font-size:1em;font-weight:400;gap:8px;padding:1em}.DocSearch-AskAiScreen-MessageContent{display:flex;flex-direction:column;row-gap:1em}.DocSearch-AskAiScreen-Error svg,.DocSearch-AskAiScreen-MessageContent-Tool svg{flex-shrink:0;height:16px;width:16px}.DocSearch-AskAiScreen-Error p{margin:0}.DocSearch-AskAiScreen-Error .DocSearch-Markdown-Content{color:var(--docsearch-error-color)}.DocSearch-AskAiScreen-FeedbackText{color:var(--docsearch-muted-color);font-size:.7em;font-weight:400;margin:0}.DocSearch-AskAiScreen-FeedbackText--visible{animation:fade-in .3s ease-in forwards}.DocSearch-AskAiScreen-RelatedSources{display:flex;flex-direction:column;gap:4px;width:100%}.DocSearch-AskAiScreen-RelatedSources-List{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px;width:100%}.DocSearch-AskAiScreen-RelatedSources-Title{color:var(--docsearch-secondary-color);font-size:.7em;font-weight:400;margin:0;padding:6px 0}.DocSearch-AskAiScreen-RelatedSources-NoResults{color:var(--docsearch-text-color);font-size:.8rem;font-weight:400;margin:0}.DocSearch-AskAiScreen-RelatedSources-Error{color:var(--docsearch-error-color);font-size:.8rem;font-weight:400;margin:0}.DocSearch-AskAiScreen-RelatedSources-Item-Link{align-items:center;background:var(--docsearch-hit-background);border-radius:4px;color:var(--docsearch-text-color);display:flex;font-size:.75em;gap:6px;max-width:70%;padding:12px 8px;text-decoration:none;transition:background-color .2s ease}.DocSearch-AskAiScreen-RelatedSources-Item-Link svg{color:var(--docsearch-icon-color);flex-shrink:0;stroke-width:1.2}.DocSearch-AskAiScreen-RelatedSources-Item-Link span{flex:1 1 0;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.DocSearch-AskAiScreen-ExchangesList{display:flex;flex-direction:column;gap:24px;margin:8px 0}.DocSearch-AskAiScreen-RelatedSources-Item-Link:hover{background:var(--docsearch-hit-highlight-color)}.DocSearch-Markdown-Content{color:var(--docsearch-text-color);font-size:1em;line-height:1.6;word-wrap:break-word}.DocSearch-Markdown-Content--streaming{animation:fade-in .3s ease-in-out both}.DocSearch-Markdown-Content p{margin:1.2em 0}.DocSearch-Markdown-Content p:last-child{margin-bottom:0}.DocSearch-Markdown-Content p:first-child{margin-top:0}.DocSearch-Markdown-Content code{border-radius:3px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.9em;letter-spacing:normal;margin:0;padding:.2em 0}.DocSearch-Markdown-Content code,.DocSearch-Markdown-Content pre{background-color:var(--docsearch-key-background);color:var(--docsearch-text-color)}.DocSearch-Markdown-Content pre{border-radius:6px;margin:1.5em 0;overflow-x:auto;padding:1.2em}.DocSearch-Markdown-Content pre code{background-color:transparent;border-radius:0;color:inherit;font-size:.8em;margin:0;padding:0;white-space:pre-wrap;word-wrap:break-word;line-height:1.5}.DocSearch-Markdown-Content h1,.DocSearch-Markdown-Content h2,.DocSearch-Markdown-Content h3,.DocSearch-Markdown-Content h4,.DocSearch-Markdown-Content h5,.DocSearch-Markdown-Content h6{color:var(--docsearch-text-color);font-weight:600;letter-spacing:-.02em;line-height:1.3;margin:1em 0}.DocSearch-Markdown-Content h1{font-size:1.5em}.DocSearch-Markdown-Content h2{font-size:1.2em}.DocSearch-Markdown-Content h3{font-size:1em}.DocSearch-Markdown-Content h4{font-size:.9em}.DocSearch-Markdown-Content h5,.DocSearch-Markdown-Content h6{font-size:.8em}.DocSearch-Markdown-Content ol,.DocSearch-Markdown-Content ul{color:var(--docsearch-text-color);margin:1.2em 0;padding-left:1.5em}.DocSearch-Markdown-Content ul{list-style-type:disc}.DocSearch-Markdown-Content ol{list-style-type:decimal}.DocSearch-Markdown-Content li{color:var(--docsearch-text-color);line-height:1.6;margin:.5em 0;padding-left:.3em}.DocSearch-Markdown-Content li>ol,.DocSearch-Markdown-Content li>ul{margin:.5em}.DocSearch-Markdown-Content li::marker{color:var(--docsearch-muted-color)}.DocSearch-Markdown-Content a{color:var(--docsearch-highlight-color);text-decoration:none;transition:all .2s ease}.DocSearch-Markdown-Content a:hover{opacity:.9;text-decoration:underline}.DocSearch-Markdown-Content blockquote{border-left:4px solid var(--docsearch-hit-highlight-color);color:var(--docsearch-secondary-text-color);font-style:italic;margin:1.5em 0;padding:.5em 0 .5em 1em}.DocSearch-Markdown-Content hr{border:none;border-top:1px solid var(--docsearch-subtle-color);margin:2em 0}.DocSearch-Markdown-Content table{border-collapse:collapse;margin:1.5em 0;width:100%}.DocSearch-Markdown-Content td,.DocSearch-Markdown-Content th{border:1px solid var(--docsearch-subtle-color);padding:.75em;text-align:left}.DocSearch-Markdown-Content th{background-color:var(--docsearch-hit-background);font-weight:600}.DocSearch-AskAiScreen-MessageContent-Reasoning{align-items:center;color:var(--docsearch-muted-color);display:flex;font-size:1em;gap:4px}.DocSearch-AskAiScreen-MessageContent-Reasoning svg{color:var(--docsearch-icon-color)}.DocSearch-AskAiScreen-MessageContent-Tool{align-items:baseline;color:var(--docsearch-muted-color);display:flex;width:100%}.DocSearch-AskAiScreen-MessageContent-Tool.Tool--Result{padding-top:0}.DocSearch-AskAiScreen-MessageContent-Tool>svg{color:var(--docsearch-icon-color);margin-right:8px}.DocSearch-AskAiScreen-MessageContent-Tool-Query{color:var(--docsearch-muted-color);transition:box-shadow .2s ease}.DocSearch-AskAiScreen-MessageContent-Tool-Query svg{color:var(--docsearch-muted-color)}.DocSearch-AskAiScreen-MessageContent-Tool-Query:hover{box-shadow:0 1px 0 0 var(--docsearch-highlight-color);color:var(--docsearch-highlight-color);cursor:pointer}.DocSearch-AskAiScreen-MessageContent-Tool-Query:hover svg{color:var(--docsearch-highlight-color)}.DocSearch-AskAiScreen-SmallerLoadingIcon{height:16px;width:16px}.shimmer{background:var(--shimmer-bg);background-clip:text;-webkit-background-clip:text;background-size:200% auto;color:transparent;display:flex;-webkit-text-fill-color:transparent;animation:shimmerText 2.5s linear infinite;pointer-events:none}@keyframes shimmerText{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes pulse{0%,to{opacity:.3}50%{opacity:.6}}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:48px}.DocSearch-Input{font-size:1rem}.DocSearch-Hit-AskAIButton-icon{margin-right:8px}body:has(.DocSearch-Container){overflow:hidden;position:fixed}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:calc(var(--docsearch-vh, 1vh)*100);height:100dvh}.DocSearch-Footer{border-radius:0;bottom:0;position:static}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:calc(var(--docsearch-vh, 1vh)*100);height:100dvh;margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:none}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}.DocSearch-AskAiScreen-Response-Container{flex-direction:column}.DocSearch-AskAiScreen-RelatedSources,.DocSearch-AskAiScreen-Response{width:100%}}.DocSearch-CodeSnippet{position:relative}.DocSearch-CodeSnippet-CopyButton{align-items:center;background:var(--docsearch-key-background);border:none;border-radius:4px;color:var(--docsearch-text-color);cursor:pointer;display:flex;font-size:.75em;padding:.2em .6em;position:absolute;right:8px;top:8px;transition:opacity .2s ease}.DocSearch-CodeSnippet-CopyButton:hover{opacity:.8}.DocSearch-CodeSnippet-CopyButton:active{opacity:.6}.DocSearch-CodeSnippet-CopyButton svg{height:16px;margin-right:4px;width:16px}.DocSearch-CodeSnippet-CheckIcon,.DocSearch-CodeSnippet-CopyButton--copied .DocSearch-CodeSnippet-CopyIcon{display:none}.DocSearch-CodeSnippet-CopyButton--copied .DocSearch-CodeSnippet-CheckIcon{display:inline-block}.DocSearch-Markdown-Content--streaming .DocSearch-CodeSnippet-CopyButton{display:none} \ No newline at end of file diff --git a/pluginsSrc/@docsearch/js/dist/umd/index.js b/pluginsSrc/@docsearch/js/dist/umd/index.js deleted file mode 100644 index 4b8736c6..00000000 --- a/pluginsSrc/@docsearch/js/dist/umd/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! @docsearch/js 4.1.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).docsearch=t()}(this,function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function c(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t3?(u=h===r)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((u=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,o=0))}if(u||n>1)return i;throw f=!0,r}return function(u,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),o=l,s=h;(t=o<2?e:s)||!f;){a||(o?o<3?(o>1&&(d.n=-1),p(o,s)):d.n=s:d.v=s);try{if(c=2,a){if(o||(u="next"),t=a[u]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+u+"' method"),o=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,o=1,s=t}finally{c=1}}return{value:t,done:f}}}(n,u,a),!0),c}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(y(t={},r,function(){return this}),t),f=c.prototype=o.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,y(e,u,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,y(f,"constructor",c),y(c,"constructor",s),s.displayName="GeneratorFunction",y(c,u,"GeneratorFunction"),y(f),y(f,u,"Generator"),y(f,r,function(){return this}),y(f,"toString",function(){return"[object Generator]"}),(D=function(){return{w:a,m:d}})()}function y(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch(e){u=0}y=function(e,t,n,r){function a(t,n){y(e,t,function(e){return this._invoke(t,n,e)})}t?u?u(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},y(e,t,n,r)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||C(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function C(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function k(e){var t="function"==typeof Map?new Map:void 0;return k=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(p())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var u=new(e.bind.apply(e,r));return n&&g(u,n.prototype),u}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),g(n,e)},k(e)}var A,w,x,S,B,O,I,T,P,j,N,z,R={},M=[],Z=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,L=Array.isArray;function $(e,t){for(var n in t)e[n]=t[n];return e}function q(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function U(e,t,n){var r,u,a,i={};for(a in t)"key"==a?r=t[a]:"ref"==a?u=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?A.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===i[a]&&(i[a]=e.defaultProps[a]);return H(e,i,r,u,null)}function H(e,t,n,r,u){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==u?++x:u,__i:-1,__u:0};return null==u&&null!=w.vnode&&w.vnode(a),a}function V(e){return e.children}function W(e,t){this.props=e,this.context=t}function K(e,t){if(null==t)return e.__?K(e.__,e.__i+1):null;for(var n;to&&S.sort(I),e=S.shift(),o=S.length,e.__d&&(n=void 0,r=void 0,u=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=$({},r)).__v=r.__v+1,w.vnode&&w.vnode(n),ae(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[u]:null,a,null==u?K(r):u,!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,oe(a,n,i),r.__e=r.__=null,n.__e!=u&&J(n)));Q.__r=0}function Y(e,t,n,r,u,a,i,o,s,c,l){var f,d,p,h,v,m,D,y=r&&r.__k||M,g=t.length;for(s=function(e,t,n,r,u){var a,i,o,s,c,l=n.length,f=l,d=0;for(e.__k=new Array(u),a=0;a0?H(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,-1!=(c=i.__i=te(i,n,s,f))&&(f--,(o=n[c])&&(o.__u|=2)),null==o||null==o.__v?(-1==c&&(u>l?d--:us?d--:d++,i.__u|=4))):e.__k[a]=null;if(f)for(a=0;a(l?1:0))for(u=n-1,a=n+1;u>=0||a=0?u--:a++])&&!(2&c.__u)&&o==c.key&&s==c.type)return i;return-1}function ne(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Z.test(t)?n:n+"px"}function re(e,t,n,r,u){var a,i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ne(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ne(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(T,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=P,e.addEventListener(t,a?N:j,a)):e.removeEventListener(t,a?N:j,a);else{if("http://www.w3.org/2000/svg"==u)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function ue(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=P++;else if(t.t0?e:L(e)?e.map(se):$({},e)}function ce(e,t,n,r,u,a,i,o,s){var c,l,f,d,p,h,v,m=n.props,D=t.props,y=t.type;if("svg"==y?u="http://www.w3.org/2000/svg":"math"==y?u="http://www.w3.org/1998/Math/MathML":u||(u="http://www.w3.org/1999/xhtml"),null!=a)for(c=0;c2&&(o.children=arguments.length>3?A.call(arguments,2):n),H(e.type,o,r||e.key,u||e.ref,null)}A=M.slice,w={__e:function(e,t,n,r){for(var u,a,i;t=t.__;)if((u=t.__c)&&!u.__)try{if((a=u.constructor)&&null!=a.getDerivedStateFromError&&(u.setState(a.getDerivedStateFromError(e)),i=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(e,r||{}),i=u.__d),i)return u.__E=u}catch(t){e=t}throw e}},x=0,W.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=$({},this.state),"function"==typeof e&&(e=e($({},n),this.props)),e&&$(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),G(this))},W.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),G(this))},W.prototype.render=V,S=[],O="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,I=function(e,t){return e.__v.__b-t.__v.__b},Q.__r=0,T=/(PointerCapture)$|Capture$/i,P=0,j=ue(!1),N=ue(!0),z=0;var me,De,ye,ge,Fe=0,Ee=[],_e=w,be=_e.__b,Ce=_e.__r,ke=_e.diffed,Ae=_e.__c,we=_e.unmount,xe=_e.__;function Se(e,t){_e.__h&&_e.__h(De,e,Fe||t),Fe=0;var n=De.__H||(De.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Be(e){return Fe=1,Oe(We,e)}function Oe(e,t,n){var r=Se(me++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):We(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=De,!De.__f)){var u=function(e,t,n){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(e){return!!e.__c});if(u.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var i=r.__c.props!==e;return u.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),a&&a.call(this,e,t,n)||i};De.__f=!0;var a=De.shouldComponentUpdate,i=De.componentWillUpdate;De.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,u(e,t,n),a=r}i&&i.call(this,e,t,n)},De.shouldComponentUpdate=u}return r.__N||r.__}function Ie(e,t){var n=Se(me++,3);!_e.__s&&Ve(n.__H,t)&&(n.__=e,n.u=t,De.__H.__h.push(n))}function Te(e,t){var n=Se(me++,4);!_e.__s&&Ve(n.__H,t)&&(n.__=e,n.u=t,De.__h.push(n))}function Pe(e){return Fe=5,Ne(function(){return{current:e}},[])}function je(e,t,n){Fe=6,Te(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function Ne(e,t){var n=Se(me++,7);return Ve(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ze(e,t){return Fe=8,Ne(function(){return e},t)}function Re(e){var t=De.context[e.__c],n=Se(me++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(De)),t.props.value):e.__}function Me(e,t){_e.useDebugValue&&_e.useDebugValue(t?t(e):e)}function Ze(){var e=Se(me++,11);if(!e.__){for(var t=De.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Le(){for(var e;e=Ee.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ue),e.__H.__h.forEach(He),e.__H.__h=[]}catch(t){e.__H.__h=[],_e.__e(t,e.__v)}}_e.__b=function(e){De=null,be&&be(e)},_e.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),xe&&xe(e,t)},_e.__r=function(e){Ce&&Ce(e),me=0;var t=(De=e.__c).__H;t&&(ye===De?(t.__h=[],De.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Ue),t.__h.forEach(He),t.__h=[],me=0)),ye=De},_e.diffed=function(e){ke&&ke(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Ee.push(t)&&ge===_e.requestAnimationFrame||((ge=_e.requestAnimationFrame)||qe)(Le)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),ye=De=null},_e.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Ue),e.__h=e.__h.filter(function(e){return!e.__||He(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],_e.__e(n,e.__v)}}),Ae&&Ae(e,t)},_e.unmount=function(e){we&&we(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Ue(e)}catch(e){t=e}}),n.__H=void 0,t&&_e.__e(t,n.__v))};var $e="function"==typeof requestAnimationFrame;function qe(e){var t,n=function(){clearTimeout(r),$e&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);$e&&(t=requestAnimationFrame(n))}function Ue(e){var t=De,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),De=t}function He(e){var t=De;e.__c=e.__(),De=t}function Ve(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function We(e,t){return"function"==typeof t?t(e):t}function Ke(e,t){for(var n in t)e[n]=t[n];return e}function Je(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ge(e,t){var n=t(),r=Be({t:{__:n,u:t}}),u=r[0].t,a=r[1];return Te(function(){u.__=n,u.u=t,Qe(u)&&a({t:u})},[e,n,t]),Ie(function(){return Qe(u)&&a({t:u}),e(function(){Qe(u)&&a({t:u})})},[e]),n}function Qe(e){var t,n,r=e.u,u=e.__;try{var a=r();return!((t=u)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function Ye(e){e()}function Xe(e){return e}function et(){return[!1,Ye]}var tt=Te;function nt(e,t){this.props=e,this.context=t}function rt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Je(this.props,e)}function r(t){return this.shouldComponentUpdate=n,U(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(nt.prototype=new W).isPureReactComponent=!0,nt.prototype.shouldComponentUpdate=function(e,t){return Je(this.props,e)||Je(this.state,t)};var ut=w.__b;w.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ut&&ut(e)};var at="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var it=function(e,t){return null==e?null:ee(ee(e).map(t))},ot={map:it,forEach:it,count:function(e){return e?ee(e).length:0},only:function(e){var t=ee(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:ee},st=w.__e;w.__e=function(e,t,n,r){if(e.then)for(var u,a=t;a=a.__;)if((u=a.__c)&&u.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),u.__c(e,t);st(e,t,n,r)};var ct=w.unmount;function lt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Ke({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return lt(e,t,n)})),e}function ft(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ft(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function dt(){this.__u=0,this.o=null,this.__b=null}function pt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ht(){this.i=null,this.l=null}w.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ct&&ct(e)},(dt.prototype=new W).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var u=pt(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,u?u(o):o())};n.__R=i;var o=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ft(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},dt.prototype.componentWillUnmount=function(){this.o=[]},dt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=lt(this.__b,n,r.__O=r.__P)}this.__b=null}var u=t.__a&&U(V,null,e.fallback);return u&&(u.__u&=-33),[U(V,null,t.__a?null:e.children),u]};var vt=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.h.removeChild(e)}}}pe(U(mt,{context:t.context},e.__v),t.v)}function yt(e,t){var n=U(Dt,{__v:e,h:t});return n.containerInfo=t,n}(ht.prototype=new W).__a=function(e){var t=this,n=pt(t.__v),r=t.l.get(e);return r[0]++,function(u){var a=function(){t.props.revealOrder?(r.push(u),vt(t,e,r)):u()};n?n(a):a()}},ht.prototype.render=function(e){this.i=null,this.l=new Map;var t=ee(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ht.prototype.componentDidUpdate=ht.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){vt(e,n,t)})};var gt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ft=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Et=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,_t=/[A-Z0-9]/g,bt="undefined"!=typeof document,Ct=function(e){return("undefined"!=typeof Symbol&&"symbol"==b(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function kt(e,t,n){return null==t.__k&&(t.textContent=""),pe(e,t),"function"==typeof n&&n(),e?e.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(W.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var At=w.event;function wt(){}function xt(){return this.cancelBubble}function St(){return this.defaultPrevented}w.event=function(e){return At&&(e=At(e)),e.persist=wt,e.isPropagationStopped=xt,e.isDefaultPrevented=St,e.nativeEvent=e};var Bt,Ot={enumerable:!1,configurable:!0,get:function(){return this.class}},It=w.vnode;w.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},u=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||bt&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var o=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===o&&"no"===i?i=!1:"o"===o[0]&&"n"===o[1]?"ondoubleclick"===o?a="ondblclick":"onchange"!==o||"input"!==n&&"textarea"!==n||Ct(t.type)?"onfocus"===o?a="onfocusin":"onblur"===o?a="onfocusout":Et.test(a)&&(a=o):o=a="oninput":u&&Ft.test(a)?a=a.replace(_t,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===o&&r[a=o]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=ee(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=ee(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Ot)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=gt,It&&It(e)};var Tt=w.__r;w.__r=function(e){Tt&&Tt(e),Bt=e.__c};var Pt=w.diffed;w.diffed=function(e){Pt&&Pt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),Bt=null};var jt={ReactCurrentDispatcher:{current:{readContext:function(e){return Bt.__n[e.__c].props.value},useCallback:ze,useContext:Re,useDebugValue:Me,useDeferredValue:Xe,useEffect:Ie,useId:Ze,useImperativeHandle:je,useInsertionEffect:tt,useLayoutEffect:Te,useMemo:Ne,useReducer:Oe,useRef:Pe,useState:Be,useSyncExternalStore:Ge,useTransition:et}}};function Nt(e){return!!e&&e.$$typeof===gt}function zt(e){return!!e.__k&&(pe(null,e),!0)}var Rt={useState:Be,useId:Ze,useReducer:Oe,useEffect:Ie,useLayoutEffect:Te,useInsertionEffect:tt,useTransition:et,useDeferredValue:Xe,useSyncExternalStore:Ge,startTransition:Ye,useRef:Pe,useImperativeHandle:je,useMemo:Ne,useCallback:ze,useContext:Re,useDebugValue:Me,version:"18.3.1",Children:ot,render:kt,hydrate:function(e,t,n){return he(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:zt,createPortal:yt,createElement:U,createContext:function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,G(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+z++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},createFactory:function(e){return U.bind(null,e)},cloneElement:function(e){return Nt(e)?ve.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:V,isValidElement:Nt,isElement:Nt,isFragment:function(e){return Nt(e)&&e.type===V},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:W,PureComponent:nt,memo:rt,forwardRef:function(e){function t(t){var n=Ke({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=at,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:V,Suspense:dt,SuspenseList:ht,lazy:function(e){var t,n,r;function u(u){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return U(n,u)}return u.displayName="Lazy",u.__f=!0,u},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:jt},Mt=["type"],Zt=["type"],Lt=["additionalProperties"],$t=["abortSignal"],qt=["messageId"],Ut=["messages"],Ht=["experimental_throttle","resume"];function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}function tn(e,t,n){return(t=vn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t3?(u=h===r)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((u=n<2&&pr||r>h)&&(a[4]=n,a[5]=r,d.n=h,o=0))}if(u||n>1)return i;throw f=!0,r}return function(u,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),o=l,s=h;(t=o<2?e:s)||!f;){a||(o?o<3?(o>1&&(d.n=-1),p(o,s)):d.n=s:d.v=s);try{if(c=2,a){if(o||(u="next"),t=a[u]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+u+"' method"),o=1);a=e}else if((t=(f=d.n<0)?s:n.call(r,d))!==i)break}catch(t){a=e,o=1,s=t}finally{c=1}}return{value:t,done:f}}}(n,u,a),!0),c}var i={};function o(){}function s(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(fn(t={},r,function(){return this}),t),f=c.prototype=o.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,fn(e,u,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,fn(f,"constructor",c),fn(c,"constructor",s),s.displayName="GeneratorFunction",fn(c,u,"GeneratorFunction"),fn(f),fn(f,u,"Generator"),fn(f,r,function(){return this}),fn(f,"toString",function(){return"[object Generator]"}),(ln=function(){return{w:a,m:d}})()}function fn(e,t,n,r){var u=Object.defineProperty;try{u({},"",{})}catch(e){u=0}fn=function(e,t,n,r){function a(t,n){fn(e,t,function(e){return this._invoke(t,n,e)})}t?u?u(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},fn(e,t,n,r)}function dn(e,t){return dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dn(e,t)}function pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,a,i,o=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);s=!0);}catch(e){c=!0,u=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw u}}return o}}(e,t)||Dn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hn(e){return function(e){if(Array.isArray(e))return Vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Dn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vn(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function mn(e){return mn="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},mn(e)}function Dn(e,t){if(e){if("string"==typeof e)return Vt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vt(e,t):void 0}}function yn(e){var t="function"==typeof Map?new Map:void 0;return yn=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Qt(e,arguments,rn(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),dn(n,e)},yn(e)}var gn={"Ctrl/Cmd+K":!0,"/":!0};function Fn(e){return sn(sn({},gn),e)}function En(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rt.createElement("path",{d:"M8.19531 8.76758H7.33398C7.02539 8.76758 6.74414 8.69531 6.49023 8.55078C6.23633 8.40234 6.0332 8.20312 5.88086 7.95312C5.73242 7.70312 5.6582 7.42188 5.6582 7.10938C5.6582 6.80078 5.73242 6.51953 5.88086 6.26562C6.0332 6.01172 6.23633 5.80859 6.49023 5.65625C6.74414 5.50391 7.02539 5.42773 7.33398 5.42773C7.64258 5.42773 7.92383 5.50391 8.17773 5.65625C8.43164 5.80859 8.63281 6.01172 8.78125 6.26562C8.93359 6.51953 9.00977 6.80078 9.00977 7.10938V7.96484H10.9902V7.10938C10.9902 6.80078 11.0664 6.51953 11.2188 6.26562C11.3711 6.01172 11.5723 5.80859 11.8223 5.65625C12.0762 5.50391 12.3574 5.42773 12.666 5.42773C12.9746 5.42773 13.2559 5.50391 13.5098 5.65625C13.7637 5.80859 13.9648 6.01172 14.1133 6.26562C14.2656 6.51953 14.3418 6.80078 14.3418 7.10938C14.3418 7.42188 14.2656 7.70312 14.1133 7.95312C13.9648 8.20312 13.7637 8.40234 13.5098 8.55078C13.2559 8.69531 12.9746 8.76758 12.666 8.76758H11.8105V10.7773H12.666C12.9746 10.7773 13.2559 10.8516 13.5098 11C13.7637 11.1445 13.9648 11.3418 14.1133 11.5918C14.2656 11.8418 14.3418 12.123 14.3418 12.4355C14.3418 12.7441 14.2656 13.0254 14.1133 13.2793C13.9648 13.5332 13.7637 13.7363 13.5098 13.8887C13.2559 14.041 12.9746 14.1172 12.666 14.1172C12.3574 14.1172 12.0762 14.041 11.8223 13.8887C11.5723 13.7363 11.3711 13.5332 11.2188 13.2793C11.0664 13.0254 10.9902 12.7441 10.9902 12.4355V11.5801H9.00977V12.4355C9.00977 12.7441 8.93359 13.0254 8.78125 13.2793C8.63281 13.5332 8.43164 13.7363 8.17773 13.8887C7.92383 14.041 7.64258 14.1172 7.33398 14.1172C7.02539 14.1172 6.74414 14.041 6.49023 13.8887C6.23633 13.7363 6.0332 13.5332 5.88086 13.2793C5.73242 13.0254 5.6582 12.7441 5.6582 12.4355C5.6582 12.123 5.73242 11.8418 5.88086 11.5918C6.0332 11.3418 6.23633 11.1445 6.49023 11C6.74414 10.8516 7.02539 10.7773 7.33398 10.7773H8.19531V8.76758ZM7.33398 7.97656H8.19531V7.10938C8.19531 6.875 8.10938 6.67383 7.9375 6.50586C7.76953 6.33398 7.56836 6.24805 7.33398 6.24805C7.09961 6.24805 6.89648 6.33398 6.72461 6.50586C6.55664 6.67383 6.47266 6.875 6.47266 7.10938C6.47266 7.34766 6.55664 7.55273 6.72461 7.72461C6.89648 7.89258 7.09961 7.97656 7.33398 7.97656ZM12.666 7.97656C12.9004 7.97656 13.1016 7.89258 13.2695 7.72461C13.4414 7.55273 13.5273 7.34766 13.5273 7.10938C13.5273 6.875 13.4414 6.67383 13.2695 6.50586C13.1016 6.33398 12.9004 6.24805 12.666 6.24805C12.4316 6.24805 12.2305 6.33398 12.0625 6.50586C11.8945 6.67383 11.8105 6.875 11.8105 7.10938V7.97656H12.666ZM9.00977 10.7773H10.9902V8.76758H9.00977V10.7773ZM7.33398 11.5625C7.09961 11.5625 6.89648 11.6484 6.72461 11.8203C6.55664 11.9883 6.47266 12.1914 6.47266 12.4297C6.47266 12.6641 6.55664 12.8672 6.72461 13.0391C6.89648 13.207 7.09961 13.291 7.33398 13.291C7.56836 13.291 7.76953 13.207 7.9375 13.0391C8.10938 12.8672 8.19531 12.6641 8.19531 12.4297V11.5625H7.33398ZM12.666 11.5625H11.8105V12.4297C11.8105 12.6641 11.8945 12.8672 12.0625 13.0391C12.2305 13.207 12.4316 13.291 12.666 13.291C12.9004 13.291 13.1016 13.207 13.2695 13.0391C13.4414 12.8672 13.5273 12.6641 13.5273 12.4297C13.5273 12.1914 13.4414 11.9883 13.2695 11.8203C13.1016 11.6484 12.9004 11.5625 12.666 11.5625Z",fill:"currentColor"}))}function _n(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rt.createElement("path",{d:"M8.01562 11.1758L7.95703 9.65234H8.22656L11.9297 5.54492H13.2539L9.75586 9.32422L9.26367 9.79883L8.01562 11.1758ZM7.07812 14V5.54492H8.13281V14H7.07812ZM12.1992 14L9.04102 9.78711L9.76758 9.05469L13.5645 14H12.1992Z",fill:"currentColor"}))}function bn(){return Rt.createElement("svg",{width:"33",height:"20",viewBox:"0 0 33 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rt.createElement("path",{d:"M10.4824 14.1992C9.7168 14.1992 9.05469 14.0195 8.49609 13.6602C7.9375 13.3008 7.50586 12.791 7.20117 12.1309C6.90039 11.4707 6.75 10.6875 6.75 9.78125V9.76953C6.75 8.85938 6.90039 8.07422 7.20117 7.41406C7.50586 6.75391 7.93555 6.24414 8.49023 5.88477C9.04883 5.52539 9.71094 5.3457 10.4766 5.3457C11.0703 5.3457 11.6094 5.46289 12.0938 5.69727C12.582 5.92773 12.9844 6.25 13.3008 6.66406C13.6172 7.07422 13.8164 7.54883 13.8984 8.08789L13.8926 8.09961H12.832L12.8262 8.08789C12.7324 7.72461 12.5742 7.41211 12.3516 7.15039C12.1289 6.88477 11.8574 6.67969 11.5371 6.53516C11.2207 6.39062 10.8672 6.31836 10.4766 6.31836C9.9375 6.31836 9.46875 6.45898 9.07031 6.74023C8.67578 7.02148 8.37109 7.41992 8.15625 7.93555C7.94141 8.45117 7.83398 9.0625 7.83398 9.76953V9.78125C7.83398 10.4844 7.94141 11.0938 8.15625 11.6094C8.37109 12.125 8.67578 12.5234 9.07031 12.8047C9.46875 13.0859 9.93945 13.2266 10.4824 13.2266C10.877 13.2266 11.2344 13.1641 11.5547 13.0391C11.875 12.9102 12.1445 12.7285 12.3633 12.4941C12.582 12.2559 12.7344 11.9746 12.8203 11.6504L12.832 11.6387H13.8984V11.6504C13.8047 12.166 13.6016 12.6152 13.2891 12.998C12.9766 13.377 12.5801 13.6719 12.0996 13.8828C11.623 14.0938 11.084 14.1992 10.4824 14.1992ZM17.7832 14.0469C17.1348 14.0469 16.6641 13.916 16.3711 13.6543C16.082 13.3926 15.9375 12.9609 15.9375 12.3594V8.52734H14.9414V7.68359H15.9375V6.04883H16.9922V7.68359H18.375V8.52734H16.9922V12.1016C16.9922 12.4727 17.0625 12.7402 17.2031 12.9043C17.3438 13.0645 17.5781 13.1445 17.9062 13.1445C17.9961 13.1445 18.0723 13.1426 18.1348 13.1387C18.2012 13.1348 18.2812 13.1289 18.375 13.1211V13.9883C18.2773 14.0039 18.1797 14.0176 18.082 14.0293C17.9844 14.041 17.8848 14.0469 17.7832 14.0469ZM19.8984 14V7.68359H20.918V8.62109H21.0117C21.1328 8.28906 21.3379 8.03125 21.627 7.84766C21.916 7.66406 22.2734 7.57227 22.6992 7.57227C22.7969 7.57227 22.8926 7.57812 22.9863 7.58984C23.084 7.59766 23.1582 7.60547 23.209 7.61328V8.60352C23.1035 8.58398 23 8.57031 22.8984 8.5625C22.8008 8.55078 22.6953 8.54492 22.582 8.54492C22.2578 8.54492 21.9707 8.60938 21.7207 8.73828C21.4707 8.86719 21.2734 9.04688 21.1289 9.27734C20.9883 9.50781 20.918 9.77734 20.918 10.0859V14H19.8984ZM24.5273 14V5.17578H25.5469V14H24.5273Z",fill:"currentColor"}))}function Cn(e){var t=e.size,n=void 0===t?20:t,r=e.color,u=void 0===r?"currentColor":r;return Rt.createElement("svg",{width:n,height:n,className:"DocSearch-Search-Icon",viewBox:"0 0 24 24","aria-hidden":"true"},Rt.createElement("circle",{cx:"11",cy:"11",r:"8",stroke:u,fill:"none",strokeWidth:"1.4"}),Rt.createElement("path",{d:"m21 21-4.3-4.3",stroke:u,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}))}var kn=function(e){var t=e.theme;Ie(function(){if(t){var e=document.documentElement.dataset.theme;if(t!==e)return document.documentElement.dataset.theme=t,function(){void 0===e?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}},[t])},An=["translations","keyboardShortcuts"],wn="Ctrl",xn=Rt.forwardRef(function(e,t){var n=e.translations,r=void 0===n?{}:n,u=e.keyboardShortcuts,a=cn(e,An),i=r.buttonText,o=void 0===i?"Search":i,s=r.buttonAriaLabel,c=void 0===s?"Search":s,l=Fn(u),f=pn(Be(null),2),d=f[0],p=f[1];kn({theme:a.theme}),Ie(function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?p("⌘"):p(wn))},[]);var h=pn(d===wn?[wn,"Control",Rt.createElement(bn,null)]:["Meta","Meta",Rt.createElement(En,null)],3),v=h[0],m=h[1],D=h[2],y=l["Ctrl/Cmd+K"],g="".concat(m,"+k");return Rt.createElement("button",nn({type:"button",className:"DocSearch DocSearch-Button","aria-label":y?"".concat(c," (").concat(g,")"):c,"aria-keyshortcuts":y?g:void 0},a,{ref:t}),Rt.createElement("span",{className:"DocSearch-Button-Container"},Rt.createElement(Cn,null),Rt.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),Rt.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&y&&Rt.createElement(Rt.Fragment,null,Rt.createElement(Sn,{reactsToKey:v},D),Rt.createElement(Sn,{reactsToKey:"k"},Rt.createElement(_n,null)))))});function Sn(e){var t=e.reactsToKey,n=e.children,r=pn(Be(!1),2),u=r[0],a=r[1];return Ie(function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&a(!0)}function n(e){e.key!==t&&"Meta"!==e.key||a(!1)}},[t]),Rt.createElement("kbd",{className:u?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"+("Ctrl"===t?" DocSearch-Button-Key--ctrl":"")},n)}var Bn,On="vercel.ai.error",In=Symbol.for(On),Tn=function(e){function t(e){var n,r=e.name,i=e.message,o=e.cause;return a(this,t),(n=u(this,t,[i]))[Bn]=!0,n.name=r,n.cause=o,n}return d(t,e),o(t,null,[{key:"isInstance",value:function(e){return t.hasMarker(e,On)}},{key:"hasMarker",value:function(e,t){var n=Symbol.for(t);return null!=e&&"object"==b(e)&&n in e&&"boolean"==typeof e[n]&&!0===e[n]}}])}(k(Error));Bn=In;var Pn=Tn;function jn(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var Nn,zn="AI_InvalidArgumentError",Rn="vercel.ai.error.".concat(zn),Mn=Symbol.for(Rn),Zn=function(e){function t(e){var n,r=e.message,i=e.cause,o=e.argument;return a(this,t),(n=u(this,t,[{name:zn,message:r,cause:i}]))[Nn]=!0,n.argument=o,n}return d(t,e),o(t,null,[{key:"isInstance",value:function(e){return Pn.hasMarker(e,Rn)}}])}(Pn);Nn=Mn;var Ln,$n="AI_JSONParseError",qn="vercel.ai.error.".concat($n),Un=Symbol.for(qn),Hn=function(e){function t(e){var n,r=e.text,i=e.cause;return a(this,t),(n=u(this,t,[{name:$n,message:"JSON parsing failed: Text: ".concat(r,".\nError message: ").concat(jn(i)),cause:i}]))[Ln]=!0,n.text=r,n}return d(t,e),o(t,null,[{key:"isInstance",value:function(e){return Pn.hasMarker(e,qn)}}])}(Pn);Ln=Un;var Vn,Wn="AI_TypeValidationError",Kn="vercel.ai.error.".concat(Wn),Jn=Symbol.for(Kn);Vn=Jn;var Gn=function(e){function t(e){var n,r=e.value,i=e.cause;return a(this,t),(n=u(this,t,[{name:Wn,message:"Type validation failed: Value: ".concat(JSON.stringify(r),".\nError message: ").concat(jn(i)),cause:i}]))[Vn]=!0,n.value=r,n}return d(t,e),o(t,null,[{key:"isInstance",value:function(e){return Pn.hasMarker(e,Kn)}},{key:"wrap",value:function(e){var n=e.value,r=e.cause;return t.isInstance(r)&&r.value===n?r:new t({value:n,cause:r})}}])}(Pn),Qn=function(){function e(t,n){var r;return Gt(this,e),(r=Jt(this,e,[t])).name="ParseError",r.type=n.type,r.field=n.field,r.value=n.value,r.line=n.line,r}return un(e,yn(Error)),Xt(e)}();function Yn(e){}var Xn=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.onError,u=n.onRetry,a=n.onComment;return Gt(this,e),Jt(this,e,[{start:function(e){t=function(e){if("function"==typeof e)throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");var t,n=e.onEvent,r=void 0===n?Yn:n,u=e.onError,a=void 0===u?Yn:u,i=e.onRetry,o=void 0===i?Yn:i,s=e.onComment,c="",l=!0,f="",d="";function p(e){if(""===e)return f.length>0&&r({id:t,event:d||void 0,data:f.endsWith("\n")?f.slice(0,-1):f}),t=void 0,f="",void(d="");if(e.startsWith(":"))s&&s(e.slice(e.startsWith(": ")?2:1));else{var n=e.indexOf(":");if(-1===n)h(e,"",e);else{var u=e.slice(0,n),a=" "===e[n+1]?2:1;h(u,e.slice(n+a),e)}}}function h(e,n,r){switch(e){case"event":d=n;break;case"data":f="".concat(f).concat(n,"\n");break;case"id":t=n.includes("\0")?void 0:n;break;case"retry":/^\d+$/.test(n)?o(parseInt(n,10)):a(new Qn('Invalid `retry` value: "'.concat(n,'"'),{type:"invalid-retry",value:n,line:r}));break;default:a(new Qn('Unknown field "'.concat(e.length>20?"".concat(e.slice(0,20),"…"):e,'"'),{type:"unknown-field",field:e,value:n,line:r}))}}return{feed:function(e){var t,n=l?e.replace(/^\xEF\xBB\xBF/,""):e,r=function(e){for(var t=[],n="",r=0;r0&&void 0!==arguments[0]?arguments[0]:{}).consume&&p(c),l=!0,t=void 0,f="",d="",c=""}}}({onEvent:function(t){e.enqueue(t)},onError:function(t){"terminate"===r?e.error(t):"function"==typeof r&&r(t)},onRetry:u,onComment:a})},transform:function(e){t.feed(e)}}])}return un(e,yn(TransformStream)),Xt(e)}();function er(e,t,n){var r;function u(n,r){var u,a,o;for(var s in Object.defineProperty(n,"_zod",{value:null!==(u=n._zod)&&void 0!==u?u:{},enumerable:!1}),null!==(a=(o=n._zod).traits)&&void 0!==a||(o.traits=new Set),n._zod.traits.add(e),t(n,r),i.prototype)s in n||Object.defineProperty(n,s,{value:i.prototype[s].bind(n)});n._zod.constr=i,n._zod.def=r}var a=function(e){function t(){return Gt(this,t),Jt(this,t,arguments)}return un(t,e),Xt(t)}(null!==(r=null==n?void 0:n.Parent)&&void 0!==r?r:Object);function i(e){var t,r,i=null!=n&&n.Parent?new a:this;u(i,e),null!==(t=(r=i._zod).deferred)&&void 0!==t||(r.deferred=[]);var o,s=en(i._zod.deferred);try{for(s.s();!(o=s.n()).done;)(0,o.value)()}catch(e){s.e(e)}finally{s.f()}return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(i,"init",{value:u}),Object.defineProperty(i,Symbol.hasInstance,{value:function(t){var r;return!!(null!=n&&n.Parent&&t instanceof n.Parent)||(null==t||null===(r=t._zod)||void 0===r||null===(r=r.traits)||void 0===r?void 0:r.has(e))}}),Object.defineProperty(i,"name",{value:e}),i}var tr=function(){function e(){return Gt(this,e),Jt(this,e,["Encountered Promise during synchronous parse. Use .parseAsync() instead."])}return un(e,yn(Error)),Xt(e)}(),nr=function(){function e(t){var n;return Gt(this,e),(n=Jt(this,e,["Encountered unidirectional transform during encode: ".concat(t)])).name="ZodEncodeError",n}return un(e,yn(Error)),Xt(e)}(),rr={};function ur(e){return rr}function ar(e){var t=Object.values(e).filter(function(e){return"number"==typeof e});return Object.entries(e).filter(function(e){var n=pn(e,2),r=n[0];return n[1],-1===t.indexOf(+r)}).map(function(e){var t=pn(e,2);return t[0],t[1]})}function ir(e,t){return"bigint"==typeof t?t.toString():t}function or(e){return{get value(){var t=e();return Object.defineProperty(this,"value",{value:t}),t}}}function sr(e){return null==e}function cr(e){var t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var lr=Symbol("evaluating");function fr(e,t,n){var r=void 0;Object.defineProperty(e,t,{get:function(){if(r!==lr)return void 0===r&&(r=lr,r=n()),r},set:function(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function dr(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function pr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function hr(){for(var e={},t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0;if(!0===e.aborted)return!0;for(var n=t;nu&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=function(r){(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gu=er("$ZodCheckMultipleOf",function(e,t){vu.init(e,t),e._zod.onattach.push(function(e){var n,r;null!==(n=(r=e._zod.bag).multipleOf)&&void 0!==n||(r.multipleOf=t.value)}),e._zod.check=function(n){if(mn(n.value)!==mn(t.value))throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){var n=(e.toString().split(".")[1]||"").length,r=t.toString(),u=(r.split(".")[1]||"").length;if(0===u&&/\d?e-\d?/.test(r)){var a=r.match(/\d?e-(\d?)/);null!=a&&a[1]&&(u=Number.parseInt(a[1]))}var i=n>u?n:u;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}(n.value,t.value))||n.issues.push({origin:mn(n.value),code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Fu=er("$ZodCheckNumberFormat",function(e,t){var n;vu.init(e,t),t.format=t.format||"float64";var r=null===(n=t.format)||void 0===n?void 0:n.includes("int"),u=r?"int":"number",a=pn(kr[t.format],2),i=a[0],o=a[1];e._zod.onattach.push(function(e){var n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=o,r&&(n.pattern=cu)}),e._zod.check=function(n){var a=n.value;if(r){if(!Number.isInteger(a))return void n.issues.push({expected:u,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?n.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}):n.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:u,continue:!t.abort}))}ao&&n.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),Eu=er("$ZodCheckMaxSize",function(e,t){var n,r;vu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!sr(t)&&void 0!==t.size}),e._zod.onattach.push(function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximumr&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=function(n){var r=n.value;r.size>=t.minimum||n.issues.push({origin:Br(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bu=er("$ZodCheckSizeEquals",function(e,t){var n,r;vu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!sr(t)&&void 0!==t.size}),e._zod.onattach.push(function(e){var n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=function(n){var r=n.value,u=r.size;if(u!==t.size){var a=u>t.size;n.issues.push(sn(sn({origin:Br(r)},a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}}),Cu=er("$ZodCheckMaxLength",function(e,t){var n,r;vu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!sr(t)&&void 0!==t.length}),e._zod.onattach.push(function(e){var n,r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximumr&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=function(n){var r=n.value;if(!(r.length>=t.minimum)){var u=Or(r);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}}),Au=er("$ZodCheckLengthEquals",function(e,t){var n,r;vu.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=function(e){var t=e.value;return!sr(t)&&void 0!==t.length}),e._zod.onattach.push(function(e){var n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=function(n){var r=n.value,u=r.length;if(u!==t.length){var a=Or(r),i=u>t.length;n.issues.push(sn(sn({origin:a},i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{},{inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort}))}}}),wu=er("$ZodCheckStringFormat",function(e,t){var n,r,u,a;vu.init(e,t),e._zod.onattach.push(function(e){var n,r=e._zod.bag;r.format=t.format,t.pattern&&(null!==(n=r.patterns)&&void 0!==n||(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?null!==(n=(u=e._zod).check)&&void 0!==n||(u.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push(sn(sn({origin:"string",code:"invalid_format",format:t.format,input:n.value},t.pattern?{pattern:t.pattern.toString()}:{}),{},{inst:e,continue:!t.abort}))}):null!==(r=(a=e._zod).check)&&void 0!==r||(a.check=function(){})}),xu=er("$ZodCheckRegex",function(e,t){wu.init(e,t),e._zod.check=function(n){t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Su=er("$ZodCheckLowerCase",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=pu),wu.init(e,t)}),Bu=er("$ZodCheckUpperCase",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=hu),wu.init(e,t)}),Ou=er("$ZodCheckIncludes",function(e,t){vu.init(e,t);var n=_r(t.includes),r=new RegExp("number"==typeof t.position?"^.{".concat(t.position,"}").concat(n):n);t.pattern=r,e._zod.onattach.push(function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=function(n){n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Iu=er("$ZodCheckStartsWith",function(e,t){var n;vu.init(e,t);var r=new RegExp("^".concat(_r(t.prefix),".*"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push(function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=function(n){n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Tu=er("$ZodCheckEndsWith",function(e,t){var n;vu.init(e,t);var r=new RegExp(".*".concat(_r(t.suffix),"$"));null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push(function(e){var t,n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=function(n){n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Pu(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,hn(wr(n,e.issues)))}var ju=er("$ZodCheckProperty",function(e,t){vu.init(e,t),e._zod.check=function(e){var n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(function(n){return Pu(n,e,t.property)});Pu(n,e,t.property)}}),Nu=er("$ZodCheckMimeType",function(e,t){vu.init(e,t);var n=new Set(t.mime);e._zod.onattach.push(function(e){e._zod.bag.mime=t.mime}),e._zod.check=function(r){n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),zu=er("$ZodCheckOverwrite",function(e,t){vu.init(e,t),e._zod.check=function(e){e.value=t.tx(e.value)}}),Ru=Xt(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Gt(this,e),this.content=[],this.indent=0,this&&(this.args=t)},[{key:"indented",value:function(e){this.indent+=1,e(this),this.indent-=1}},{key:"write",value:function(e){var t=this;if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});var n,r=e.split("\n").filter(function(e){return e}),u=Math.min.apply(Math,hn(r.map(function(e){return e.length-e.trimStart().length}))),a=en(r.map(function(e){return e.slice(u)}).map(function(e){return" ".repeat(2*t.indent)+e}));try{for(a.s();!(n=a.n()).done;){var i=n.value;this.content.push(i)}}catch(e){a.e(e)}finally{a.f()}}},{key:"compile",value:function(){var e,t=Function,n=null==this?void 0:this.args,r=hn((null!==(e=null==this?void 0:this.content)&&void 0!==e?e:[""]).map(function(e){return" ".concat(e)}));return Qt(t,hn(n).concat([r.join("\n")]))}}]),Mu={major:4,minor:1,patch:9},Zu=er("$ZodType",function(e,t){var n,r;null!=e||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Mu;var u=hn(null!==(n=e._zod.def.checks)&&void 0!==n?n:[]);e._zod.traits.has("$ZodCheck")&&u.unshift(e);var a,i=en(u);try{for(i.s();!(a=i.n()).done;){var o,s=en(a.value._zod.onattach);try{for(s.s();!(o=s.n()).done;)(0,o.value)(e)}catch(e){s.e(e)}finally{s.f()}}}catch(e){i.e(e)}finally{i.f()}if(0===u.length){var c,l;null!==(c=(r=e._zod).deferred)&&void 0!==c||(r.deferred=[]),null===(l=e._zod.deferred)||void 0===l||l.push(function(){e._zod.run=e._zod.parse})}else{var f=function(e,t,n){var r,u,a=Ar(e),i=en(t);try{var o=function(){var t=u.value;if(t._zod.def.when){if(!t._zod.def.when(e))return 0}else if(a)return 0;var i=e.issues.length,o=t._zod.check(e);if(o instanceof Promise&&!1===(null==n?void 0:n.async))throw new tr;if(r||o instanceof Promise)r=(null!=r?r:Promise.resolve()).then(Kt(ln().m(function t(){return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,o;case 1:if(e.issues.length!==i){t.n=2;break}return t.a(2);case 2:a||(a=Ar(e,i));case 3:return t.a(2)}},t)})));else{if(e.issues.length===i)return 0;a||(a=Ar(e,i))}};for(i.s();!(u=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}return r?r.then(function(){return e}):e},d=function(t,n,r){if(Ar(t))return t.aborted=!0,t;var a=f(n,u,r);if(a instanceof Promise){if(!1===r.async)throw new tr;return a.then(function(t){return e._zod.parse(t,r)})}return e._zod.parse(a,r)};e._zod.run=function(t,n){if(n.skipChecks)return e._zod.parse(t,n);if("backward"===n.direction){var r=e._zod.parse({value:t.value,issues:[]},sn(sn({},n),{},{skipChecks:!0}));return r instanceof Promise?r.then(function(e){return d(e,t,n)}):d(r,t,n)}var a=e._zod.parse(t,n);if(a instanceof Promise){if(!1===n.async)throw new tr;return a.then(function(e){return f(e,u,n)})}return f(a,u,n)}}e["~standard"]={validate:function(t){try{var n,r=Mr(e,t);return r.success?{value:r.data}:{issues:null===(n=r.error)||void 0===n?void 0:n.issues}}catch(n){return Lr(e,t).then(function(e){var t;return e.success?{value:e.data}:{issues:null===(t=e.error)||void 0===t?void 0:t.issues}})}},vendor:"zod",version:1}}),Lu=er("$ZodString",function(e,t){var n,r,u;Zu.init(e,t),e._zod.pattern=null!==(n=hn(null!==(r=null==e||null===(u=e._zod.bag)||void 0===u?void 0:u.patterns)&&void 0!==r?r:[]).pop())&&void 0!==n?n:function(e){var t,n,r=e?"[\\s\\S]{".concat(null!==(t=null==e?void 0:e.minimum)&&void 0!==t?t:0,",").concat(null!==(n=null==e?void 0:e.maximum)&&void 0!==n?n:"","}"):"[\\s\\S]*";return new RegExp("^".concat(r,"$"))}(e._zod.bag),e._zod.parse=function(n,r){if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),$u=er("$ZodStringFormat",function(e,t){wu.init(e,t),Lu.init(e,t)}),qu=er("$ZodGUID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Jr),$u.init(e,t)}),Uu=er("$ZodUUID",function(e,t){var n;if(t.version){var r,u={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===u)throw new Error('Invalid UUID version: "'.concat(t.version,'"'));null!==(r=t.pattern)&&void 0!==r||(t.pattern=Gr(u))}else null!==(n=t.pattern)&&void 0!==n||(t.pattern=Gr());$u.init(e,t)}),Hu=er("$ZodEmail",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Qr),$u.init(e,t)}),Vu=er("$ZodURL",function(e,t){$u.init(e,t),e._zod.check=function(n){try{var r=n.value.trim(),u=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:uu.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=u.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Wu=er("$ZodEmoji",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),$u.init(e,t)}),Ku=er("$ZodNanoID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Wr),$u.init(e,t)}),Ju=er("$ZodCUID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=$r),$u.init(e,t)}),Gu=er("$ZodCUID2",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=qr),$u.init(e,t)}),Qu=er("$ZodULID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ur),$u.init(e,t)}),Yu=er("$ZodXID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Hr),$u.init(e,t)}),Xu=er("$ZodKSUID",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Vr),$u.init(e,t)}),ea=er("$ZodISODateTime",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=function(e){var t=su({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");var r="".concat(t,"(?:").concat(n.join("|"),")");return new RegExp("^".concat(iu,"T(?:").concat(r,")$"))}(t)),$u.init(e,t)}),ta=er("$ZodISODate",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ou),$u.init(e,t)}),na=er("$ZodISOTime",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^".concat(su(t),"$"))),$u.init(e,t)}),ra=er("$ZodISODuration",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Kr),$u.init(e,t)}),ua=er("$ZodIPv4",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Yr),$u.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.format="ipv4"})}),aa=er("$ZodIPv6",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Xr),$u.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.format="ipv6"}),e._zod.check=function(n){try{new URL("http://[".concat(n.value,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),ia=er("$ZodCIDRv4",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=eu),$u.init(e,t)}),oa=er("$ZodCIDRv6",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=tu),$u.init(e,t),e._zod.check=function(n){var r=n.value.split("/");try{if(2!==r.length)throw new Error;var u=pn(r,2),a=u[0],i=u[1];if(!i)throw new Error;var o=Number(i);if("".concat(o)!==i)throw new Error;if(o<0||o>128)throw new Error;new URL("http://[".concat(a,"]"))}catch(r){n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function sa(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch(e){return!1}}var ca=er("$ZodBase64",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=nu),$u.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.contentEncoding="base64"}),e._zod.check=function(n){sa(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),la=er("$ZodBase64URL",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=ru),$u.init(e,t),e._zod.onattach.push(function(e){e._zod.bag.contentEncoding="base64url"}),e._zod.check=function(n){(function(e){if(!ru.test(e))return!1;var t=e.replace(/[-_]/g,function(e){return"-"===e?"+":"/"});return sa(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fa=er("$ZodE164",function(e,t){var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=au),$u.init(e,t)}),da=er("$ZodJWT",function(e,t){$u.init(e,t),e._zod.check=function(n){(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=e.split(".");if(3!==n.length)return!1;var r=pn(n,1)[0];if(!r)return!1;var u=JSON.parse(atob(r));return!("typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch(e){return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),pa=er("$ZodNumber",function(e,t){var n;Zu.init(e,t),e._zod.pattern=null!==(n=e._zod.bag.pattern)&&void 0!==n?n:lu,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Number(n.value)}catch(e){}var u=n.value;if("number"==typeof u&&!Number.isNaN(u)&&Number.isFinite(u))return n;var a="number"==typeof u?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return n.issues.push(sn({expected:"number",code:"invalid_type",input:u,inst:e},a?{received:a}:{})),n}}),ha=er("$ZodNumber",function(e,t){Fu.init(e,t),pa.init(e,t)}),va=er("$ZodBoolean",function(e,t){Zu.init(e,t),e._zod.pattern=fu,e._zod.parse=function(n,r){if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}var u=n.value;return"boolean"==typeof u||n.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),n}}),ma=er("$ZodNull",function(e,t){Zu.init(e,t),e._zod.pattern=du,e._zod.values=new Set([null]),e._zod.parse=function(t,n){var r=t.value;return null===r||t.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),t}}),Da=er("$ZodUnknown",function(e,t){Zu.init(e,t),e._zod.parse=function(e){return e}}),ya=er("$ZodNever",function(e,t){Zu.init(e,t),e._zod.parse=function(t,n){return t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t}});function ga(e,t,n){var r;e.issues.length&&(r=t.issues).push.apply(r,hn(wr(n,e.issues))),t.value[n]=e.value}var Fa=er("$ZodArray",function(e,t){Zu.init(e,t),e._zod.parse=function(n,r){var u=n.value;if(!Array.isArray(u))return n.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),n;n.value=Array(u.length);for(var a=[],i=function(e){var i=u[e],o=t.element._zod.run({value:i,issues:[]},r);o instanceof Promise?a.push(o.then(function(t){return ga(t,n,e)})):ga(o,n,e)},o=0;o ({\n ...iss,\n path: iss.path ? [").concat(p,", ...iss.path] : [").concat(p,"]\n })));\n }\n \n \n if (").concat(d,".value === undefined) {\n if (").concat(p," in input) {\n newResult[").concat(p,"] = undefined;\n }\n } else {\n newResult[").concat(p,"] = ").concat(d,".value;\n }\n \n "))}}catch(e){l.e(e)}finally{l.f()}t.write("payload.value = newResult;"),t.write("return payload;");var h=t.compile();return function(t,n){return h(e,t,n)}}(t.shape)),l=n(l,f),c?ba([],d,l,f,r,e):l):u(l,f):(l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l)}});function Aa(e,t,n,r){var u,a=en(e);try{for(a.s();!(u=a.n()).done;){var i=u.value;if(0===i.issues.length)return t.value=i.value,t}}catch(e){a.e(e)}finally{a.f()}var o=e.filter(function(e){return!Ar(e)});return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(function(e){return e.issues.map(function(e){return Sr(e,r,ur())})})}),t)}var wa=er("$ZodUnion",function(e,t){Zu.init(e,t),fr(e._zod,"optin",function(){return t.options.some(function(e){return"optional"===e._zod.optin})?"optional":void 0}),fr(e._zod,"optout",function(){return t.options.some(function(e){return"optional"===e._zod.optout})?"optional":void 0}),fr(e._zod,"values",function(){if(t.options.every(function(e){return e._zod.values}))return new Set(t.options.flatMap(function(e){return Array.from(e._zod.values)}))}),fr(e._zod,"pattern",function(){if(t.options.every(function(e){return e._zod.pattern})){var e=t.options.map(function(e){return e._zod.pattern});return new RegExp("^(".concat(e.map(function(e){return cr(e.source)}).join("|"),")$"))}});var n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=function(u,a){if(n)return r(u,a);var i,o=!1,s=[],c=en(t.options);try{for(c.s();!(i=c.n()).done;){var l=i.value._zod.run({value:u.value,issues:[]},a);if(l instanceof Promise)s.push(l),o=!0;else{if(0===l.issues.length)return l;s.push(l)}}}catch(e){c.e(e)}finally{c.f()}return o?Promise.all(s).then(function(t){return Aa(t,u,e,a)}):Aa(s,u,e,a)}}),xa=er("$ZodDiscriminatedUnion",function(e,t){wa.init(e,t);var n=e._zod.parse;fr(e._zod,"propValues",function(){var e,n={},r=en(t.options);try{for(r.s();!(e=r.n()).done;){var u=e.value,a=u._zod.propValues;if(!a||0===Object.keys(a).length)throw new Error('Invalid discriminated union option at index "'.concat(t.options.indexOf(u),'"'));for(var i=0,o=Object.entries(a);i0&&n.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:s})}else{n.value={};var d,p=en(Reflect.ownKeys(u));try{var h=function(){var i=d.value;if("__proto__"===i)return 0;var o=t.keyType._zod.run({value:i,issues:[]},r);if(o instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(o.issues.length)return n.issues.push({code:"invalid_key",origin:"record",issues:o.issues.map(function(e){return Sr(e,r,ur())}),input:i,path:[i],inst:e}),n.value[o.value]=o.value,0;var s,c=t.valueType._zod.run({value:u[i],issues:[]},r);c instanceof Promise?a.push(c.then(function(e){var t;e.issues.length&&(t=n.issues).push.apply(t,hn(wr(i,e.issues))),n.value[o.value]=e.value})):(c.issues.length&&(s=n.issues).push.apply(s,hn(wr(i,c.issues))),n.value[o.value]=c.value)};for(p.s();!(d=p.n()).done;)h()}catch(e){p.e(e)}finally{p.f()}}return a.length?Promise.all(a).then(function(){return n}):n}}),Ta=er("$ZodEnum",function(e,t){Zu.init(e,t);var n=ar(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp("^(".concat(n.filter(function(e){return Er.has(mn(e))}).map(function(e){return"string"==typeof e?_r(e):e.toString()}).join("|"),")$")),e._zod.parse=function(t,u){var a=t.value;return r.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),Pa=er("$ZodLiteral",function(e,t){if(Zu.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp("^(".concat(t.values.map(function(e){return"string"==typeof e?_r(e):e?_r(e.toString()):String(e)}).join("|"),")$")),e._zod.parse=function(n,r){var u=n.value;return e._zod.values.has(u)||n.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),n}}),ja=er("$ZodTransform",function(e,t){Zu.init(e,t),e._zod.parse=function(n,r){if("backward"===r.direction)throw new nr(e.constructor.name);var u=t.transform(n.value,n);if(r.async)return(u instanceof Promise?u:Promise.resolve(u)).then(function(e){return n.value=e,n});if(u instanceof Promise)throw new tr;return n.value=u,n}});function Na(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}var za=er("$ZodOptional",function(e,t){Zu.init(e,t),e._zod.optin="optional",e._zod.optout="optional",fr(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(hn(t.innerType._zod.values),[void 0])):void 0}),fr(e._zod,"pattern",function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(cr(e.source),")?$")):void 0}),e._zod.parse=function(e,n){if("optional"===t.innerType._zod.optin){var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(t){return Na(t,e.value)}):Na(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Ra=er("$ZodNullable",function(e,t){Zu.init(e,t),fr(e._zod,"optin",function(){return t.innerType._zod.optin}),fr(e._zod,"optout",function(){return t.innerType._zod.optout}),fr(e._zod,"pattern",function(){var e=t.innerType._zod.pattern;return e?new RegExp("^(".concat(cr(e.source),"|null)$")):void 0}),fr(e._zod,"values",function(){return t.innerType._zod.values?new Set([].concat(hn(t.innerType._zod.values),[null])):void 0}),e._zod.parse=function(e,n){return null===e.value?e:t.innerType._zod.run(e,n)}}),Ma=er("$ZodDefault",function(e,t){Zu.init(e,t),e._zod.optin="optional",fr(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(e){return Za(e,t)}):Za(r,t)}});function Za(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var La=er("$ZodPrefault",function(e,t){Zu.init(e,t),e._zod.optin="optional",fr(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){return"backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n)}}),$a=er("$ZodNonOptional",function(e,t){Zu.init(e,t),fr(e._zod,"values",function(){var e=t.innerType._zod.values;return e?new Set(hn(e).filter(function(e){return void 0!==e})):void 0}),e._zod.parse=function(n,r){var u=t.innerType._zod.run(n,r);return u instanceof Promise?u.then(function(t){return qa(t,e)}):qa(u,e)}});function qa(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Ua=er("$ZodCatch",function(e,t){Zu.init(e,t),fr(e._zod,"optin",function(){return t.innerType._zod.optin}),fr(e._zod,"optout",function(){return t.innerType._zod.optout}),fr(e._zod,"values",function(){return t.innerType._zod.values}),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(function(r){return e.value=r.value,r.issues.length&&(e.value=t.catchValue(sn(sn({},e),{},{error:{issues:r.issues.map(function(e){return Sr(e,n,ur())})},input:e.value})),e.issues=[]),e}):(e.value=r.value,r.issues.length&&(e.value=t.catchValue(sn(sn({},e),{},{error:{issues:r.issues.map(function(e){return Sr(e,n,ur())})},input:e.value})),e.issues=[]),e)}}),Ha=er("$ZodPipe",function(e,t){Zu.init(e,t),fr(e._zod,"values",function(){return t.in._zod.values}),fr(e._zod,"optin",function(){return t.in._zod.optin}),fr(e._zod,"optout",function(){return t.out._zod.optout}),fr(e._zod,"propValues",function(){return t.in._zod.propValues}),e._zod.parse=function(e,n){if("backward"===n.direction){var r=t.out._zod.run(e,n);return r instanceof Promise?r.then(function(e){return Va(e,t.in,n)}):Va(r,t.in,n)}var u=t.in._zod.run(e,n);return u instanceof Promise?u.then(function(e){return Va(e,t.out,n)}):Va(u,t.out,n)}});function Va(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Wa=er("$ZodReadonly",function(e,t){Zu.init(e,t),fr(e._zod,"propValues",function(){return t.innerType._zod.propValues}),fr(e._zod,"values",function(){return t.innerType._zod.values}),fr(e._zod,"optin",function(){return t.innerType._zod.optin}),fr(e._zod,"optout",function(){return t.innerType._zod.optout}),e._zod.parse=function(e,n){if("backward"===n.direction)return t.innerType._zod.run(e,n);var r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ka):Ka(r)}});function Ka(e){return e.value=Object.freeze(e.value),e}var Ja=er("$ZodLazy",function(e,t){Zu.init(e,t),fr(e._zod,"innerType",function(){return t.getter()}),fr(e._zod,"pattern",function(){return e._zod.innerType._zod.pattern}),fr(e._zod,"propValues",function(){return e._zod.innerType._zod.propValues}),fr(e._zod,"optin",function(){var t;return null!==(t=e._zod.innerType._zod.optin)&&void 0!==t?t:void 0}),fr(e._zod,"optout",function(){var t;return null!==(t=e._zod.innerType._zod.optout)&&void 0!==t?t:void 0}),e._zod.parse=function(t,n){return e._zod.innerType._zod.run(t,n)}}),Ga=er("$ZodCustom",function(e,t){vu.init(e,t),Zu.init(e,t),e._zod.parse=function(e,t){return e},e._zod.check=function(n){var r=n.value,u=t.fn(r);if(u instanceof Promise)return u.then(function(t){return Qa(t,n,r,e)});Qa(u,n,r,e)}});function Qa(e,t,n,r){if(!e){var u,a={code:"custom",input:n,inst:r,path:hn(null!==(u=r._zod.def.path)&&void 0!==u?u:[]),continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(Ir(a))}}var Ya=Xt(function e(){Gt(this,e),this._map=new WeakMap,this._idmap=new Map},[{key:"add",value:function(e){var t=arguments.length<=1?void 0:arguments[1];if(this._map.set(e,t),t&&"object"===mn(t)&&"id"in t){if(this._idmap.has(t.id))throw new Error("ID ".concat(t.id," already exists in the registry"));this._idmap.set(t.id,e)}return this}},{key:"clear",value:function(){return this._map=new WeakMap,this._idmap=new Map,this}},{key:"remove",value:function(e){var t=this._map.get(e);return t&&"object"===mn(t)&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}},{key:"get",value:function(e){var t=e._zod.parent;if(t){var n,r=sn({},null!==(n=this.get(t))&&void 0!==n?n:{});delete r.id;var u=sn(sn({},r),this._map.get(e));return Object.keys(u).length?u:void 0}return this._map.get(e)}},{key:"has",value:function(e){return this._map.has(e)}}]);var Xa=new Ya;function ei(e,t){return new e(sn({type:"string",format:"guid",check:"string_format",abort:!1},Cr(t)))}function ti(e,t){return new e(sn({type:"string",format:"base64",check:"string_format",abort:!1},Cr(t)))}function ni(e,t){return new Du(sn(sn({check:"less_than"},Cr(t)),{},{value:e,inclusive:!1}))}function ri(e,t){return new Du(sn(sn({check:"less_than"},Cr(t)),{},{value:e,inclusive:!0}))}function ui(e,t){return new yu(sn(sn({check:"greater_than"},Cr(t)),{},{value:e,inclusive:!1}))}function ai(e,t){return new yu(sn(sn({check:"greater_than"},Cr(t)),{},{value:e,inclusive:!0}))}function ii(e,t){return new gu(sn(sn({check:"multiple_of"},Cr(t)),{},{value:e}))}function oi(e,t){return new Cu(sn(sn({check:"max_length"},Cr(t)),{},{maximum:e}))}function si(e,t){return new ku(sn(sn({check:"min_length"},Cr(t)),{},{minimum:e}))}function ci(e,t){return new Au(sn(sn({check:"length_equals"},Cr(t)),{},{length:e}))}function li(e,t){return new xu(sn(sn({check:"string_format",format:"regex"},Cr(t)),{},{pattern:e}))}function fi(e){return new Su(sn({check:"string_format",format:"lowercase"},Cr(e)))}function di(e){return new Bu(sn({check:"string_format",format:"uppercase"},Cr(e)))}function pi(e,t){return new Ou(sn(sn({check:"string_format",format:"includes"},Cr(t)),{},{includes:e}))}function hi(e,t){return new Iu(sn(sn({check:"string_format",format:"starts_with"},Cr(t)),{},{prefix:e}))}function vi(e,t){return new Tu(sn(sn({check:"string_format",format:"ends_with"},Cr(t)),{},{suffix:e}))}function mi(e){return new zu({check:"overwrite",tx:e})}function Di(e){return mi(function(t){return t.normalize(e)})}function yi(){return mi(function(e){return e.trim()})}function gi(){return mi(function(e){return e.toLowerCase()})}function Fi(){return mi(function(e){return e.toUpperCase()})}var Ei=Xt(function e(t){var n,r,u,a,i;Gt(this,e),this.counter=0,this.metadataRegistry=null!==(n=null==t?void 0:t.metadata)&&void 0!==n?n:Xa,this.target=null!==(r=null==t?void 0:t.target)&&void 0!==r?r:"draft-2020-12",this.unrepresentable=null!==(u=null==t?void 0:t.unrepresentable)&&void 0!==u?u:"throw",this.override=null!==(a=null==t?void 0:t.override)&&void 0!==a?a:function(){},this.io=null!==(i=null==t?void 0:t.io)&&void 0!==i?i:"output",this.seen=new Map},[{key:"process",value:function(e){var t,n,r,u,a=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{path:[],schemaPath:[]},o=e._zod.def,s=this.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;var c={schema:{},count:1,cycle:void 0,path:i.path};this.seen.set(e,c);var l=null===(t=(n=e._zod).toJSONSchema)||void 0===t?void 0:t.call(n);if(l)c.schema=l;else{var f=sn(sn({},i),{},{schemaPath:[].concat(hn(i.schemaPath),[e]),path:i.path}),d=e._zod.parent;if(d)c.ref=d,this.process(d,f),this.seen.get(d).isParent=!0;else{var p=c.schema;switch(o.type){case"string":var h=p;h.type="string";var v,m=e._zod.bag,D=m.minimum,y=m.maximum,g=m.format,F=m.patterns,E=m.contentEncoding;if("number"==typeof D&&(h.minLength=D),"number"==typeof y&&(h.maxLength=y),g&&(h.format=null!==(v={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""}[g])&&void 0!==v?v:g,""===h.format&&delete h.format),E&&(h.contentEncoding=E),F&&F.size>0){var _=hn(F);1===_.length?h.pattern=_[0].source:_.length>1&&(c.schema.allOf=hn(_.map(function(e){return sn(sn({},"draft-7"===a.target||"draft-4"===a.target||"openapi-3.0"===a.target?{type:"string"}:{}),{},{pattern:e.source})})))}break;case"number":var b=p,C=e._zod.bag,k=C.minimum,A=C.maximum,w=C.format,x=C.multipleOf,S=C.exclusiveMaximum,B=C.exclusiveMinimum;"string"==typeof w&&w.includes("int")?b.type="integer":b.type="number","number"==typeof B&&("draft-4"===this.target||"openapi-3.0"===this.target?(b.minimum=B,b.exclusiveMinimum=!0):b.exclusiveMinimum=B),"number"==typeof k&&(b.minimum=k,"number"==typeof B&&"draft-4"!==this.target&&(B>=k?delete b.minimum:delete b.exclusiveMinimum)),"number"==typeof S&&("draft-4"===this.target||"openapi-3.0"===this.target?(b.maximum=S,b.exclusiveMaximum=!0):b.exclusiveMaximum=S),"number"==typeof A&&(b.maximum=A,"number"==typeof S&&"draft-4"!==this.target&&(S<=A?delete b.maximum:delete b.exclusiveMaximum)),"number"==typeof x&&(b.multipleOf=x);break;case"boolean":case"success":p.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":"openapi-3.0"===this.target?(p.type="string",p.nullable=!0,p.enum=[null]):p.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":p.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":var O=p,I=e._zod.bag,T=I.minimum,P=I.maximum;"number"==typeof T&&(O.minItems=T),"number"==typeof P&&(O.maxItems=P),O.type="array",O.items=this.process(o.element,sn(sn({},f),{},{path:[].concat(hn(f.path),["items"])}));break;case"object":var j,N=p;N.type="object",N.properties={};var z=o.shape;for(var R in z)N.properties[R]=this.process(z[R],sn(sn({},f),{},{path:[].concat(hn(f.path),["properties",R])}));var M=new Set(Object.keys(z)),Z=new Set(hn(M).filter(function(e){var t=o.shape[e]._zod;return"input"===a.io?void 0===t.optin:void 0===t.optout}));Z.size>0&&(N.required=Array.from(Z)),"never"===(null===(j=o.catchall)||void 0===j?void 0:j._zod.def.type)?N.additionalProperties=!1:o.catchall?o.catchall&&(N.additionalProperties=this.process(o.catchall,sn(sn({},f),{},{path:[].concat(hn(f.path),["additionalProperties"])}))):"output"===this.io&&(N.additionalProperties=!1);break;case"union":var L=p,$=o.options.map(function(e,t){return a.process(e,sn(sn({},f),{},{path:[].concat(hn(f.path),["anyOf",t])}))});L.anyOf=$;break;case"intersection":var q=p,U=this.process(o.left,sn(sn({},f),{},{path:[].concat(hn(f.path),["allOf",0])})),H=this.process(o.right,sn(sn({},f),{},{path:[].concat(hn(f.path),["allOf",1])})),V=function(e){return"allOf"in e&&1===Object.keys(e).length},W=[].concat(hn(V(U)?U.allOf:[U]),hn(V(H)?H.allOf:[H]));q.allOf=W;break;case"tuple":var K=p;K.type="array";var J="draft-2020-12"===this.target?"prefixItems":"items",G="draft-2020-12"===this.target||"openapi-3.0"===this.target?"items":"additionalItems",Q=o.items.map(function(e,t){return a.process(e,sn(sn({},f),{},{path:[].concat(hn(f.path),[J,t])}))}),Y=o.rest?this.process(o.rest,sn(sn({},f),{},{path:[].concat(hn(f.path),[G],hn("openapi-3.0"===this.target?[o.items.length]:[]))})):null;"draft-2020-12"===this.target?(K.prefixItems=Q,Y&&(K.items=Y)):"openapi-3.0"===this.target?(K.items={anyOf:Q},Y&&K.items.anyOf.push(Y),K.minItems=Q.length,Y||(K.maxItems=Q.length)):(K.items=Q,Y&&(K.additionalItems=Y));var X=e._zod.bag,ee=X.minimum,te=X.maximum;"number"==typeof ee&&(K.minItems=ee),"number"==typeof te&&(K.maxItems=te);break;case"record":var ne=p;ne.type="object","draft-7"!==this.target&&"draft-2020-12"!==this.target||(ne.propertyNames=this.process(o.keyType,sn(sn({},f),{},{path:[].concat(hn(f.path),["propertyNames"])}))),ne.additionalProperties=this.process(o.valueType,sn(sn({},f),{},{path:[].concat(hn(f.path),["additionalProperties"])}));break;case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":var re=p,ue=ar(o.entries);ue.every(function(e){return"number"==typeof e})&&(re.type="number"),ue.every(function(e){return"string"==typeof e})&&(re.type="string"),re.enum=ue;break;case"literal":var ae,ie=p,oe=[],se=en(o.values);try{for(se.s();!(ae=se.n()).done;){var ce=ae.value;if(void 0===ce){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof ce){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");oe.push(Number(ce))}else oe.push(ce)}}catch(e){se.e(e)}finally{se.f()}if(0===oe.length);else if(1===oe.length){var le=oe[0];ie.type=null===le?"null":mn(le),"draft-4"===this.target||"openapi-3.0"===this.target?ie.enum=[le]:ie.const=le}else oe.every(function(e){return"number"==typeof e})&&(ie.type="number"),oe.every(function(e){return"string"==typeof e})&&(ie.type="string"),oe.every(function(e){return"boolean"==typeof e})&&(ie.type="string"),oe.every(function(e){return null===e})&&(ie.type="null"),ie.enum=oe;break;case"file":var fe=p,de={type:"string",format:"binary",contentEncoding:"binary"},pe=e._zod.bag,he=pe.minimum,ve=pe.maximum,me=pe.mime;void 0!==he&&(de.minLength=he),void 0!==ve&&(de.maxLength=ve),me?1===me.length?(de.contentMediaType=me[0],Object.assign(fe,de)):fe.anyOf=me.map(function(e){return sn(sn({},de),{},{contentMediaType:e})}):Object.assign(fe,de);break;case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":var De=this.process(o.innerType,f);"openapi-3.0"===this.target?(c.ref=o.innerType,p.nullable=!0):p.anyOf=[De,{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(o.innerType,f),c.ref=o.innerType;break;case"default":this.process(o.innerType,f),c.ref=o.innerType,p.default=JSON.parse(JSON.stringify(o.defaultValue));break;case"prefault":this.process(o.innerType,f),c.ref=o.innerType,"input"===this.io&&(p._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break;case"catch":var ye;this.process(o.innerType,f),c.ref=o.innerType;try{ye=o.catchValue(void 0)}catch(e){throw new Error("Dynamic catch values are not supported in JSON Schema")}p.default=ye;break;case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":var ge=p,Fe=e._zod.pattern;if(!Fe)throw new Error("Pattern not found in template literal");ge.type="string",ge.pattern=Fe.source;break;case"pipe":var Ee="input"===this.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;this.process(Ee,f),c.ref=Ee;break;case"readonly":this.process(o.innerType,f),c.ref=o.innerType,p.readOnly=!0;break;case"lazy":var _e=e._zod.innerType;this.process(_e,f),c.ref=_e;break;case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema");break;case"function":if("throw"===this.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")}}}var be=this.metadataRegistry.get(e);return be&&Object.assign(c.schema,be),"input"===this.io&&_i(e)&&(delete c.schema.examples,delete c.schema.default),"input"===this.io&&c.schema._prefault&&(null!==(r=(u=c.schema).default)&&void 0!==r||(u.default=c.schema._prefault)),delete c.schema._prefault,this.seen.get(e).schema}},{key:"emit",value:function(e,t){var n,r,u,a,i,o,s=this,c={cycles:null!==(n=null==t?void 0:t.cycles)&&void 0!==n?n:"ref",reused:null!==(r=null==t?void 0:t.reused)&&void 0!==r?r:"inline",external:null!==(u=null==t?void 0:t.external)&&void 0!==u?u:void 0},l=this.seen.get(e);if(!l)throw new Error("Unprocessed schema. This is a bug in Zod.");var f=function(e){if(!e[1].schema.$ref){var t=e[1],n=function(e){var t,n="draft-2020-12"===s.target?"$defs":"definitions";if(c.external){var r,u,a,i,o=null===(r=c.external.registry.get(e[0]))||void 0===r?void 0:r.id,f=null!==(u=c.external.uri)&&void 0!==u?u:function(e){return e};if(o)return{ref:f(o)};var d=null!==(a=null!==(i=e[1].defId)&&void 0!==i?i:e[1].schema.id)&&void 0!==a?a:"schema".concat(s.counter++);return e[1].defId=d,{defId:d,ref:"".concat(f("__shared"),"#/").concat(n,"/").concat(d)}}if(e[1]===l)return{ref:"#"};var p="".concat("#","/").concat(n,"/"),h=null!==(t=e[1].schema.id)&&void 0!==t?t:"__schema".concat(s.counter++);return{defId:h,ref:p+h}}(e),r=n.ref,u=n.defId;t.def=sn({},t.schema),u&&(t.defId=u);var a=t.schema;for(var i in a)delete a[i];a.$ref=r}};if("throw"===c.cycles){var d,p=en(this.seen.entries());try{for(p.s();!(d=p.n()).done;){var h,v=d.value[1];if(v.cycle)throw new Error("Cycle detected: "+"#/".concat(null===(h=v.cycle)||void 0===h?void 0:h.join("/"),"/")+'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.')}}catch(e){p.e(e)}finally{p.f()}}var m,D=en(this.seen.entries());try{for(D.s();!(m=D.n()).done;){var y,g=m.value,F=g[1];if(e!==g[0]){if(c.external){var E,_=null===(E=c.external.registry.get(g[0]))||void 0===E?void 0:E.id;if(e!==g[0]&&_){f(g);continue}}((null===(y=this.metadataRegistry.get(g[0]))||void 0===y?void 0:y.id)||F.cycle||F.count>1&&"ref"===c.reused)&&f(g)}else f(g)}}catch(e){D.e(e)}finally{D.f()}var b,C=function(e,t){var n,r,u=s.seen.get(e),a=null!==(n=u.def)&&void 0!==n?n:u.schema,i=sn({},a);if(null!==u.ref){var o=u.ref;if(u.ref=null,o){C(o,t);var c,l=s.seen.get(o).schema;!l.$ref||"draft-7"!==t.target&&"draft-4"!==t.target&&"openapi-3.0"!==t.target?(Object.assign(a,l),Object.assign(a,i)):(a.allOf=null!==(c=a.allOf)&&void 0!==c?c:[],a.allOf.push(l))}u.isParent||s.override({zodSchema:e,jsonSchema:a,path:null!==(r=u.path)&&void 0!==r?r:[]})}},k=en(hn(this.seen.entries()).reverse());try{for(k.s();!(b=k.n()).done;){var A=b.value;C(A[0],{target:this.target})}}catch(e){k.e(e)}finally{k.f()}var w={};if("draft-2020-12"===this.target?w.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?w.$schema="http://json-schema.org/draft-07/schema#":"draft-4"===this.target?w.$schema="http://json-schema.org/draft-04/schema#":"openapi-3.0"===this.target||console.warn("Invalid target: ".concat(this.target)),null!==(a=c.external)&&void 0!==a&&a.uri){var x,S=null===(x=c.external.registry.get(e))||void 0===x?void 0:x.id;if(!S)throw new Error("Schema is missing an `id` property");w.$id=c.external.uri(S)}Object.assign(w,l.def);var B,O=null!==(i=null===(o=c.external)||void 0===o?void 0:o.defs)&&void 0!==i?i:{},I=en(this.seen.entries());try{for(I.s();!(B=I.n()).done;){var T=B.value[1];T.def&&T.defId&&(O[T.defId]=T.def)}}catch(e){I.e(e)}finally{I.f()}c.external||Object.keys(O).length>0&&("draft-2020-12"===this.target?w.$defs=O:w.definitions=O);try{return JSON.parse(JSON.stringify(w))}catch(e){throw new Error("Error converting schema to JSON.")}}}]);function _i(e,t){var n=null!=t?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);var r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":case"function":return!1;case"array":return _i(r.element,n);case"object":for(var u in r.shape)if(_i(r.shape[u],n))return!0;return!1;case"union":var a,i=en(r.options);try{for(i.s();!(a=i.n()).done;)if(_i(a.value,n))return!0}catch(e){i.e(e)}finally{i.f()}return!1;case"intersection":return _i(r.left,n)||_i(r.right,n);case"tuple":var o,s=en(r.items);try{for(s.s();!(o=s.n()).done;)if(_i(o.value,n))return!0}catch(e){s.e(e)}finally{s.f()}return!(!r.rest||!_i(r.rest,n));case"record":case"map":return _i(r.keyType,n)||_i(r.valueType,n);case"set":return _i(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return _i(r.innerType,n);case"lazy":return _i(r.getter(),n);case"transform":return!0;case"pipe":return _i(r.in,n)||_i(r.out,n)}throw new Error("Unknown schema type: ".concat(r.type))}var bi=Object.freeze({__proto__:null,endsWith:vi,gt:ui,gte:ai,includes:pi,length:ci,lowercase:fi,lt:ni,lte:ri,maxLength:oi,maxSize:function(e,t){return new Eu(sn(sn({check:"max_size"},Cr(t)),{},{maximum:e}))},mime:function(e,t){return new Nu(sn({check:"mime_type",mime:e},Cr(t)))},minLength:si,minSize:function(e,t){return new _u(sn(sn({check:"min_size"},Cr(t)),{},{minimum:e}))},multipleOf:ii,negative:function(e){return ni(0,e)},nonnegative:function(e){return ai(0,e)},nonpositive:function(e){return ri(0,e)},normalize:Di,overwrite:mi,positive:function(e){return ui(0,e)},property:function(e,t,n){return new ju(sn({check:"property",property:e,schema:t},Cr(n)))},regex:li,size:function(e,t){return new bu(sn(sn({check:"size_equals"},Cr(t)),{},{size:e}))},startsWith:hi,toLowerCase:gi,toUpperCase:Fi,trim:yi,uppercase:di}),Ci=er("ZodISODateTime",function(e,t){ea.init(e,t),Hi.init(e,t)});var ki=er("ZodISODate",function(e,t){ta.init(e,t),Hi.init(e,t)});var Ai=er("ZodISOTime",function(e,t){na.init(e,t),Hi.init(e,t)});var wi=er("ZodISODuration",function(e,t){ra.init(e,t),Hi.init(e,t)});var xi=er("ZodError",function(e,t){Pr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:function(t){return function(e,t){var n=t||function(e){return e.message},r={_errors:[]},u=function(e){var t,a=en(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;if("invalid_union"===i.code&&i.errors.length)i.errors.map(function(e){return u({issues:e})});else if("invalid_key"===i.code)u({issues:i.issues});else if("invalid_element"===i.code)u({issues:i.issues});else if(0===i.path.length)r._errors.push(n(i));else for(var o=r,s=0;s1&&void 0!==arguments[1]?arguments[1]:function(e){return e.message},r={},u=[],a=en(e.issues);try{for(a.s();!(t=a.n()).done;){var i=t.value;i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(n(i))):u.push(n(i))}}catch(e){a.e(e)}finally{a.f()}return{formErrors:u,fieldErrors:r}}(e,t)}},addIssue:{value:function(t){e.issues.push(t),e.message=JSON.stringify(e.issues,ir,2)}},addIssues:{value:function(t){var n;(n=e.issues).push.apply(n,hn(t)),e.message=JSON.stringify(e.issues,ir,2)}},isEmpty:{get:function(){return 0===e.issues.length}}})},{Parent:Error}),Si=Nr(xi),Bi=zr(xi),Oi=Rr(xi),Ii=Zr(xi),Ti=function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nr(e)(t,n,u)}}(xi),Pi=function(e){return function(t,n,r){return Nr(e)(t,n,r)}}(xi),ji=function(e){return function(){var t=Kt(ln().m(function t(n,r,u){var a;return ln().w(function(t){for(;;)if(0===t.n)return a=u?Object.assign(u,{direction:"backward"}):{direction:"backward"},t.a(2,zr(e)(n,r,a))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()}(xi),Ni=function(e){return function(){var t=Kt(ln().m(function t(n,r,u){return ln().w(function(t){for(;;)if(0===t.n)return t.a(2,zr(e)(n,r,u))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()}(xi),zi=function(e){return function(t,n,r){var u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Rr(e)(t,n,u)}}(xi),Ri=function(e){return function(t,n,r){return Rr(e)(t,n,r)}}(xi),Mi=function(e){return function(){var t=Kt(ln().m(function t(n,r,u){var a;return ln().w(function(t){for(;;)if(0===t.n)return a=u?Object.assign(u,{direction:"backward"}):{direction:"backward"},t.a(2,Zr(e)(n,r,a))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()}(xi),Zi=function(e){return function(){var t=Kt(ln().m(function t(n,r,u){return ln().w(function(t){for(;;)if(0===t.n)return t.a(2,Zr(e)(n,r,u))},t)}));return function(e,n,r){return t.apply(this,arguments)}}()}(xi),Li=er("ZodType",function(e,t){return Zu.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=function(){for(var n,r=arguments.length,u=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:{})}(t,n))},e.superRefine=function(t){return e.check(function(e){var t=function(e){var t=new vu(sn({check:"custom"},Cr(void 0)));return t._zod.check=e,t}(function(n){return n.addIssue=function(e){if("string"==typeof e)n.issues.push(Ir(e,n.value,t._zod.def));else{var r,u,a,i,o=e;o.fatal&&(o.continue=!1),null!==(r=o.code)&&void 0!==r||(o.code="custom"),null!==(u=o.input)&&void 0!==u||(o.input=n.value),null!==(a=o.inst)&&void 0!==a||(o.inst=t),null!==(i=o.continue)&&void 0!==i||(o.continue=!t._zod.def.abort),n.issues.push(Ir(o))}},e(n.value,n)});return t}(t))},e.overwrite=function(t){return e.check(mi(t))},e.optional=function(){return qo(e)},e.nullable=function(){return Ho(e)},e.nullish=function(){return qo(Ho(e))},e.nonoptional=function(t){return function(e,t){return new Ko(sn({type:"nonoptional",innerType:e},Cr(t)))}(e,t)},e.array=function(){return Ao(e)},e.or=function(t){return Io([e,t])},e.and=function(t){return new Po({type:"intersection",left:e,right:t})},e.transform=function(t){return Qo(e,new Lo({type:"transform",transform:t}))},e.default=function(t){return n=t,new Vo({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():Fr(n)}});var n},e.prefault=function(t){return n=t,new Wo({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():Fr(n)}});var n},e.catch=function(t){return new Jo({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:function(){return n}});var n},e.pipe=function(t){return Qo(e,t)},e.readonly=function(){return new es({type:"readonly",innerType:e})},e.describe=function(t){var n=e.clone();return Xa.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:function(){var t;return null===(t=Xa.get(e))||void 0===t?void 0:t.description},configurable:!0}),e.meta=function(){if(0===arguments.length)return Xa.get(e);var t=e.clone();return Xa.add(t,arguments.length<=0?void 0:arguments[0]),t},e.isOptional=function(){return e.safeParse(void 0).success},e.isNullable=function(){return e.safeParse(null).success},e}),$i=er("_ZodString",function(e,t){var n,r,u;Lu.init(e,t),Li.init(e,t);var a=e._zod.bag;e.format=null!==(n=a.format)&&void 0!==n?n:null,e.minLength=null!==(r=a.minimum)&&void 0!==r?r:null,e.maxLength=null!==(u=a.maximum)&&void 0!==u?u:null,e.regex=function(){return e.check(li.apply(bi,arguments))},e.includes=function(){return e.check(pi.apply(bi,arguments))},e.startsWith=function(){return e.check(hi.apply(bi,arguments))},e.endsWith=function(){return e.check(vi.apply(bi,arguments))},e.min=function(){return e.check(si.apply(bi,arguments))},e.max=function(){return e.check(oi.apply(bi,arguments))},e.length=function(){return e.check(ci.apply(bi,arguments))},e.nonempty=function(){for(var t=arguments.length,n=new Array(t),r=0;r0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");var r=hr(e._zod.def,{get shape(){var n=sn(sn({},e._zod.def.shape),t);return pr(this,"shape",n),n},checks:[]});return br(e,r)}(e,t)},e.safeExtend=function(t){return function(e,t){if(!gr(t))throw new Error("Invalid input to safeExtend: expected a plain object");var n=sn(sn({},e._zod.def),{},{get shape(){var n=sn(sn({},e._zod.def.shape),t);return pr(this,"shape",n),n},checks:e._zod.def.checks});return br(e,n)}(e,t)},e.merge=function(t){return function(e,t){var n=hr(e._zod.def,{get shape(){var n=sn(sn({},e._zod.def.shape),t._zod.def.shape);return pr(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return br(e,n)}(e,t)},e.pick=function(t){return function(e,t){var n=e._zod.def;return br(e,hr(e._zod.def,{get shape(){var e={};for(var r in t){if(!(r in n.shape))throw new Error('Unrecognized key: "'.concat(r,'"'));t[r]&&(e[r]=n.shape[r])}return pr(this,"shape",e),e},checks:[]}))}(e,t)},e.omit=function(t){return function(e,t){var n=e._zod.def,r=hr(e._zod.def,{get shape(){var r=sn({},e._zod.def.shape);for(var u in t){if(!(u in n.shape))throw new Error('Unrecognized key: "'.concat(u,'"'));t[u]&&delete r[u]}return pr(this,"shape",r),r},checks:[]});return br(e,r)}(e,t)},e.partial=function(){return function(e,t,n){var r=hr(t._zod.def,{get shape(){var r=t._zod.def.shape,u=sn({},r);if(n)for(var a in n){if(!(a in r))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"optional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"optional",innerType:r[i]});return pr(this,"shape",u),u},checks:[]});return br(t,r)}($o,e,arguments.length<=0?void 0:arguments[0])},e.required=function(){return function(e,t,n){var r=hr(t._zod.def,{get shape(){var r=t._zod.def.shape,u=sn({},r);if(n)for(var a in n){if(!(a in u))throw new Error('Unrecognized key: "'.concat(a,'"'));n[a]&&(u[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(var i in r)u[i]=new e({type:"nonoptional",innerType:r[i]});return pr(this,"shape",u),u},checks:[]});return br(t,r)}(Ko,e,arguments.length<=0?void 0:arguments[0])}});function xo(e,t){var n=sn({type:"object",get shape(){return pr(this,"shape",e?dr(e):{}),this.shape}},Cr(t));return new wo(n)}function So(e,t){return new wo(sn({type:"object",get shape(){return pr(this,"shape",dr(e)),this.shape},catchall:Co()},Cr(t)))}function Bo(e,t){return new wo(sn({type:"object",get shape(){return pr(this,"shape",dr(e)),this.shape},catchall:_o()},Cr(t)))}var Oo=er("ZodUnion",function(e,t){wa.init(e,t),Li.init(e,t),e.options=t.options});function Io(e,t){return new Oo(sn({type:"union",options:e},Cr(t)))}var To=er("ZodDiscriminatedUnion",function(e,t){Oo.init(e,t),xa.init(e,t)}),Po=er("ZodIntersection",function(e,t){Sa.init(e,t),Li.init(e,t)}),jo=er("ZodRecord",function(e,t){Ia.init(e,t),Li.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function No(e,t,n){return new jo(sn({type:"record",keyType:e,valueType:t},Cr(n)))}var zo=er("ZodEnum",function(e,t){Ta.init(e,t),Li.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);var n=new Set(Object.keys(t.entries));e.extract=function(e,r){var u,a={},i=en(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));a[o]=t.entries[o]}}catch(e){i.e(e)}finally{i.f()}return new zo(sn(sn(sn({},t),{},{checks:[]},Cr(r)),{},{entries:a}))},e.exclude=function(e,r){var u,a=sn({},t.entries),i=en(e);try{for(i.s();!(u=i.n()).done;){var o=u.value;if(!n.has(o))throw new Error("Key ".concat(o," not found in enum"));delete a[o]}}catch(e){i.e(e)}finally{i.f()}return new zo(sn(sn(sn({},t),{},{checks:[]},Cr(r)),{},{entries:a}))}});function Ro(e,t){var n=Array.isArray(e)?Object.fromEntries(e.map(function(e){return[e,e]})):e;return new zo(sn({type:"enum",entries:n},Cr(t)))}var Mo=er("ZodLiteral",function(e,t){Pa.init(e,t),Li.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get:function(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Zo(e,t){return new Mo(sn({type:"literal",values:Array.isArray(e)?e:[e]},Cr(t)))}var Lo=er("ZodTransform",function(e,t){ja.init(e,t),Li.init(e,t),e._zod.parse=function(n,r){if("backward"===r.direction)throw new nr(e.constructor.name);n.addIssue=function(r){if("string"==typeof r)n.issues.push(Ir(r,n.value,t));else{var u,a,i,o=r;o.fatal&&(o.continue=!1),null!==(u=o.code)&&void 0!==u||(o.code="custom"),null!==(a=o.input)&&void 0!==a||(o.input=n.value),null!==(i=o.inst)&&void 0!==i||(o.inst=e),n.issues.push(Ir(o))}};var u=t.transform(n.value,n);return u instanceof Promise?u.then(function(e){return n.value=e,n}):(n.value=u,n)}}),$o=er("ZodOptional",function(e,t){za.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function qo(e){return new $o({type:"optional",innerType:e})}var Uo=er("ZodNullable",function(e,t){Ra.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType}});function Ho(e){return new Uo({type:"nullable",innerType:e})}var Vo=er("ZodDefault",function(e,t){Ma.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeDefault=e.unwrap}),Wo=er("ZodPrefault",function(e,t){La.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),Ko=er("ZodNonOptional",function(e,t){$a.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),Jo=er("ZodCatch",function(e,t){Ua.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType},e.removeCatch=e.unwrap}),Go=er("ZodPipe",function(e,t){Ha.init(e,t),Li.init(e,t),e.in=t.in,e.out=t.out});function Qo(e,t){return new Go({type:"pipe",in:e,out:t})}var Yo,Xo,es=er("ZodReadonly",function(e,t){Wa.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.innerType}}),ts=er("ZodLazy",function(e,t){Ja.init(e,t),Li.init(e,t),e.unwrap=function(){return e._zod.def.getter()}}),ns=er("ZodCustom",function(e,t){Ga.init(e,t),Li.init(e,t)});function rs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{error:"Input not instance of ".concat(e.name)},n=new ns(sn({type:"custom",check:"custom",fn:function(t){return t instanceof e},abort:!0},Cr(t)));return n._zod.bag.Class=e,n}!function(e){e.assertEqual=function(e){},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=function(e){var t,n={},r=en(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n[u]=u}}catch(e){r.e(e)}finally{r.f()}return n},e.getValidEnumValues=function(t){var n,r={},u=en(e.objectKeys(t).filter(function(e){return"number"!=typeof t[t[e]]}));try{for(u.s();!(n=u.n()).done;){var a=n.value;r[a]=t[a]}}catch(e){u.e(e)}finally{u.f()}return e.objectValues(r)},e.objectValues=function(t){return e.objectKeys(t).map(function(e){return t[e]})},e.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=function(e,t){var n,r=en(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(t(u))return u}}catch(e){r.e(e)}finally{r.f()}},e.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},e.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map(function(e){return"string"==typeof e?"'".concat(e,"'"):e}).join(t)},e.jsonStringifyReplacer=function(e,t){return"bigint"==typeof t?t.toString():t}}(Yo||(Yo={})),function(e){e.mergeShapes=function(e,t){return sn(sn({},e),t)}}(Xo||(Xo={}));var us=Yo.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),as=function(e){switch(mn(e)){case"undefined":return us.undefined;case"string":return us.string;case"number":return Number.isNaN(e)?us.nan:us.number;case"boolean":return us.boolean;case"function":return us.function;case"bigint":return us.bigint;case"symbol":return us.symbol;case"object":return Array.isArray(e)?us.array:null===e?us.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?us.promise:"undefined"!=typeof Map&&e instanceof Map?us.map:"undefined"!=typeof Set&&e instanceof Set?us.set:"undefined"!=typeof Date&&e instanceof Date?us.date:us.object;default:return us.unknown}},is=Yo.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),os=function(){function e(t){var n;Gt(this,e),(n=Jt(this,e)).issues=[],n.addIssue=function(e){n.issues=[].concat(hn(n.issues),[e])},n.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n.issues=[].concat(hn(n.issues),hn(e))};var r=(this instanceof e?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,n.name="ZodError",n.issues=t,n}return un(e,yn(Error)),Xt(e,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},n={_errors:[]},r=function(e){var u,a=en(e.issues);try{for(a.s();!(u=a.n()).done;){var i=u.value;if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else for(var o=n,s=0;s0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},n={},r=[],u=en(this.issues);try{for(u.s();!(e=u.n()).done;){var a=e.value;if(a.path.length>0){var i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a))}}catch(e){u.e(e)}finally{u.f()}return{formErrors:r,fieldErrors:n}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(t){if(!(t instanceof e))throw new Error("Not a ZodError: ".concat(t))}}])}();os.create=function(e){return new os(e)};var ss=function(e,t){var n;switch(e.code){case is.invalid_type:n=e.received===us.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case is.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,Yo.jsonStringifyReplacer));break;case is.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(Yo.joinValues(e.keys,", "));break;case is.invalid_union:n="Invalid input";break;case is.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(Yo.joinValues(e.options));break;case is.invalid_enum_value:n="Invalid enum value. Expected ".concat(Yo.joinValues(e.options),", received '").concat(e.received,"'");break;case is.invalid_arguments:n="Invalid function arguments";break;case is.invalid_return_type:n="Invalid function return type";break;case is.invalid_date:n="Invalid date";break;case is.invalid_string:"object"===mn(e.validation)?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?n='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?n='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):Yo.assertNever(e.validation):n="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case is.too_small:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case is.too_big:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case is.custom:n="Invalid input";break;case is.invalid_intersection_types:n="Intersection results could not be merged";break;case is.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case is.not_finite:n="Number must be finite";break;default:n=t.defaultError,Yo.assertNever(e)}return{message:n}},cs=ss;function ls(){return cs}var fs=function(e){var t=e.data,n=e.path,r=e.errorMaps,u=e.issueData,a=[].concat(hn(n),hn(u.path||[])),i=sn(sn({},u),{},{path:a});if(void 0!==u.message)return sn(sn({},u),{},{path:a,message:u.message});var o,s="",c=r.filter(function(e){return!!e}).slice().reverse(),l=en(c);try{for(l.s();!(o=l.n()).done;)s=(0,o.value)(i,{data:t,defaultError:s}).message}catch(e){l.e(e)}finally{l.f()}return sn(sn({},u),{},{path:a,message:s})};function ds(e,t){var n=ls(),r=fs({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ss?void 0:ss].filter(function(e){return!!e})});e.common.issues.push(r)}var ps,hs=function(){function e(){Gt(this,e),this.value="valid"}return Xt(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var n,r=[],u=en(t);try{for(u.s();!(n=u.n()).done;){var a=n.value;if("aborted"===a.status)return vs;"dirty"===a.status&&e.dirty(),r.push(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}},{key:"mergeObjectAsync",value:(t=Kt(ln().m(function t(n,r){var u,a,i,o,s,c,l;return ln().w(function(t){for(;;)switch(t.p=t.n){case 0:u=[],a=en(r),t.p=1,a.s();case 2:if((i=a.n()).done){t.n=6;break}return o=i.value,t.n=3,o.key;case 3:return s=t.v,t.n=4,o.value;case 4:c=t.v,u.push({key:s,value:c});case 5:t.n=2;break;case 6:t.n=8;break;case 7:t.p=7,l=t.v,a.e(l);case 8:return t.p=8,a.f(),t.f(8);case 9:return t.a(2,e.mergeObjectSync(n,u))}},t,null,[[1,7,8,9]])})),function(e,n){return t.apply(this,arguments)})},{key:"mergeObjectSync",value:function(e,t){var n,r={},u=en(t);try{for(u.s();!(n=u.n()).done;){var a=n.value,i=a.key,o=a.value;if("aborted"===i.status)return vs;if("aborted"===o.status)return vs;"dirty"===i.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===i.value||void 0===o.value&&!a.alwaysSet||(r[i.value]=o.value)}}catch(e){u.e(e)}finally{u.f()}return{status:e.value,value:r}}}]);var t}(),vs=Object.freeze({status:"aborted"}),ms=function(e){return{status:"dirty",value:e}},Ds=function(e){return{status:"valid",value:e}},ys=function(e){return"aborted"===e.status},gs=function(e){return"dirty"===e.status},Fs=function(e){return"valid"===e.status},Es=function(e){return"undefined"!=typeof Promise&&e instanceof Promise};!function(e){e.errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},e.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message}}(ps||(ps={}));var _s=Xt(function e(t,n,r,u){Gt(this,e),this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=u},[{key:"path",get:function(){var e,t;return this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,hn(this._path).concat(hn(this._key))):(t=this._cachedPath).push.apply(t,hn(this._path).concat([this._key]))),this._cachedPath}}]),bs=function(e,t){if(Fs(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;var t=new os(e.common.issues);return this._error=t,this._error}}};function Cs(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,u=e.description;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:u}:{errorMap:function(t,u){var a,i,o=e.message;return"invalid_enum_value"===t.code?{message:null!=o?o:u.defaultError}:void 0===u.data?{message:null!==(i=null!=o?o:r)&&void 0!==i?i:u.defaultError}:"invalid_type"!==t.code?{message:u.defaultError}:{message:null!==(a=null!=o?o:n)&&void 0!==a?a:u.defaultError}},description:u}}var ks,As=function(){return Xt(function e(t){var n=this;Gt(this,e),this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:function(e){return n["~validate"](e)}}},[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return as(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:as(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new hs,ctx:{common:e.parent.common,data:e.data,parsedType:as(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(Es(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}},{key:"safeParse",value:function(e,t){var n,r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:as(e)},u=this._parseSync({data:e,path:r.path,parent:r});return bs(r,u)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:as(e)};if(!this["~standard"].async)try{var n=this._parseSync({data:e,path:[],parent:t});return Fs(n)?{value:n.value}:{issues:t.common.issues}}catch(e){var r;null!=e&&null!==(r=e.message)&&void 0!==r&&null!==(r=r.toLowerCase())&&void 0!==r&&r.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(function(e){return Fs(e)?{value:e.value}:{issues:t.common.issues}})}},{key:"parseAsync",value:(e=Kt(ln().m(function e(t,n){var r;return ln().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.safeParseAsync(t,n);case 1:if(!(r=e.v).success){e.n=2;break}return e.a(2,r.data);case 2:throw r.error;case 3:return e.a(2)}},e,this)})),function(t,n){return e.apply(this,arguments)})},{key:"safeParseAsync",value:function(){var e=Kt(ln().m(function e(t,n){var r,u,a;return ln().w(function(e){for(;;)switch(e.n){case 0:return r={common:{issues:[],contextualErrorMap:null==n?void 0:n.errorMap,async:!0},path:(null==n?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:as(t)},u=this._parse({data:t,path:r.path,parent:r}),e.n=1,Es(u)?u:Promise.resolve(u);case 1:return a=e.v,e.a(2,bs(r,a))}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"refine",value:function(e,t){return this._refinement(function(n,r){var u=e(n),a=function(){return r.addIssue(sn({code:is.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(n)))};return"undefined"!=typeof Promise&&u instanceof Promise?u.then(function(e){return!!e||(a(),!1)}):!!u||(a(),!1)})}},{key:"refinement",value:function(e,t){return this._refinement(function(n,r){return!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)})}},{key:"_refinement",value:function(e){return new wc({schema:this,typeName:Tc.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return xc.create(this,this._def)}},{key:"nullable",value:function(){return Sc.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return sc.create(this)}},{key:"promise",value:function(){return Ac.create(this,this._def)}},{key:"or",value:function(e){return fc.create([this,e],this._def)}},{key:"and",value:function(e){return vc.create(this,e,this._def)}},{key:"transform",value:function(e){return new wc(sn(sn({},Cs(this._def)),{},{schema:this,typeName:Tc.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new Bc(sn(sn({},Cs(this._def)),{},{innerType:this,defaultValue:t,typeName:Tc.ZodDefault}))}},{key:"brand",value:function(){return new Pc(sn({typeName:Tc.ZodBranded,type:this},Cs(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new Oc(sn(sn({},Cs(this._def)),{},{innerType:this,catchValue:t,typeName:Tc.ZodCatch}))}},{key:"describe",value:function(e){return new this.constructor(sn(sn({},this._def),{},{description:e}))}},{key:"pipe",value:function(e){return jc.create(this,e)}},{key:"readonly",value:function(){return Nc.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]);var e}(),ws=/^c[^\s-]{8,}$/i,xs=/^[0-9a-z]+$/,Ss=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Bs=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Os=/^[a-z0-9_-]{21}$/i,Is=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ts=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ps=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,js=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ns=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,zs=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Rs=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ms=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Zs=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ls="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",$s=new RegExp("^".concat(Ls,"$"));function qs(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var n=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(n)}function Us(e){return new RegExp("^".concat(qs(e),"$"))}function Hs(e){var t="".concat(Ls,"T").concat(qs(e)),n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(n.join("|"),")"),new RegExp("^".concat(t,"$"))}function Vs(e,t){return!("v4"!==t&&t||!js.test(e))||!("v6"!==t&&t||!zs.test(e))}function Ws(e,t){if(!Is.test(e))return!1;try{var n=pn(e.split("."),1)[0];if(!n)return!1;var r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),u=JSON.parse(atob(r));return!("object"!==mn(u)||null===u||"typ"in u&&"JWT"!==(null==u?void 0:u.typ)||!u.alg||t&&u.alg!==t)}catch(e){return!1}}function Ks(e,t){return!("v4"!==t&&t||!Ns.test(e))||!("v6"!==t&&t||!Rs.test(e))}var Js=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==us.string){var t=this._getOrReturnCtx(e);return ds(t,{code:is.invalid_type,expected:us.string,received:t.parsedType}),vs}var n,r=new hs,u=void 0,a=en(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;if("min"===i.kind)e.data.lengthi.value&&(ds(u=this._getOrReturnCtx(e,u),{code:is.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if("length"===i.kind){var o=e.data.length>i.value,s=e.data.lengtht)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxLength",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valuer?n:r;return Number.parseInt(e.toFixed(u).replace(".",""))%Number.parseInt(t.toFixed(u).replace(".",""))/Math.pow(10,u)}Js.create=function(e){var t;return new Js(sn({checks:[],typeName:Tc.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},Cs(e)))};var Qs=function(){function e(){var t;return Gt(this,e),(t=Jt(this,e,arguments)).min=t.gte,t.max=t.lte,t.step=t.multipleOf,t}return un(e,As),Xt(e,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==us.number){var t=this._getOrReturnCtx(e);return ds(t,{code:is.invalid_type,expected:us.number,received:t.parsedType}),vs}var n,r=void 0,u=new hs,a=en(this._def.checks);try{for(a.s();!(n=a.n()).done;){var i=n.value;"int"===i.kind?Yo.isInteger(e.data)||(ds(r=this._getOrReturnCtx(e,r),{code:is.invalid_type,expected:"integer",received:"float",message:i.message}),u.dirty()):"min"===i.kind?(i.inclusive?e.datai.value:e.data>=i.value)&&(ds(r=this._getOrReturnCtx(e,r),{code:is.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),u.dirty()):"multipleOf"===i.kind?0!==Gs(e.data,i.value)&&(ds(r=this._getOrReturnCtx(e,r),{code:is.not_multiple_of,multipleOf:i.value,message:i.message}),u.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(ds(r=this._getOrReturnCtx(e,r),{code:is.not_finite,message:i.message}),u.dirty()):Yo.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:u.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,ps.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,ps.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,ps.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,ps.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(sn(sn({},this._def),{},{checks:[].concat(hn(this._def.checks),[{kind:t,value:n,inclusive:r,message:ps.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(sn(sn({},this._def),{},{checks:[].concat(hn(this._def.checks),[t])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:ps.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ps.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ps.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ps.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ps.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ps.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:ps.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ps.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ps.toString(e)})}},{key:"minValue",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valuen)&&(n=u.value):"max"===u.kind&&(null===t||u.valuea.value:e.data>=a.value)&&(ds(n=this._getOrReturnCtx(e,n),{code:is.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(ds(n=this._getOrReturnCtx(e,n),{code:is.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):Yo.assertNever(a)}}catch(e){u.e(e)}finally{u.f()}return{status:r.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return ds(t,{code:is.invalid_type,expected:us.bigint,received:t.parsedType}),vs}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,ps.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,ps.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,ps.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,ps.toString(t))}},{key:"setLimit",value:function(t,n,r,u){return new e(sn(sn({},this._def),{},{checks:[].concat(hn(this._def.checks),[{kind:t,value:n,inclusive:r,message:ps.toString(u)}])}))}},{key:"_addCheck",value:function(t){return new e(sn(sn({},this._def),{},{checks:[].concat(hn(this._def.checks),[t])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ps.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ps.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ps.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ps.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ps.toString(t)})}},{key:"minValue",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"maxValue",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valuei.value&&(ds(u=this._getOrReturnCtx(e,u),{code:is.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Yo.assertNever(i)}}catch(e){a.e(e)}finally{a.f()}return{status:r.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(t){return new e(sn(sn({},this._def),{},{checks:[].concat(hn(this._def.checks),[t])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ps.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ps.toString(t)})}},{key:"minDate",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"min"===r.kind&&(null===t||r.value>t)&&(t=r.value)}}catch(e){n.e(e)}finally{n.f()}return null!=t?new Date(t):null}},{key:"maxDate",get:function(){var e,t=null,n=en(this._def.checks);try{for(n.s();!(e=n.n()).done;){var r=e.value;"max"===r.kind&&(null===t||r.valueu.exactLength.value,i=n.data.lengthu.maxLength.value&&(ds(n,{code:is.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),r.dirty()),n.common.async)return Promise.all(hn(n.data).map(function(e,t){return u.type._parseAsync(new _s(n,e,n.path,t))})).then(function(e){return hs.mergeArray(r,e)});var o=hn(n.data).map(function(e,t){return u.type._parseSync(new _s(n,e,n.path,t))});return hs.mergeArray(r,o)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(t,n){return new e(sn(sn({},this._def),{},{minLength:{value:t,message:ps.toString(n)}}))}},{key:"max",value:function(t,n){return new e(sn(sn({},this._def),{},{maxLength:{value:t,message:ps.toString(n)}}))}},{key:"length",value:function(t,n){return new e(sn(sn({},this._def),{},{exactLength:{value:t,message:ps.toString(n)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();function cc(e){if(e instanceof lc){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=xc.create(cc(r))}return new lc(sn(sn({},e._def),{},{shape:function(){return t}}))}return e instanceof sc?new sc(sn(sn({},e._def),{},{type:cc(e.element)})):e instanceof xc?xc.create(cc(e.unwrap())):e instanceof Sc?Sc.create(cc(e.unwrap())):e instanceof mc?mc.create(e.items.map(function(e){return cc(e)})):e}sc.create=function(e,t){return new sc(sn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tc.ZodArray},Cs(t)))};var lc=function(){function e(){var t;return Gt(this,e),(t=Jt(this,e,arguments))._cached=null,t.nonstrict=t.passthrough,t.augment=t.extend,t}return un(e,As),Xt(e,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=Yo.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==us.object){var t=this._getOrReturnCtx(e);return ds(t,{code:is.invalid_type,expected:us.object,received:t.parsedType}),vs}var n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._getCached(),i=a.shape,o=a.keys,s=[];if(!(this._def.catchall instanceof ic&&"strip"===this._def.unknownKeys))for(var c in u.data)o.includes(c)||s.push(c);var l,f=[],d=en(o);try{for(d.s();!(l=d.n()).done;){var p=l.value,h=i[p],v=u.data[p];f.push({key:{status:"valid",value:p},value:h._parse(new _s(u,v,u.path,p)),alwaysSet:p in u.data})}}catch(e){d.e(e)}finally{d.f()}if(this._def.catchall instanceof ic){var m=this._def.unknownKeys;if("passthrough"===m){var D,y=en(s);try{for(y.s();!(D=y.n()).done;){var g=D.value;f.push({key:{status:"valid",value:g},value:{status:"valid",value:u.data[g]}})}}catch(e){y.e(e)}finally{y.f()}}else if("strict"===m)s.length>0&&(ds(u,{code:is.unrecognized_keys,keys:s}),r.dirty());else if("strip"!==m)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var F,E=this._def.catchall,_=en(s);try{for(_.s();!(F=_.n()).done;){var b=F.value,C=u.data[b];f.push({key:{status:"valid",value:b},value:E._parse(new _s(u,C,u.path,b)),alwaysSet:b in u.data})}}catch(e){_.e(e)}finally{_.f()}}return u.common.async?Promise.resolve().then(Kt(ln().m(function e(){var t,n,r,u,a,i,o;return ln().w(function(e){for(;;)switch(e.p=e.n){case 0:t=[],n=en(f),e.p=1,n.s();case 2:if((r=n.n()).done){e.n=6;break}return u=r.value,e.n=3,u.key;case 3:return a=e.v,e.n=4,u.value;case 4:i=e.v,t.push({key:a,value:i,alwaysSet:u.alwaysSet});case 5:e.n=2;break;case 6:e.n=8;break;case 7:e.p=7,o=e.v,n.e(o);case 8:return e.p=8,n.f(),e.f(8);case 9:return e.a(2,t)}},e,null,[[1,7,8,9]])}))).then(function(e){return hs.mergeObjectSync(r,e)}):hs.mergeObjectSync(r,f)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(t){var n=this;return ps.errToObj,new e(sn(sn({},this._def),{},{unknownKeys:"strict"},void 0!==t?{errorMap:function(e,r){var u,a,i,o,s=null!==(u=null===(a=(i=n._def).errorMap)||void 0===a?void 0:a.call(i,e,r).message)&&void 0!==u?u:r.defaultError;return"unrecognized_keys"===e.code?{message:null!==(o=ps.errToObj(t).message)&&void 0!==o?o:s}:{message:s}}}:{}))}},{key:"strip",value:function(){return new e(sn(sn({},this._def),{},{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new e(sn(sn({},this._def),{},{unknownKeys:"passthrough"}))}},{key:"extend",value:function(t){var n=this;return new e(sn(sn({},this._def),{},{shape:function(){return sn(sn({},n._def.shape()),t)}}))}},{key:"merge",value:function(t){var n=this;return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:function(){return sn(sn({},n._def.shape()),t._def.shape())},typeName:Tc.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(tn({},e,t))}},{key:"catchall",value:function(t){return new e(sn(sn({},this._def),{},{catchall:t}))}},{key:"pick",value:function(t){var n,r={},u=en(Yo.objectKeys(t));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]&&this.shape[a]&&(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(sn(sn({},this._def),{},{shape:function(){return r}}))}},{key:"omit",value:function(t){var n,r={},u=en(Yo.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;t[a]||(r[a]=this.shape[a])}}catch(e){u.e(e)}finally{u.f()}return new e(sn(sn({},this._def),{},{shape:function(){return r}}))}},{key:"deepPartial",value:function(){return cc(this)}},{key:"partial",value:function(t){var n,r={},u=en(Yo.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value,i=this.shape[a];t&&!t[a]?r[a]=i:r[a]=i.optional()}}catch(e){u.e(e)}finally{u.f()}return new e(sn(sn({},this._def),{},{shape:function(){return r}}))}},{key:"required",value:function(t){var n,r={},u=en(Yo.objectKeys(this.shape));try{for(u.s();!(n=u.n()).done;){var a=n.value;if(t&&!t[a])r[a]=this.shape[a];else{for(var i=this.shape[a];i instanceof xc;)i=i._def.innerType;r[a]=i}}}catch(e){u.e(e)}finally{u.f()}return new e(sn(sn({},this._def),{},{shape:function(){return r}}))}},{key:"keyof",value:function(){return bc(Yo.objectKeys(this.shape))}}])}();lc.create=function(e,t){return new lc(sn({shape:function(){return e},unknownKeys:"strip",catchall:ic.create(),typeName:Tc.ZodObject},Cs(t)))},lc.strictCreate=function(e,t){return new lc(sn({shape:function(){return e},unknownKeys:"strict",catchall:ic.create(),typeName:Tc.ZodObject},Cs(t)))},lc.lazycreate=function(e,t){return new lc(sn({shape:e,unknownKeys:"strip",catchall:ic.create(),typeName:Tc.ZodObject},Cs(t)))};var fc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=this._def.options;if(t.common.async)return Promise.all(n.map(function(){var e=Kt(ln().m(function e(n){var r,u,a;return ln().w(function(e){for(;;)switch(e.n){case 0:return r=sn(sn({},t),{},{common:sn(sn({},t.common),{},{issues:[]}),parent:null}),e.n=1,n._parseAsync({data:t.data,path:t.path,parent:r});case 1:return u=e.v,a=r,e.a(2,{result:u,ctx:a})}},e)}));return function(t){return e.apply(this,arguments)}}())).then(function(e){var n,r=en(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if("valid"===u.result.status)return u.result}}catch(e){r.e(e)}finally{r.f()}var a,i=en(e);try{for(i.s();!(a=i.n()).done;){var o,s=a.value;if("dirty"===s.result.status)return(o=t.common.issues).push.apply(o,hn(s.ctx.common.issues)),s.result}}catch(e){i.e(e)}finally{i.f()}var c=e.map(function(e){return new os(e.ctx.common.issues)});return ds(t,{code:is.invalid_union,unionErrors:c}),vs});var r,u,a=void 0,i=[],o=en(n);try{for(o.s();!(r=o.n()).done;){var s=r.value,c=sn(sn({},t),{},{common:sn(sn({},t.common),{},{issues:[]}),parent:null}),l=s._parseSync({data:t.data,path:t.path,parent:c});if("valid"===l.status)return l;"dirty"!==l.status||a||(a={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}}catch(e){o.e(e)}finally{o.f()}if(a)return(u=t.common.issues).push.apply(u,hn(a.ctx.common.issues)),a.result;var f=i.map(function(e){return new os(e)});return ds(t,{code:is.invalid_union,unionErrors:f}),vs}},{key:"options",get:function(){return this._def.options}}])}();fc.create=function(e,t){return new fc(sn({options:e,typeName:Tc.ZodUnion},Cs(t)))};var dc=function(e){return e instanceof Ec?dc(e.schema):e instanceof wc?dc(e.innerType()):e instanceof _c?[e.value]:e instanceof Cc?e.options:e instanceof kc?Yo.objectValues(e.enum):e instanceof Bc?dc(e._def.innerType):e instanceof nc?[void 0]:e instanceof rc?[null]:e instanceof xc?[void 0].concat(hn(dc(e.unwrap()))):e instanceof Sc?[null].concat(hn(dc(e.unwrap()))):e instanceof Pc||e instanceof Nc?dc(e.unwrap()):e instanceof Oc?dc(e._def.innerType):[]},pc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==us.object)return ds(t,{code:is.invalid_type,expected:us.object,received:t.parsedType}),vs;var n=this.discriminator,r=t.data[n],u=this.optionsMap.get(r);return u?t.common.async?u._parseAsync({data:t.data,path:t.path,parent:t}):u._parseSync({data:t.data,path:t.path,parent:t}):(ds(t,{code:is.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),vs)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(t,n,r){var u,a=new Map,i=en(n);try{for(i.s();!(u=i.n()).done;){var o=u.value,s=dc(o.shape[t]);if(!s.length)throw new Error("A discriminator value for key `".concat(t,"` could not be extracted from all schema options"));var c,l=en(s);try{for(l.s();!(c=l.n()).done;){var f=c.value;if(a.has(f))throw new Error("Discriminator property ".concat(String(t)," has duplicate value ").concat(String(f)));a.set(f,o)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}return new e(sn({typeName:Tc.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a},Cs(r)))}}])}();function hc(e,t){var n=as(e),r=as(t);if(e===t)return{valid:!0,data:e};if(n===us.object&&r===us.object){var u,a=Yo.objectKeys(t),i=Yo.objectKeys(e).filter(function(e){return-1!==a.indexOf(e)}),o=sn(sn({},e),t),s=en(i);try{for(s.s();!(u=s.n()).done;){var c=u.value,l=hc(e[c],t[c]);if(!l.valid)return{valid:!1};o[c]=l.data}}catch(e){s.e(e)}finally{s.f()}return{valid:!0,data:o}}if(n===us.array&&r===us.array){if(e.length!==t.length)return{valid:!1};for(var f=[],d=0;dthis._def.items.length&&(ds(u,{code:is.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());var a=hn(u.data).map(function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new _s(u,e,u.path,n)):null}).filter(function(e){return!!e});return u.common.async?Promise.all(a).then(function(e){return hs.mergeArray(r,e)}):hs.mergeArray(r,a)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(t){return new e(sn(sn({},this._def),{},{rest:t}))}}])}();mc.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mc(sn({items:e,typeName:Tc.ZodTuple,rest:null},Cs(t)))};var Dc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==us.object)return ds(r,{code:is.invalid_type,expected:us.object,received:r.parsedType}),vs;var u=[],a=this._def.keyType,i=this._def.valueType;for(var o in r.data)u.push({key:a._parse(new _s(r,o,r.path,o)),value:i._parse(new _s(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?hs.mergeObjectAsync(n,u):hs.mergeObjectSync(n,u)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(t,n,r){return new e(n instanceof As?sn({keyType:t,valueType:n,typeName:Tc.ZodRecord},Cs(r)):sn({keyType:Js.create(),valueType:t,typeName:Tc.ZodRecord},Cs(n)))}}])}(),yc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==us.map)return ds(r,{code:is.invalid_type,expected:us.map,received:r.parsedType}),vs;var u=this._def.keyType,a=this._def.valueType,i=hn(r.data.entries()).map(function(e,t){var n=pn(e,2),i=n[0],o=n[1];return{key:u._parse(new _s(r,i,r.path,[t,"key"])),value:a._parse(new _s(r,o,r.path,[t,"value"]))}});if(r.common.async){var o=new Map;return Promise.resolve().then(Kt(ln().m(function e(){var t,r,u,a,s,c;return ln().w(function(e){for(;;)switch(e.p=e.n){case 0:t=en(i),e.p=1,t.s();case 2:if((r=t.n()).done){e.n=7;break}return u=r.value,e.n=3,u.key;case 3:return a=e.v,e.n=4,u.value;case 4:if(s=e.v,"aborted"!==a.status&&"aborted"!==s.status){e.n=5;break}return e.a(2,vs);case 5:"dirty"!==a.status&&"dirty"!==s.status||n.dirty(),o.set(a.value,s.value);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,c=e.v,t.e(c);case 9:return e.p=9,t.f(),e.f(9);case 10:return e.a(2,{status:n.value,value:o})}},e,null,[[1,8,9,10]])})))}var s,c=new Map,l=en(i);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f.key,p=f.value;if("aborted"===d.status||"aborted"===p.status)return vs;"dirty"!==d.status&&"dirty"!==p.status||n.dirty(),c.set(d.value,p.value)}}catch(e){l.e(e)}finally{l.f()}return{status:n.value,value:c}}}])}();yc.create=function(e,t,n){return new yc(sn({valueType:t,keyType:e,typeName:Tc.ZodMap},Cs(n)))};var gc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==us.set)return ds(r,{code:is.invalid_type,expected:us.set,received:r.parsedType}),vs;var u=this._def;null!==u.minSize&&r.data.sizeu.maxSize.value&&(ds(r,{code:is.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),n.dirty());var a=this._def.valueType;function i(e){var t,r=new Set,u=en(e);try{for(u.s();!(t=u.n()).done;){var a=t.value;if("aborted"===a.status)return vs;"dirty"===a.status&&n.dirty(),r.add(a.value)}}catch(e){u.e(e)}finally{u.f()}return{status:n.value,value:r}}var o=hn(r.data.values()).map(function(e,t){return a._parse(new _s(r,e,r.path,t))});return r.common.async?Promise.all(o).then(function(e){return i(e)}):i(o)}},{key:"min",value:function(t,n){return new e(sn(sn({},this._def),{},{minSize:{value:t,message:ps.toString(n)}}))}},{key:"max",value:function(t,n){return new e(sn(sn({},this._def),{},{maxSize:{value:t,message:ps.toString(n)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}])}();gc.create=function(e,t){return new gc(sn({valueType:e,minSize:null,maxSize:null,typeName:Tc.ZodSet},Cs(t)))};var Fc=function(){function e(){var t;return Gt(this,e),(t=Jt(this,e,arguments)).validate=t.implement,t}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==us.function)return ds(t,{code:is.invalid_type,expected:us.function,received:t.parsedType}),vs;function n(e,n){return fs({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ls(),ss].filter(function(e){return!!e}),issueData:{code:is.invalid_arguments,argumentsError:n}})}function r(e,n){return fs({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ls(),ss].filter(function(e){return!!e}),issueData:{code:is.invalid_return_type,returnTypeError:n}})}var u={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Ac){var i=this;return Ds(Kt(ln().m(function e(){var t,o,s,c,l,f,d,p=arguments;return ln().w(function(e){for(;;)switch(e.n){case 0:for(t=p.length,o=new Array(t),s=0;s1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(t,sn(sn({},this._def),n))}},{key:"exclude",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return e.create(this.options.filter(function(e){return!t.includes(e)}),sn(sn({},this._def),n))}}])}();Cc.create=bc;var kc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=Yo.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==us.string&&n.parsedType!==us.number){var r=Yo.objectValues(t);return ds(n,{expected:Yo.joinValues(r),received:n.parsedType,code:is.invalid_type}),vs}if(this._cache||(this._cache=new Set(Yo.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var u=Yo.objectValues(t);return ds(n,{received:n.data,code:is.invalid_enum_value,options:u}),vs}return Ds(e.data)}},{key:"enum",get:function(){return this._def.values}}])}();kc.create=function(e,t){return new kc(sn({values:e,typeName:Tc.ZodNativeEnum},Cs(t)))};var Ac=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx;if(n.parsedType!==us.promise&&!1===n.common.async)return ds(n,{code:is.invalid_type,expected:us.promise,received:n.parsedType}),vs;var r=n.parsedType===us.promise?n.data:Promise.resolve(n.data);return Ds(r.then(function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})}))}}])}();Ac.create=function(e,t){return new Ac(sn({type:e,typeName:Tc.ZodPromise},Cs(t)))};var wc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===Tc.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx,a=this._def.effect||null,i={addIssue:function(e){ds(u,e),e.fatal?r.abort():r.dirty()},get path(){return u.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===a.type){var o=a.transform(u.data,i);if(u.common.async)return Promise.resolve(o).then(function(){var e=Kt(ln().m(function e(n){var a;return ln().w(function(e){for(;;)switch(e.n){case 0:if("aborted"!==r.value){e.n=1;break}return e.a(2,vs);case 1:return e.n=2,t._def.schema._parseAsync({data:n,path:u.path,parent:u});case 2:if("aborted"!==(a=e.v).status){e.n=3;break}return e.a(2,vs);case 3:if("dirty"!==a.status){e.n=4;break}return e.a(2,ms(a.value));case 4:if("dirty"!==r.value){e.n=5;break}return e.a(2,ms(a.value));case 5:return e.a(2,a)}},e)}));return function(t){return e.apply(this,arguments)}}());if("aborted"===r.value)return vs;var s=this._def.schema._parseSync({data:o,path:u.path,parent:u});return"aborted"===s.status?vs:"dirty"===s.status||"dirty"===r.value?ms(s.value):s}if("refinement"===a.type){var c=function(e){var t=a.refinement(e,i);if(u.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===u.common.async){var l=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===l.status?vs:("dirty"===l.status&&r.dirty(),c(l.value),{status:r.value,value:l.value})}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(function(e){return"aborted"===e.status?vs:("dirty"===e.status&&r.dirty(),c(e.value).then(function(){return{status:r.value,value:e.value}}))})}if("transform"===a.type){if(!1===u.common.async){var f=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!Fs(f))return vs;var d=a.transform(f.value,i);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(function(e){return Fs(e)?Promise.resolve(a.transform(e.value,i)).then(function(e){return{status:r.value,value:e}}):vs})}Yo.assertNever(a)}}])}();wc.create=function(e,t,n){return new wc(sn({schema:e,typeName:Tc.ZodEffects,effect:t},Cs(n)))},wc.createWithPreprocess=function(e,t,n){return new wc(sn({schema:t,effect:{type:"preprocess",transform:e},typeName:Tc.ZodEffects},Cs(n)))};var xc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){return this._getType(e)===us.undefined?Ds(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();xc.create=function(e,t){return new xc(sn({innerType:e,typeName:Tc.ZodOptional},Cs(t)))};var Sc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){return this._getType(e)===us.null?Ds(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();Sc.create=function(e,t){return new Sc(sn({innerType:e,typeName:Tc.ZodNullable},Cs(t)))};var Bc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===us.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}])}();Bc.create=function(e,t){return new Bc(sn({innerType:e,typeName:Tc.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},Cs(t)))};var Oc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx,r=sn(sn({},n),{},{common:sn(sn({},n.common),{},{issues:[]})}),u=this._def.innerType._parse({data:r.data,path:r.path,parent:sn({},r)});return Es(u)?u.then(function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new os(r.common.issues)},input:r.data})}}):{status:"valid",value:"valid"===u.status?u.value:this._def.catchValue({get error(){return new os(r.common.issues)},input:r.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}])}();Oc.create=function(e,t){return new Oc(sn({innerType:e,typeName:Tc.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},Cs(t)))};var Ic=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){if(this._getType(e)!==us.nan){var t=this._getOrReturnCtx(e);return ds(t,{code:is.invalid_type,expected:us.nan,received:t.parsedType}),vs}return{status:"valid",value:e.data}}}])}();Ic.create=function(e){return new Ic(sn({typeName:Tc.ZodNaN},Cs(e)))};var Tc,Pc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}])}(),jc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,u=n.ctx;if(u.common.async){var a=function(){var e=Kt(ln().m(function e(){var n;return ln().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t._def.in._parseAsync({data:u.data,path:u.path,parent:u});case 1:if("aborted"!==(n=e.v).status){e.n=2;break}return e.a(2,vs);case 2:if("dirty"!==n.status){e.n=3;break}return r.dirty(),e.a(2,ms(n.value));case 3:return e.a(2,t._def.out._parseAsync({data:n.value,path:u.path,parent:u}));case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return a()}var i=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return"aborted"===i.status?vs:"dirty"===i.status?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:u.path,parent:u})}}],[{key:"create",value:function(t,n){return new e({in:t,out:n,typeName:Tc.ZodPipeline})}}])}(),Nc=function(){function e(){return Gt(this,e),Jt(this,e,arguments)}return un(e,As),Xt(e,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),n=function(e){return Fs(e)&&(e.value=Object.freeze(e.value)),e};return Es(t)?t.then(function(e){return n(e)}):n(t)}},{key:"unwrap",value:function(){return this._def.innerType}}])}();function zc(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return r.window?"runtime/browser":(null==(e=r.navigator)?void 0:e.userAgent)?"runtime/".concat(r.navigator.userAgent.toLowerCase()):(null==(n=null==(t=r.process)?void 0:t.versions)?void 0:n.node)?"runtime/node.js/".concat(r.process.version.substring(0)):r.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Rc(e){for(var t=function(e){return Object.fromEntries(Object.entries(e).filter(function(e){var t=F(e,2);return t[0],null!=t[1]}))}(null!=e?e:{}),n=new Headers(t),r=n.get("user-agent")||"",u=arguments.length,a=new Array(u>1?u-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.prefix,n=e.size,r=void 0===n?16:n,u=e.alphabet,a=void 0===u?"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz":u,i=e.separator,o=void 0===i?"-":i,s=function(){for(var e=a.length,t=new Array(r),n=0;n1?r:r[0]}}if(n.every(function(e){return"ZodLiteral"===e._def.typeName&&!e.description})){var u=n.reduce(function(e,t){var n=b(t._def.value);switch(n){case"string":case"number":case"boolean":return[].concat(E(e),[n]);case"bigint":return[].concat(E(e),["integer"]);case"object":if(null===t._def.value)return[].concat(E(e),["null"]);default:return e}},[]);if(u.length===n.length){var a=u.filter(function(e,t,n){return n.indexOf(e)===t});return{type:a.length>1?a:a[0],enum:n.reduce(function(e,t){return e.includes(t._def.value)?e:[].concat(E(e),[t._def.value])},[])}}}else if(n.every(function(e){return"ZodEnum"===e._def.typeName}))return{type:"string",enum:n.reduce(function(e,t){return[].concat(E(e),E(t._def.values.filter(function(t){return!e.includes(t)})))},[])};return function(e,t){var n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(function(e,n){return xl(e._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["anyOf","".concat(n)])}))}).filter(function(e){return!!e&&(!t.strictUnions||"object"==b(e)&&Object.keys(e).length>0)});return n.length?{anyOf:n}:void 0}(e,t)}(e,n);case Tc.ZodIntersection:return function(e,t){var n=[xl(e.left._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["allOf","0"])})),xl(e.right._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["allOf","1"])}))].filter(function(e){return!!e}),r=[];return n.forEach(function(e){if("type"in(n=e)&&"string"===n.type||!("allOf"in n)){var t=e;if("additionalProperties"in e&&!1===e.additionalProperties)e.additionalProperties,t=m(e,Lt);r.push(t)}else r.push.apply(r,E(e.allOf));var n}),r.length?{allOf:r}:void 0}(e,n);case Tc.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(function(e,n){return xl(e._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["items","".concat(n)])}))}).reduce(function(e,t){return void 0===t?e:[].concat(E(e),[t])},[]),additionalItems:xl(e.rest._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["additionalItems"])}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(function(e,n){return xl(e._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["items","".concat(n)])}))}).reduce(function(e,t){return void 0===t?e:[].concat(E(e),[t])},[])}}(e,n);case Tc.ZodRecord:return Cl(e,n);case Tc.ZodLiteral:return function(e){var t=b(e.value);return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case Tc.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case Tc.ZodNativeEnum:return function(e){var t=e.values,n=Object.keys(e.values).filter(function(e){return"number"!=typeof t[t[e]]}).map(function(e){return t[e]}),r=Array.from(new Set(n.map(function(e){return b(e)})));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case Tc.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[kl[e.innerType._def.typeName],"null"]};var n=xl(e.innerType._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["anyOf","0"])}));return n&&{anyOf:[n,{type:"null"}]}}(e,n);case Tc.ZodOptional:return function(e,t){var n;if(t.currentPath.toString()===(null==(n=t.propertyPath)?void 0:n.toString()))return xl(e.innerType._def,t);var r=xl(e.innerType._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["anyOf","1"])}));return r?{anyOf:[{not:{}},r]}:{}}(e,n);case Tc.ZodMap:return function(e,t){return"record"===t.mapStrategy?Cl(e,t):{type:"array",maxItems:125,items:{type:"array",items:[xl(e.keyType._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["items","items","0"])}))||{},xl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["items","items","1"])}))||{}],minItems:2,maxItems:2}}}(e,n);case Tc.ZodSet:return function(e,t){var n={type:"array",uniqueItems:!0,items:xl(e.valueType._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["items"])}))};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case Tc.ZodLazy:return function(){return e.getter()._def};case Tc.ZodPromise:return function(e,t){return xl(e.type._def,t)}(e,n);case Tc.ZodNaN:case Tc.ZodNever:return{not:{}};case Tc.ZodEffects:return function(e,t){return"input"===t.effectStrategy?xl(e.schema._def,t):{}}(e,n);case Tc.ZodAny:case Tc.ZodUnknown:return{};case Tc.ZodDefault:return function(e,t){return v(v({},xl(e.innerType._def,t)),{},{default:e.defaultValue()})}(e,n);case Tc.ZodBranded:return rl(e,n);case Tc.ZodReadonly:case Tc.ZodCatch:return function(e,t){return xl(e.innerType._def,t)}(e,n);case Tc.ZodPipeline:return function(e,t){if("input"===t.pipeStrategy)return xl(e.in._def,t);if("output"===t.pipeStrategy)return xl(e.out._def,t);var n=xl(e.in._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["allOf","0"])}));return{allOf:[n,xl(e.out._def,v(v({},t),{},{currentPath:[].concat(E(t.currentPath),["allOf",n?"1":"0"])}))].filter(function(e){return void 0!==e})}}(e,n);case Tc.ZodFunction:case Tc.ZodVoid:case Tc.ZodSymbol:default:return}};function xl(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=t.seen.get(e);if(t.override){var a=null==(n=t.override)?void 0:n.call(t,e,t,u,r);if(a!==tl)return a}if(u&&!r){var i=Sl(u,t);if(void 0!==i)return i}var o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);var s=wl(e,e.typeName,t),c="function"==typeof s?xl(s(),t):s;if(c&&Bl(e,t,c),t.postProcess){var l=t.postProcess(c,e,t);return o.jsonSchema=c,l}return o.jsonSchema=c,c}var Sl=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:el(t.currentPath,e.path)};case"none":case"seen":return e.path.length0){var v="draft-2020-12"===r.target?"$defs":"definitions";c.__shared=tn({},v,u)}return{schemas:c}}var m=new Ei(t);return m.process(e),m.emit(e,t)}(e,{target:"draft-7",io:"output",reused:"inline"}),{validate:(t=r(D().m(function t(n){var r;return D().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Ii(e,n);case 1:return r=t.v,t.a(2,r.success?{success:!0,value:r.data}:{success:!1,error:r.error})}},t)})),function(e){return t.apply(this,arguments)})});var t}(e):function(e){return Pl(Ol(e,{$refStrategy:"none"}),{validate:(t=r(D().m(function t(n){var r;return D().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.safeParseAsync(n);case 1:return r=t.v,t.a(2,r.success?{success:!0,value:r.data}:{success:!1,error:r.error})}},t)})),function(e){return t.apply(this,arguments)})});var t}(e)}var Tl=Symbol.for("vercel.ai.schema");function Pl(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).validate;return c(c(c(c(c({},Tl,!0),"_type",void 0),Uc,!0),"jsonSchema",e),"validate",t)}var jl,Nl=Object.defineProperty,zl="AI_NoObjectGeneratedError",Rl="vercel.ai.error.".concat(zl),Ml=Symbol.for(Rl),Zl=function(e){function t(e){var n,r=e.message,i=void 0===r?"No object generated.":r,o=e.cause,s=e.text,c=e.response,l=e.usage,f=e.finishReason;return a(this,t),(n=u(this,t,[{name:zl,message:i,cause:o}]))[jl]=!0,n.text=s,n.response=c,n.usage=l,n.finishReason=f,n}return d(t,e),o(t,null,[{key:"isInstance",value:function(e){return Pn.hasMarker(e,Rl)}}])}(Pn);jl=Ml;var Ll,$l,ql="5.0.47",Ul=Io([Ui(),rs(Uint8Array),rs(ArrayBuffer),(Ll=function(e){var t,n;return null!=(n=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&n},$l={message:"Must be a Buffer"},function(e,t,n){var r,u=Cr(n);return null!==(r=u.abort)&&void 0!==r||(u.abort=!0),new e(sn({type:"custom",check:"custom",fn:t},u))}(ns,null!=Ll?Ll:function(){return!0},$l))]),Hl=new ts({type:"lazy",getter:function(){return Io([Fo(),Ui(),ho(),yo(),No(Ui(),Hl),Ao(Hl)])}}),Vl=No(Ui(),No(Ui(),Hl)),Wl=xo({type:Zo("text"),text:Ui(),providerOptions:Vl.optional()}),Kl=xo({type:Zo("image"),image:Io([Ul,rs(URL)]),mediaType:Ui().optional(),providerOptions:Vl.optional()}),Jl=xo({type:Zo("file"),data:Io([Ul,rs(URL)]),filename:Ui().optional(),mediaType:Ui(),providerOptions:Vl.optional()}),Gl=xo({type:Zo("reasoning"),text:Ui(),providerOptions:Vl.optional()}),Ql=xo({type:Zo("tool-call"),toolCallId:Ui(),toolName:Ui(),input:_o(),providerOptions:Vl.optional(),providerExecuted:yo().optional()}),Yl=new To(sn({type:"union",options:[xo({type:Zo("text"),value:Ui()}),xo({type:Zo("json"),value:Hl}),xo({type:Zo("error-text"),value:Ui()}),xo({type:Zo("error-json"),value:Hl}),xo({type:Zo("content"),value:Ao(Io([xo({type:Zo("text"),text:Ui()}),xo({type:Zo("media"),data:Ui(),mediaType:Ui()})]))})],discriminator:"type"},Cr(undefined))),Xl=xo({type:Zo("tool-result"),toolCallId:Ui(),toolName:Ui(),output:Yl,providerOptions:Vl.optional()}),ef=xo({role:Zo("system"),content:Ui(),providerOptions:Vl.optional()}),tf=xo({role:Zo("user"),content:Io([Ui(),Ao(Io([Wl,Kl,Jl]))]),providerOptions:Vl.optional()}),nf=xo({role:Zo("assistant"),content:Io([Ui(),Ao(Io([Wl,Jl,Gl,Ql,Xl]))]),providerOptions:Vl.optional()});Io([ef,tf,nf,xo({role:Zo("tool"),content:Ao(Xl),providerOptions:Vl.optional()})]),Mc({prefix:"aitxt",size:24}),TransformStream;var rf=Io([So({type:Zo("text-start"),id:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("text-delta"),id:Ui(),delta:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("text-end"),id:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("error"),errorText:Ui()}),So({type:Zo("tool-input-start"),toolCallId:Ui(),toolName:Ui(),providerExecuted:yo().optional(),dynamic:yo().optional()}),So({type:Zo("tool-input-delta"),toolCallId:Ui(),inputTextDelta:Ui()}),So({type:Zo("tool-input-available"),toolCallId:Ui(),toolName:Ui(),input:_o(),providerExecuted:yo().optional(),providerMetadata:Vl.optional(),dynamic:yo().optional()}),So({type:Zo("tool-input-error"),toolCallId:Ui(),toolName:Ui(),input:_o(),providerExecuted:yo().optional(),providerMetadata:Vl.optional(),dynamic:yo().optional(),errorText:Ui()}),So({type:Zo("tool-output-available"),toolCallId:Ui(),output:_o(),providerExecuted:yo().optional(),dynamic:yo().optional(),preliminary:yo().optional()}),So({type:Zo("tool-output-error"),toolCallId:Ui(),errorText:Ui(),providerExecuted:yo().optional(),dynamic:yo().optional()}),So({type:Zo("reasoning"),text:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("reasoning-start"),id:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("reasoning-delta"),id:Ui(),delta:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("reasoning-end"),id:Ui(),providerMetadata:Vl.optional()}),So({type:Zo("reasoning-part-finish")}),So({type:Zo("source-url"),sourceId:Ui(),url:Ui(),title:Ui().optional(),providerMetadata:Vl.optional()}),So({type:Zo("source-document"),sourceId:Ui(),mediaType:Ui(),title:Ui(),filename:Ui().optional(),providerMetadata:Vl.optional()}),So({type:Zo("file"),url:Ui(),mediaType:Ui(),providerMetadata:Vl.optional()}),So({type:Ui().startsWith("data-"),id:Ui().optional(),data:_o(),transient:yo().optional()}),So({type:Zo("start-step")}),So({type:Zo("finish-step")}),So({type:Zo("start"),messageId:Ui().optional(),messageMetadata:_o().optional()}),So({type:Zo("finish"),messageMetadata:_o().optional()}),So({type:Zo("abort")}),So({type:Zo("message-metadata"),messageMetadata:_o()})]);function uf(e,t){if(void 0!==e||void 0!==t){if(void 0===e)return t;if(void 0===t)return e;var n=v({},e);for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var u=t[r];if(void 0===u)continue;var a=r in e?e[r]:void 0,i=!(null===u||"object"!=b(u)||Array.isArray(u)||u instanceof Date||u instanceof RegExp),o=!(null==a||"object"!=b(a)||Array.isArray(a)||a instanceof Date||a instanceof RegExp);n[r]=i&&o?uf(a,u):u}return n}}function af(e){var t=["ROOT"],n=-1,r=null;function u(e,u,a){switch(e){case'"':n=u,t.pop(),t.push(a),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=u,r=u,t.pop(),t.push(a),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=u,t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"{":n=u,t.pop(),t.push(a),t.push("INSIDE_OBJECT_START");break;case"[":n=u,t.pop(),t.push(a),t.push("INSIDE_ARRAY_START")}}function a(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(var o=0;o=0;f--)switch(t[f]){case"INSIDE_STRING":l+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":l+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":l+="]";break;case"INSIDE_LITERAL":var d=e.substring(r,e.length);"true".startsWith(d)?l+="true".slice(d.length):"false".startsWith(d)?l+="false".slice(d.length):"null".startsWith(d)&&(l+="null".slice(d.length))}return l}function of(e){return sf.apply(this,arguments)}function sf(){return sf=r(D().m(function e(t){var n,r;return D().w(function(e){for(;;)switch(e.n){case 0:if(void 0!==t){e.n=1;break}return e.a(2,{value:void 0,state:"undefined-input"});case 1:return e.n=2,Gc({text:t});case 2:if(!(n=e.v).success){e.n=3;break}r={value:n.value,state:"successful-parse"},e.n=5;break;case 3:return e.n=4,Gc({text:af(t)});case 4:n=e.v,r=n.success?{value:n.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"};case 5:return e.a(2,r)}},e)})),sf.apply(this,arguments)}function cf(e){return e.type.startsWith("tool-")}function lf(e){return cf(e)||function(e){return"dynamic-tool"===e.type}(e)}function ff(e){return e.type.split("-").slice(1).join("-")}function df(e){var t=e.lastMessage,n=e.messageId;return{message:"assistant"===(null==t?void 0:t.role)?t:{id:n,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function pf(e){var t=e.stream,n=e.messageMetadataSchema,u=e.dataPartSchemas,a=e.runUpdateMessageJob,i=e.onError,o=e.onToolCall,s=e.onData;return t.pipeThrough(new TransformStream({transform:function(e,t){return r(D().m(function c(){return D().w(function(c){for(;;)switch(c.n){case 0:return c.n=1,a(function(){var a=r(D().m(function a(c){var l,f,d,p,h,m,y,g,F,E,_,b,C,k,A,w,x,S,B,O,I,T,P,j,N,z,R,M,Z;return D().w(function(a){for(;;)switch(a.n){case 0:b=function(){return b=r(D().m(function e(t){var r;return D().w(function(e){for(;;)switch(e.n){case 0:if(null==t){e.n=2;break}if(r=null!=l.message.metadata?uf(l.message.metadata,t):t,!(null!=n)){e.n=1;break}return e.n=1,Vc({value:r,schema:n});case 1:l.message.metadata=r;case 2:return e.a(2)}},e)})),b.apply(this,arguments)},_=function(e){return b.apply(this,arguments)},E=function(e){var t,n=l.message.parts.find(function(t){return"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId}),r=e,u=n;null!=n?(n.state=e.state,u.toolName=e.toolName,u.input=r.input,u.output=r.output,u.errorText=r.errorText,u.rawInput=null!=(t=r.rawInput)?t:u.rawInput,u.preliminary=r.preliminary,null!=r.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=r.providerMetadata)):l.message.parts.push(v({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:r.input,output:r.output,errorText:r.errorText,preliminary:r.preliminary},null!=r.providerMetadata?{callProviderMetadata:r.providerMetadata}:{}))},F=function(e){var t,n=l.message.parts.find(function(t){return cf(t)&&t.toolCallId===e.toolCallId}),r=e,u=n;null!=n?(n.state=e.state,u.input=r.input,u.output=r.output,u.errorText=r.errorText,u.rawInput=r.rawInput,u.preliminary=r.preliminary,u.providerExecuted=null!=(t=r.providerExecuted)?t:n.providerExecuted,null!=r.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=r.providerMetadata)):l.message.parts.push(v({type:"tool-".concat(e.toolName),toolCallId:e.toolCallId,state:e.state,input:r.input,output:r.output,rawInput:r.rawInput,errorText:r.errorText,providerExecuted:r.providerExecuted,preliminary:r.preliminary},null!=r.providerMetadata?{callProviderMetadata:r.providerMetadata}:{}))},g=function(e){var t=l.message.parts.filter(function(e){return"dynamic-tool"===e.type}).find(function(t){return t.toolCallId===e});if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t},y=function(e){var t=l.message.parts.filter(cf).find(function(t){return t.toolCallId===e});if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t},l=c.state,f=c.write,Z=e.type,a.n="text-start"===Z?1:"text-delta"===Z?2:"text-end"===Z?3:"reasoning-start"===Z?4:"reasoning-delta"===Z?5:"reasoning-end"===Z?6:"file"===Z?7:"source-url"===Z?8:"source-document"===Z?9:"tool-input-start"===Z?10:"tool-input-delta"===Z?11:"tool-input-available"===Z?13:"tool-input-error"===Z?15:"tool-output-available"===Z?16:"tool-output-error"===Z?17:"start-step"===Z?18:"finish-step"===Z?19:"start"===Z?20:"finish"===Z||"message-metadata"===Z?22:"error"===Z?24:25;break;case 1:return C={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"},l.activeTextParts[e.id]=C,l.message.parts.push(C),f(),a.a(3,28);case 2:return(k=l.activeTextParts[e.id]).text+=e.delta,k.providerMetadata=null!=(d=e.providerMetadata)?d:k.providerMetadata,f(),a.a(3,28);case 3:return(A=l.activeTextParts[e.id]).state="done",A.providerMetadata=null!=(p=e.providerMetadata)?p:A.providerMetadata,delete l.activeTextParts[e.id],f(),a.a(3,28);case 4:return w={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"},l.activeReasoningParts[e.id]=w,l.message.parts.push(w),f(),a.a(3,28);case 5:return(x=l.activeReasoningParts[e.id]).text+=e.delta,x.providerMetadata=null!=(h=e.providerMetadata)?h:x.providerMetadata,f(),a.a(3,28);case 6:return(S=l.activeReasoningParts[e.id]).providerMetadata=null!=(m=e.providerMetadata)?m:S.providerMetadata,S.state="done",delete l.activeReasoningParts[e.id],f(),a.a(3,28);case 7:return l.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),f(),a.a(3,28);case 8:return l.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),f(),a.a(3,28);case 9:return l.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),f(),a.a(3,28);case 10:return B=l.message.parts.filter(cf),l.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:B.length,dynamic:e.dynamic},e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),f(),a.a(3,28);case 11:return(O=l.partialToolCalls[e.toolCallId]).text+=e.inputTextDelta,a.n=12,of(O.text);case 12:return I=a.v,T=I.value,O.dynamic?E({toolCallId:e.toolCallId,toolName:O.toolName,state:"input-streaming",input:T}):F({toolCallId:e.toolCallId,toolName:O.toolName,state:"input-streaming",input:T}),f(),a.a(3,28);case 13:if(e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerMetadata:e.providerMetadata}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),f(),!(o&&!e.providerExecuted)){a.n=14;break}return a.n=14,o({toolCall:e});case 14:return a.a(3,28);case 15:return e.dynamic?E({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerMetadata:e.providerMetadata}):F({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),f(),a.a(3,28);case 16:return e.dynamic?(P=g(e.toolCallId),E({toolCallId:e.toolCallId,toolName:P.toolName,state:"output-available",input:P.input,output:e.output,preliminary:e.preliminary})):(j=y(e.toolCallId),F({toolCallId:e.toolCallId,toolName:ff(j),state:"output-available",input:j.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})),f(),a.a(3,28);case 17:return e.dynamic?(N=g(e.toolCallId),E({toolCallId:e.toolCallId,toolName:N.toolName,state:"output-error",input:N.input,errorText:e.errorText})):(z=y(e.toolCallId),F({toolCallId:e.toolCallId,toolName:ff(z),state:"output-error",input:z.input,rawInput:z.rawInput,errorText:e.errorText})),f(),a.a(3,28);case 18:return l.message.parts.push({type:"step-start"}),a.a(3,28);case 19:return l.activeTextParts={},l.activeReasoningParts={},a.a(3,28);case 20:return null!=e.messageId&&(l.message.id=e.messageId),a.n=21,_(e.messageMetadata);case 21:return null==e.messageId&&null==e.messageMetadata||f(),a.a(3,28);case 22:return a.n=23,_(e.messageMetadata);case 23:return null!=e.messageMetadata&&f(),a.a(3,28);case 24:return null==i||i(new Error(e.errorText)),a.a(3,28);case 25:if(!function(e){return e.type.startsWith("data-")}(e)){a.n=28;break}if(!(null!=(null==u?void 0:u[e.type]))){a.n=26;break}return a.n=26,Vc({value:e.data,schema:u[e.type]});case 26:if(!(R=e).transient){a.n=27;break}return null==s||s(R),a.a(3,28);case 27:M=null!=R.id?l.message.parts.find(function(e){return R.type===e.type&&R.id===e.id}):void 0,null!=M?M.data=R.data:l.message.parts.push(R),null==s||s(R),f();case 28:t.enqueue(e);case 29:return a.a(2)}},a)}));return function(e){return a.apply(this,arguments)}}());case 1:return c.a(2)}},c)}))()}}))}Mc({prefix:"aitxt",size:24}),Mc({prefix:"aiobj",size:24});var hf=function(){return o(function e(){a(this,e),this.queue=[],this.isProcessing=!1},[{key:"processQueue",value:(t=r(D().m(function e(){return D().w(function(e){for(;;)switch(e.n){case 0:if(this.isProcessing){e.n=5;break}this.isProcessing=!0;case 1:if(!(this.queue.length>0)){e.n=4;break}return e.n=2,this.queue[0]();case 2:this.queue.shift();case 3:e.n=1;break;case 4:this.isProcessing=!1;case 5:return e.a(2)}},e,this)})),function(){return t.apply(this,arguments)})},{key:"run",value:(e=r(D().m(function e(t){var n=this;return D().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,u){n.queue.push(r(D().m(function n(){var r;return D().w(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,t();case 1:e(),n.n=3;break;case 2:n.p=2,r=n.v,u(r);case 3:return n.a(2)}},n,null,[[0,2]])}))),n.processQueue()}))},e)})),function(t){return e.apply(this,arguments)})}]);var e,t}();Mc({prefix:"aiobj",size:24}),function(e,t){for(var n in t)Nl(e,n,{get:t[n],enumerable:!0})}({},{object:function(){return mf},text:function(){return vf}});var vf=function(){return{type:"text",responseFormat:{type:"text"},parsePartial:(t=r(D().m(function e(t){var n;return D().w(function(e){for(;;)if(0===e.n)return n=t.text,e.a(2,{partial:n})},e)})),function(e){return t.apply(this,arguments)}),parseOutput:(e=r(D().m(function e(t){var n;return D().w(function(e){for(;;)if(0===e.n)return n=t.text,e.a(2,n)},e)})),function(t){return e.apply(this,arguments)})};var e,t},mf=function(e){var t=function(e){return null==e?Pl({properties:{},additionalProperties:!1}):"object"==b(t=e)&&null!==t&&Tl in t&&!0===t[Tl]&&"jsonSchema"in t&&"validate"in t?e:Il(e);var t}(e.schema);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},parsePartial:function(e){return r(D().m(function t(){var n,r,u,a;return D().w(function(t){for(;;)switch(t.n){case 0:return n=e.text,t.n=1,of(n);case 1:r=t.v,a=r.state,t.n="failed-parse"===a||"undefined-input"===a?2:"repaired-parse"===a||"successful-parse"===a?3:4;break;case 2:case 5:return t.a(2);case 3:return t.a(2,{partial:r.value});case 4:throw u=r.state,new Error("Unsupported parse state: ".concat(u))}},t)}))()},parseOutput:function(e,n){return r(D().m(function r(){var u,a,i;return D().w(function(r){for(;;)switch(r.n){case 0:return u=e.text,r.n=1,Gc({text:u});case 1:if((a=r.v).success){r.n=2;break}throw new Zl({message:"No object generated: could not parse the response.",cause:a.error,text:u,response:n.response,usage:n.usage,finishReason:n.finishReason});case 2:return r.n=3,Kc({value:a.value,schema:t});case 3:if((i=r.v).success){r.n=4;break}throw new Zl({message:"No object generated: response did not match schema.",cause:i.error,text:u,response:n.response,usage:n.usage,finishReason:n.finishReason});case 4:return r.a(2,i.value)}},r)}))()}}},Df=Bo({name:Ui(),version:Ui()}),yf=Bo({_meta:qo(xo({}).loose())}),gf=yf,Ff=xo({method:Ui(),params:qo(yf)}),Ef=Bo({experimental:qo(xo({}).loose()),logging:qo(xo({}).loose()),prompts:qo(Bo({listChanged:qo(yo())})),resources:qo(Bo({subscribe:qo(yo()),listChanged:qo(yo())})),tools:qo(Bo({listChanged:qo(yo())}))});gf.extend({protocolVersion:Ui(),capabilities:Ef,serverInfo:Df,instructions:qo(Ui())});var _f=gf.extend({nextCursor:qo(Ui())}),bf=xo({name:Ui(),description:qo(Ui()),inputSchema:xo({type:Zo("object"),properties:qo(xo({}).loose())}).loose()}).loose();_f.extend({tools:Ao(bf)});var Cf=xo({type:Zo("text"),text:Ui()}).loose(),kf=xo({type:Zo("image"),data:so(),mimeType:Ui()}).loose(),Af=xo({uri:Ui(),mimeType:qo(Ui())}).loose(),wf=Af.extend({text:Ui()}),xf=Af.extend({blob:so()}),Sf=xo({type:Zo("resource"),resource:Io([wf,xf])}).loose();gf.extend({content:Ao(Io([Cf,kf,Sf])),isError:yo().default(!1).optional()}).or(gf.extend({toolResult:_o()}));var Bf="2.0",Of=xo({jsonrpc:Zo(Bf),id:Io([Ui(),ho().int()])}).merge(Ff).strict(),If=xo({jsonrpc:Zo(Bf),id:Io([Ui(),ho().int()]),result:gf}).strict(),Tf=xo({jsonrpc:Zo(Bf),id:Io([Ui(),ho().int()]),error:xo({code:ho().int(),message:Ui(),data:qo(_o())})}).strict();Io([Of,xo({jsonrpc:Zo(Bf)}).merge(xo({method:Ui(),params:qo(yf)})).strict(),If,Tf]);var Pf=function(){return o(function e(t){var n=t.api,r=void 0===n?"/api/chat":n,u=t.credentials,i=t.headers,o=t.body,s=t.fetch,c=t.prepareSendMessagesRequest,l=t.prepareReconnectToStreamRequest;a(this,e),this.api=r,this.credentials=u,this.headers=i,this.body=o,this.fetch=s,this.prepareSendMessagesRequest=c,this.prepareReconnectToStreamRequest=l},[{key:"sendMessages",value:(t=r(D().m(function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,y,g,F,E,_,b;return D().w(function(e){for(;;)switch(e.n){case 0:return n=t.abortSignal,r=m(t,$t),e.n=1,Yc(this.body);case 1:return c=e.v,e.n=2,Yc(this.headers);case 2:return l=e.v,e.n=3,Yc(this.credentials);case 3:return f=e.v,e.n=4,null==(u=this.prepareSendMessagesRequest)?void 0:u.call(this,{api:this.api,id:r.chatId,messages:r.messages,body:v(v({},c),r.body),headers:v(v({},l),r.headers),credentials:f,requestMetadata:r.metadata,trigger:r.trigger,messageId:r.messageId});case 4:return d=e.v,p=null!=(a=null==d?void 0:d.api)?a:this.api,h=void 0!==(null==d?void 0:d.headers)?d.headers:v(v({},l),r.headers),y=void 0!==(null==d?void 0:d.body)?d.body:v(v(v({},c),r.body),{},{id:r.chatId,messages:r.messages,trigger:r.trigger,messageId:r.messageId}),g=null!=(i=null==d?void 0:d.credentials)?i:f,F=null!=(o=this.fetch)?o:globalThis.fetch,e.n=5,F(p,{method:"POST",headers:Rc(v({"Content-Type":"application/json"},h),"ai-sdk/".concat(ql),zc()),body:JSON.stringify(y),credentials:g,signal:n});case 5:if((E=e.v).ok){e.n=9;break}return _=Error,e.n=6,E.text();case 6:if(null==(s=e.v)){e.n=7;break}b=s,e.n=8;break;case 7:b="Failed to fetch the chat response.";case 8:throw new _(b);case 9:if(E.body){e.n=10;break}throw new Error("The response body is empty.");case 10:return e.a(2,this.processResponseStream(E.body))}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"reconnectToStream",value:(e=r(D().m(function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,m,y,g;return D().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Yc(this.body);case 1:return o=e.v,e.n=2,Yc(this.headers);case 2:return s=e.v,e.n=3,Yc(this.credentials);case 3:return c=e.v,e.n=4,null==(n=this.prepareReconnectToStreamRequest)?void 0:n.call(this,{api:this.api,id:t.chatId,body:v(v({},o),t.body),headers:v(v({},s),t.headers),credentials:c,requestMetadata:t.metadata});case 4:return l=e.v,f=null!=(r=null==l?void 0:l.api)?r:"".concat(this.api,"/").concat(t.chatId,"/stream"),d=void 0!==(null==l?void 0:l.headers)?l.headers:v(v({},s),t.headers),p=null!=(u=null==l?void 0:l.credentials)?u:c,h=null!=(a=this.fetch)?a:globalThis.fetch,e.n=5,h(f,{method:"GET",headers:Rc(d,"ai-sdk/".concat(ql),zc()),credentials:p});case 5:if(204!==(m=e.v).status){e.n=6;break}return e.a(2,null);case 6:if(m.ok){e.n=10;break}return y=Error,e.n=7,m.text();case 7:if(null==(i=e.v)){e.n=8;break}g=i,e.n=9;break;case 8:g="Failed to fetch the chat response.";case 9:throw new y(g);case 10:if(m.body){e.n=11;break}throw new Error("The response body is empty.");case 11:return e.a(2,this.processResponseStream(m.body))}},e,this)})),function(t){return e.apply(this,arguments)})}]);var e,t}(),jf=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,t),u(this,t,[e])}return d(t,e),o(t,[{key:"processResponseStream",value:function(e){return function(e){var t=e.schema;return e.stream.pipeThrough(new TextDecoderStream).pipeThrough(new Xn).pipeThrough(new TransformStream({transform:function(e,n){return r(D().m(function r(){var u,a;return D().w(function(r){for(;;)switch(r.n){case 0:if(u=e.data,!("[DONE]"!==u)){r.n=2;break}return a=n,r.n=1,Gc({text:u,schema:t});case 1:a.enqueue.call(a,r.v);case 2:return r.a(2)}},r)}))()}}))}({stream:e,schema:rf}).pipeThrough(new TransformStream({transform:function(e,t){return r(D().m(function n(){return D().w(function(n){for(;;)switch(n.n){case 0:if(e.success){n.n=1;break}throw e.error;case 1:t.enqueue(e.value);case 2:return n.a(2)}},n)}))()}}))}}])}(Pf),Nf=function(){return o(function e(t){var n=this,u=t.generateId,i=void 0===u?Zc:u,o=t.id,s=void 0===o?i():o,c=t.transport,l=void 0===c?new jf:c,f=t.messageMetadataSchema,d=t.dataPartSchemas,p=t.state,h=t.onError,y=t.onToolCall,g=t.onFinish,F=t.onData,_=t.sendAutomaticallyWhen;a(this,e),this.activeResponse=void 0,this.jobExecutor=new hf,this.sendMessage=function(){var e=r(D().m(function e(t,u){var a,i,o,s,c,l,f;return D().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=2;break}return e.n=1,n.makeRequest(v({trigger:"submit-message",messageId:null==(a=n.lastMessage)?void 0:a.id},u));case 1:return e.a(2,void e.v);case 2:if(!("text"in t)&&!("files"in t)){e.n=6;break}if(!Array.isArray(t.files)){e.n=3;break}f=t.files,e.n=5;break;case 3:return e.n=4,function(){var e=r(D().m(function e(t){return D().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,[]);case 1:if(globalThis.FileList&&t instanceof globalThis.FileList){e.n=2;break}throw new Error("FileList is not supported in the current environment");case 2:return e.a(2,Promise.all(Array.from(t).map(function(){var e=r(D().m(function e(t){var n,r,u,a,i;return D().w(function(e){for(;;)switch(e.n){case 0:return n=t.name,r=t.type,u=r,a=n,e.n=1,new Promise(function(e,n){var r=new FileReader;r.onload=function(t){var n;e(null==(n=t.target)?void 0:n.result)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)});case 1:return i=e.v,e.a(2,{type:"file",mediaType:u,filename:a,url:i})}},e)}));return function(t){return e.apply(this,arguments)}}())))}},e)}));return function(t){return e.apply(this,arguments)}}()(t.files);case 4:f=e.v;case 5:c={parts:[].concat(E(f),E("text"in t&&null!=t.text?[{type:"text",text:t.text}]:[]))},e.n=7;break;case 6:c=t;case 7:if(null==t.messageId){e.n=10;break}if(l=n.state.messages.findIndex(function(e){return e.id===t.messageId}),-1!==l){e.n=8;break}throw new Error("message with id ".concat(t.messageId," not found"));case 8:if("user"===n.state.messages[l].role){e.n=9;break}throw new Error("message with id ".concat(t.messageId," is not a user message"));case 9:n.state.messages=n.state.messages.slice(0,l+1),n.state.replaceMessage(l,v(v({},c),{},{id:t.messageId,role:null!=(i=c.role)?i:"user",metadata:t.metadata})),e.n=11;break;case 10:n.state.pushMessage(v(v({},c),{},{id:null!=(o=c.id)?o:n.generateId(),role:null!=(s=c.role)?s:"user",metadata:t.metadata}));case 11:return e.n=12,n.makeRequest(v({trigger:"submit-message",messageId:t.messageId},u));case 12:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),this.regenerate=r(D().m(function e(){var t,r,u,a,i=arguments;return D().w(function(e){for(;;)switch(e.n){case 0:if(r=(t=i.length>0&&void 0!==i[0]?i[0]:{}).messageId,u=m(t,qt),a=null==r?n.state.messages.length-1:n.state.messages.findIndex(function(e){return e.id===r}),-1!==a){e.n=1;break}throw new Error("message ".concat(r," not found"));case 1:return n.state.messages=n.state.messages.slice(0,"assistant"===n.messages[a].role?a:a+1),e.n=2,n.makeRequest(v({trigger:"regenerate-message",messageId:r},u));case 2:return e.a(2)}},e)})),this.resumeStream=r(D().m(function e(){var t,r=arguments;return D().w(function(e){for(;;)switch(e.n){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.n=1,n.makeRequest(v({trigger:"resume-stream"},t));case 1:return e.a(2)}},e)})),this.clearError=function(){"error"===n.status&&(n.state.error=void 0,n.setStatus({status:"ready"}))},this.addToolResult=function(){var e=r(D().m(function e(t){var u,a;return D().w(function(e){for(;;)if(0===e.n)return t.tool,u=t.toolCallId,a=t.output,e.a(2,n.jobExecutor.run(r(D().m(function e(){var t,r,i,o;return D().w(function(e){for(;;)switch(e.n){case 0:i=n.state.messages,o=i[i.length-1],n.state.replaceMessage(i.length-1,v(v({},o),{},{parts:o.parts.map(function(e){return lf(e)&&e.toolCallId===u?v(v({},e),{},{state:"output-available",output:a}):e})})),n.activeResponse&&(n.activeResponse.state.message.parts=n.activeResponse.state.message.parts.map(function(e){return lf(e)&&e.toolCallId===u?v(v({},e),{},{state:"output-available",output:a,errorText:void 0}):e})),"streaming"!==n.status&&"submitted"!==n.status&&(null==(t=n.sendAutomaticallyWhen)?void 0:t.call(n,{messages:n.state.messages}))&&n.makeRequest({trigger:"submit-message",messageId:null==(r=n.lastMessage)?void 0:r.id});case 1:return e.a(2)}},e)}))))},e)}));return function(t){return e.apply(this,arguments)}}(),this.stop=r(D().m(function e(){var t;return D().w(function(e){for(;;)switch(e.n){case 0:"streaming"!==n.status&&"submitted"!==n.status||(null==(t=n.activeResponse)?void 0:t.abortController)&&n.activeResponse.abortController.abort();case 1:return e.a(2)}},e)})),this.id=s,this.transport=l,this.generateId=i,this.messageMetadataSchema=f,this.dataPartSchemas=d,this.state=p,this.onError=h,this.onToolCall=y,this.onFinish=g,this.onData=F,this.sendAutomaticallyWhen=_},[{key:"status",get:function(){return this.state.status}},{key:"setStatus",value:function(e){var t=e.status,n=e.error;this.status!==t&&(this.state.status=t,this.state.error=n)}},{key:"error",get:function(){return this.state.error}},{key:"messages",get:function(){return this.state.messages},set:function(e){this.state.messages=e}},{key:"lastMessage",get:function(){return this.state.messages[this.state.messages.length-1]}},{key:"makeRequest",value:(e=r(D().m(function e(t){var n,u,a,i,o,s,c,l,f,d,p,h,v,m,y,g,F,E=this;return D().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=t.trigger,u=t.metadata,a=t.headers,i=t.body,o=t.messageId,this.setStatus({status:"submitted",error:void 0}),f=this.lastMessage,d=!1,p=!1,h=!1,e.p=1,(v={state:df({lastMessage:this.state.snapshot(f),messageId:this.generateId()}),abortController:new AbortController}).abortController.signal.addEventListener("abort",function(){d=!0}),this.activeResponse=v,"resume-stream"!==n){e.n=4;break}return e.n=2,this.transport.reconnectToStream({chatId:this.id,metadata:u,headers:a,body:i});case 2:if(null!=(y=e.v)){e.n=3;break}return e.a(2,void this.setStatus({status:"ready"}));case 3:m=y,e.n=6;break;case 4:return e.n=5,this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:v.abortController.signal,metadata:u,headers:a,body:i,trigger:n,messageId:o});case 5:m=e.v;case 6:return g=function(e){return E.jobExecutor.run(function(){return e({state:v.state,write:function(){var e;E.setStatus({status:"streaming"}),v.state.message.id===(null==(e=E.lastMessage)?void 0:e.id)?E.state.replaceMessage(E.state.messages.length-1,v.state.message):E.state.pushMessage(v.state.message)}})})},e.n=7,function(){var e=r(D().m(function e(t){var n,r,u,a;return D().w(function(e){for(;;)switch(e.p=e.n){case 0:n=t.stream,r=t.onError,u=n.getReader(),e.p=1;case 2:return e.n=3,u.read();case 3:if(!e.v.done){e.n=4;break}return e.a(3,5);case 4:e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,a=e.v,null==r||r(a);case 7:return e.p=7,u.releaseLock(),e.f(7);case 8:return e.a(2)}},e,null,[[1,6,7,8]])}));return function(t){return e.apply(this,arguments)}}()({stream:pf({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:g,onError:function(e){throw e}}),onError:function(e){throw e}});case 7:this.setStatus({status:"ready"}),e.n=10;break;case 8:if(e.p=8,F=e.v,!d&&"AbortError"!==F.name){e.n=9;break}return e.a(2,(d=!0,this.setStatus({status:"ready"}),null));case 9:h=!0,F instanceof TypeError&&(F.message.toLowerCase().includes("fetch")||F.message.toLowerCase().includes("network"))&&(p=!0),this.onError&&F instanceof Error&&this.onError(F),this.setStatus({status:"error",error:F});case 10:e.p=10;try{null==(s=this.onFinish)||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:d,isDisconnect:p,isError:h})}catch(e){console.error(e)}return this.activeResponse=void 0,e.f(10);case 11:if(!(null==(c=this.sendAutomaticallyWhen)?void 0:c.call(this,{messages:this.state.messages}))){e.n=12;break}return e.n=12,this.makeRequest({trigger:"submit-message",messageId:null==(l=this.lastMessage)?void 0:l.id,metadata:u,headers:a,body:i});case 12:return e.a(2)}},e,this,[[1,8,10,11]])})),function(t){return e.apply(this,arguments)})}]);var e}();function zf(e){var t=e.messages,n=t[t.length-1];if(!n)return!1;if("assistant"!==n.role)return!1;var r=n.parts.reduce(function(e,t,n){return"step-start"===t.type?n:e},-1),u=n.parts.slice(r+1).filter(lf);return u.length>0&&u.every(function(e){return"output-available"===e.state})}var Rf,Mf,Zf=xo({type:Zo("text"),text:Ui(),state:Ro(["streaming","done"]).optional(),providerMetadata:Vl.optional()}),Lf=xo({type:Zo("reasoning"),text:Ui(),state:Ro(["streaming","done"]).optional(),providerMetadata:Vl.optional()}),$f=xo({type:Zo("source-url"),sourceId:Ui(),url:Ui(),title:Ui().optional(),providerMetadata:Vl.optional()}),qf=xo({type:Zo("source-document"),sourceId:Ui(),mediaType:Ui(),title:Ui(),filename:Ui().optional(),providerMetadata:Vl.optional()}),Uf=xo({type:Zo("file"),mediaType:Ui(),filename:Ui().optional(),url:Ui(),providerMetadata:Vl.optional()}),Hf=xo({type:Zo("step-start")}),Vf=xo({type:Ui().startsWith("data-"),id:Ui().optional(),data:_o()}),Wf=[xo({type:Zo("dynamic-tool"),toolName:Ui(),toolCallId:Ui(),state:Zo("input-streaming"),input:_o().optional(),output:Co().optional(),errorText:Co().optional()}),xo({type:Zo("dynamic-tool"),toolName:Ui(),toolCallId:Ui(),state:Zo("input-available"),input:_o(),output:Co().optional(),errorText:Co().optional(),callProviderMetadata:Vl.optional()}),xo({type:Zo("dynamic-tool"),toolName:Ui(),toolCallId:Ui(),state:Zo("output-available"),input:_o(),output:_o(),errorText:Co().optional(),callProviderMetadata:Vl.optional(),preliminary:yo().optional()}),xo({type:Zo("dynamic-tool"),toolName:Ui(),toolCallId:Ui(),state:Zo("output-error"),input:_o(),output:Co().optional(),errorText:Ui(),callProviderMetadata:Vl.optional()})],Kf=[xo({type:Ui().startsWith("tool-"),toolCallId:Ui(),state:Zo("input-streaming"),providerExecuted:yo().optional(),input:_o().optional(),output:Co().optional(),errorText:Co().optional()}),xo({type:Ui().startsWith("tool-"),toolCallId:Ui(),state:Zo("input-available"),providerExecuted:yo().optional(),input:_o(),output:Co().optional(),errorText:Co().optional(),callProviderMetadata:Vl.optional()}),xo({type:Ui().startsWith("tool-"),toolCallId:Ui(),state:Zo("output-available"),providerExecuted:yo().optional(),input:_o(),output:_o(),errorText:Co().optional(),callProviderMetadata:Vl.optional(),preliminary:yo().optional()}),xo({type:Ui().startsWith("tool-"),toolCallId:Ui(),state:Zo("output-error"),providerExecuted:yo().optional(),input:_o(),output:Co().optional(),errorText:Ui(),callProviderMetadata:Vl.optional()})];xo({id:Ui(),role:Ro(["system","user","assistant"]),metadata:_o().optional(),parts:Ao(Io([Zf,Lf,$f,qf,Uf,Hf,Vf].concat(Wf,Kf)))});var Jf,Gf,Qf,Yf,Xf,ed,td,nd,rd,ud,ad=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((Mf||(Mf=1,Rf=function(e,t){if("function"!=typeof e)throw new TypeError("Expected the first argument to be a `function`, got `".concat(mn(e),"`."));var n,r=0;return function(){for(var u=this,a=arguments.length,i=new Array(a),o=0;o0&&void 0!==arguments[0]?arguments[0]:[];a(this,e),sd(this,Jf,void 0),sd(this,Gf,"ready"),sd(this,Qf,void 0),sd(this,Yf,new Set),sd(this,Xf,new Set),sd(this,ed,new Set),this.pushMessage=function(e){cd(t,Jf,od(t,Jf).concat(e)),od(t,td).call(t)},this.popMessage=function(){cd(t,Jf,od(t,Jf).slice(0,-1)),od(t,td).call(t)},this.replaceMessage=function(e,n){cd(t,Jf,[].concat(E(od(t,Jf).slice(0,e)),[t.snapshot(n)],E(od(t,Jf).slice(e+1)))),od(t,td).call(t)},this.snapshot=function(e){return structuredClone(e)},this["~registerMessagesCallback"]=function(e,n){var r=n?function(e,t){return null!=t?ad(e,t):e}(e,n):e;return od(t,Yf).add(r),function(){od(t,Yf).delete(r)}},this["~registerStatusCallback"]=function(e){return od(t,Xf).add(e),function(){od(t,Xf).delete(e)}},this["~registerErrorCallback"]=function(e){return od(t,ed).add(e),function(){od(t,ed).delete(e)}},sd(this,td,function(){od(t,Yf).forEach(function(e){return e()})}),sd(this,nd,function(){od(t,Xf).forEach(function(e){return e()})}),sd(this,rd,function(){od(t,ed).forEach(function(e){return e()})}),cd(this,Jf,n)},[{key:"status",get:function(){return od(this,Gf)},set:function(e){cd(this,Gf,e),od(this,nd).call(this)}},{key:"error",get:function(){return od(this,Qf)},set:function(e){cd(this,Qf,e),od(this,rd).call(this)}},{key:"messages",get:function(){return od(this,Jf)},set:function(e){cd(this,Jf,E(e)),od(this,td).call(this)}}])}();Jf=new WeakMap,Gf=new WeakMap,Qf=new WeakMap,Yf=new WeakMap,Xf=new WeakMap,ed=new WeakMap,td=new WeakMap,nd=new WeakMap,rd=new WeakMap;var fd=function(e){function n(e){var r,i=e.messages,o=m(e,Ut);a(this,n);var s=new ld(i);return r=u(this,n,[v(v({},o),{},{state:s})]),sd(t(r),ud,void 0),r["~registerMessagesCallback"]=function(e,n){return od(t(r),ud)["~registerMessagesCallback"](e,n)},r["~registerStatusCallback"]=function(e){return od(t(r),ud)["~registerStatusCallback"](e)},r["~registerErrorCallback"]=function(e){return od(t(r),ud)["~registerErrorCallback"](e)},cd(t(r),ud,s),r}return d(n,e),o(n)}(Nf);function dd(e,t){var n=void 0;return function(){for(var r=arguments.length,u=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function a(t,n,r){if(u&&void 0!==r){var a=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[t].concat(kd(n),[{headers:i}]))}else e.apply(void 0,[t].concat(kd(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("clickedObjectIDsAfterSearch",Od(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("clickedObjectIDs",Od(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("convertedObjectIDsAfterSearch",Od(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&a("convertedObjectIDs",Od(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce(function(e,t){var n=t.items,r=wd(t,bd);return[].concat(kd(e),kd(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Td(e){var t=e.items.reduce(function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e},{});return Object.keys(t).map(function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}})}function Pd(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function jd(e){return jd="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},jd(e)}function Nd(e){return function(e){if(Array.isArray(e))return zd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zd(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&qd({onItemsChange:u,items:n,insights:c,state:t}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:Md(Md({},o?{clickAnalytics:!0}:{}),e?{userToken:Vd(e)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),u(),s("onUserTokenChange",function(e){u(e)}),s("getUserToken",null,function(e,t){u(t)}),n(function(e){var t=e.item,n=e.state,r=e.event,u=e.source;Pd(t)&&a({state:n,event:r,insights:c,item:t,insightsEvents:[Md({eventName:"Item Selected"},Fd({item:t,items:u.getItems().filter(Pd)}))]})}),r(function(e){var t=e.item,n=e.source,r=e.state,u=e.event;Pd(t)&&i({state:r,event:u,insights:c,item:t,insightsEvents:[Md({eventName:"Item Active"},Fd({item:t,items:n.getItems().filter(Pd)}))]})})},onStateChange:function(e){var t=e.state;f({state:t})},__autocomplete_pluginOptions:e}}function Hd(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(Nd(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],Nd(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function Vd(e){return"number"==typeof e?e.toString():e}function Wd(e,t){var n=t;return{then:function(t,r){return Wd(e.then(Jd(t,n,e),Jd(r,n,e)),n)},catch:function(t){return Wd(e.catch(Jd(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),Wd(e.finally(Jd(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach(function(e){e()})},isCanceled:function(){return!0===n.isCanceled}}}function Kd(e){return Wd(e,{isCanceled:!1,onCancelList:[]})}function Jd(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}var Gd,Qd=!0;function Yd(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var u=(null===t?-1:t)+e;return u<=-1||u>=n?null===r?null:0:u}function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ep(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){o=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw a}}}}(e);try{for(a.s();!(n=a.n()).done;){var i,o,s,c=null===(i=n.value.__autocomplete_pluginOptions)||void 0===i||null===(o=(s=i).awaitSubmit)||void 0===o?void 0:o.call(s);if("number"==typeof c)u.push(c);else if(!0===c){r=!0;break}}}catch(e){a.e(e)}finally{a.f()}return r?t.wait():u.length>0?t.wait(Math.max.apply(Math,u)):void 0};function ap(e){var t=function(e){var t=e.collections.map(function(e){return e.items.length}).reduce(function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e},[]).reduce(function(t,n){return n<=e.activeItemId?t+1:t},0);return e.collections[t]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,u=0,a=0;!1===r;){var i=t.collections[u];if(i===n){r=!0;break}a+=i.items.length,u++}return t.activeItemId-a}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function ip(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}var op=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function sp(e){return e.nativeEvent||e}function cp(e){return cp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},cp(e)}function lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fp(e,t,n){return(t=function(e){var t=function(e){if("object"!==cp(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==cp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===cp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dp(e){return dp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},dp(e)}function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(hd++),plugins:u,initialState:gp({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),u.forEach(function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)})},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),u.forEach(function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)})},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),u.forEach(function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)})},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Dp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Dp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dp(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u.map(function(e){return e.getSources})),[e.getSources]).filter(Boolean).map(function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then(function(e){return Promise.all(e.filter(function(e){return Boolean(e)}).map(function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:yd,onResolve:yd};Object.keys(t).forEach(function(e){t[e].__default=!0});var r=ep(ep({},t),e);return Promise.resolve(r)}))})}(e,n)})).then(function(e){return pd(e)}).then(function(e){return e.map(function(e){return gp(gp({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach(function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)})},onActive:function(n){e.onActive(n),t.forEach(function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)})},onResolve:function(n){e.onResolve(n),t.forEach(function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)})}})})})},navigator:gp({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function _p(e){return _p="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},_p(e)}function bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,jp);$p&&u.environment.clearTimeout($p);var c=s.setCollections,l=s.setIsOpen,f=s.setQuery,d=s.setActiveItemId,p=s.setStatus,h=s.setContext;if(f(a),d(u.defaultActiveItemId),!a&&!1===u.openOnFocus){var v,m=o.getState().collections.map(function(e){return zp(zp({},e),{},{items:[]})});p("idle"),c(m),l(null!==(v=r.isOpen)&&void 0!==v?v:u.shouldPanelOpen({state:o.getState()}));var D=Kd(qp(m).then(function(){return Promise.resolve()}));return o.pendingRequests.add(D)}p("loading"),$p=u.environment.setTimeout(function(){p("stalled")},u.stallThreshold);var y=Kd(qp(u.getSources(zp({query:a,refresh:i,state:o.getState()},s)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(zp({query:a,refresh:i,state:o.getState()},s))).then(function(t){return function(e,t,n){if(u=e,Boolean(null==u?void 0:u.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(Bp(Object.keys(n.context).map(function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters})))):{};return xp(xp({},e),{},{requests:e.queries.map(function(n){return{query:"algolia"===e.requesterId?xp(xp({},n),{},{params:xp(xp({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}})})}var u;return{items:e,sourceId:t}}(t,e.sourceId,o.getState())})})).then(Tp).then(function(t){var n,r=t.some(function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)});return r&&h({algoliaInsightsPlugin:zp(zp({},(null===(n=o.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map(function(t){var r,u=e.filter(function(e){return e.sourceId===t.sourceId}),a=u.map(function(e){return e.items}),i=u[0].transformResponse,o=i?i({results:r=a,hits:r.map(function(e){return e.hits}).filter(Boolean),facetHits:r.map(function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map(function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}})}).filter(Boolean)}):a;return t.onResolve({source:t,results:a,items:o,state:n.getState()}),o.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:o}})}(t,e,o)}).then(function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce(function(e,t){return Cp(Cp({},e),{},kp({},t.source.sourceId,Cp(Cp({},t.source),{},{getItems:function(){return pd(t.items)}})))},{}),u=t.plugins.reduce(function(e,t){return t.reshape?t.reshape(e):e},{sourcesBySourceId:r,state:n}).sourcesBySourceId;return pd(t.reshape({sourcesBySourceId:u,sources:Object.values(u),state:n})).filter(Boolean).map(function(e){return{source:e,items:e.getItems()}})}({collections:e,props:u,state:o.getState()})})}))).then(function(e){var n;p("idle"),c(e);var f=u.shouldPanelOpen({state:o.getState()});l(null!==(n=r.isOpen)&&void 0!==n?n:u.openOnFocus&&!a&&f||f);var d=ap(o.getState());if(null!==o.getState().activeItemId&&d){var h=d.item,v=d.itemInputValue,m=d.itemUrl,D=d.source;D.onActive(zp({event:t,item:h,itemInputValue:v,itemUrl:m,refresh:i,source:D,state:o.getState()},s))}}).finally(function(){p("idle"),$p&&u.environment.clearTimeout($p)});return o.pendingRequests.add(y)}function Hp(e){return Hp="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},Hp(e)}var Vp=["event","props","refresh","store"];function Wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kp(e){for(var t=1;t=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function oh(e){var t=e.props,n=e.refresh,r=e.store,u=ih(e,Qp);return{getEnvironmentProps:function(e){var n=e.inputElement,u=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[u,a].some(function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r})&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return uh({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},ih(e,Yp))},getRootProps:function(e){return uh({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return ip(t.id,"list",n)}).join(" "):void 0,"aria-labelledby":ip(t.id,"label")},e)},getFormProps:function(e){e.inputElement;var a=ih(e,Xp),i=function(a){var i;t.onSubmit(uh({event:a,refresh:n,state:r.getState()},u)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()};return uh({action:"",noValidate:!0,role:"search",onSubmit:function(e){e.preventDefault();var n=up(t.plugins,r.pendingRequests);void 0!==n?n.then(function(){return i(e)}):i(e)},onReset:function(a){var i;a.preventDefault(),t.onReset(uh({event:a,refresh:n,state:r.getState()},u)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},a)},getLabelProps:function(e){return uh({htmlFor:ip(t.id,"input"),id:ip(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&Up(uh({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},u)),r.dispatch("focus",null)}var o=e||{};o.inputElement;var s=o.maxLength,c=void 0===s?512:s,l=ih(o,eh),f=ap(r.getState()),d=function(e){return Boolean(e&&e.match(op))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=f&&f.itemUrl&&!d?"go":"search");return uh({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?ip(t.id,"item-".concat(r.getState().activeItemId),null==f?void 0:f.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter(function(e){return e.items.length>0}).map(function(e){var n=e.source;return ip(t.id,"list",n)}).join(" "):void 0,"aria-labelledby":ip(t.id,"label"),value:r.getState().completion||r.getState().query,id:ip(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&sp(e).isComposing?u.setQuery(a):Up(uh({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},u))},onCompositionEnd:function(e){Up(uh({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},u))},onKeyDown:function(e){sp(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,u=e.store,a=function(e,t){if(null==e)return{};var n,r,u=function(e,t){if(null==e)return{};var n,r,u={},a=Object.keys(e);for(r=0;r=0||(u[n]=e[n]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}(e,Vp);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=ap(u.getState()),t=n.environment.document.getElementById(ip(n.id,"item-".concat(u.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},o=function(){var e=ap(u.getState());if(null!==u.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,o=e.itemUrl,s=e.source;s.onActive(Kp({event:t,item:n,itemInputValue:i,itemUrl:o,refresh:r,source:s,state:u.getState()},a))}};t.preventDefault(),!1===u.getState().isOpen&&(n.openOnFocus||Boolean(u.getState().query))?Up(Kp({event:t,props:n,query:u.getState().query,refresh:r,store:u},a)).then(function(){u.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),o(),setTimeout(i,0)}):(u.dispatch(t.key,{}),o(),i())}else if("Escape"===t.key)t.preventDefault(),u.dispatch(t.key,null),u.pendingRequests.cancelAll();else if("Tab"===t.key)u.dispatch("blur",null),u.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===u.getState().activeItemId||u.getState().collections.every(function(e){return 0===e.items.length})){var s=up(n.plugins,u.pendingRequests);return void(void 0!==s?s.then(u.pendingRequests.cancelAll):n.debug||u.pendingRequests.cancelAll())}t.preventDefault();var c=ap(u.getState()),l=c.item,f=c.itemInputValue,d=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(Kp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:u.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(Kp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:u.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(Kp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a)),void n.navigator.navigate({itemUrl:d,item:l,state:u.getState()});Up(Kp({event:t,nextState:{isOpen:!1},props:n,query:f,refresh:r,store:u},a)).then(function(){p.onSelect(Kp({event:t,item:l,itemInputValue:f,itemUrl:d,refresh:r,source:p,state:u.getState()},a))})}}}(uh({event:e,props:t,refresh:n,store:r},u))},onFocus:i,onBlur:yd,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},l)},getPanelProps:function(e){return uh({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,u=ih(n,th);return uh({role:"listbox","aria-labelledby":ip(t.id,"label"),id:ip(t.id,"list",r)},u)},getItemProps:function(e){var a=e.item,i=e.source,o=ih(e,nh);return uh({id:ip(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=ap(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,o=t.itemInputValue,s=t.itemUrl,c=t.source;c.onActive(uh({event:e,item:i,itemInputValue:o,itemUrl:s,refresh:n,source:c,state:r.getState()},u))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():Up(uh({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},u))).then(function(){i.onSelect(uh({event:e,item:a,itemInputValue:o,itemUrl:s,refresh:n,source:i,state:r.getState()},u))})}},o)}}}function sh(e){return sh="function"==typeof Symbol&&"symbol"==b(Symbol.iterator)?function(e){return b(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":b(e)},sh(e)}function ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lh(e){for(var t=1;tn-30}catch(e){return!0}},wh=null,xh=function(){var e=Kt(ln().m(function e(t){var n,r;return ln().w(function(e){for(;;)switch(e.n){case 0:if(n=t.assistantId,r=sessionStorage.getItem(kh),Ah(r)){e.n=1;break}return e.a(2,r);case 1:return wh||(wh=fetch("".concat(Ch,"/token"),{method:"POST",headers:{"x-algolia-assistant-id":n,"content-type":"application/json"}}).then(function(e){return e.json()}).then(function(e){var t=e.token;return sessionStorage.setItem(kh,t),t}).finally(function(){return wh=null})),e.a(2,wh)}},e)}));return function(t){return e.apply(this,arguments)}}(),Sh=function(){var e=Kt(ln().m(function e(t){var n,r,u,a,i,o;return ln().w(function(e){for(;;)switch(e.n){case 0:return n=t.assistantId,r=t.thumbs,u=t.messageId,a=t.appId,(i=new Headers).set("x-algolia-assistant-id",n),i.set("content-type","application/json"),e.n=1,xh({assistantId:n});case 1:o=e.v,i.set("authorization","TOKEN ".concat(o));case 2:return e.a(2,fetch("".concat(Ch,"/feedback"),{method:"POST",body:JSON.stringify({appId:a,messageId:u,thumbs:r}),headers:i}))}},e)}));return function(t){return e.apply(this,arguments)}}();function Bh(e){var t=e.translations,n=(void 0===t?{}:t).poweredByText,r=void 0===n?"Powered by":n;return Rt.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},Rt.createElement("span",{className:"DocSearch-Label"},r),Rt.createElement("svg",{width:"80",height:"24","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},Rt.createElement("defs",null,Rt.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),Rt.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),Rt.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),Rt.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),Rt.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),Rt.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),Rt.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),Rt.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),Rt.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),Rt.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function Oh(e){return Rt.createElement("svg",{width:"20",height:"20","aria-label":e.ariaLabel,viewBox:"0 0 24 24",role:"img"},Rt.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.4"},e.children))}function Ih(e){var t=e.translations,n=void 0===t?{}:t,r=e.isAskAiActive,u=void 0!==r&&r,a=n.selectText,i=void 0===a?"Select":a,o=n.selectKeyAriaLabel,s=void 0===o?"Enter key":o,c=n.submitQuestionText,l=void 0===c?"Submit question":c,f=n.navigateText,d=void 0===f?"Navigate":f,p=n.navigateUpKeyAriaLabel,h=void 0===p?"Arrow up":p,v=n.navigateDownKeyAriaLabel,m=void 0===v?"Arrow down":v,D=n.closeText,y=void 0===D?"Close":D,g=n.backToSearchText,F=void 0===g?"Back to search":g,E=n.closeKeyAriaLabel,_=void 0===E?"Escape key":E,b=n.poweredByText,C=void 0===b?"Powered by":b;return Rt.createElement(Rt.Fragment,null,Rt.createElement("div",{className:"DocSearch-Logo"},Rt.createElement(Bh,{translations:{poweredByText:C}})),Rt.createElement("ul",{className:"DocSearch-Commands"},Rt.createElement("li",null,Rt.createElement("kbd",{className:"DocSearch-Commands-Key"},Rt.createElement(Oh,{ariaLabel:m},Rt.createElement("path",{d:"M12 5v14"}),Rt.createElement("path",{d:"m19 12-7 7-7-7"}))),Rt.createElement("kbd",{className:"DocSearch-Commands-Key"},Rt.createElement(Oh,{ariaLabel:h},Rt.createElement("path",{d:"m5 12 7-7 7 7"}),Rt.createElement("path",{d:"M12 19V5"}))),Rt.createElement("span",{className:"DocSearch-Label"},d)),Rt.createElement("li",null,Rt.createElement("kbd",{className:"DocSearch-Commands-Key"},Rt.createElement(Oh,{ariaLabel:s},Rt.createElement("polyline",{points:"9 10 4 15 9 20"}),Rt.createElement("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}))),Rt.createElement("span",{className:"DocSearch-Label"},u?l:i)),Rt.createElement("li",null,Rt.createElement("kbd",{className:"DocSearch-Commands-Key"},Rt.createElement("span",{className:"DocSearch-Escape-Key"},"ESC")),Rt.createElement("span",{className:"DocSearch-Label","aria-label":_},u?F:y))))}function Th(e){var t=e.hit,n=e.children;return Rt.createElement("a",{href:t.url},n)}function Ph(e){var t=e.className;return Rt.createElement("svg",{viewBox:"0 0 38 38",className:t,stroke:"currentColor",strokeOpacity:".5"},Rt.createElement("g",{fill:"none",fillRule:"evenodd"},Rt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},Rt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),Rt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},Rt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function jh(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",className:"DocSearch-Hit-icon-sparkles"},Rt.createElement("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}),Rt.createElement("path",{d:"M20 3v4"}),Rt.createElement("path",{d:"M22 5h-4"}),Rt.createElement("path",{d:"M4 17v2"}),Rt.createElement("path",{d:"M5 18H3"}))}function Nh(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},Rt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},Rt.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),Rt.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function zh(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},Rt.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Rh(){return Rt.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:"lucide lucide-triangle-alert-icon lucide-triangle-alert"},Rt.createElement("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),Rt.createElement("path",{d:"M12 9v4"}),Rt.createElement("path",{d:"M12 17h.01"}))}function Mh(){return Rt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},Rt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},Rt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),Rt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Zh=function(){return Rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Rt.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),Rt.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),Rt.createElement("path",{d:"M10 9H8"}),Rt.createElement("path",{d:"M16 13H8"}),Rt.createElement("path",{d:"M16 17H8"}))};function Lh(e){switch(e.type){case"lvl1":return Rt.createElement(Zh,null);case"content":return Rt.createElement(qh,null);default:return Rt.createElement($h,null)}}function $h(){return Rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},Rt.createElement("line",{x1:"4",x2:"20",y1:"9",y2:"9"}),Rt.createElement("line",{x1:"4",x2:"20",y1:"15",y2:"15"}),Rt.createElement("line",{x1:"10",x2:"8",y1:"3",y2:"21"}),Rt.createElement("line",{x1:"16",x2:"14",y1:"3",y2:"21"}))}function qh(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},Rt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Uh(){return Rt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},Rt.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Hh(){return Rt.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},Rt.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function Vh(){return Rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"#5a5e9a",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Rt.createElement("path",{d:"m13.5 8.5-5 5"}),Rt.createElement("path",{d:"m8.5 8.5 5 5"}),Rt.createElement("circle",{cx:"11",cy:"11",r:"8"}),Rt.createElement("path",{d:"m21 21-4.3-4.3"}))}var Wh,Kh={before:"Searched for ",separator:", ",lastSeparator:" and ",after:""};function Jh(e){var t=e.queries,n=e.translations,r=e.onSearchQueryClick;if(0===t.length)return null;if("function"==typeof n.aggregatedToolCallNode)return Rt.createElement(Rt.Fragment,null,n.aggregatedToolCallNode(t,r));var u=(n.aggregatedToolCallText?n.aggregatedToolCallText(t):Kh)||{},a=u.before,i=void 0===a?"":a,o=u.separator,s=void 0===o?", ":o,c=u.lastSeparator,l=void 0===c?" and ":c,f=u.after,d=void 0===f?"":f;return Rt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--AggregatedResult"},Rt.createElement(Cn,{size:18}),Rt.createElement("span",null,i&&Rt.createElement("span",null,i),t.map(function(e,n){return Rt.createElement(V,{key:e+n},Rt.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(t){"enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e))},onClick:function(){return r(e)}},'"',e,'"'),n1&&void 0!==arguments[1]?arguments[1]:"",n="string"==typeof e?e:e.source,r={replace:function(e,t){var u="string"==typeof t?t:t.source;return u=u.replace(ev.caret,"$1"),n=n.replace(e,u),r},getRegex:function(){return new RegExp(n,t)}};return r}var ev={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD40-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDD40-\uDD65\uDD6F-\uDD85\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC7\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDED0-\uDEE3\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0\uDFF0-\uDFF9]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDDB0-\uDDDB\uDDE0-\uDDE9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D\uDD30-\uDD39]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDD70-\uDD79\uDE40-\uDE96\uDEA0-\uDEB8\uDEBB-\uDED3\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF2-\uDFF6]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD833[\uDCF0-\uDCF9]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDDD0-\uDDED\uDDF0-\uDDFA\uDEC0-\uDEDE\uDEE0-\uDEE2\uDEE4\uDEE5\uDEE7-\uDEED\uDEF0-\uDEF4\uDEFE\uDEFF\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79])/,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:function(e){return new RegExp("^( {0,3}".concat(e,")((?:[\t ][^\\n]*)?(?:\\n|$))"))},nextBulletRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))"))},hrRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"))},fencesBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}(?:```|~~~)"))},headingBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}#"))},htmlBeginRegex:function(e){return new RegExp("^ {0,".concat(Math.min(3,e-1),"}<(?:[a-z].*>|!--)"),"i")}},tv=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nv=/(?:[*+-]|\d{1,9}[.)])/,rv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,uv=Xh(rv).replace(/bull/g,nv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),av=Xh(rv).replace(/bull/g,nv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),iv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ov=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sv=Xh(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ov).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cv=Xh(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nv).getRegex(),lv="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fv=/|$))/,dv=Xh("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",fv).replace("tag",lv).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pv=Xh(iv).replace("hr",tv).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",lv).getRegex(),hv={blockquote:Xh(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pv).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:sv,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:tv,html:dv,lheading:uv,list:cv,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:pv,table:Yh,text:/^[^\n]+/},vv=Xh("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",tv).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",lv).getRegex(),mv=sn(sn({},hv),{},{lheading:av,table:vv,paragraph:Xh(iv).replace("hr",tv).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",lv).getRegex()}),Dv=sn(sn({},hv),{},{html:Xh("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fv).replace(/tag/g,"(?!(?: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").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Yh,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Xh(iv).replace("hr",tv).replace("heading"," *#{1,6} *[^\n]").replace("lheading",uv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),yv=/^( {2,}|\\)\n(?!\s*$)/,gv=/(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,Fv=/(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,Ev=/(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C2-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDECF\uDED9-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,_v=Xh(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fv).getRegex(),bv=/(?!~)(?:[!-\/:-@\[-`\{-~\xA1-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2010-\u2027\u2030-\u205E\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/,Cv=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kv=Xh(Cv,"u").replace(/punct/g,gv).getRegex(),Av=Xh(Cv,"u").replace(/punct/g,bv).getRegex(),wv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xv=Xh(wv,"gu").replace(/notPunctSpace/g,Ev).replace(/punctSpace/g,Fv).replace(/punct/g,gv).getRegex(),Sv=Xh(wv,"gu").replace(/notPunctSpace/g,/(?:(?:[\0-\x08\x0E-\x1F0-9A-Za-z\x7F-\x9F\xAA\xAD\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u037D\u037F-\u0383\u0386\u0388-\u03F5\u03F7-\u0481\u0483-\u0559\u0560-\u0588\u058B\u058C\u0590-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05F2\u05F5-\u0605\u0610-\u061A\u061C\u0620-\u0669\u066E-\u06D3\u06D5-\u06DD\u06DF-\u06E8\u06EA-\u06FC\u06FF\u070E-\u07F5\u07FA-\u07FD\u0800-\u082F\u083F-\u085D\u085F-\u0887\u0889-\u0963\u0966-\u096F\u0971-\u09F1\u09F4-\u09F9\u09FC\u09FE-\u0A75\u0A77-\u0AEF\u0AF2-\u0B6F\u0B71-\u0BF2\u0BFB-\u0C76\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0D4E\u0D50-\u0D78\u0D7A-\u0DF3\u0DF5-\u0E3E\u0E40-\u0E4E\u0E50-\u0E59\u0E5C-\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F84\u0F86-\u0FBD\u0FC6\u0FCD\u0FDB-\u1049\u1050-\u109D\u10A0-\u10FA\u10FC-\u135F\u1369-\u138F\u139A-\u13FF\u1401-\u166C\u166F-\u167F\u1681-\u169A\u169D-\u16EA\u16EE-\u1734\u1737-\u17D3\u17D7\u17DC-\u17FF\u180B-\u193F\u1941-\u1943\u1946-\u19DD\u1A00-\u1A1D\u1A20-\u1A9F\u1AA7\u1AAE-\u1B4D\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BFB\u1C00-\u1C3A\u1C40-\u1C7D\u1C80-\u1CBF\u1CC8-\u1CD2\u1CD4-\u1FBC\u1FBE\u1FC2-\u1FCC\u1FD0-\u1FDC\u1FE0-\u1FEC\u1FF0-\u1FFC\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u2079\u207F-\u2089\u208F-\u209F\u20C2-\u20FF\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u218C-\u218F\u242A-\u243F\u244B-\u249B\u24EA-\u24FF\u2776-\u2793\u2B74\u2B75\u2C00-\u2CE4\u2CEB-\u2CF8\u2CFD\u2D00-\u2D6F\u2D71-\u2DFF\u2E2F\u2E5E-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3040-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u318F\u3192-\u3195\u31A0-\u31BF\u31E6-\u31EE\u31F0-\u31FF\u321F-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48F\uA4C7-\uA4FD\uA500-\uA60C\uA610-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA6F8-\uA6FF\uA717-\uA71F\uA722-\uA788\uA78B-\uA827\uA82C-\uA835\uA83A-\uA873\uA878-\uA8CD\uA8D0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA95E\uA960-\uA9C0\uA9CE-\uA9DD\uA9E0-\uAA5B\uAA60-\uAA76\uAA7A-\uAADD\uAAE0-\uAAEF\uAAF2-\uAB5A\uAB5C-\uAB69\uAB6C-\uABEA\uABEC-\uD7FF\uE000-\uFB28\uFB2A-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDD0-\uFDFB\uFE00-\uFE0F\uFE1A-\uFE2F\uFE53\uFE67\uFE6C-\uFEFE\uFF00\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]|\uD800[\uDC00-\uDCFF\uDD03-\uDD36\uDD40-\uDD78\uDD8A\uDD8B\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFD-\uDF9E\uDFA0-\uDFCF\uDFD1-\uDFFF]|\uD801[\uDC00-\uDD6E\uDD70-\uDFFF]|\uD802[\uDC00-\uDC56\uDC58-\uDC76\uDC79-\uDD1E\uDD20-\uDD3E\uDD40-\uDE4F\uDE59-\uDE7E\uDE80-\uDEC7\uDEC9-\uDEEF\uDEF7-\uDF38\uDF40-\uDF98\uDF9D-\uDFFF]|\uD803[\uDC00-\uDD6D\uDD6F-\uDD8D\uDD90-\uDEAC\uDEAE-\uDECF\uDED9-\uDF54\uDF5A-\uDF85\uDF8A-\uDFFF]|\uD804[\uDC00-\uDC46\uDC4E-\uDCBA\uDCBD\uDCC2-\uDD3F\uDD44-\uDD73\uDD76-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE0-\uDE37\uDE3E-\uDEA8\uDEAA-\uDFD3\uDFD6\uDFD9-\uDFFF]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5C\uDC5E-\uDCC5\uDCC7-\uDDC0\uDDD8-\uDE40\uDE44-\uDE5F\uDE6D-\uDEB8\uDEBA-\uDF3B\uDF40-\uDFFF]|\uD806[\uDC00-\uDC3A\uDC3C-\uDD43\uDD47-\uDDE1\uDDE3-\uDE3E\uDE47-\uDE99\uDE9D\uDEA3-\uDEFF\uDF0A-\uDFE0\uDFE2-\uDFFF]|\uD807[\uDC00-\uDC40\uDC46-\uDC6F\uDC72-\uDEF6\uDEF9-\uDF42\uDF50-\uDFD4\uDFF2-\uDFFE]|[\uD808\uD80A\uD80C-\uD819\uD81C-\uD82E\uD830-\uD832\uD837\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD809[\uDC00-\uDC6F\uDC75-\uDFFF]|\uD80B[\uDC00-\uDFF0\uDFF3-\uDFFF]|\uD81A[\uDC00-\uDE6D\uDE70-\uDEF4\uDEF6-\uDF36\uDF40-\uDF43\uDF46-\uDFFF]|\uD81B[\uDC00-\uDD6C\uDD70-\uDE96\uDE9B-\uDFE1\uDFE3-\uDFFF]|\uD82F[\uDC00-\uDC9B\uDC9D\uDC9E\uDCA0-\uDFFF]|\uD833[\uDCF0-\uDCF9\uDCFD-\uDCFF\uDEB4-\uDEB9\uDED1-\uDEDF\uDEF1-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDDEB-\uDDFF\uDE42-\uDE44\uDE46-\uDEFF\uDF57-\uDFFF]|\uD835[\uDC00-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE8C-\uDFFF]|\uD838[\uDC00-\uDD4E\uDD50-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDDFE\uDE00-\uDFFF]|\uD83A[\uDC00-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDD2D\uDD2F-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDD0C\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED9-\uDEDB\uDEED-\uDEEF\uDEFD-\uDEFF\uDFDA-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDE58-\uDE5F\uDE6E\uDE6F\uDE7D-\uDE7F\uDE8B-\uDE8D\uDEC7\uDEC9-\uDECC\uDEDD\uDEDE\uDEEB-\uDEEE\uDEF9-\uDEFF\uDF93\uDFF0-\uDFF9\uDFFB-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|~)/).replace(/punctSpace/g,/(?!~)(?:[\t-\r -\/:-@\[-`\{-~\xA0-\xA9\xAB\xAC\xAE-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u037E\u0384\u0385\u0387\u03F6\u0482\u055A-\u055F\u0589\u058A\u058D-\u058F\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0606-\u060F\u061B\u061D-\u061F\u066A-\u066D\u06D4\u06DE\u06E9\u06FD\u06FE\u0700-\u070D\u07F6-\u07F9\u07FE\u07FF\u0830-\u083E\u085E\u0888\u0964\u0965\u0970\u09F2\u09F3\u09FA\u09FB\u09FD\u0A76\u0AF0\u0AF1\u0B70\u0BF3-\u0BFA\u0C77\u0C7F\u0C84\u0D4F\u0D79\u0DF4\u0E3F\u0E4F\u0E5A\u0E5B\u0F01-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F85\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u104A-\u104F\u109E\u109F\u10FB\u1360-\u1368\u1390-\u1399\u1400\u166D\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DB\u1800-\u180A\u1940\u1944\u1945\u19DE-\u19FF\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2000-\u200A\u2010-\u2029\u202F-\u205F\u207A-\u207E\u208A-\u208E\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2775\u2794-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u303F\u309B\u309C\u30A0\u30FB\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAA77-\uAA79\uAADE\uAADF\uAAF0\uAAF1\uAB5B\uAB6A\uAB6B\uABEB\uFB29\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD00-\uDD02\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDC77\uDC78\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEC8\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDD8E\uDD8F\uDEAD\uDED0-\uDED8\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3F]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFD5-\uDFF1\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3F\uDF44\uDF45]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F[\uDC9C\uDC9F]|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE8B]|\uD838[\uDD4F\uDEFF]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA])/).replace(/punct/g,bv).getRegex(),Bv=Xh("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ev).replace(/punctSpace/g,Fv).replace(/punct/g,gv).getRegex(),Ov=Xh(/\\(punct)/,"gu").replace(/punct/g,gv).getRegex(),Iv=Xh(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Tv=Xh(fv).replace("(?:--\x3e|$)","--\x3e").getRegex(),Pv=Xh("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Tv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jv=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Nv=Xh(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jv).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),zv=Xh(/^!?\[(label)\]\[(ref)\]/).replace("label",jv).replace("ref",ov).getRegex(),Rv=Xh(/^!?\[(ref)\](?:\[\])?/).replace("ref",ov).getRegex(),Mv={_backpedal:Yh,anyPunctuation:Ov,autolink:Iv,blockSkip:/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,br:yv,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Yh,emStrongLDelim:kv,emStrongRDelimAst:xv,emStrongRDelimUnd:Bv,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Nv,nolink:Rv,punctuation:_v,reflink:zv,reflinkSearch:Xh("reflink|nolink(?!\\()","g").replace("reflink",zv).replace("nolink",Rv).getRegex(),tag:Pv,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Vv=function(e){return Hv[e]};function Wv(e,t){if(t){if(ev.escapeTest.test(e))return e.replace(ev.escapeReplace,Vv)}else if(ev.escapeTestNoEncode.test(e))return e.replace(ev.escapeReplaceNoEncode,Vv);return e}function Kv(e){try{e=encodeURI(e).replace(ev.percentDecode,"%")}catch(e){return null}return e}function Jv(e,t){var n,r=e.replace(ev.findPipe,function(e,t,n){for(var r=!1,u=t;--u>=0&&"\\"===n[u];)r=!r;return r?"|":" |"}).split(ev.splitPipe),u=0;if(r[0].trim()||r.shift(),r.length>0&&!(null!==(n=r.at(-1))&&void 0!==n&&n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Gv(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t,n){var r=e.match(n.other.indentCodeCompensation);if(null===r)return t;var u=r[1];return t.split("\n").map(function(e){var t=e.match(n.other.beginningSpace);return null===t?e:pn(t,1)[0].length>=u.length?e.slice(u.length):e}).join("\n")}(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(this.rules.other.endingHash.test(n)){var r=Gv(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Gv(t[0],"\n")}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){for(var n=Gv(t[0],"\n").split("\n"),r="",u="",a=[];n.length>0;){var i=!1,o=[],s=void 0;for(s=0;s1,a={type:"list",raw:"",ordered:u,start:u?+r.slice(0,-1):"",loose:!1,items:[]};r=u?"\\d{1,9}\\".concat(r.slice(-1)):"\\".concat(r),this.options.pedantic&&(r=u?r:"[*+-]");for(var i=this.rules.other.listItemRegex(r),o=!1;e;){var s=!1,c="",l="";if(!(n=i.exec(e))||this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);var f=n[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,function(e){return" ".repeat(3*e.length)}),d=e.split("\n",1)[0],p=!f.trim(),h=0;if(this.options.pedantic?(h=2,l=f.trimStart()):p?h=n[1].length+1:(h=(h=n[2].search(this.rules.other.nonSpaceChar))>4?1:h,l=f.slice(h),h+=n[1].length),p&&this.rules.other.blankLine.test(d)&&(c+=d+"\n",e=e.substring(d.length+1),s=!0),!s)for(var v=this.rules.other.nextBulletRegex(h),m=this.rules.other.hrRegex(h),D=this.rules.other.fencesBeginRegex(h),y=this.rules.other.headingBeginRegex(h),g=this.rules.other.htmlBeginRegex(h);e;){var F=e.split("\n",1)[0],E=void 0;if(d=F,E=this.options.pedantic?d=d.replace(this.rules.other.listReplaceNesting," "):d.replace(this.rules.other.tabCharGlobal," "),D.test(d)||y.test(d)||g.test(d)||v.test(d)||m.test(d))break;if(E.search(this.rules.other.nonSpaceChar)>=h||!d.trim())l+="\n"+E.slice(h);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(f)||y.test(f)||m.test(f))break;l+="\n"+d}!p&&!d.trim()&&(p=!0),c+=F+"\n",e=e.substring(F.length+1),f=E.slice(h)}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0));var _=null,b=void 0;this.options.gfm&&(_=this.rules.other.listIsTask.exec(l))&&(b="[ ] "!==_[0],l=l.replace(this.rules.other.listReplaceTask,"")),a.items.push({type:"list_item",raw:c,task:!!_,checked:b,loose:!1,text:l,tokens:[]}),a.raw+=c}var C=a.items.at(-1);if(!C)return;C.raw=C.raw.trimEnd(),C.text=C.text.trimEnd(),a.raw=a.raw.trimEnd();for(var k=0;k0&&A.some(function(e){return t.rules.other.anyLine.test(e.raw)});a.loose=w}if(a.loose)for(var x=0;x0?-2:-1}(t[2],"()");if(-2===u)return;if(u>-1){var a=(0===t[0].indexOf("!")?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,a).trim(),t[3]=""}}var i=t[2],o="";if(this.options.pedantic){var s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i.slice(1):i.slice(1,-1)),Qv(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!r){var u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return Qv(n,r,n[0],this.lexer,this.rules)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){var u,a,i=hn(r[0]).length-1,o=i,s=0,c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=c.exec(t));)if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=hn(u).length,r[3]||r[4])o+=a;else if(!((r[5]||r[6])&&i%3)||(i+a)%3){if(!((o-=a)>0)){a=Math.min(a,a+o+s);var l=hn(r[0])[0].length,f=e.slice(0,i+r.index+l+a);if(Math.min(i,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}else s+=a}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),u=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&u&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e){var t,n,r=this.rules.inline.autolink.exec(e);if(r)return n="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e){var t;if(t=this.rules.inline.url.exec(e)){var n,r;if("@"===t[2])r="mailto:"+(n=t[0]);else{var u;do{var a,i;u=t[0],t[0]=null!==(a=null===(i=this.rules.inline._backpedal.exec(t[0]))||void 0===i?void 0:i[0])&&void 0!==a?a:""}while(u!==t[0]);n=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}},{key:"inlineText",value:function(e){var t=this.rules.inline.text.exec(e);if(t){var n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}]),Xv=function(){function e(t){Gt(this,e),tn(this,"tokens",void 0),tn(this,"options",void 0),tn(this,"state",void 0),tn(this,"tokenizer",void 0),tn(this,"inlineQueue",void 0),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Gh,this.options.tokenizer=this.options.tokenizer||new Yv,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={other:ev,block:qv.normal,inline:Uv.normal};this.options.pedantic?(n.block=qv.pedantic,n.inline=Uv.pedantic):this.options.gfm&&(n.block=qv.gfm,this.options.breaks?n.inline=Uv.breaks:n.inline=Uv.gfm),this.tokenizer.rules=n}return Xt(e,[{key:"lex",value:function(e){e=e.replace(ev.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=function(){var t,a,i;if(null!==(t=n.options.extensions)&&void 0!==t&&null!==(t=t.block)&&void 0!==t&&t.some(function(t){return!!(i=t.call({lexer:n},e,r))&&(e=e.substring(i.raw.length),r.push(i),!0)}))return 0;if(i=n.tokenizer.space(e)){e=e.substring(i.raw.length);var o=r.at(-1);return 1===i.raw.length&&void 0!==o?o.raw+="\n":r.push(i),0}if(i=n.tokenizer.code(e)){e=e.substring(i.raw.length);var s=r.at(-1);return"paragraph"===(null==s?void 0:s.type)||"text"===(null==s?void 0:s.type)?(s.raw+=(s.raw.endsWith("\n")?"":"\n")+i.raw,s.text+="\n"+i.text,n.inlineQueue.at(-1).src=s.text):r.push(i),0}if(i=n.tokenizer.fences(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.heading(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.hr(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.blockquote(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.list(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.html(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.def(e)){e=e.substring(i.raw.length);var c=r.at(-1);return"paragraph"===(null==c?void 0:c.type)||"text"===(null==c?void 0:c.type)?(c.raw+=(c.raw.endsWith("\n")?"":"\n")+i.raw,c.text+="\n"+i.raw,n.inlineQueue.at(-1).src=c.text):n.tokens.links[i.tag]||(n.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i)),0}if(i=n.tokenizer.table(e))return e=e.substring(i.raw.length),r.push(i),0;if(i=n.tokenizer.lheading(e))return e=e.substring(i.raw.length),r.push(i),0;var l=e;if(null!==(a=n.options.extensions)&&void 0!==a&&a.startBlock){var f,d=1/0,p=e.slice(1);n.options.extensions.startBlock.forEach(function(e){"number"==typeof(f=e.call({lexer:n},p))&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(n.state.top&&(i=n.tokenizer.paragraph(l))){var h=r.at(-1);return u&&"paragraph"===(null==h?void 0:h.type)?(h.raw+=(h.raw.endsWith("\n")?"":"\n")+i.raw,h.text+="\n"+i.text,n.inlineQueue.pop(),n.inlineQueue.at(-1).src=h.text):r.push(i),u=l.length!==e.length,e=e.substring(i.raw.length),0}if(i=n.tokenizer.text(e)){e=e.substring(i.raw.length);var v=r.at(-1);return"text"===(null==v?void 0:v.type)?(v.raw+=(v.raw.endsWith("\n")?"":"\n")+i.raw,v.text+="\n"+i.text,n.inlineQueue.pop(),n.inlineQueue.at(-1).src=v.text):r.push(i),0}if(e){var m="Infinite loop on byte: "+e.charCodeAt(0);if(n.options.silent)return console.error(m),1;throw new Error(m)}};for(this.options.pedantic&&(e=e.replace(ev.tabCharGlobal," ").replace(ev.spaceLine,""));e&&(0===(t=a())||1!==t););return this.state.top=!0,r}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=e,i=null;if(this.tokens.links){var o=Object.keys(this.tokens.links);if(o.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,i.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=null!==(t=null===(n=this.options.hooks)||void 0===n||null===(n=n.emStrongMask)||void 0===n?void 0:n.call({lexer:this},a))&&void 0!==t?t:a;for(var s,c=!1,l="",f=function(){var t,n,i;if(c||(l=""),c=!1,null!==(t=r.options.extensions)&&void 0!==t&&null!==(t=t.inline)&&void 0!==t&&t.some(function(t){return!!(i=t.call({lexer:r},e,u))&&(e=e.substring(i.raw.length),u.push(i),!0)}))return 0;if(i=r.tokenizer.escape(e))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.tag(e))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.link(e))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.reflink(e,r.tokens.links)){e=e.substring(i.raw.length);var o=u.at(-1);return"text"===i.type&&"text"===(null==o?void 0:o.type)?(o.raw+=i.raw,o.text+=i.text):u.push(i),0}if(i=r.tokenizer.emStrong(e,a,l))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.codespan(e))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.br(e))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.del(e))return e=e.substring(i.raw.length),u.push(i),0;if(i=r.tokenizer.autolink(e))return e=e.substring(i.raw.length),u.push(i),0;if(!r.state.inLink&&(i=r.tokenizer.url(e)))return e=e.substring(i.raw.length),u.push(i),0;var s=e;if(null!==(n=r.options.extensions)&&void 0!==n&&n.startInline){var f,d=1/0,p=e.slice(1);r.options.extensions.startInline.forEach(function(e){"number"==typeof(f=e.call({lexer:r},p))&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(s=e.substring(0,d+1))}if(i=r.tokenizer.inlineText(s)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),c=!0;var h=u.at(-1);return"text"===(null==h?void 0:h.type)?(h.raw+=i.raw,h.text+=i.text):u.push(i),0}if(e){var v="Infinite loop on byte: "+e.charCodeAt(0);if(r.options.silent)return console.error(v),1;throw new Error(v)}};e&&(0===(s=f())||1!==s););return u}}],[{key:"rules",get:function(){return{block:qv,inline:Uv}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}])}(),em=Xt(function e(t){Gt(this,e),tn(this,"options",void 0),tn(this,"parser",void 0),this.options=t||Gh},[{key:"space",value:function(e){return""}},{key:"code",value:function(e){var t,n=e.text,r=e.lang,u=e.escaped,a=null===(t=(r||"").match(ev.notSpaceStart))||void 0===t?void 0:t[0],i=n.replace(ev.endingNewline,"")+"\n";return a?'
    '+(u?i:Wv(i,!0))+"
    \n":"
    "+(u?i:Wv(i,!0))+"
    \n"}},{key:"blockquote",value:function(e){var t=e.tokens;return"
    \n".concat(this.parser.parse(t),"
    \n")}},{key:"html",value:function(e){return e.text}},{key:"def",value:function(e){return""}},{key:"heading",value:function(e){var t=e.tokens,n=e.depth;return"").concat(this.parser.parseInline(t),"\n")}},{key:"hr",value:function(e){return"
    \n"}},{key:"list",value:function(e){for(var t=e.ordered,n=e.start,r="",u=0;u\n"+r+"\n"}},{key:"listitem",value:function(e){var t="";if(e.task){var n,r=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null===(n=e.tokens[0])||void 0===n?void 0:n.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+Wv(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"
  • ".concat(t,"
  • \n")}},{key:"checkbox",value:function(e){return"'}},{key:"paragraph",value:function(e){var t=e.tokens;return"

    ".concat(this.parser.parseInline(t),"

    \n")}},{key:"table",value:function(e){for(var t="",n="",r=0;r")),"\n\n"+t+"\n"+u+"
    \n"}},{key:"tablerow",value:function(e){var t=e.text;return"\n".concat(t,"\n")}},{key:"tablecell",value:function(e){var t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"\n")}},{key:"strong",value:function(e){var t=e.tokens;return"".concat(this.parser.parseInline(t),"")}},{key:"em",value:function(e){var t=e.tokens;return"".concat(this.parser.parseInline(t),"")}},{key:"codespan",value:function(e){var t=e.text;return"".concat(Wv(t,!0),"")}},{key:"br",value:function(e){return"
    "}},{key:"del",value:function(e){var t=e.tokens;return"".concat(this.parser.parseInline(t),"")}},{key:"link",value:function(e){var t=e.href,n=e.title,r=e.tokens,u=this.parser.parseInline(r),a=Kv(t);if(null===a)return u;var i='
    "+u+""}},{key:"image",value:function(e){var t=e.href,n=e.title,r=e.text,u=e.tokens;u&&(r=this.parser.parseInline(u,this.parser.textRenderer));var a=Kv(t);if(null===a)return Wv(r);var i='').concat(r,'"}},{key:"text",value:function(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Wv(e.text)}}]),tm=Xt(function e(){Gt(this,e)},[{key:"strong",value:function(e){return e.text}},{key:"em",value:function(e){return e.text}},{key:"codespan",value:function(e){return e.text}},{key:"del",value:function(e){return e.text}},{key:"html",value:function(e){return e.text}},{key:"text",value:function(e){return e.text}},{key:"link",value:function(e){return""+e.text}},{key:"image",value:function(e){return""+e.text}},{key:"br",value:function(){return""}}]),nm=function(){function e(t){Gt(this,e),tn(this,"options",void 0),tn(this,"renderer",void 0),tn(this,"textRenderer",void 0),this.options=t||Gh,this.options.renderer=this.options.renderer||new em,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tm}return Xt(e,[{key:"parse",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="",r=0;r"u"||null===n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);var o=a.hooks?a.hooks.provideLexer():e?Xv.lex:Xv.lexInline,s=a.hooks?a.hooks.provideParser():e?nm.parse:nm.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(function(e){return o(e,a)}).then(function(e){return a.hooks?a.hooks.processAllTokens(e):e}).then(function(e){return a.walkTokens?Promise.all(t.walkTokens(e,a.walkTokens)).then(function(){return e}):e}).then(function(e){return s(e,a)}).then(function(e){return a.hooks?a.hooks.postprocess(e):e}).catch(i);try{a.hooks&&(n=a.hooks.preprocess(n));var c=o(n,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&t.walkTokens(c,a.walkTokens);var l=s(c,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(c){return i(c)}}}},{key:"onError",value:function(e,t){return function(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){var r="

    An error occurred:

    "+Wv(n.message+"",!0)+"
    ";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}]));function am(e,t){return um.parse(e,t)}function im(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}am.options=am.setOptions=function(e){return um.setOptions(e),am.defaults=um.defaults,Qh(am.defaults),am},am.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},am.defaults=Gh,am.use=function(){return um.use.apply(um,arguments),am.defaults=um.defaults,Qh(am.defaults),am},am.walkTokens=function(e,t){return um.walkTokens(e,t)},am.parseInline=um.parseInline,am.Parser=nm,am.parser=nm.parse,am.Renderer=em,am.TextRenderer=tm,am.Lexer=Xv,am.lexer=Xv.lex,am.Tokenizer=Yv,am.Hooks=rm,am.parse=am,am.options,am.setOptions,am.use,am.walkTokens,am.parseInline,nm.parse,Xv.lex;var om=new am.Renderer;om.code=function(e){var t=e.text,n=e.lang,r=void 0===n?"":n,u=e.escaped,a=r?"language-".concat(r):"",i=u?t:im(t),o=encodeURIComponent(t);return'\n
    \n \n
    ').concat(i,"
    \n
    \n ")},om.link=function(e){var t=e.href,n=e.title,r=e.text,u=n?' title="'.concat(im(n),'"'):"",a=t?im(t):"",i=im(r);return'').concat(i,"")};var sm=rt(function(e){var t=e.content,n=e.copyButtonText,r=e.copyButtonCopiedText,u=e.isStreaming,a=Ne(function(){return am.parse(t,{gfm:!0,breaks:!0,renderer:om})},[t]),i=Pe(null);return Ie(function(){var e=i.current;if(e)return Array.from(e.querySelectorAll(".DocSearch-CodeSnippet-CopyButton")).forEach(function(e){var t=e.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");t&&(t.textContent=n),e.classList.remove("DocSearch-CodeSnippet-CopyButton--copied")}),e.addEventListener("click",t),function(){e.removeEventListener("click",t)};function t(e){var t,u=e.target.closest(".DocSearch-CodeSnippet-CopyButton");if(u){var a=null!==(t=u.getAttribute("data-code"))&&void 0!==t?t:"";navigator.clipboard.writeText(decodeURIComponent(a)).catch(function(){});var i=u.querySelector(".DocSearch-CodeSnippet-CopyButton-Label");if(i){u.classList.add("DocSearch-CodeSnippet-CopyButton--copied");var o=n;i.textContent=r,setTimeout(function(){u.classList.remove("DocSearch-CodeSnippet-CopyButton--copied"),i.textContent=o},1500)}}}},[a,n,r]),Rt.createElement("div",{ref:i,className:"DocSearch-Markdown-Content ".concat(u?"DocSearch-Markdown-Content--streaming":""),dangerouslySetInnerHTML:{__html:a}})});sm.displayName="MemoizedMarkdown";var cm=function(e,t){var n,r,u=t[0].parts.find(function(e){return"text"===e.type});return{query:e,objectID:null!==(n=null==u?void 0:u.text)&&void 0!==n?n:"",messages:t,type:"askAI",anchor:"stored",content:null,hierarchy:{lvl0:"askAI",lvl1:null!==(r=null==u?void 0:u.text)&&void 0!==r?r:"",lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},url:"",url_without_anchor:""}},lm=function(e){return null==e?void 0:e.parts.find(function(e){return"text"===e.type})},fm=["translations"];function dm(e){var t=e.disclaimerText;return Rt.createElement("p",{className:"DocSearch-AskAiScreen-Disclaimer"},t)}function pm(e){var t,n=e.exchange,r=e.askAiStreamError,u=e.isLastExchange,a=e.loadingStatus,i=e.onSearchQueryClick,o=e.translations,s=e.conversations,c=e.onFeedback,l=n.userMessage,f=n.assistantMessage,d=!u||u&&"ready"===a&&Boolean(f),p=Ne(function(){return lm(f)},[f]),h=Ne(function(){return lm(l)},[l]),v=Rt.useMemo(function(){return e=f,t=[],n=new Set,e?(e.parts.forEach(function(e){if("text"===e.type&&0!==e.text.length){var r,u=e.text.replace(/```[\s\S]*?```/g,"").replace(/`[^`]*`/g,""),a=en(u.matchAll(/\[([^\]]*)\]\(([^)]+)\)/g));try{for(a.s();!(r=a.n()).done;){var i=r.value,o=i[1].trim(),s=i[2];n.has(s)||(n.add(s),t.push({url:s,title:o||void 0}))}}catch(e){a.e(e)}finally{a.f()}var c,l=en(u.matchAll(/(?"{}|\\^`[\]]+/g));try{for(l.s();!(c=l.n()).done;){var f=c.value[0].replace(/[.,;:!?]+$/,"");n.has(f)||(n.add(f),t.push({url:f}))}}catch(e){l.e(e)}finally{l.f()}}}),t):[];var e,t,n},[f]),m=Rt.useMemo(function(){return function(e){for(var t=[],n=0;n0&&u.push(c),a++}u.length>1?t.push({type:"aggregated-tool-call",queries:u}):1===u.length&&t.push(r),n=a-1}else t.push(r)}return t}((null==f?void 0:f.parts)||[])},[f]),D=["submitted","streaming"].includes(a)&&u&&!m.some(function(e){return"step-start"!==e.type});return Rt.createElement("div",{className:"DocSearch-AskAiScreen-Response-Container"},Rt.createElement("div",{className:"DocSearch-AskAiScreen-Response"},Rt.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--user"},Rt.createElement("p",{className:"DocSearch-AskAiScreen-Query"},null!==(t=null==h?void 0:h.text)&&void 0!==t?t:"")),Rt.createElement("div",{className:"DocSearch-AskAiScreen-Message DocSearch-AskAiScreen-Message--assistant"},Rt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent"},"error"===a&&r&&u&&Rt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent DocSearch-AskAiScreen-Error"},Rt.createElement(Rh,null),Rt.createElement(sm,{content:r.message,copyButtonText:"",copyButtonCopiedText:"",isStreaming:!1})),D&&Rt.createElement("div",{className:"DocSearch-AskAiScreen-MessageContent-Reasoning"},Rt.createElement("span",{className:"shimmer"},o.thinkingText||"Thinking...")),m.map(function(e,t){var n,r=t;if("string"==typeof e)return Rt.createElement(sm,{key:r,content:e,copyButtonText:o.copyButtonText||"Copy",copyButtonCopiedText:o.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===a});if("aggregated-tool-call"===e.type)return Rt.createElement(Jh,{key:r,queries:e.queries,translations:o,onSearchQueryClick:i});if("reasoning"===e.type&&"streaming"===e.state)return Rt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Reasoning shimmer"},Rt.createElement(Ph,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),Rt.createElement("span",{className:"shimmer"},"Reasoning..."));if("text"===e.type)return Rt.createElement(sm,{key:r,content:e.text,copyButtonText:o.copyButtonText||"Copy",copyButtonCopiedText:o.copyButtonCopiedText||"Copied!",isStreaming:"streaming"===e.state});if("tool-searchIndex"===e.type)switch(e.state){case"input-streaming":return Rt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--PartialCall shimmer"},Rt.createElement(Ph,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),Rt.createElement("span",null,o.preToolCallText||"Searching..."));case"input-available":return Rt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer"},Rt.createElement(Ph,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}),Rt.createElement("span",null,"".concat(o.duringToolCallText||"Searching for ",' "').concat(e.input.query||"",'" ...')));case"output-available":return Rt.createElement("div",{key:r,className:"DocSearch-AskAiScreen-MessageContent-Tool Tool--Result"},Rt.createElement(Cn,null),Rt.createElement("span",null,"".concat(o.afterToolCallText||"Searched for")," ",Rt.createElement("span",{role:"button",tabIndex:0,className:"DocSearch-AskAiScreen-MessageContent-Tool-Query",onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),i(e.output.query||""))},onClick:function(){return i(e.output.query||"")}}," ",'"',e.output.query||"",'"')," ","found ",(null===(n=e.output.hits)||void 0===n?void 0:n.length)||0," results"))}return null}))),Rt.createElement("div",{className:"DocSearch-AskAiScreen-Answer-Footer"},Rt.createElement(hm,{id:(null==l?void 0:l.id)||n.id,showActions:d,latestAssistantMessageContent:(null==p?void 0:p.text)||null,translations:o,conversations:s,onFeedback:c}))),v.length>0?Rt.createElement(vm,{urlsToDisplay:v,relatedSourcesText:o.relatedSourcesText}):null)}function hm(e){var t=e.id,n=e.showActions,r=e.latestAssistantMessageContent,u=e.translations,a=e.conversations,i=e.onFeedback,o=Rt.useMemo(function(){var e,n,r=null===(e=a.getOne)||void 0===e?void 0:e.call(a,t);return null!==(n=null==r?void 0:r.feedback)&&void 0!==n?n:null},[a,t]),s=pn(Rt.useState(o),2),c=s[0],l=s[1],f=pn(Rt.useState(!1),2),d=f[0],p=f[1],h=pn(Rt.useState(null),2),v=h[0],m=h[1],D=function(){var e=Kt(ln().m(function e(n){var r;return ln().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!d){e.n=1;break}return e.a(2);case 1:return m(null),p(!0),e.p=2,e.n=3,null==i?void 0:i(t,"like"===n?1:0);case 3:l(n),e.n=5;break;case 4:e.p=4,r=e.v,m(r);case 5:return e.p=5,p(!1),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t){return e.apply(this,arguments)}}(),y=u.likeButtonTitle,g=void 0===y?"Like":y,F=u.dislikeButtonTitle,E=void 0===F?"Dislike":F,_=u.thanksForFeedbackText,b=void 0===_?"Thanks for your feedback!":_;return n&&r?Rt.createElement("div",{className:"DocSearch-AskAiScreen-Actions"},null===c?Rt.createElement(Rt.Fragment,null,d?Rt.createElement(Ph,{className:"DocSearch-AskAiScreen-SmallerLoadingIcon"}):Rt.createElement(Rt.Fragment,null,Rt.createElement(gm,{title:g,onClick:function(){return D("like")}}),Rt.createElement(Fm,{title:E,onClick:function(){return D("dislike")}})),v&&Rt.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText"},v.message||"An error occured")):Rt.createElement("p",{className:"DocSearch-AskAiScreen-FeedbackText DocSearch-AskAiScreen-FeedbackText--visible"},b),Rt.createElement(ym,{translations:u,onClick:function(){return navigator.clipboard.writeText(r)}})):null}function vm(e){var t=e.urlsToDisplay,n=e.relatedSourcesText;return Rt.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources"},Rt.createElement("p",{className:"DocSearch-AskAiScreen-RelatedSources-Title"},n||"Related sources"),Rt.createElement("div",{className:"DocSearch-AskAiScreen-RelatedSources-List"},t.length>0&&t.map(function(e){return Rt.createElement("a",{key:e.url,href:e.url,className:"DocSearch-AskAiScreen-RelatedSources-Item-Link",target:"_blank",rel:"noopener noreferrer"},Rt.createElement(Dm,null),Rt.createElement("span",null,e.title||e.url))})))}function mm(e){var t=e.translations,n=void 0===t?{}:t,r=cn(e,fm),u=n.disclaimerText,a=void 0===u?"Answers are generated with AI which can make mistakes. Verify responses.":u,i=r.messages,o=Ne(function(){for(var e=[],t=0;t0&&Rt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},Rt.createElement("p",{className:"DocSearch-Help"},o,":"),Rt.createElement("div",{className:"DocSearch-NoResults-Prefill-List-Items"},d.slice(0,3).reduce(function(e,t){return[].concat(hn(e),[Rt.createElement("p",{key:t},Rt.createElement(Cn,{size:16}),Rt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){r.setQuery(t.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},t))])},[]))),r.getMissingResultsUrl&&Rt.createElement("p",{className:"DocSearch-Help"},"".concat(c," "),Rt.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var Cm=["hit","attribute","tagName"];function km(e,t){return t.split(".").reduce(function(e,t){return null!=e&&e[t]?e[t]:null},e)}function Am(e){var t=e.hit,n=e.attribute,r=e.tagName;return U(void 0===r?"span":r,sn(sn({},cn(e,Cm)),{},{dangerouslySetInnerHTML:{__html:km(t,"_snippetResult.".concat(n,".value"))||km(t,n)}}))}function wm(e){return e.collection&&0!==e.collection.items.length?"askAI"===e.collection.source.sourceId?Rt.createElement("section",{className:"DocSearch-AskAi-Section"},Rt.createElement("ul",e.getListProps({source:e.collection.source}),Rt.createElement(Sm,nn({item:e.collection.items[0],translations:e.translations},e)))):(e.collection.source.sourceId,Rt.createElement("section",{className:"DocSearch-Hits"},Rt.createElement("div",{className:"DocSearch-Hit-source"},e.title),Rt.createElement("ul",e.getListProps({source:e.collection.source}),e.collection.items.map(function(t,n){return Rt.createElement(xm,nn({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function xm(e){var t=e.item,n=e.index,r=e.renderIcon,u=e.renderAction,a=e.getItemProps,i=e.onItemClick,o=e.collection,s=e.hitComponent,c=pn(Rt.useState("idle"),2),l=c[0],f=c[1],d=Rt.useRef(null),p=s;return Rt.createElement("li",nn({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child","favoriting"===l&&"DocSearch-Hit--favoriting","deleting"===l&&"DocSearch-Hit--deleting"].filter(Boolean).join(" "),onAnimationEnd:function(){var e;null===(e=d.current)||void 0===e||e.call(d),d.current=null}},a({item:t,source:o.source,onClick:function(e){i(t,e)}})),Rt.createElement(p,{hit:t},Rt.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&Rt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},Rt.createElement(Am,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&Rt.createElement(Am,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),"askAI"===t.type&&Rt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},Rt.createElement(Am,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&Rt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},Rt.createElement(Am,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),Rt.createElement(Am,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&Rt.createElement("div",{className:"DocSearch-Hit-content-wrapper"},Rt.createElement(Am,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),Rt.createElement(Am,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),u({item:t,runDeleteTransition:function(e){f("deleting"),d.current=e},runFavoriteTransition:function(e){f("favoriting"),d.current=e}}))))}function Sm(e){var t=e.item,n=e.getItemProps,r=e.onItemClick,u=e.translations,a=e.collection,i=(u||{}).askAiPlaceholder,o=void 0===i?"Ask AI: ":i;return Rt.createElement("li",nn({className:"DocSearch-Hit"},n({item:t,source:a.source,onClick:function(e){r(t,e)}})),Rt.createElement("div",{className:"DocSearch-Hit--AskAI"},Rt.createElement("div",{className:"DocSearch-Hit-AskAIButton DocSearch-Hit-Container"},Rt.createElement("div",{className:" DocSearch-Hit-AskAIButton-icon DocSearch-Hit-icon"},Rt.createElement(jh,null)),Rt.createElement("div",{className:"DocSearch-Hit-AskAIButton-title"},Rt.createElement("span",{className:"DocSearch-Hit-AskAIButton-title-highlight"},o),Rt.createElement("mark",{className:"DocSearch-Hit-AskAIButton-title-query"},t.query||"")))))}function Bm(e,t,n){return e.reduce(function(e,r){var u=t(r);return e.hasOwnProperty(u)||(e[u]=[]),e[u].length<(n||5)&&e[u].push(r),e},{})}function Om(e){return e}function Im(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Tm(){}var Pm=/(|<\/mark>)/g,jm=RegExp(Pm.source);function Nm(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var u=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return u?u.value&&jm.test(u.value)?u.value.replace(Pm,""):u.value:e.hierarchy.lvl0}var zm=["translations"];function Rm(e){var t=e.translations,n=void 0===t?{}:t,r=cn(e,zm);return Rt.createElement("div",{className:"DocSearch-Dropdown-Container"},r.state.collections.map(function(e){if(0===e.items.length)return null;var t=Nm(e.items[0]);return Rt.createElement(wm,nn({},r,{key:e.source.sourceId,translations:n,title:t,collection:e,renderIcon:function(t){var n,r=t.item,u=t.index;return Rt.createElement(Rt.Fragment,null,r.__docsearch_parent&&Rt.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},Rt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.__docsearch_parent!==(null===(n=e.items[u+1])||void 0===n?void 0:n.__docsearch_parent)?Rt.createElement("path",{d:"M8 6v21M20 27H8.3"}):Rt.createElement("path",{d:"M8 6v42M20 27H8.3"}))),Rt.createElement("div",{className:"DocSearch-Hit-icon"},Rt.createElement(Lh,{type:r.type})))},renderAction:function(){return Rt.createElement("div",{className:"DocSearch-Hit-action"},Rt.createElement(Mh,null))}}))}),r.resultsFooterComponent&&Rt.createElement("section",{className:"DocSearch-HitsFooter"},Rt.createElement(r.resultsFooterComponent,{state:r.state})))}var Mm=["translations"];function Zm(e){var t=e.translations,n=void 0===t?{}:t,r=cn(e,Mm),u=n.recentSearchesTitle,a=void 0===u?"Recent":u,i=n.saveRecentSearchButtonTitle,o=void 0===i?"Save this search":i,s=n.removeRecentSearchButtonTitle,c=void 0===s?"Remove this search from history":s,l=n.favoriteSearchesTitle,f=void 0===l?"Favorite":l,d=n.removeFavoriteSearchButtonTitle,p=void 0===d?"Remove this search from favorites":d,h=n.recentConversationsTitle,v=void 0===h?"Recent conversations":h,m=n.removeRecentConversationButtonTitle,D=void 0===m?"Remove this conversation from history":m;return Rt.createElement("div",{className:"DocSearch-Dropdown-Container"},Rt.createElement(wm,nn({},r,{title:a,collection:r.state.collections[0],renderIcon:function(){return Rt.createElement("div",{className:"DocSearch-Hit-icon"},Rt.createElement(Nh,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,u=e.runDeleteTransition;return Rt.createElement(Rt.Fragment,null,Rt.createElement("div",{className:"DocSearch-Hit-action"},Rt.createElement("button",{className:"DocSearch-Hit-action-button",title:o,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n(function(){r.favoriteSearches.add(t),r.recentSearches.remove(t),r.refresh()})}},Rt.createElement(Uh,null))),Rt.createElement("div",{className:"DocSearch-Hit-action"},Rt.createElement("button",{className:"DocSearch-Hit-action-button",title:c,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),u(function(){r.recentSearches.remove(t),r.refresh()})}},Rt.createElement(zh,null))))}})),Rt.createElement(wm,nn({},r,{title:f,collection:r.state.collections[1],renderIcon:function(){return Rt.createElement("div",{className:"DocSearch-Hit-icon"},Rt.createElement(Uh,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return Rt.createElement("div",{className:"DocSearch-Hit-action"},Rt.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n(function(){r.favoriteSearches.remove(t),r.refresh()})}},Rt.createElement(zh,null)))}})),Rt.createElement(wm,nn({},r,{title:v,collection:r.state.collections[2],renderIcon:function(){return Rt.createElement("div",{className:"DocSearch-Hit-icon"},Rt.createElement(jh,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return Rt.createElement("div",{className:"DocSearch-Hit-action"},Rt.createElement("button",{className:"DocSearch-Hit-action-button",title:D,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n(function(){r.conversations.remove(t),r.refresh()})}},Rt.createElement(zh,null)))}})))}var Lm=["translations"],$m=Rt.memo(function(e){var t,n=e.translations,r=void 0===n?{}:n,u=cn(e,Lm);return u.isAskAiActive&&u.canHandleAskAi?Rt.createElement(mm,nn({},u,{messages:u.messages,status:u.status,askAiStreamError:u.askAiStreamError,askAiFetchError:u.askAiFetchError,translations:null==r?void 0:r.askAiScreen})):"error"===(null===(t=u.state)||void 0===t?void 0:t.status)?Rt.createElement(Em,{translations:null==r?void 0:r.errorScreen}):u.state.query?u.hasCollections||u.canHandleAskAi?Rt.createElement(Rt.Fragment,null,Rt.createElement(Rm,nn({},u,{translations:null==r?void 0:r.resultsScreen})),u.canHandleAskAi&&1===u.state.collections.length&&Rt.createElement(bm,nn({},u,{translations:null==r?void 0:r.noResultsScreen}))):Rt.createElement(bm,nn({},u,{translations:null==r?void 0:r.noResultsScreen})):Rt.createElement(Zm,nn({},u,{hasCollections:u.hasCollections,translations:null==r?void 0:r.startScreen}))},function(e,t){return"loading"===t.state.status||"stalled"===t.state.status});function qm(e){var t=e.size,n=void 0===t?20:t,r=e.color,u=void 0===r?"currentColor":r;return Rt.createElement("svg",{width:n,height:n,className:"DocSearch-Back-Icon",viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Rt.createElement("path",{d:"m12 19-7-7 7-7"}),Rt.createElement("path",{d:"M19 12H5"}))}var Um=["translations"];function Hm(e){var t=e.translations,n=void 0===t?{}:t,r=cn(e,Um),u=n.clearButtonTitle,a=void 0===u?"Clear":u,i=n.clearButtonAriaLabel,o=void 0===i?"Clear the query":i,s=n.closeButtonText,c=void 0===s?"Close":s,l=n.closeButtonAriaLabel,f=void 0===l?"Close":l,d=n.searchInputLabel,p=void 0===d?"Search":d,h=n.backToKeywordSearchButtonText,v=void 0===h?"Back to keyword search":h,m=n.backToKeywordSearchButtonAriaLabel,D=void 0===m?"Back to keyword search":m,y=n.placeholderTextAskAiStreaming,g=void 0===y?"Answering...":y,F=r.getFormProps({inputElement:r.inputRef.current}).onReset;Rt.useEffect(function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()},[r.autoFocus,r.inputRef]),Rt.useEffect(function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()},[r.isFromSelection,r.inputRef]);var E=r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:512}),_=new Set(["ArrowUp","ArrowDown","Enter"]),b=E.onKeyDown,C=E.onChange,k="streaming"===r.askAiStatus||"submitted"===r.askAiStatus,A="stalled"===r.state.status;Rt.useEffect(function(){"streaming"!==r.askAiStatus&&"submitted"!==r.askAiStatus&&r.inputRef.current&&r.inputRef.current.focus()},[r.askAiStatus,r.inputRef]);var w=sn(sn({},E),{},{enterKeyHint:r.isAskAiActive?"enter":"search",onKeyDown:function(e){if(r.isAskAiActive&&_.has(e.key))return"Enter"===e.key&&!k&&r.state.query&&r.onAskAgain(r.state.query),e.preventDefault(),void e.stopPropagation();null==b||b(e)},onChange:function(e){if(r.isAskAiActive)return r.setQuery(e.currentTarget.value),e.preventDefault(),void e.stopPropagation();null==C||C(e)},disabled:k});return Rt.createElement(Rt.Fragment,null,Rt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:F},r.isAskAiActive?Rt.createElement(Rt.Fragment,null,Rt.createElement("button",{type:"button",tabIndex:0,className:"DocSearch-AskAi-Return",title:v,"aria-label":D,onClick:function(){return r.onAskAiToggle(!1)}},Rt.createElement(qm,null))):Rt.createElement(Rt.Fragment,null,A&&Rt.createElement("div",{className:"DocSearch-LoadingIndicator"},Rt.createElement(Ph,null)),!A&&Rt.createElement("label",nn({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),Rt.createElement(Cn,null),Rt.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},p))),Rt.createElement("input",nn({className:"DocSearch-Input",ref:r.inputRef},w,{placeholder:k?g:r.placeholder})),Rt.createElement("div",{className:"DocSearch-Actions"},k&&Rt.createElement("button",{type:"button",className:"DocSearch-StreamingIndicator",onClick:function(){return r.onAskAiToggle(!0)}},Rt.createElement(jh,null)),Rt.createElement("button",{className:"DocSearch-Clear",type:"reset","aria-label":o,hidden:!r.state.query,tabIndex:r.state.query?0:-1,"aria-hidden":r.state.query?"false":"true"},a),(k||r.state.query)&&Rt.createElement("div",{className:"DocSearch-Divider"}),Rt.createElement("button",{type:"button",title:c,className:"DocSearch-Close","aria-label":f,onClick:r.onClose},Rt.createElement(zh,null)))))}function Vm(){if("undefined"!=typeof window&&window.localStorage){var e=[];for(var t in window.localStorage)if(t.includes("__DOCSEARCH_")){var n=window.localStorage[t];e.push({key:t,size:n.length+t.length})}e.sort(function(e,t){return t.size-e.size});for(var r=Math.ceil(e.length/2),u=0;u-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),u.setItem(a)},remove:function(e){a=a.filter(function(t){return t.objectID!==e.objectID}),u.setItem(a)},getAll:function(){return a}}}function Gm(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function u(){return JSON.parse(r().getItem(n)||"{}")}function a(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var n,r,i;return n=e.timeToLive?1e3*e.timeToLive:null,r=u(),a(i=Object.fromEntries(Object.entries(r).filter(function(e){return void 0!==pn(e,2)[1].timestamp}))),n&&a(Object.fromEntries(Object.entries(i).filter(function(e){var t=pn(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then(function(e){return Promise.all([e,n.miss(e)])}).then(function(e){return pn(e,1)[0]})},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,u).catch(function(){return Qm({caches:t}).get(e,r,u)})},set:function(e,r){return n.set(e,r).catch(function(){return Qm({caches:t}).set(e,r)})},delete:function(e){return n.delete(e).catch(function(){return Qm({caches:t}).delete(e)})},clear:function(){return n.clear().catch(function(){return Qm({caches:t}).clear()})}}}function Ym(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r();return i.then(function(e){return u.miss(e)}).then(function(){return i})},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Xm(e){var t=e.algoliaAgents,n=e.client,r=e.version,u=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach(function(e){return u.add(e)}),u}var eD=12e4;function tD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return sn(sn({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>eD},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=eD}})}var nD=function(){function e(t,n){var r;return Gt(this,e),tn(r=Jt(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return un(e,yn(Error)),Xt(e)}(),rD=function(){function e(t,n,r){var u;return Gt(this,e),tn(u=Jt(this,e,[t,r]),"stackTrace",void 0),u.stackTrace=n,u}return un(e,nD),Xt(e)}(),uD=function(){function e(t){return Gt(this,e),Jt(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",t,"RetryError"])}return un(e,rD),Xt(e)}(),aD=function(){function e(t,n,r){var u,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return Gt(this,e),tn(u=Jt(this,e,[t,r,a]),"status",void 0),u.status=n,u}return un(e,rD),Xt(e)}(),iD=function(){function e(t,n){var r;return Gt(this,e),tn(r=Jt(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return un(e,nD),Xt(e)}(),oD=function(){function e(t,n,r,u){var a;return Gt(this,e),tn(a=Jt(this,e,[t,n,u,"DetailedApiError"]),"error",void 0),a.error=r,a}return un(e,aD),Xt(e)}();function sD(e,t,n){var r,u=(r=n,Object.keys(r).filter(function(e){return void 0!==r[e]}).sort().map(function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))}).join("&")),a="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return u.length&&(a+="?".concat(u)),a}function cD(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:sn(sn({},e.data),t.data);return JSON.stringify(n)}}function lD(e,t,n){var r=sn(sn(sn({Accept:"application/json"},e),t),n),u={};return Object.keys(r).forEach(function(e){var t=r[e];u[e.toLowerCase()]=t}),u}function fD(e){try{return JSON.parse(e.content)}catch(t){throw new iD(t.message,e)}}function dD(e,t){var n=e.content,r=e.status;try{var u=JSON.parse(n);return"error"in u?new oD(u.message,r,u.error,t):new aD(u.message,r,t)}catch(e){}return new aD(n,r,t)}function pD(e){var t=e.isTimedOut,n=e.status;return t||function(e){return!e.isTimedOut&&0===~~e.status}({isTimedOut:t,status:n})||2!=~~(n/100)&&4!=~~(n/100)}function hD(e){return 2==~~(e.status/100)}function vD(e){return e.map(function(e){return mD(e)})}function mD(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return sn(sn({},e),{},{request:sn(sn({},e.request),{},{headers:sn(sn({},e.request.headers),t)})})}var DD=["appId","apiKey","authMode","algoliaAgents"],yD=["params"],gD="5.37.0";function FD(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),u=e[n];t[n]=e[r],t[r]=u}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var ED="4.1.0";function _D(e,t,n){var r=Rt.useMemo(function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,u=e.algoliaAgents,a=cn(e,DD),i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),o=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,u=e.logger,a=e.baseQueryParameters,i=e.algoliaAgent,o=e.timeouts,s=e.requester,c=e.requestsCache,l=e.responsesCache;function f(e){return d.apply(this,arguments)}function d(){return(d=Kt(ln().m(function e(t){var r,u,a,i,o;return ln().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all(t.map(function(e){return n.get(e,function(){return Promise.resolve(tD(e))})}));case 1:return r=e.v,u=r.filter(function(e){return e.isUp()}),a=r.filter(function(e){return e.isTimedOut()}),i=[].concat(hn(u),hn(a)),o=i.length>0?i:t,e.a(2,{hosts:o,getTimeout:function(e,t){return(0===a.length&&0===e?1:a.length+3+e)*t}})}},e)}))).apply(this,arguments)}function p(e,t){return h.apply(this,arguments)}function h(){return h=Kt(ln().m(function e(c,l){var d,p,h,v,m,D,y,g,F,E,_,b,C,k=arguments;return ln().w(function(e){for(;;)switch(e.n){case 0:if(d=!(k.length>2&&void 0!==k[2])||k[2],p=[],h=cD(c,l),v=lD(r,c.headers,l.headers),m="GET"===c.method?sn(sn({},c.data),l.data):{},D=sn(sn(sn({},a),c.queryParameters),m),i.value&&(D["x-algolia-agent"]=i.value),l&&l.queryParameters)for(y=0,g=Object.keys(l.queryParameters);y1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return p(e,t,n);var u=function(){return p(e,t)};if(!0!==(t.cacheable||e.cacheable))return u();var i={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return l.get(i,function(){return c.get(i,function(){return c.set(i,u()).then(function(e){return Promise.all([c.delete(i),e])},function(e){return Promise.all([c.delete(i),Promise.reject(e)])}).then(function(e){var t=pn(e,2);return t[0],t[1]})})},{miss:function(e){return l.set(i,e)}})},requestsCache:c,responsesCache:l}}(sn(sn({hosts:FD(t)},a),{},{algoliaAgent:Xm({algoliaAgents:u,client:"Lite",version:gD}),baseHeaders:sn(sn({"content-type":"text/plain"},i.headers()),a.baseHeaders),baseQueryParameters:sn(sn({},i.queryParameters()),a.baseQueryParameters)}));return{transporter:o,appId:t,apiKey:n,clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(function(){})},get _ua(){return o.algoliaAgent.value},addAlgoliaAgent:function(e,t){o.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?o.baseQueryParameters["x-algolia-api-key"]=t:o.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,u=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var a={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:u||{}};return o.request(a,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map(function(e){var t=e.params,n=cn(e,yD);return"facet"===n.type?sn(sn(sn({},n),t),{},{type:"facet"}):sn(sn(sn({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(r,t)}}}(sn({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise(function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach(function(t){return n.setRequestHeader(t,e.headers[t])});var r,u=function(e,r){return setTimeout(function(){n.abort(),t({status:0,content:r,isTimedOut:!0})},e)},a=u(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=u(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:Ym(),requestsCache:Ym({serializable:!1}),hostsCache:Qm({caches:[Gm({key:"".concat(gD,"-").concat(e)}),Ym()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",ED),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",ED),n(r)},[e,t,n]);return r}var bD=["footer","searchBox"],CD=function(){var e=Kt(ln().m(function e(t){var n,r,u,a,i,o,s,c,l,f,d,p,h,v,m,D,y,g,F;return ln().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=t.query,r=t.state,u=t.setContext,a=t.setStatus,i=t.searchClient,o=t.indexes,s=t.snippetLength,c=t.insights,l=t.appId,f=t.apiKey,d=t.maxResultsPerGroup,p=t.transformItems,h=void 0===p?Om:p,v=t.saveRecentSearch,m=t.onClose,D=c,e.p=1,e.n=2,i.search({requests:o.map(function(e){var t,r,u,a,i,o,c,l="string"==typeof e?e:e.name,f="string"==typeof e?{}:e.searchParameters;return sn({query:n,indexName:l,attributesToRetrieve:null!==(t=null==f?void 0:f.attributesToRetrieve)&&void 0!==t?t:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:null!==(r=null==f?void 0:f.attributesToSnippet)&&void 0!==r?r:["hierarchy.lvl1:".concat(s.current),"hierarchy.lvl2:".concat(s.current),"hierarchy.lvl3:".concat(s.current),"hierarchy.lvl4:".concat(s.current),"hierarchy.lvl5:".concat(s.current),"hierarchy.lvl6:".concat(s.current),"content:".concat(s.current)],snippetEllipsisText:null!==(u=null==f?void 0:f.snippetEllipsisText)&&void 0!==u?u:"…",highlightPreTag:null!==(a=null==f?void 0:f.highlightPreTag)&&void 0!==a?a:"",highlightPostTag:null!==(i=null==f?void 0:f.highlightPostTag)&&void 0!==i?i:"",hitsPerPage:null!==(o=null==f?void 0:f.hitsPerPage)&&void 0!==o?o:20,clickAnalytics:null!==(c=null==f?void 0:f.clickAnalytics)&&void 0!==c?c:D},null!=f?f:{})})});case 2:return y=e.v,g=y.results,e.a(2,g.flatMap(function(e){var t,n=e,a=n.hits,i=n.nbHits,o=Bm(h(a),function(e){return Nm(e)},d);if(r.context.searchSuggestions.length0&&Z.forEach(function(e){oe.push("string"==typeof e?{name:e}:e)}),oe.length<1)throw new Error("Must supply either `indexName` or `indices` for DocSearch to work");var se,ce,le,fe,de,pe,he,ve=oe[0].name,me=Rt.useRef((se={key:"__DOCSEARCH_ASKAI_CONVERSATIONS__".concat((null==ue?void 0:ue.indexName)||ve),limit:10},ce=se.key,le=se.limit,fe=void 0===le?5:le,de=Wm(ce),pe=de.getItem().slice(0,fe),{add:function(e){var t=e.objectID,n=e.query,r=pe.findIndex(function(e){return e.objectID===t||e.query===n});r>-1?pe[r]=e:(pe.unshift(e),pe=pe.slice(0,fe)),de.setItem(pe)},addFeedback:function(e,t){var n=pe.find(function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some(function(t){return t.id===e})});if(n&&n.messages){var r=n.messages.find(function(t){return t.id===e});r&&(r.feedback=t,de.setItem(pe))}},getOne:function(e){var t,n=pe.find(function(t){var n;return null===(n=t.messages)||void 0===n?void 0:n.some(function(t){return t.id===e})});return null==n||null===(t=n.messages)||void 0===t?void 0:t.find(function(t){return t.id===e})},getAll:function(){return pe},remove:function(e){pe=pe.filter(function(t){return t.objectID!==e.objectID}),de.setItem(pe)}})).current,De=Rt.useRef(Jm({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(ve),limit:10})).current,ye=Rt.useRef(Jm({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(ve),limit:0===De.getAll().length?N:R})).current,ge=pn(Rt.useState(null),2),Fe=ge[0],Ee=ge[1],_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.experimental_throttle,n=e.resume,r=void 0!==n&&n,u=m(e,Ht),a=Pe("chat"in u?u.chat:new fd(u));("chat"in u&&u.chat!==a.current||"id"in u&&a.current.id!==u.id)&&(a.current="chat"in u?u.chat:new fd(u));var i="id"in u?u.id:null,o=ze(function(e){return a.current["~registerMessagesCallback"](e,t)},[t,i]),s=Ge(o,function(){return a.current.messages}),c=Ge(a.current["~registerStatusCallback"],function(){return a.current.status}),l=Ge(a.current["~registerErrorCallback"],function(){return a.current.error}),f=ze(function(e){"function"==typeof e&&(e=e(a.current.messages)),a.current.messages=e},[a]);return Ie(function(){r&&a.current.resumeStream()},[r,a]),{id:a.current.id,messages:s,setMessages:f,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:l,resumeStream:a.current.resumeStream,status:c,addToolResult:a.current.addToolResult}}({sendAutomaticallyWhen:zf,transport:new jf({api:Ch,headers:(he=Kt(ln().m(function e(){var r;return ln().w(function(e){for(;;)switch(e.n){case 0:if(ae){e.n=1;break}throw new Error("Ask AI assistant ID is required");case 1:return r=null,e.n=2,xh({assistantId:ae});case 2:r=e.v;case 3:return e.a(2,sn(sn({},r?{authorization:"TOKEN ".concat(r)}:{}),{},{"X-Algolia-API-Key":(null==ue?void 0:ue.apiKey)||n,"X-Algolia-Application-Id":(null==ue?void 0:ue.appId)||t,"X-Algolia-Index-Name":(null==ue?void 0:ue.indexName)||ve,"X-Algolia-Assistant-Id":ae||"","X-AI-SDK-Version":"v5"}))}},e)})),function(){return he.apply(this,arguments)}),body:ie?{searchParameters:ie}:{}}),onError:function(e){Ee(e)}}),be=_e.messages,Ce=_e.sendMessage,ke=_e.status,Ae=_e.setMessages,we=_e.error,xe=Rt.useRef(ke);Rt.useEffect(function(){if(!_){if("streaming"===xe.current&&"ready"===ke){var e,t=en(be[0].parts);try{for(t.s();!(e=t.n()).done;){var n=e.value;"text"===n.type&&me.add(cm(n.text,be))}}catch(e){t.e(e)}finally{t.f()}}xe.current=ke}},[ke,be,me,_]);var Se=Rt.useCallback(function(e){var t=e.hierarchy,n=["lvl6","lvl5","lvl4","lvl3","lvl2","lvl1","lvl0"].find(function(e){return t[e]});return sn(sn({},e),{},{type:n||"lvl0",content:null})},[]),Be=Rt.useCallback(function(e){if(!_){var t="content"===e.type?e.__docsearch_parent||Se(e):e;t&&-1===De.getAll().findIndex(function(e){return e.objectID===t.objectID})&&ye.add(t)}},[De,ye,_,Se]),Oe=Rt.useCallback(function(e){if(W.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};W.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}},[W.context.algoliaInsightsPlugin]),Te=Rt.useRef(void 0),je=Rt.useCallback(function(e,t){if(B(e),Ce({role:"user",parts:[{type:"text",text:t}]}),Y.current){var n=Y.current;"function"==typeof n.scrollTo?n.scrollTo({top:0,behavior:"smooth"}):n.scrollTop=0}Te.current&&Te.current.setQuery("")},[B,Ce]),Ne=Rt.useCallback(function(){var e=Kt(ln().m(function e(n,r){var u;return ln().w(function(e){for(;;)switch(e.n){case 0:if(ae&&t){e.n=1;break}return e.a(2);case 1:return e.n=2,Sh({assistantId:ae,thumbs:r,messageId:n,appId:t});case 2:if(!(e.v.status>=300)){e.n=3;break}throw new Error("Failed, try again later");case 3:null===(u=me.addFeedback)||void 0===u||u.call(me,n,1===r?"like":"dislike");case 4:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),[ae,t,me]);Te.current||(Te.current=bh({id:"docsearch",defaultActiveItemId:0,openOnFocus:!0,initialState:{query:ne,context:{searchSuggestions:[]}},insights:Boolean(S),navigator:v,onStateChange:function(e){K(e.state)},getSources:function(e){var r=e.query,u=e.state,i=e.setContext,o=e.setStatus;if(!r){var c=function(e){var t=e.recentSearches,n=e.favoriteSearches,r=e.saveRecentSearch,u=e.onClose;return e.disableUserPersonalization?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),Im(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return t.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;r(t),Im(n)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return n.getAll()}}]}({recentSearches:ye,favoriteSearches:De,saveRecentSearch:Be,onClose:s,disableUserPersonalization:_,canHandleAskAi:P}),f=P?[{sourceId:"recentConversations",getItems:function(){return _?[]:me.getAll()},onSelect:function(e){var t=e.item;t.messages&&(Ae(t.messages),B(!0))}}]:[];return[].concat(hn(c),f)}var d={context:u.context},p=CD({query:r,state:d,setContext:i,setStatus:o,searchClient:re,indexes:oe,snippetLength:ee,insights:Boolean(S),appId:t,apiKey:n,maxResultsPerGroup:a,transformItems:l,saveRecentSearch:Be,onClose:s}),h=P?[{sourceId:"askAI",getItems:function(){return[{type:"askAI",query:r,url_without_anchor:"",objectID:"ask-ai-button",content:null,url:"",anchor:null,hierarchy:{lvl0:"Ask AI",lvl1:r,lvl2:null,lvl3:null,lvl4:null,lvl5:null,lvl6:null},_highlightResult:{},_snippetResult:{},__docsearch_parent:null}]},onSelect:function(e){var t=e.item;"askAI"===t.type&&t.query&&je(!0,t.query)}}]:[];return p.then(function(e){return[].concat(h,hn(e))})}}));var Re,Me,Ze=Te.current,Le=Ze.getEnvironmentProps,$e=Ze.getRootProps,qe=Ze.refresh;!function(e){var t=e.getEnvironmentProps,n=e.panelElement,r=e.formElement,u=e.inputElement;Rt.useEffect(function(){if(n&&r&&u){var e=t({panelElement:n,formElement:r,inputElement:u}),a=e.onTouchStart,i=e.onTouchMove;return window.addEventListener("touchstart",a),window.addEventListener("touchmove",i),function(){window.removeEventListener("touchstart",a),window.removeEventListener("touchmove",i)}}},[t,n,r,u])}({getEnvironmentProps:Le,panelElement:Y.current,formElement:Q.current,inputElement:X.current}),Re={container:J.current},Me=Re.container,Rt.useEffect(function(){if(Me){var e=Me.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),t=e[0],n=e[e.length-1];return Me.addEventListener("keydown",r),function(){Me.removeEventListener("keydown",r)}}function r(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===t&&(e.preventDefault(),n.focus()):document.activeElement===n&&(e.preventDefault(),t.focus()))}},[Me]),kn({theme:i}),Rt.useEffect(function(){return document.body.classList.add("DocSearch--active"),function(){var e,t;document.body.classList.remove("DocSearch--active"),null===(e=(t=window).scrollTo)||void 0===e||e.call(t,0,y)}},[]),Rt.useEffect(function(){"undefined"!=typeof window&&window.localStorage&&function(){if("undefined"==typeof window||!window.localStorage)return 0;var e=0;for(var t in window.localStorage)window.localStorage.hasOwnProperty(t)&&(e+=window.localStorage[t].length+t.length);return e}()>4194304&&Vm()},[]),Rt.useLayoutEffect(function(){var e=window.innerWidth-document.body.clientWidth;return document.body.style.marginRight="".concat(e,"px"),function(){document.body.style.marginRight="0px"}},[]),Rt.useEffect(function(){window.matchMedia("(max-width: 768px)").matches&&(ee.current=5)},[]),Rt.useEffect(function(){var e;Y.current&&!I&&("function"==typeof(e=Y.current).scrollTo?e.scrollTo({top:0,behavior:"smooth"}):e.scrollTop=0)},[W.query,I]),Rt.useEffect(function(){ne.length>0&&(qe(),X.current&&X.current.focus())},[ne,qe]),Rt.useEffect(function(){function e(){if(G.current){var e=.01*window.innerHeight;G.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]),Rt.useEffect(function(){I||(Ze.refresh(),Ae([]))},[I,Ze,Ae]);var Ue=!0,He=W.collections.some(function(e){return e.items.length>0});return"idle"!==W.status||!1!==He||0!==W.query.length||I||(Ue=!1),Rt.createElement("div",nn({ref:J},$e({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===W.status&&"DocSearch-Container--Stalled","error"===W.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&s()}}),Rt.createElement("div",{className:"DocSearch-Modal",ref:G},Rt.createElement("header",{className:"DocSearch-SearchBar",ref:Q},Rt.createElement(Hm,nn({},Ze,{state:W,placeholder:r||"Search docs",autoFocus:0===ne.length,inputRef:X,isFromSelection:Boolean(ne)&&ne===te,translations:U,isAskAiActive:I,askAiStatus:ke,onClose:s,onAskAiToggle:B,onAskAgain:function(e){je(!0,e)}}))),Ue&&Rt.createElement("div",{className:"DocSearch-Dropdown",ref:Y},Rt.createElement($m,nn({},Ze,{indexName:ve,state:W,hitComponent:d,resultsFooterComponent:h,disableUserPersonalization:_,recentSearches:ye,favoriteSearches:De,conversations:me,inputRef:X,translations:H,getMissingResultsUrl:w,isAskAiActive:I,canHandleAskAi:P,messages:be,askAiStreamError:Fe,askAiFetchError:we,status:ke,hasCollections:He,onAskAiToggle:B,onItemClick:function(e,t){if("askAI"===e.type&&e.query)return"stored"===e.anchor&&"messages"in e?(Ae(e.messages),B(!0)):je(!0,e.query),void t.preventDefault();Oe(e),Be(e),Im(t)||s()},onFeedback:Ne}))),Rt.createElement("footer",{className:"DocSearch-Footer"},Rt.createElement(Ih,{translations:q,isAskAiActive:I}))))}function AD(e){var t,n,r,u,a,i,o=Rt.useRef(null),s=pn(Rt.useState(!1),2),c=s[0],l=s[1],f=pn(Rt.useState((null==e?void 0:e.initialQuery)||void 0),2),d=f[0],p=f[1],h=pn(Rt.useState(!1),2),v=h[0],m=h[1],D=(null==e||null===(t=e.translations)||void 0===t||null===(t=t.modal)||void 0===t||null===(t=t.searchBox)||void 0===t?void 0:t.placeholderText)||(null==e?void 0:e.placeholder)||"Search docs",y=Boolean(null==e?void 0:e.askAi);y&&(D=(null==e||null===(a=e.translations)||void 0===a||null===(a=a.modal)||void 0===a||null===(a=a.searchBox)||void 0===a?void 0:a.placeholderText)||"Search docs or ask AI a question"),v&&(D=(null==e||null===(i=e.translations)||void 0===i||null===(i=i.modal)||void 0===i||null===(i=i.searchBox)||void 0===i?void 0:i.placeholderTextAskAi)||"Ask another question...");var g=Rt.useCallback(function(e){m(e)},[m]),F=Rt.useCallback(function(){l(!0)},[l]),E=Rt.useCallback(function(){l(!1),p(null==e?void 0:e.initialQuery),v&&m(!1)},[l,e.initialQuery,v,m]);return function(e){var t=e.isOpen,n=e.onOpen,r=e.onClose,u=e.onInput,a=e.isAskAiActive,i=e.onAskAiToggle,o=e.searchButtonRef,s=Fn(e.keyboardShortcuts);Rt.useEffect(function(){function e(e){var c;if(t&&"Escape"===e.code&&a)i(!1);else{var l=s["Ctrl/Cmd+K"]&&"k"===(null===(c=e.key)||void 0===c?void 0:c.toLowerCase())&&(e.metaKey||e.ctrlKey),f=s["/"]&&"/"===e.key;if("Escape"===e.code&&t||l||!function(e){var t=e.composedPath()[0],n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&f&&!t)return e.preventDefault(),void(t?r():document.body.classList.contains("DocSearch--active")||n());o&&o.current===document.activeElement&&u&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&u(e)}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[t,n,r,u,o,a,i,s])}({isOpen:c,onOpen:F,onClose:E,onInput:Rt.useCallback(function(e){l(!0),p(e.key)},[l,p]),isAskAiActive:v,onAskAiToggle:g,searchButtonRef:o,keyboardShortcuts:e.keyboardShortcuts}),kn({theme:e.theme}),Rt.createElement(Rt.Fragment,null,Rt.createElement(xn,{ref:o,translations:null==e||null===(n=e.translations)||void 0===n?void 0:n.button,keyboardShortcuts:e.keyboardShortcuts,onClick:F}),c&&yt(Rt.createElement(kD,nn({},e,{placeholder:D,initialScrollY:window.scrollY,initialQuery:d,translations:null==e||null===(r=e.translations)||void 0===r?void 0:r.modal,isAskAiActive:v,canHandleAskAi:y,onAskAiToggle:g,onClose:E})),null!==(u=e.portalContainer)&&void 0!==u?u:document.body))}return function(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return"string"==typeof e?t.document.querySelector(e):e}(e.container,e.environment);return kt(Rt.createElement(AD,l({},e,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js",ED),e.transformSearchClient?e.transformSearchClient(t):t}})),t),function(){zt(t)}}}); -//# sourceMappingURL=index.js.map diff --git a/pluginsSrc/@egjs/infinitegrid/dist/infinitegrid.min.js b/pluginsSrc/@egjs/infinitegrid/dist/infinitegrid.min.js deleted file mode 100644 index d2809a36..00000000 --- a/pluginsSrc/@egjs/infinitegrid/dist/infinitegrid.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright (c) NAVER Corp. -name: @egjs/infinitegrid -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-infinitegrid -version: 4.12.0 -*/ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).InfiniteGrid=t()}(this,function(){"use strict";var G=function(e,t){return(G=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return(I=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.keys(t)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=t[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=e}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),i=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(t){for(var n=[],e=1;ed))break;if(!O&&(g<0||T[g]e.maxSize&&(n=Math.min(n,e.maxSize/e.originalSize)):e.sizee.maxSize||e.size=e.pos||i=t.outlineLength}}),n([w],t)}(L),JustifiedInfiniteGrid:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.propertyTypes=I(I({},L.propertyTypes),Ne.propertyTypes),t.defaultOptions=I(I(I({},L.defaultOptions),Ne.defaultOptions),{gridConstructor:Ne}),n([w],t)}(L),FrameInfiniteGrid:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.propertyTypes=I(I({},L.propertyTypes),Ke.propertyTypes),t.defaultOptions=I(I(I({},L.defaultOptions),Ke.defaultOptions),{gridConstructor:Ke}),n([w],t)}(L),PackingInfiniteGrid:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.propertyTypes=I(I({},L.propertyTypes),Ue.propertyTypes),t.defaultOptions=I(I(I({},L.defaultOptions),Ue.defaultOptions),{gridConstructor:Ue}),n([w],t)}(L),Renderer:e,IS_IOS:je,CONTAINER_CLASS_NAME:Fe,IGNORE_PROPERITES_MAP:qe,INFINITEGRID_PROPERTY_TYPES:Ye,DIRECTION:T,INFINITEGRID_EVENTS:M,ITEM_INFO_PROPERTIES:Be,INFINITEGRID_METHODS:t,get GROUP_TYPE(){return P},get ITEM_TYPE(){return b},get STATUS_TYPE(){return _},INVISIBLE_POS:We};for(pt in vt)L[pt]=vt[pt];return L}); -//# sourceMappingURL=infinitegrid.min.js.map diff --git a/pluginsSrc/@fancyapps/ui/dist/fancybox/fancybox.css b/pluginsSrc/@fancyapps/ui/dist/fancybox/fancybox.css deleted file mode 100644 index 3d99f68c..00000000 --- a/pluginsSrc/@fancyapps/ui/dist/fancybox/fancybox.css +++ /dev/null @@ -1 +0,0 @@ -:root{--f-button-width: 40px;--f-button-height: 40px;--f-button-border: 0;--f-button-border-radius: 0;--f-button-color: #374151;--f-button-bg: #f8f8f8;--f-button-shadow: none;--f-button-transition: all .15s ease;--f-button-transform: none;--f-button-outline-width: 1px;--f-button-outline-color: rgba(0, 0, 0, .7);--f-button-svg-width: 20px;--f-button-svg-height: 20px;--f-button-svg-stroke-width: 1.5;--f-button-svg-fill: none;--f-button-svg-filter: none;--f-button-svg-opacity: 1;--f-button-svg-disabled-opacity: .5;--f-button-svg-transition: opacity .15s ease;--f-button-svg-transform: none}.f-button{width:var(--f-button-width);height:var(--f-button-height);border:var(--f-button-border);border-radius:var(--f-button-border-radius);color:var(--f-button-color);background:var(--f-button-bg);box-shadow:var(--f-button-shadow);transform:var(--f-button-transform);transition:var(--f-button-transition);backdrop-filter:var(--f-button-backdrop-filter);display:flex;justify-content:center;align-items:center;box-sizing:content-box;position:relative;margin:0;padding:0;pointer-events:all;cursor:pointer;overflow:hidden}@media (hover: hover){.f-button:hover:not([aria-disabled]){color:var(--f-button-hover-color, var(--f-button-color));background-color:var(--f-button-hover-bg, var(--f-button-bg))}}.f-button:active:not([aria-disabled]){color:var(--f-button-active-color, var(--f-button-hover-color, var(--f-button-color)));background-color:var(--f-button-active-bg, var(--f-button-hover-bg, var(--f-button-bg)))}.f-button:focus{outline:none}.f-button:focus-visible{outline:var(--f-button-outline-width) solid var(--f-button-outline-color);outline-offset:var(--f-button-outline-offset);position:relative;z-index:1}.f-button svg{width:var(--f-button-svg-width);height:var(--f-button-svg-height);transform:var(--f-button-svg-transform);fill:var(--f-button-svg-fill);filter:var(--f-button-svg-filter);opacity:var(--f-button-svg-opacity, 1);transition:var(--f-button-svg-transition);stroke:currentColor;stroke-width:var(--f-button-svg-stroke-width);stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.f-button[aria-disabled]{cursor:default}.f-button[aria-disabled] svg{opacity:var(--f-button-svg-disabled-opacity)}[data-panzoom-action=toggleFS] g:first-child{display:flex}[data-panzoom-action=toggleFS] g:last-child{display:none}.in-fullscreen [data-panzoom-action=toggleFS] g:first-child{display:none}.in-fullscreen [data-panzoom-action=toggleFS] g:last-child{display:flex}[data-autoplay-action=toggle] svg g:first-child{display:flex}[data-autoplay-action=toggle] svg g:last-child{display:none}.has-autoplay [data-autoplay-action=toggle] svg g:first-child{display:none}.has-autoplay [data-autoplay-action=toggle] svg g:last-child{display:flex}:fullscreen [data-fullscreen-action=toggle] svg [data-fullscreen-action=toggle] svg g:first-child{display:none}:fullscreen [data-fullscreen-action=toggle] svg [data-fullscreen-action=toggle] svg g:last-child{display:flex}:root{--f-spinner-color-1: rgba(0, 0, 0, .1);--f-spinner-color-2: rgba(17, 24, 28, .8);--f-spinner-width: 50px;--f-spinner-height: 50px;--f-spinner-border-radius: 50%;--f-spinner-border-width: 4px}.f-spinner{position:absolute;top:50%;left:50%;margin:calc(var(--f-spinner-width) * -.5) 0 0 calc(var(--f-spinner-height) * -.5);padding:0;width:var(--f-spinner-width);height:var(--f-spinner-height);border-radius:var(--f-spinner-border-radius);border:var(--f-spinner-border-width) solid var(--f-spinner-color-1);border-top-color:var(--f-spinner-color-2);animation:f-spinner .75s linear infinite,f-fadeIn .2s ease .2s both}@keyframes f-spinner{to{transform:rotate(360deg)}}.f-panzoom,.f-zoomable{position:relative;overflow:hidden;display:flex;align-items:center;flex-direction:column}.f-panzoom:before,.f-panzoom:after,.f-zoomable:before,.f-zoomable:after{display:block;content:""}.f-panzoom:not(.has-controls):before,.f-zoomable:not(.has-controls):before{margin-bottom:auto}.f-panzoom:after,.f-zoomable:after{margin-top:auto}.f-panzoom.in-fullscreen,.f-zoomable.in-fullscreen{position:fixed;top:0;left:0;margin:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:unset!important;z-index:9999}.f-panzoom__wrapper{position:relative;min-width:0;min-height:0;max-width:100%;max-height:100%}.f-panzoom__wrapper.will-zoom-out{cursor:zoom-out}.f-panzoom__wrapper.can-drag{cursor:move;cursor:grab}.f-panzoom__wrapper.will-zoom-in{cursor:zoom-in}.f-panzoom__wrapper.is-dragging{cursor:move;cursor:grabbing}.f-panzoom__wrapper.has-error{display:none}.f-panzoom__content{display:block;min-width:0;min-height:0;max-width:100%;max-height:100%}.f-panzoom__content.is-lazyloading,.f-panzoom__content.has-lazyerror{visibility:hidden}img.f-panzoom__content{width:auto;height:auto;vertical-align:top;object-fit:contain;transition:none;user-select:none}.f-panzoom__wrapper>.f-panzoom__content{visibility:hidden}.f-panzoom__viewport{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.f-panzoom__viewport>.f-panzoom__content{width:100%;height:100%;object-fit:fill}picture.f-panzoom__content img{vertical-align:top;width:100%;height:auto;max-height:100%;object-fit:contain;transition:none;user-select:none}.f-panzoom__protected{position:absolute;inset:0;z-index:1;user-select:none}html.with-panzoom-in-fullscreen{overflow:hidden}.f-fadeIn{animation:var(--f-transition-duration, .2s) var(--f-transition-easing, ease) var(--f-transition-delay, 0s) both f-fadeIn;z-index:2}.f-fadeOut{animation:var(--f-transition-duration, .2s) var(--f-transition-easing, ease) var(--f-transition-delay, 0s) both f-fadeOut;z-index:1}@keyframes f-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes f-fadeOut{to{opacity:0}}.f-crossfadeIn{animation:var(--f-transition-duration, .2s) ease both f-crossfadeIn;z-index:2}.f-crossfadeOut{animation:calc(var(--f-transition-duration, .2s) * .2) ease calc(var(--f-transition-duration, .2s) * .8) both f-crossfadeOut;z-index:1}@keyframes f-crossfadeIn{0%{opacity:0}to{opacity:1}}@keyframes f-crossfadeOut{to{opacity:0}}.is-horizontal .f-slideIn.from-next{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideInNextX}.is-horizontal .f-slideIn.from-prev{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideInPrevX}.is-horizontal .f-slideOut.to-next{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideOutNextX}.is-horizontal .f-slideOut.to-prev{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideOutPrevX}@keyframes f-slideInPrevX{0%{transform:translate(calc(100% + var(--f-carousel-gap, 0)))}to{transform:translateZ(0)}}@keyframes f-slideInNextX{0%{transform:translate(calc(-100% - var(--f-carousel-gap, 0)))}to{transform:translateZ(0)}}@keyframes f-slideOutNextX{to{transform:translate(calc(-100% - var(--f-carousel-gap, 0)))}}@keyframes f-slideOutPrevX{to{transform:translate(calc(100% + var(--f-carousel-gap, 0)))}}.is-vertical .f-slideIn.from-next{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideInNextY}.is-vertical .f-slideIn.from-prev{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideInPrevY}.is-vertical .f-slideOut.to-next{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideOutNextY}.is-vertical .f-slideOut.to-prev{animation:var(--f-transition-duration, .85s) cubic-bezier(.16,1,.3,1) f-slideOutPrevY}@keyframes f-slideInPrevY{0%{transform:translateY(calc(100% + var(--f-carousel-gap, 0)))}to{transform:translateZ(0)}}@keyframes f-slideInNextY{0%{transform:translateY(calc(-100% - var(--f-carousel-gap, 0)))}to{transform:translateZ(0)}}@keyframes f-slideOutNextY{to{transform:translateY(calc(-100% - var(--f-carousel-gap, 0)))}}@keyframes f-slideOutPrevY{to{transform:translateY(calc(100% + var(--f-carousel-gap, 0)))}}.f-zoomInUp{animation:var(--f-transition-duration, .3s) ease both f-zoomInUp}.f-zoomOutDown{animation:var(--f-transition-duration, .3s) ease both f-zoomOutDown}@keyframes f-zoomInUp{0%{transform:scale(var(--f-zoomInUp-scale, .975)) translate3d(var(--f-zoomInUp-x, 0),var(--f-zoomInUp-y, 16px),0);opacity:var(--f-zoomInUp-opacity, 0)}to{transform:scale(1) translateZ(0);opacity:1}}@keyframes f-zoomOutDown{to{transform:scale(var(--f-zoomOutDown-scale, .975)) translate3d(var(--f-zoomOutDown-x, 0),var(--f-zoomOutDown-y, 16px),0);opacity:0}}.f-throwOutUp{animation:var(--f-throwOutUp-duration, .2s) ease-out both f-throwOutUp}.f-throwOutDown{animation:var(--f-throwOutDown-duration, .2s) ease-out both f-throwOutDown}@keyframes f-throwOutUp{to{transform:translate3d(0,calc(var(--f-throwOutUp-y, 150px) * -1),0);opacity:0}}@keyframes f-throwOutDown{to{transform:translate3d(0,var(--f-throwOutDown-y, 150px),0);opacity:0}}.has-iframe .f-html,.has-pdf .f-html,.has-gmap .f-html{width:100%;height:100%;min-height:1px;overflow:visible}.has-pdf .f-html,.has-gmap .f-html{padding:0}.f-html{position:relative;box-sizing:border-box;margin:var(--f-html-margin, 0);padding:var(--f-html-padding, 2rem);color:var(--f-html-color, currentColor);background:var(--f-html-bg)}.f-html.is-error{text-align:center}.f-iframe{display:block;margin:0;border:0;height:100%;width:100%}.f-caption{align-self:center;flex-shrink:0;margin:var(--f-caption-margin);padding:var(--f-caption-padding, 16px 8px);max-width:100%;max-height:calc(80vh - 100px);overflow:auto;overflow-wrap:anywhere;line-height:var(--f-caption-line-height);color:var(--f-caption-color);background:var(--f-caption-bg);font:var(--f-caption-font)}.has-html5video .f-html,.has-youtube .f-html,.has-vimeo .f-html{padding:0;width:100%;height:100%;min-height:1px;overflow:visible;max-width:var(--f-video-width, 960px);max-height:var(--f-video-height, 540px);aspect-ratio:var(--f-video-aspect-ratio);background:var(--f-video-bg, rgba(0, 0, 0, .9))}.f-html5video{border:0;display:block;height:100%;width:100%;background:transparent}.f-button.is-arrow{--f-button-width: var(--f-arrow-width, 46px);--f-button-height: var(--f-arrow-height, 46px);--f-button-svg-width: var(--f-arrow-svg-width, 24px);--f-button-svg-height: var(--f-arrow-svg-height, 24px);--f-button-svg-stroke-width: var(--f-arrow-svg-stroke-width, 1.75);--f-button-border-radius: var(--f-arrow-border-radius, unset);--f-button-bg: var(--f-arrow-bg, transparent);--f-button-hover-bg: var(--f-arrow-hover-bg, var(--f-arrow-bg));--f-button-active-bg: var(--f-arrow-active-bg, var(--f-arrow-hover-bg));--f-button-shadow: var(--f-arrow-shadow);--f-button-color: var(--f-arrow-color);--f-button-hover-color: var(--f-arrow-hover-color, var(--f-arrow-color));--f-button-active-color: var( --f-arrow-active-color, var(--f-arrow-hover-color) );overflow:visible}.f-button.is-arrow.is-prev,.f-button.is-arrow.is-next{position:absolute;transform:translate(0);z-index:20}.is-horizontal .f-button.is-arrow.is-prev,.is-horizontal .f-button.is-arrow.is-next{inset:50% auto auto;transform:translateY(-50%)}.is-horizontal.is-ltr .f-button.is-arrow.is-prev{left:var(--f-arrow-pos, 0)}.is-horizontal.is-ltr .f-button.is-arrow.is-next{right:var(--f-arrow-pos, 0)}.is-horizontal.is-rtl .f-button.is-arrow.is-prev{right:var(--f-arrow-pos, 0);transform:translateY(-50%) rotateY(180deg)}.is-horizontal.is-rtl .f-button.is-arrow.is-next{left:var(--f-arrow-pos, 0);transform:translateY(-50%) rotateY(180deg)}.is-vertical.is-ltr .f-button.is-arrow.is-prev,.is-vertical.is-rtl .f-button.is-arrow.is-prev{top:var(--f-arrow-pos, 0);right:auto;bottom:auto;left:50%;transform:translate(-50%)}.is-vertical.is-ltr .f-button.is-arrow.is-next,.is-vertical.is-rtl .f-button.is-arrow.is-next{top:auto;right:auto;bottom:var(--f-arrow-pos, 0);left:50%;transform:translate(-50%)}.is-vertical .f-button.is-arrow.is-prev svg,.is-vertical .f-button.is-arrow.is-next svg{transform:rotate(90deg)}.f-carousel__toolbar{display:grid;grid-template-columns:1fr auto 1fr;margin:var(--f-toolbar-margin, 0);padding:var(--f-toolbar-padding, 8px);line-height:var(--f-toolbar-line-height);background:var(--f-toolbar-bg, none);box-shadow:var(--f-toolbar-shadow, none);backdrop-filter:var(--f-toolbar-backdrop-filter);position:relative;z-index:20;color:var(--f-toolbar-color, currentColor);font-size:var(--f-toolbar-font-size, 17px);font-weight:var(--f-toolbar-font-weight, inherit);font-family:var(--f-toolbar-font, -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif);text-shadow:var(--f-toolbar-text-shadow);text-align:center;font-variant-numeric:tabular-nums;-webkit-font-smoothing:subpixel-antialiased;white-space:nowrap;pointer-events:none}.f-carousel__toolbar.is-absolute{position:absolute;top:0;left:0;right:0}.f-carousel__toolbar__column{display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start;gap:var(--f-toolbar-gap, 0)}.f-carousel__toolbar__column.is-left{display:flex;justify-self:flex-start;justify-content:flex-start}.f-carousel__toolbar__column.is-middle{display:flex;justify-content:center}.f-carousel__toolbar__column.is-right{display:flex;justify-self:flex-end;justify-content:flex-end;flex-flow:nowrap}.f-carousel__toolbar__column{pointer-events:none}.f-carousel__toolbar__column>*{pointer-events:all}.f-counter{position:relative;display:flex;flex-direction:row;cursor:default;user-select:none;margin:var(--f-counter-margin, 0);padding:var(--f-counter-padding, 4px);line-height:var(--f-counter-line-height);background:var(--f-counter-bg);border-radius:var(--f-counter-border-radius)}.f-counter span{padding:0 var(--f-counter-gap, 4px)}:root{--f-thumbs-gap: 8px;--f-thumbs-margin: 0;--f-thumbs-padding-x: 8px;--f-thumbs-padding-y: 8px;--f-thumbs-z-index: 1;--f-thumb-width: 96px;--f-thumb-height: 72px;--f-thumb-clip-width: 46px;--f-thumb-extra-gap: 16px;--f-thumb-fit: cover;--f-thumb-opacity: 1;--f-thumb-transition: opacity .3s ease, transform .15s ease;--f-thumb-border: none;--f-thumb-border-radius: 4px;--f-thumb-transfors: none;--f-thumb-shadow: none;--f-thumb-bg: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .05));--f-thumb-focus-shadow: inset 0 0 0 .8px #222, inset 0 0 0 2.25px #fff;--f-thumb-selected-shadow: inset 0 0 0 .8px #222, inset 0 0 0 2.25px #fff}.f-thumbs{flex-shrink:0;margin:var(--f-thumbs-margin);padding:0;background:var(--f-thumbs-bg);-webkit-tap-highlight-color:transparent;user-select:none;transition:max-height .3s ease,max-width .3s ease;position:relative;overflow:hidden;z-index:var(--f-thumbs-z-index)}.f-thumbs.is-horizontal{max-height:calc(var(--f-carousel-slide-height) + var(--f-thumbs-padding-y) * 2 + var(--f-thumbs-gap) * 2)}.f-thumbs.is-vertical{max-width:calc(var(--f-carousel-slide-width) + var(--f-thumbs-padding-x) * 2 + var(--f-thumbs-gap) * 2)}.f-thumbs.is-ltr{direction:ltr}.f-thumbs.is-rtl{direction:rtl}.f-thumbs__viewport{margin:var(--f-thumbs-padding-y) var(--f-thumbs-padding-x);overflow:visible;display:grid}.f-thumbs.is-vertical .f-thumbs__viewport{height:calc(100% - var(--f-thumbs-padding-y) * 2)}.f-thumbs__slide{position:relative;box-sizing:border-box;grid-area:1/1;width:var(--f-carousel-slide-width);height:var(--f-carousel-slide-height);margin:0;padding:0;display:flex;align-items:center;flex-direction:column;cursor:pointer;overflow:visible}.f-thumbs__slide:hover button{opacity:var(--f-thumb-hover-opacity, 1);transform:var(--f-thumb-hover-transform, none)}.f-thumbs__slide:hover button:after{border:var(--f-thumb-hover-border, none);box-shadow:var(--f-thumb-hover-shadow, var(--f-thumb-shadow))}.f-thumbs__slide button{all:unset;margin:auto;padding:0;position:relative;overflow:visible;width:100%;height:100%;outline:none;transition:var(--f-thumb-transition);border-radius:var(--f-thumb-border-radius);opacity:var(--f-thumb-opacity);transform:var(--f-thumb-transform);background:var(--f-thumb-bg)}.f-thumbs__slide button:after{content:"";position:absolute;inset:0;z-index:1;transition:none;border-radius:inherit;border:var(--f-thumb-border);box-shadow:var(--f-thumb-shadow)}.f-thumbs__slide button:focus-within{opacity:var(--f-thumb-focus-opacity, 1);transform:var(--f-thumb-focus-transform, none)}.f-thumbs__slide button:focus-within:after{border:var(--f-thumb-focus-border, none);box-shadow:var(--f-thumb-focus-shadow, var(--f-thumb-shadow))}.f-thumbs__slide:active{opacity:var(--f-thumb-active-opacity, 1);transform:var(--f-thumb-active-transform, none)}.f-thumbs__slide:active:after{border:var(--f-thumb-active-border, none);box-shadow:var(--f-thumb-active-shadow, var(--f-thumb-shadow))}.f-thumbs__slide.is-selected{z-index:2}.f-thumbs__slide.is-selected button{opacity:var(--f-thumb-selected-opacity, 1);transform:var(--f-thumb-selected-transform, none)}.f-thumbs__slide.is-selected button:after{border:var(--f-thumb-selected-border, none);box-shadow:var(--f-thumb-selected-shadow, var(--f-thumb-shadow))}.f-thumbs__slide img{display:block;width:100%;height:100%;object-fit:var(--f-thumb-fit);border-radius:inherit;pointer-events:none}.f-thumbs__slide img.has-lazyerror{display:none}.f-thumbs.is-classic{--f-carousel-slide-width: var(--f-thumb-width);--f-carousel-slide-height: var(--f-thumb-height);--f-carousel-gap: var(--f-thumbs-gap)}.f-thumbs.is-modern{--f-carousel-slide-width: calc( var(--f-thumb-clip-width) + var(--f-thumbs-gap) );--f-carousel-slide-height: var(--f-thumb-height);--f-carousel-gap: 0;--width-diff: calc((var(--f-thumb-width) - var(--f-thumb-clip-width)))}.f-thumbs.is-modern .f-thumbs__viewport{width:calc(100% + var(--f-carousel-slide-width) * 2);margin-inline:calc(var(--f-carousel-slide-width) * -1)}.f-thumbs.is-modern .f-thumbs__slide{--clip-shift: calc((var(--width-diff) * .5) * var(--progress));--clip-path: inset( 0 var(--clip-shift) round var(--f-thumb-border-radius, 0) );padding:0;overflow:visible;left:var(--shift, 0);will-change:left;transition:left var(--f-transition-duration) var(--f-transition-easing)}.f-thumbs.is-modern .f-thumbs__slide button{display:block;margin-inline:50%;width:var(--f-thumb-width);clip-path:var(--clip-path);border:none;box-shadow:none;transition:clip-path var(--f-transition-duration) var(--f-transition-easing),opacity var(--f-thumb-transition-duration, .2s) var(--f-thumb-transition-easing, ease)}.f-thumbs.is-modern .f-thumbs__slide button:after{display:none}.f-thumbs.is-modern .f-thumbs__slide:focus:not(:focus-visible){outline:none}.f-thumbs.is-modern .f-thumbs__slide:focus-within:not(.is-selected) button:before{content:"";position:absolute;z-index:1;top:0;left:var(--clip-shift);bottom:0;right:var(--clip-shift);transition:border var(--f-transition-duration) var(--f-transition-easing),box-shadow var(--f-transition-duration) var(--f-transition-easing);border-radius:inherit;border:var(--f-thumb-focus-border, none);box-shadow:var(--f-thumb-focus-shadow, none)}.f-thumbs.is-modern{--f-transition-duration: .25s;--f-transition-easing: ease-out}.f-thumbs.is-modern.is-syncing{--f-transition-duration: 0s}:root{--f-progressbar-height: 3px;--f-progressbar-color: var(--f-carousel-theme-color, #575ad6);--f-progressbar-opacity: 1;--f-progressbar-z-index: 30}.f-progressbar{position:absolute;top:0;left:0;right:0;z-index:var(--f-progressbar-z-index);height:var(--f-progressbar-height);transform:scaleX(0);transform-origin:0;opacity:var(--f-progressbar-opacity);background:var(--f-progressbar-color);user-select:none;pointer-events:none;animation-name:f-progressbar;animation-play-state:running;animation-timing-function:linear}.f-progressbar:empty{display:block}button>.f-progressbar{--f-progressbar-height: 100%;--f-progressbar-opacity: .2}@keyframes f-progressbar{0%{transform:scaleX(0)}to{transform:scaleX(1)}}[data-fullscreen-action=toggle] svg g:first-child{display:flex}[data-fullscreen-action=toggle] svg g:last-child{display:none}:fullscreen [data-fullscreen-action=toggle] svg g:first-child{display:none}:fullscreen [data-fullscreen-action=toggle] svg g:last-child{display:flex}.in-fullscreen-mode>.f-carousel{flex:1;min-width:0!important;min-height:0!important}html.with-fancybox{width:auto;overflow:visible;scroll-behavior:auto}html.with-fancybox body.hide-scrollbar{width:auto;margin-right:calc(var(--f-body-margin, 0px) + var(--f-scrollbar-compensate, 0px));overflow:hidden!important;overscroll-behavior-y:none}.fancybox__dialog{width:100%;height:100vh;max-height:unset;max-width:unset;padding:0;margin:0;border:0;overflow:hidden;background:transparent;touch-action:none}.fancybox__dialog:focus{outline:none}.fancybox__dialog::backdrop{opacity:0}@supports (height: 100dvh){.fancybox__dialog{height:100dvh}}.fancybox__dialog *:empty{display:block}div.fancybox__dialog{position:fixed;inset:0;z-index:1050}.fancybox__container{--fancybox-color: #dbdbdb;--fancybox-backdrop-bg: rgba(24, 24, 27, .95);--f-toolbar-margin: 0;--f-toolbar-padding: 8px;--f-toolbar-gap: 0;--f-toolbar-color: #ddd;--f-toolbar-font-size: 16px;--f-toolbar-font-weight: 500;--f-toolbar-font: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;--f-toolbar-line-height: var(--f-button-height);--f-toolbar-text-shadow: 1px 1px 1px rgba(0, 0, 0, .75);--f-toolbar-shadow: none;--f-toolbar-bg: none;--f-counter-margin: 0;--f-counter-padding: 0px 10px;--f-counter-gap: 4px;--f-counter-line-height: var(--f-button-height);--f-carousel-gap: 17px;--f-carousel-slide-width: 100%;--f-carousel-slide-height: 100%;--f-carousel-slide-padding: 0;--f-carousel-slide-bg: unset;--f-html-color: #222;--f-html-bg: #fff;--f-error-color: #fff;--f-error-bg: #333;--f-caption-margin: 0;--f-caption-padding: 16px 8px;--f-caption-color: var(--fancybox-color, #dbdbdb);--f-caption-bg: transparent;--f-caption-font: inherit;--f-caption-line-height: 1.375;--f-spinner-color-1: rgba(255, 255, 255, .2);--f-spinner-color-2: rgba(255, 255, 255, .8);--f-spinner-width: 50px;--f-spinner-height: 50px;--f-spinner-border-radius: 50%;--f-spinner-border-width: 4px;--f-progressbar-color: rgba(255, 255, 255);--f-button-width: 46px;--f-button-height: 46px;--f-button-color: #ddd;--f-button-hover-color: #fff;--f-button-outline-width: 1px;--f-button-outline-color: rgba(255, 255, 255, .75);--f-button-outline-offset: 0px;--f-button-bg: rgba(54, 54, 54, .75);--f-button-border: 0;--f-button-border-radius: 0;--f-button-shadow: none;--f-button-transition: all .2s ease;--f-button-transform: none;--f-button-svg-width: 24px;--f-button-svg-height: 24px;--f-button-svg-stroke-width: 1.75;--f-button-svg-filter: drop-shadow(1px 1px 1px rgba(24, 24, 27, .01)), drop-shadow(1px 2px 1px rgba(24, 24, 27, .05));--f-button-svg-fill: none;--f-button-svg-disabled-opacity: .5;--f-arrow-pos: 32px;--f-arrow-width: 50px;--f-arrow-height: 50px;--f-arrow-svg-width: 24px;--f-arrow-svg-height: 24px;--f-arrow-svg-stroke-width: 2;--f-arrow-border-radius: 50%;--f-arrow-bg: rgba(54, 54, 54, .65);--f-arrow-color: #ddd;--f-arrow-hover-color: #fff;--f-close-button-width: 34px;--f-close-button-height: 34px;--f-close-border-radius: 4px;--f-close-button-color: #fff;--f-close-button-hover-color: #fff;--f-close-button-bg: transparent;--f-close-button-hover-bg: transparent;--f-close-button-active-bg: transparent;--f-close-button-svg-width: 22px;--f-close-button-svg-height: 22px;--f-thumbs-margin: 0px;--f-thumbs-padding-x: 8px;--f-thumbs-padding-y: 8px;--f-thumbs-bg: none;--f-thumb-transition: all .2s ease;--f-thumb-width: 94px;--f-thumb-height: 76px;--f-thumb-opacity: 1;--f-thumb-border: none;--f-thumb-shadow: none;--f-thumb-transform: none;--f-thumb-focus-opacity: 1;--f-thumb-focus-border: none;--f-thumb-focus-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65);--f-thumb-focus-transform: none;--f-thumb-hover-opacity: 1;--f-thumb-hover-border: none;--f-thumb-hover-transform: none;--f-thumb-active-opacity: var(--f-thumb-hover-opacity);--f-thumb-active-border: var(--f-thumb-hover-border);--f-thumb-active-transform: var(--f-thumb-hover-transform);--f-thumb-selected-opacity: 1;--f-thumb-selected-border: none;--f-thumb-selected-shadow: inset 0 0 0 2px #fff;--f-thumb-selected-transform: none}.fancybox__container[theme=light]{--fancybox-color: #222;--fancybox-backdrop-bg: rgba(255, 255, 255, .97);--f-toolbar-color: var(--fancybox-color, #222);--f-toolbar-text-shadow: none;--f-toolbar-font-weight: 400;--f-html-color: var(--fancybox-color, #222);--f-html-bg: #fff;--f-error-color: #555;--f-error-bg: #fff;--f-video-bg: #fff;--f-caption-color: #333;--f-spinner-color-1: rgba(0, 0, 0, .2);--f-spinner-color-2: rgba(0, 0, 0, .8);--f-spinner-border-width: 3.5px;--f-progressbar-color: rgba(111, 111, 116);--f-button-color: #333;--f-button-hover-color: #000;--f-button-outline-color: rgba(0, 0, 0, .85);--f-button-bg: rgba(255, 255, 255, .85);--f-button-svg-stroke-width: 1.3;--f-button-svg-filter: none;--f-arrow-bg: rgba(255, 255, 255, .85);--f-arrow-color: #333;--f-arrow-hover-color: #000;--f-arrow-svg-stroke-width: 1.3;--f-close-button-color: #555;--f-close-button-hover-color: #000;--f-thumb-bg: linear-gradient(#ebeff2, #e2e8f0);--f-thumb-focus-shadow: 0 0 0 1.8px #fff, 0px 0px 0px 2.25px #888;--f-thumb-selected-shadow: 0 0 0 1.8px #fff, 0px 0px 0px 2.25px #000}.fancybox__container{position:absolute;inset:0;overflow:hidden;display:flex;flex-direction:column}.fancybox__container:focus{outline:none}.fancybox__container.has-vertical-thumbs{flex-direction:row-reverse}.fancybox__container.has-vertical-thumbs:not(.is-closing) .fancybox__viewport{overflow-x:clip;overflow-y:visible}.fancybox__container>*:not(.fancybox__carousel),.fancybox__container .fancybox__carousel>*:not(.fancybox__viewport),.fancybox__container .fancybox__carousel>.fancybox__viewport>.fancybox__slide:not(.is-selected),.fancybox__container .fancybox__carousel>.fancybox__viewport>.fancybox__slide.is-selected>*:not(.f-html,.f-panzoom__wrapper,.f-spinner){opacity:var(--f-drag-opacity, 1)}.fancybox__container:not(.is-ready,.is-hiding){visibility:hidden}.fancybox__container.is-revealing>*:not(.fancybox__carousel),.fancybox__container.is-revealing .fancybox__carousel>*:not(.fancybox__viewport),.fancybox__container.is-revealing .fancybox__carousel>.fancybox__viewport>.fancybox__slide:not(.is-selected),.fancybox__container.is-revealing .fancybox__carousel>.fancybox__viewport>.fancybox__slide.is-selected>*:not(.f-html,.f-panzoom__wrapper,.f-spinner){animation:var(--f-interface-enter-duration, .35s) ease none f-fadeIn}.fancybox__container.is-hiding>*:not(.fancybox__carousel),.fancybox__container.is-hiding .fancybox__carousel>*:not(.fancybox__viewport),.fancybox__container.is-hiding .fancybox__carousel>.fancybox__viewport>.fancybox__slide:not(.is-selected),.fancybox__container.is-hiding .fancybox__carousel>.fancybox__viewport>.fancybox__slide.is-selected>*:not(.f-html,.f-panzoom__wrapper){animation:var(--f-interface-exit-duration, .35s) ease forwards f-fadeOut}.fancybox__container.is-idle .f-carousel__toolbar{pointer-events:none;opacity:0}.fancybox__container.is-idle .f-button.is-arrow{opacity:0}.fancybox__container.is-idle.is-ready .f-carousel__toolbar{pointer-events:none;animation:.15s ease-out both f-fadeOut}.fancybox__container.is-idle.is-ready .f-button.is-arrow{animation:.15s ease-out both f-fadeOut}.fancybox__backdrop{position:fixed;inset:0;z-index:-1;background:var(--fancybox-backdrop-bg)}.fancybox__carousel{flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;z-index:10;overflow-y:visible;overflow-x:clip}.fancybox__carousel.is-vertical{--f-carousel-slide-height: 100%}.fancybox__carousel.is-ltr{direction:ltr}.fancybox__carousel.is-rtl{direction:rtl}.fancybox__carousel>.f-button.is-arrow:before{position:absolute;content:"";inset:-30px;z-index:1}.fancybox__viewport{display:grid;flex:1;min-height:0;min-width:0;position:relative;overflow:visible;transform:translate3d(0,var(--f-drag-offset, 0),0)}.fancybox__viewport.is-draggable{cursor:move;cursor:grab}.fancybox__viewport.is-dragging{cursor:move;cursor:grabbing}.fancybox__viewport [data-selectable],.fancybox__viewport [contenteditable]{cursor:auto}.fancybox__slide{box-sizing:border-box;position:relative;grid-area:1/1;display:flex;align-items:center;flex-direction:column;width:var(--f-carousel-slide-width);height:var(--f-carousel-slide-height);min-width:0;min-height:0;max-width:100%;margin:0;padding:var(--f-carousel-slide-padding);background:var(--f-carousel-slide-bg);backface-visibility:hidden;transform:translateZ(0);will-change:transform}.fancybox__slide:before,.fancybox__slide:after{display:block;content:""}.fancybox__slide:before{margin-bottom:auto}.fancybox__slide:after{margin-top:auto}.fancybox__slide.is-selected{z-index:1}.fancybox__slide.f-zoomable{overflow:visible}.fancybox__slide.has-error{--f-html-color: var(--f-error-color, --f-html-color);--f-html-bg: var(--f-error-bg, --f-html-bg)}.fancybox__slide.has-html{overflow:auto;padding:8px}.fancybox__slide.has-close-btn{padding-top:34px}.fancybox__slide.has-controls:before{margin:0}.fancybox__slide .f-spinner{cursor:pointer}.fancybox__container.is-closing .f-caption,.fancybox__slide.is-loading .f-caption{visibility:hidden}.fancybox__container.is-closing .fancybox__carousel{overflow:visible}.f-button.is-close-button{--f-button-width: var(--f-close-button-width);--f-button-height: var(--f-close-button-height);--f-button-border-radius: var(--f-close-border-radius);--f-button-color: var(--f-close-button-color);--f-button-hover-color: var(--f-close-button-hover-color);--f-button-bg: var(--f-close-button-bg);--f-button-hover-bg: var(--f-close-button-hover-bg);--f-button-active-bg: var(--f-close-button-active-bg);--f-button-svg-width: var(--f-close-button-svg-width);--f-button-svg-height: var(--f-close-button-svg-height);position:absolute;top:calc(var(--f-button-height) * -1);right:0;z-index:40} diff --git a/pluginsSrc/@fancyapps/ui/dist/fancybox/fancybox.umd.js b/pluginsSrc/@fancyapps/ui/dist/fancybox/fancybox.umd.js deleted file mode 100644 index c141889a..00000000 --- a/pluginsSrc/@fancyapps/ui/dist/fancybox/fancybox.umd.js +++ /dev/null @@ -1,10 +0,0 @@ -!/*! License details at fancyapps.com/license */function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).window=e.window||{})}(this,function(e){"use strict";let t,n,o,i,l=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),r=e=>"string"==typeof e,a=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,s=function(e){var t=new DOMParser().parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var n=document.createElement("div");t.firstChild;)n.appendChild(t.firstChild);return n}let o=t.firstChild;if(o&&!(o instanceof HTMLElement)){var n=document.createElement("div");return n.appendChild(o),n}return o},c=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=e.scrollHeight>e.clientHeight,n=window.getComputedStyle(e).overflowY,o=-1!==n.indexOf("hidden"),i=-1!==n.indexOf("visible");return t&&!o&&!i},u=function(e,t){return!e||e===document.body||t&&e===t?null:c(e)?e:u(e.parentElement,t)},d=(e=!0,t="--f-scrollbar-compensate",n="--f-body-margin",o="hide-scrollbar")=>{let i=document,l=i.body,r=i.documentElement;if(e){if(l.classList.contains(o))return;let e=window.innerWidth-r.getBoundingClientRect().width;e<0&&(e=0),r.style.setProperty(t,`${e}px`);let i=parseFloat(window.getComputedStyle(l).marginRight);i&&l.style.setProperty(n,`${i}px`),l.classList.add(o)}else l.classList.remove(o),l.style.setProperty(n,""),i.documentElement.style.setProperty(t,"")},f=(e,...t)=>{let n=t.length;for(let o=0;o{let o=Array.isArray(n)?[]:{};e[t]||Object.assign(e,{[t]:o}),l(n)?Object.assign(e[t],f(e[t],n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})});return e};function g(){return!!("undefined"!=typeof window&&window.document&&window.document.createElement)}let m=function(e=0,t=0,n=0){return Math.max(Math.min(t,n),e)},p=function(e=0,t=0,n=0,o=0,i=0,l=!1){let r=(e-t)/(n-t)*(i-o)+o;return l?o{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.add(t)})},y=(e,t="")=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.remove(t)})},v=(e,t="",n)=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,n||!1)})};function b(e){return l(e)||Array.isArray(e)}function E(e,t){let n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every(n=>{let o=e[n],i=t[n];return"function"==typeof o?`${o}`==`${i}`:b(o)&&b(i)?E(o,i):o===i})}let w=1/60*3e3,x=function(e){for(let t of _)t.getState()===M.Running&&t.tick(H?e-H:0);H=e,$=window.requestAnimationFrame(x)},M=((L={})[L.Initializing=0]="Initializing",L[L.Running=1]="Running",L[L.Paused=2]="Paused",L[L.Completed=3]="Completed",L[L.Destroyed=4]="Destroyed",L);var L,S,T,P,R,C,A,O,z,k,I=((S=I||{})[S.Spring=0]="Spring",S[S.Ease=1]="Ease",S);let F=((T={})[T.Loop=0]="Loop",T[T.Reverse=1]="Reverse",T),_=new Set,$=null,H=0;function D(){let e=M.Initializing,t=I.Ease,n=0,o=0,i=D.Easings.Linear,l=500,r=0,a=0,s=0,c=0,u=1/0,d=.01,f=.01,g=!1,p={},h=null,y={},v={},b={},L=0,S=0,T=F.Loop,P=D.Easings.Linear,R=new Map;function C(e,...t){for(let n of R.get(e)||[])n(...t)}function A(e){return o=0,e?h=setTimeout(()=>{O()},e):O(),k}function O(){e=M.Running,C("start",y,v)}function z(){if(e=M.Completed,b={},C("end",y),e===M.Completed)if(ne!==t)),k},start:function(t){return E(y,v)||(e=M.Initializing,p={...y},_.add(this),$||($=window.requestAnimationFrame(x)),A(t)),k},pause:function(){return h&&(clearTimeout(h),h=null),e===M.Running&&(e=M.Paused,C("pause",y)),k},end:z,tick:function(n){n>w&&(n=w),o+=n;let h=0,x=!1;if(e!==M.Running)return k;if(t===I.Ease){x=1===(h=m(0,o/l,1));let e=T===F.Reverse?P:i;for(let t in y)y[t]=p[t]+(v[t]-p[t])*e(h)}if(t===I.Spring){let e=.001*n,t=0;for(let n in y){let o=v[n],i=y[n];if(!("number"==typeof o&&!isNaN(o))||!("number"==typeof i&&!isNaN(i)))continue;if(Math.abs(o-i)<=f){y[n]=o,b[n]=0;continue}b[n]||("object"==typeof r&&"number"==typeof r[n]?b[n]=r[n]:"number"==typeof r?b[n]=r:b[n]=0);let l=b[n],p=(l=m(-1*Math.abs(u),l,Math.abs(u)))*a*c,h=Math.abs(o-i)*s;l+=((i>o?-1:1)*h-p)/a*e,i+=l*e;let E=y[n]>o?io,w=Math.abs(l){for(let e of _)e.destroy();$&&(cancelAnimationFrame($),$=null)},D.Easings={Linear:function(e){return e},EaseIn:function(e){return 0===e?0:Math.pow(2,10*e-10)},EaseOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},EaseInOut:function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2}};let G=e=>{e.cancelable&&e.preventDefault()},Y={passive:!1},U={panThreshold:5,swipeThreshold:3,ignore:["textarea","input","select","[contenteditable]","[data-selectable]","[data-draggable]"]},X=!1,K=!0,J=(e,t)=>{let n,o,i,l={...U,...t},r=[],a=[],s=[],c=!1,u=!1,d=!1,f=!1,g=0,m=0,p=0,h=0,y=0,v=0,b=0,E=0,w=0,x=[],M=0,L=0,S=new Map;function T(e){let t=Z(a),l=Z(s),d=Math.abs(b)>Math.abs(E)?b:E,f={srcEvent:i,isPanRecognized:c,isSwipeRecognized:u,firstTouch:r,previousTouch:s,currentTouch:a,deltaX:p,deltaY:h,offsetX:y,offsetY:v,velocityX:b,velocityY:E,velocity:d,angle:w,axis:o,scale:t&&l?t/l:0,center:n};for(let t of S.get(e)||[])t(f)}function P(e){let t=Date.now();if(x=x.filter(e=>!e.ts||e.ts>t-100),e&&x.push(e),b=0,E=0,x.length>3){let e=x[0],t=x[x.length-1];if(e&&t){let n=t.x-e.x,o=t.y-e.y,i=e.ts&&t.ts?t.ts-e.ts:0;i>0&&(b=Math.abs(n)>3?n/(i/30):0,E=Math.abs(o)>3?o/(i/30):0)}}}function R(e){if("undefined"!=typeof MouseEvent&&e instanceof MouseEvent){if(X)return}else X=!0;let t=e.composedPath()[0],o=l.ignore.join(",");if(t.matches(o)||t.closest(o))return;if("undefined"!=typeof MouseEvent&&e instanceof MouseEvent){if(!e.buttons||0!==e.button)return;G(e)}e instanceof MouseEvent&&(window.addEventListener("mousemove",C),window.addEventListener("mouseup",A)),window.addEventListener("blur",O),i=e,r=[...a=q(e)],s=[],m=a.length,n=W(a),1===m&&(c=!1,u=!1,d=!1),m&&P(W(a));let p=Date.now(),h=p-(g||p);f=h>0&&h<=250&&1===m,g=p,clearTimeout(M),T("start")}function C(e){if(!r.length||e.defaultPrevented)return;i=e,s=[...a],a=N(e);let t=W(s),u=W(N(e));if(P(u),m=a.length,n=u,s.length===a.length?(p=u.x-t.x,h=u.y-t.y):(p=0,h=0),r.length){let e=W(r);y=u.x-e.x,v=u.y-e.y}a.length>1&&Math.abs(Z(a)-Z(s))>=.1&&(d=!0,T("pinch")),!c&&(c=Math.abs(y)>l.panThreshold||Math.abs(v)>l.panThreshold)&&(K=!1,clearTimeout(L),L=0,o=(w=Math.abs(180*Math.atan2(v,y)/Math.PI))>45&&w<135?"y":"x",r=[...a],s=[...a],y=0,v=0,p=0,h=0,window.getSelection()?.removeAllRanges(),T("panstart")),c&&(p||h)&&T("pan"),T("move")}function A(e){if(i=e,!r.length)return;let t=q(e),o=B(e);if(m=t.length,n=W(o),o.length&&P(W(o)),s=[...a],a=[...t],r=[...t],m>0)T("end"),c=!1,u=!1,x=[];else{let e=l.swipeThreshold;(Math.abs(b)>e||Math.abs(E)>e)&&(u=!0),c&&T("panend"),u&&T("swipe"),c||u||d||(T("tap"),f?T("doubleTap"):M=setTimeout(function(){T("singleTap")},250)),T("end"),z()}}function O(){clearTimeout(M),z(),c&&T("panend"),T("end")}function z(){X=!1,c=!1,u=!1,f=!1,m=0,x=[],a=[],s=[],r=[],p=0,h=0,y=0,v=0,b=0,E=0,w=0,o=void 0,window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",A),window.removeEventListener("blur",O),K||L||(L=setTimeout(()=>{K=!0,L=0},100))}function k(e){let t=e.target;X=!1,t&&!e.defaultPrevented&&(K||(G(e),e.stopPropagation()))}let I={init:function(){if(e)return e.addEventListener("click",k,Y),e.addEventListener("mousedown",R,Y),e.addEventListener("touchstart",R,Y),e.addEventListener("touchmove",C,Y),e.addEventListener("touchend",A),e.addEventListener("touchcancel",A),I},on:function(e,t){return S.set(e,[...S.get(e)||[],t]),I},off:function(e,t){return S.has(e)&&S.set(e,S.get(e).filter(e=>e!==t)),I},isPointerDown:()=>m>0,destroy:function(){clearTimeout(M),clearTimeout(L),L=0,e&&(e.removeEventListener("click",k,Y),e.removeEventListener("mousedown",R,Y),e.removeEventListener("touchstart",R,Y),e.removeEventListener("touchmove",C,Y),e.removeEventListener("touchend",A),e.removeEventListener("touchcancel",A)),e=null,z()}};return I};J.isClickAllowed=()=>K;let Q={IMAGE_ERROR:"This image couldn't be loaded.
    Please try again later.",MOVE_UP:"Move up",MOVE_DOWN:"Move down",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",TOGGLE_FULL:"Toggle zoom level",TOGGLE_1TO1:"Toggle zoom level",ITERATE_ZOOM:"Toggle zoom level",ROTATE_CCW:"Rotate counterclockwise",ROTATE_CW:"Rotate clockwise",FLIP_X:"Flip horizontally",FLIP_Y:"Flip vertically",RESET:"Reset",TOGGLE_FS:"Toggle fullscreen"},ee=1e4,et=e=>{e.cancelable&&e.preventDefault()},en=(e,t=ee)=>Math.round(((e=parseFloat(e+"")||0)+Number.EPSILON)*t)/t,eo=((P={}).Reset="reset",P.Zoom="zoom",P.ZoomIn="zoomIn",P.ZoomOut="zoomOut",P.ZoomTo="zoomTo",P.ToggleCover="toggleCover",P.ToggleFull="toggleFull",P.ToggleMax="toggleMax",P.IterateZoom="iterateZoom",P.Pan="pan",P.Swipe="swipe",P.Move="move",P.MoveLeft="moveLeft",P.MoveRight="moveRight",P.MoveUp="moveUp",P.MoveDown="moveDown",P.RotateCCW="rotateCCW",P.RotateCW="rotateCW",P.FlipX="flipX",P.FlipY="flipY",P.ToggleFS="toggleFS",P),ei=((R={}).Cover="cover",R.Full="full",R.Max="max",R),el={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1},er=((C={})[C.Init=0]="Init",C[C.Loading=1]="Loading",C[C.Error=2]="Error",C[C.Ready=3]="Ready",C[C.Destroyed=4]="Destroyed",C),ea={bounds:!0,classes:{container:"f-panzoom",wrapper:"f-panzoom__wrapper",content:"f-panzoom__content",viewport:"f-panzoom__viewport"},clickAction:eo.ToggleFull,dblClickAction:!1,gestures:{},height:"auto",l10n:Q,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:"drag",protected:!1,singleClickAction:!1,spinnerTpl:'
    ',wheelAction:eo.Zoom,width:"auto"},es=0,ec=0,eu=0,ed=(e,n={},o={})=>{let i,l,c,d,f,g,p,b,w=er.Init,x={...ea,...n},M={},L={...el},S={...el},T=[];function P(e){let t=x[e];return t&&"function"==typeof t?t(eS):t}function R(){return e&&e.parentElement&&i&&w===er.Ready}let C=new Map;function A(e,...t){let n=[...C.get(e)||[]];for(let o of(x.on&&n.push(x.on[e]),n))o&&o instanceof Function&&o(eS,...t);"*"!==e&&A("*",e,...t)}function O(e){if(!R()||u(e.target))return;let t=Date.now(),n=m(-1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),1);A("wheel",e,n);let o=P("wheelAction");if(!o||e.defaultPrevented)return;let i=S.scale,l=i*(n>0?1.5:.5);if(o===eo.Zoom){let o=100>Math.abs(e.deltaY)&&100>Math.abs(e.deltaX);if(t-ec<(o?200:45))return void et(e);ec=t;let r=Z(),a=X();if(en(l)en(a)&&en(i)>=en(a)?(eu+=Math.abs(n),l=a):(eu=0,l=m(r,l,a)),eu>7)return}switch(et(e),o){case eo.Pan:ed(o,{srcEvent:e,deltaX:-(2*e.deltaX),deltaY:-(2*e.deltaY)});break;case eo.Zoom:ed(eo.ZoomTo,{srcEvent:e,scale:l,center:{x:e.clientX,y:e.clientY}});break;default:ed(o,{srcEvent:e})}}function z(n){let o=n.composedPath()[0];if(!J.isClickAllowed()||!a(o)||n.defaultPrevented||!e?.contains(o)||o.hasAttribute("disabled")||o.hasAttribute("aria-disabled"))return;let l=o.closest("[data-panzoom-action]"),r=l?.dataset?.panzoomAction,s=l?.dataset?.panzoomValue||"";if(r){switch(et(n),r){case eo.ZoomTo:case eo.ZoomIn:case eo.ZoomOut:ed(r,{scale:parseFloat(s||"")||void 0});break;case eo.MoveLeft:case eo.MoveRight:ed(r,{deltaX:parseFloat(s||"")||void 0});break;case eo.MoveUp:case eo.MoveDown:ed(r,{deltaY:parseFloat(s||"")||void 0});break;case eo.ToggleFS:eM();break;default:ed(r)}return}if(!i?.contains(o))return;let c={srcEvent:n};if(ed(P("clickAction"),c),P("dblClickAction")){let e=Date.now(),n=e-(es||e);es=e,n>0&&n<=250?(t&&(clearTimeout(t),t=void 0),ed(P("dblClickAction"),c)):t=setTimeout(()=>{ed(P("singleClickAction"),c)},250)}}function k(e){if(b=e,!R()||!j()||L.scale<=1||S.scale<=1||(i?.dataset.animationName||"").indexOf("zoom")>-1)return;let t=N(S.scale);if(!t)return;let{x:n,y:o}=t;ed(eo.Pan,{deltaX:n-S.x,deltaY:o-S.y})}function I(){e&&(y(e,"is-loading"),e.querySelector(".f-spinner")?.remove())}function F(){if(!e||!l)return;if(I(),l instanceof HTMLImageElement&&!(l.complete&&l.naturalWidth)){w=er.Error,i?.classList.add("has-error"),A("error");return}A("loaded");let{width:t,height:n}=H();l instanceof HTMLImageElement&&(l.setAttribute("width",t+""),l.setAttribute("height",n+"")),i&&(y(i,"has-error"),l instanceof HTMLImageElement&&(i.setAttribute("width",t+""),i.setAttribute("height",n+""),i.style.aspectRatio=`${t/n||""}`)),g=D().on("start",(e,t)=>{void 0!==t.angle&&(t.angle=90*Math.round(t.angle/90)),void 0!==t.flipX&&(t.flipX=t.flipX>0?1:-1),void 0!==t.flipY&&(t.flipY=t.flipY>0?1:-1),S={...el,...t},ei(),A("animationStart")}).on("pause",e=>{S={...el,...e}}).on("step",e=>{if(!R())return void g?.end();if(L={...el,...e},j()||!P("bounds")||eE()||S.scale>L.scale||S.scalet.x[1]&&(o=!0),L.yt.y[1]&&(i=!0);let r=!1,a=!1,s=!1,c=!1;S.xt.x[1]&&(a=!0),S.yt.y[1]&&(s=!0);let u=!1;(o&&a||n&&r)&&(S.x=m(t.x[0],S.x,t.x[1]),u=!0),(i&&s||l&&c)&&(S.y=m(t.y[0],S.y,t.y[1]),u=!0),u&&g&&g.spring({tension:94,friction:17,maxSpeed:555*S.scale,restDelta:.1,restSpeed:.1,velocity:g.getCurrentVelocities()}).from(L).to(S).start(),ef()}).on("end",()=>{f?.isPointerDown()||Q(),g?.isRunning()||(ei(),A("animationEnd"))}),function(){let e=P("gestures");if(!e||!d||!l)return;let t=!1;f=J(d,e).on("start",e=>{if(!P("gestures")||!g||!R()||j())return;let n=e.srcEvent;(L.scale>1||e.currentTouch.length>1)&&(n?.stopPropagation(),g.pause(),t=!0),1===e.currentTouch.length&&A("touchStart")}).on("move",e=>{t&&(1!==S.scale||e.currentTouch.length>1)&&(et(e.srcEvent),e.srcEvent?.stopPropagation())}).on("pan",e=>{if(!t)return;let n=e.srcEvent;(1!==S.scale||e.currentTouch.length>1)&&(et(n),ed(eo.Pan,e))}).on("swipe",e=>{t&&S.scale>1&&ed(eo.Swipe,e)}).on("tap",e=>{A("click",e)}).on("singleTap",e=>{A("singleClick",e)}).on("doubleTap",e=>{A("dblClick",e)}).on("pinch",e=>{t&&(e.scale>G()?ed(eo.ZoomIn,e):e.scale{t&&(e.currentTouch.length?(e.srcEvent.stopPropagation(),et(e.srcEvent),g?.end()):(t=!1,ei(),Q(),A("touchEnd")))}).init()}(),d&&(d.addEventListener("wheel",O,{passive:!1}),T.push(()=>{d?.removeEventListener("wheel",O,{passive:!1})})),e?.addEventListener("click",z),document?.addEventListener("mousemove",k),T.push(()=>{e?.removeEventListener("click",z),document?.removeEventListener("mousemove",k)});let o=_();L={...o},S={...o},w=er.Ready,ef(),ei(),A("ready"),requestAnimationFrame(()=>{I(),d&&(d.style.visibility="")})}function _(){let e={...P("startPos")||{}},t=e.scale,n=1;n="string"==typeof t?q(t):"number"==typeof t?t:G();let o={...el,...e,scale:n},i=j()?N(n):void 0;if(i){let{x:e,y:t}=i;o.x=e,o.y=t}return o}function $(){let e={top:0,left:0,width:0,height:0};if(i){let t=i.getBoundingClientRect();S.angle%180==90?(e.top=t.top+.5*t.height-.5*t.width,e.left=t.left+.5*t.width-.5*t.height,e.width=t.height,e.height=t.width):(e.top=t.top,e.left=t.left,e.width=t.width,e.height=t.height)}return e}function H(){let e=P("width"),t=P("height");if(l&&"auto"===e){let t=l.getAttribute("width");e=t?parseFloat(t+""):void 0!==l.dataset.width?parseFloat(l.dataset.width+""):d instanceof HTMLImageElement?d.naturalWidth:l instanceof HTMLImageElement?l.naturalWidth:l.getBoundingClientRect().width}else e=r(e)?parseFloat(e):e;if(l&&"auto"===t){let e=l.getAttribute("height");t=e?parseFloat(e+""):void 0!==l.dataset.height?parseFloat(l.dataset.height+""):d instanceof HTMLImageElement?d.naturalHeight:l instanceof HTMLImageElement?l.naturalHeight:l.getBoundingClientRect().height}else t=r(t)?parseFloat(t):t;return{width:e,height:t}}function V(){let e=$();return{width:e.width,height:e.height}}function j(){return"mousemove"===P("panMode")&&matchMedia("(hover: hover)").matches}function N(e){let t=b||P("event"),n=i?.getBoundingClientRect();if(!t||!n||e<=1)return{x:0,y:0};let o=(t.clientX||0)-n.left,l=(t.clientY||0)-n.top,{width:r,height:a}=V(),s=K(e);if(e>1){let t=P("mouseMoveFactor");t>1&&(e*=t)}let c=r*e,u=a*e,d=(c-r)*.5-o/r*100/100*(c-r),f=(u-a)*.5-l/a*100/100*(u-a);return{x:d=m(s.x[0],d,s.x[1]),y:f=m(s.y[0],f,s.y[1])}}function q(t="base"){if(!e)return 1;let n=e.getBoundingClientRect(),o=$(),{width:i,height:l}=H(),r=e=>{if("number"==typeof e)return e;switch(e){case"min":case"base":return 1;case"cover":return Math.max(n.height/o.height,n.width/o.width)||1;case"full":case"max":{let e=S.angle%180==90?l:i;return e&&o.width?e/o.width:1}}},a=P("minScale"),s=P("maxScale"),c=Math.min(r("full"),r(a)),u="number"==typeof s?r("full")*s:Math.min(r("full"),r(s));switch(t){case"min":return c;case"base":return m(c,1,u);case"cover":return r("cover");case"full":return Math.min(u,r("full"));case"max":return u}}function Z(){return q("min")}function G(){return q("base")}function Y(){return q("cover")}function U(){return q("full")}function X(){return q("max")}function K(t){let n={x:[0,0],y:[0,0]},o=e?.getBoundingClientRect();if(!o)return n;let i=$(),l=o.width,r=o.height,a=i.width,s=i.height,c=t=void 0===t?S.scale:t,u=t;if(j()&&t>1){let e=P("mouseMoveFactor");e>1&&(a*t>l+.01&&(c*=e),s*t>r+.01&&(u*=e))}return a*=c,s*=u,t>1&&(a>l&&(n.x[0]=(l-a)*.5,n.x[1]=(a-l)*.5),n.x[0]-=(i.left-o.left)*.5,n.x[1]-=(i.left-o.left)*.5,n.x[0]-=(i.left+i.width-o.right)*.5,n.x[1]-=(i.left+i.width-o.right)*.5,s>r&&(n.y[0]=(r-s)*.5,n.y[1]=(s-r)*.5),n.y[0]-=(i.top-o.top)*.5,n.y[1]-=(i.top-o.top)*.5,n.y[0]-=(i.top+i.height-o.bottom)*.5,n.y[1]-=(i.top+i.height-o.bottom)*.5),n}function Q(){if(!R()||!P("bounds")||!g)return;let e=Z(),t=X(),n=m(e,S.scale,t);if(S.scalet+.01)return void ed(eo.ZoomTo,{scale:n});if(g.isRunning()||eE())return;let o=K(n);S.xo.x[1]||S.yo.y[1]?(S.x=m(o.x[0],S.x,o.x[1]),S.y=m(o.y[0],S.y,o.y[1]),g.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:g.getCurrentVelocities()}),g.from(L).to(S).start()):ef()}function ei(t){if(!R())return;let n=eb(),o=eE(),l=ew(),r=ex(),a=em(),s=ep();v(i,"is-fullsize",r),v(i,"is-expanded",l),v(i,"is-dragging",o),v(i,"can-drag",n),v(i,"will-zoom-in",a),v(i,"will-zoom-out",s);let c=ey(),u=ev(),d=eh(),f=!R();for(let n of(t||e)?.querySelectorAll("[data-panzoom-action]")||[]){let e=n.dataset.panzoomAction,t=!1;if(f)t=!0;else switch(e){case eo.ZoomIn:c||(t=!0);break;case eo.ZoomOut:d||(t=!0);break;case eo.ToggleFull:{u||d||(t=!0);let e=n.querySelector("g");e&&(e.style.display=r&&!t?"none":"");break}case eo.IterateZoom:{c||d||(t=!0);let e=n.querySelector("g");e&&(e.style.display=c||t?"":"none");break}case eo.ToggleCover:case eo.ToggleMax:c||d||(t=!0)}t?(n.setAttribute("aria-disabled",""),n.setAttribute("tabindex","-1")):(n.removeAttribute("aria-disabled"),n.removeAttribute("tabindex"))}}function ed(t,n){if(!t||!e||!l||!g||!R()||t===eo.Swipe&&Math.abs(g.getCurrentVelocities().scale)>.01)return;let o={...S},i={...S},r=K(j()?o.scale:L.scale),a=g.getCurrentVelocities(),s=$();n=n||{};let c=(n.currentTouch?.length||0)>1,u=n.velocityX||0,d=n.velocityY||0,f=n.center;n.srcEvent&&(f=W(B(n.srcEvent)));let p=n.deltaX||0,h=n.deltaY||0;switch(t){case eo.MoveRight:p=n.deltaX||100;break;case eo.MoveLeft:p=n.deltaX||-100;break;case eo.MoveUp:h=n.deltaY||-100;break;case eo.MoveDown:h=n.deltaY||100}let y=[];switch(t){case eo.Reset:(i={...el}).scale=G();break;case eo.Pan:case eo.Move:case eo.MoveLeft:case eo.MoveRight:case eo.MoveUp:case eo.MoveDown:if(eE()){let e=1,t=1;i.x<=r.x[0]&&u<=0&&(e=.2*Math.max(.01,1-Math.abs(1/s.width*Math.abs(i.x-r.x[0])))),i.x>=r.x[1]&&u>=0&&(e=.2*Math.max(.01,1-Math.abs(1/s.width*Math.abs(i.x-r.x[1])))),i.y<=r.y[0]&&d<=0&&(t=.2*Math.max(.01,1-Math.abs(1/s.height*Math.abs(i.y-r.y[0])))),i.y>=r.y[1]&&d>=0&&(t=.2*Math.max(.01,1-Math.abs(1/s.height*Math.abs(i.y-r.y[1])))),i.x+=p*e,i.y+=h*t}else i.x=m(r.x[0],i.x+p,r.x[1]),i.y=m(r.y[0],i.y+h,r.y[1]);break;case eo.Swipe:let v=(e=0)=>Math.sign(e)*Math.pow(Math.abs(e),1.5);i.x+=m(-1e3,v(u),1e3),i.y+=m(-1e3,v(d),1e3),d&&!u&&(i.x=m(r.x[0],i.x,r.x[1])),!d&&u&&(i.y=m(r.y[0],i.y,r.y[1])),a.x=u,a.y=d;break;case eo.ZoomTo:i.scale=n.scale||1;break;case eo.ZoomIn:i.scale=i.scale*(n.scale||2),c||(i.scale=Math.min(i.scale,X()));break;case eo.ZoomOut:i.scale=i.scale*(n.scale||.5),c||(i.scale=Math.max(i.scale,Z()));break;case eo.ToggleCover:y=[G(),Y()];break;case eo.ToggleFull:y=[G(),U()];break;case eo.ToggleMax:y=[G(),X()];break;case eo.IterateZoom:y=[G(),U(),X()];break;case eo.Zoom:let b=U();i.scale>=b-.05?i.scale=G():i.scale=Math.min(b,i.scale*(n.scale||2));break;case eo.RotateCW:i.angle+=90;break;case eo.RotateCCW:i.angle-=90;break;case eo.FlipX:i.flipX*=-1;break;case eo.FlipY:i.flipY*=-1}if(void 0!==L.angle&&Math.abs(L.angle)>=360&&(i.angle-=360*Math.floor(L.angle/360),L.angle-=360*Math.floor(L.angle/360)),y.length){let e=y.findIndex(e=>e>i.scale+1/ee);i.scale=y[e]||y[0]}if(c&&(i.scale=m(Z()*(c?.8:1),i.scale,X()*(c?1.6:1))),j()){let e=N(i.scale);if(e){let{x:t,y:n}=e;i.x=t,i.y=n}}else if(Math.abs(i.scale-o.scale)>1e-4){let t=0,n=0;if(f)t=f.x,n=f.y;else{let o=e.getBoundingClientRect();t=o.x+.5*o.width,n=o.y+.5*o.height}let l=t-s.left,a=n-s.top;l-=.5*s.width,a-=.5*s.height;let u=(l-o.x)/o.scale,d=(a-o.y)/o.scale;i.x=l-u*i.scale,i.y=a-d*i.scale,!c&&P("bounds")&&(r=K(i.scale),i.x=m(r.x[0],i.x,r.x[1]),i.y=m(r.y[0],i.y,r.y[1]))}if(t===eo.Swipe){let e=500*i.scale;g.spring({tension:94,friction:17,maxSpeed:e,restDelta:.1,restSpeed:.1,velocity:a})}else t===eo.Pan||c?g.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):g.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:a});if(0===n.velocity||E(L,i))L={...i},S={...i},g.end(),ef(),ei();else{if(E(S,i))return;g.from(L).to(i).start()}A("action",t)}function ef(){if(!l||!i||!d)return;let{width:t,height:n}=H();Object.assign(i.style,{maxWidth:`min(${t}px, 100%)`,maxHeight:`min(${n}px, 100%)`});let{x:o,y:r,width:a,height:s,scale:c,angle:u,flipX:f,flipY:g}=function(){let{width:t,height:n}=H(),{width:o,height:i}=V();if(!e)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:o,fitHeight:i,fullWidth:t,fullHeight:n};let{x:l,y:r,scale:a,angle:s,flipX:c,flipY:u}=L,d=1/U(),f=t,g=n,m=L.scale*d,p=S.scale*d,h=Math.max(o,i),y=Math.min(o,i);t>n?(f=h,g=y):(f=y,g=h),m=t>n?h*a/t||1:h*a/n||1;let v=f?t*p:0,b=g?n*p:0,E=f&&g?t*m/v:0;return{x:l=l+.5*f-.5*v,y:r=r+.5*g-.5*b,width:v,height:b,scale:E,flipX:c,flipY:u,angle:s,fitWidth:o,fitHeight:i,fullWidth:t,fullHeight:n}}(),m=`translate(${en(o)}px, ${en(r)}px)`;1!==f||1!==g?m+=` scaleX(${en(c*f)}) scaleY(${en(c*g)})`:m+=` scale(${en(c)})`,0!==u&&(m+=` rotate(${u}deg)`),d.style.width=`${en(a)}px`,d.style.height=`${en(s)}px`,d.style.transform=`${m}`,A("render")}function eg(){let e=S.scale,t=void 0,n=P("clickAction"),o=G();if(n){let i=[];switch(n){case eo.ZoomIn:o=e*(t||2);break;case eo.ZoomOut:o=e*(t||.5);break;case eo.ToggleCover:i=[G(),Y()];break;case eo.ToggleFull:i=[G(),U()];break;case eo.ToggleMax:i=[G(),X()];break;case eo.IterateZoom:i=[G(),U(),X()];break;case eo.Zoom:let l=U();o=e>=l-.05?G():Math.min(l,e*(t||2))}if(i.length){let t=i.findIndex(t=>t>e+1/ee);o=i[t]||G()}}return m(Z(),o,X())}function em(){return!!(R()&&eg()>S.scale)}function ep(){return!!(R()&&eg()Z())}function ey(){return!!(R()&&S.scaleG())}function ex(){return!!(R()&&S.scale>=U())}function eM(){let t="in-fullscreen",n="with-panzoom-in-fullscreen";e?.classList.toggle(t);let o=e?.classList.contains(t);o?(document.documentElement.classList.add(n),document.addEventListener("keydown",eL,!0)):(document.documentElement.classList.remove(n),document.removeEventListener("keydown",eL,!0)),ef(),A(o?"enterFS":"exitFS")}function eL(e){"Escape"!==e.key||e.defaultPrevented||eM()}let eS={canDrag:eb,canZoomIn:ey,canZoomOut:eh,canZoomToFull:ev,destroy:function(){for(let e of(A("destroy"),Object.values(M)))e?.destroy(eS);for(let e of T)e();return i&&(i.style.aspectRatio="",i.style.maxWidth="",i.style.maxHeight=""),d&&(d.style.width="",d.style.height="",d.style.transform=""),i=void 0,l=void 0,d=void 0,L={...el},S={...el},g?.destroy(),g=void 0,f?.destroy(),f=void 0,w=er.Destroyed,eS},emit:A,execute:ed,getBoundaries:K,getContainer:function(){return e},getContent:function(){return l},getFullDim:H,getGestures:function(){return f},getMousemovePos:N,getOptions:function(){return x},getPlugins:function(){return M},getScale:q,getStartPosition:_,getState:function(){return w},getTransform:function(e){return!0===e?S:L},getTween:function(){return g},getViewport:function(){return d},getWrapper:function(){return i},init:function(){return w=er.Init,A("init"),function(){for(let[e,t]of Object.entries({...o,...x.plugins||{}}))if(e&&!M[e]&&t instanceof Function){let n=t();n.init(eS),M[e]=n}A("initPlugins")}(),function(){let t={...ea.classes,...P("classes")};if(e&&(h(e,t.container),l=e.querySelector("."+t.content))){if(l.setAttribute("draggable","false"),(i=e.querySelector("."+t.wrapper))||(h(i=document.createElement("div"),t.wrapper),l.insertAdjacentElement("beforebegin",i),i.insertAdjacentElement("afterbegin",l)),(d=e.querySelector("."+t.viewport))||(h(d=document.createElement("div"),t.viewport),d.insertAdjacentElement("afterbegin",l),i.insertAdjacentElement("beforeend",d)),(c=l.cloneNode(!0)).removeAttribute("id"),i.insertAdjacentElement("afterbegin",c),l instanceof HTMLPictureElement&&(l=l.querySelector("img")),c instanceof HTMLPictureElement&&(c=c.querySelector("img")),d instanceof HTMLPictureElement&&(d=d.querySelector("img")),d&&(d.style.visibility="hidden",P("protected"))){d.addEventListener("contextmenu",e=>{et(e)});let e=document.createElement("div");h(e,"f-panzoom__protected"),d.appendChild(e)}A("initLayout")}}(),function(){if(e&&i&&!p){let e=null;(p=new ResizeObserver(()=>{R()&&(e=e||requestAnimationFrame(()=>{R()&&(ei(),Q(),A("refresh")),e=null}))})).observe(i),T.push(()=>{p?.disconnect(),p=void 0,e&&(cancelAnimationFrame(e),e=null)})}}(),function(){if(!e||!l)return;if(!(l instanceof HTMLImageElement&&c instanceof HTMLImageElement))return F();let t=()=>{l&&l instanceof HTMLImageElement&&l.decode().then(()=>{F()}).catch(()=>{F()})};if(w=er.Loading,e.classList.add("is-loading"),A("loading"),c.src&&c.complete)return t();(function(){if(!e||e?.querySelector(".f-spinner"))return;let t=s(P("spinnerTpl"));t&&(t.classList.add("f-spinner"),e.classList.add("is-loading"),i?.insertAdjacentElement("afterbegin",t))})(),c.addEventListener("load",t,!1),c.addEventListener("error",t,!1),T.push(()=>{c?.removeEventListener("load",t,!1),c?.removeEventListener("error",t,!1)})}(),eS},isDragging:eE,isExpanded:ew,isFullsize:ex,isMousemoveMode:j,localize:function(e,t=[]){let n=P("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;nt)},off:function(e,t){for(let n of e instanceof Array?e:[e])C.has(n)&&C.set(n,C.get(n).filter(e=>e!==t));return eS},on:function(e,t){for(let n of e instanceof Array?e:[e])C.set(n,[...C.get(n)||[],t]);return eS},toggleFS:eM,updateControls:ei,version:"6.0.34",willZoomIn:em,willZoomOut:ep};return eS};ed.l10n={en_EN:Q},ed.getDefaults=()=>ea;let ef=(e,t)=>{let n=[];return e.childNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(!t||e.matches(t))&&n.push(e)}),n},eg={...Q,ERROR:"Something went wrong.
    Please try again later.",NEXT:"Next page",PREV:"Previous page",GOTO:"Go to page #%d",DOWNLOAD:"Download",TOGGLE_FULLSCREEN:"Toggle full-screen mode",TOGGLE_EXPAND:"Toggle full-size mode",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_AUTOPLAY:"Toggle slideshow"},em=e=>{e.cancelable&&e.preventDefault()},ep=((A={})[A.Init=0]="Init",A[A.Ready=1]="Ready",A[A.Destroyed=2]="Destroyed",A),eh=((O={})[O.Loading=0]="Loading",O[O.Loaded=1]="Loaded",O[O.Error=2]="Error",O),ey={adaptiveHeight:!1,center:!0,classes:{container:"f-carousel",isEnabled:"is-enabled",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",hasAdaptiveHeight:"has-adaptive-height",viewport:"f-carousel__viewport",slide:"f-carousel__slide",isSelected:"is-selected"},dragFree:!1,enabled:!0,errorTpl:'
    {{ERROR}}
    ',fill:!1,infinite:!0,initialPage:0,l10n:eg,rtl:!1,slides:[],slidesPerPage:"auto",spinnerTpl:'
    ',transition:"fade",tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1},ev=0,eb=(e,t={},o={})=>{let i,c,d,g,b;ev++;let E=ep.Init,w={...ey},x={...ey},M={},L=null,S=null,T=!1,P=!1,R=!1,C=!1,A="height",O=0,z=!0,k=0,I=0,F=0,_=0,$="*",H=[],j=[],N=new Set,q=[],B=[],W=0,Z=0,G=0;function Y(e,...t){let n=x[e];return n&&n instanceof Function?n(eI,...t):n}function U(e,t=[]){let n=Y("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;nt)}let X=new Map;function K(e,...t){let n=[...X.get(e)||[]];for(let o of(x.on&&n.push(x.on[e]),n))o&&o instanceof Function&&o(eI,...t);"*"!==e&&K("*",e,...t)}function Q(){let e=f({},ey,w);f(e,ey,w);let t="",n=w.breakpoints||{};if(n)for(let[o,i]of Object.entries(n))window.matchMedia(o).matches&&(t+=o,f(e,i));if(void 0===b||t!==b){if(b=t,E!==ep.Init){let t=B[k]?.slides[0]?.index;for(let n of(void 0===t&&(t=x.initialSlide),e.initialSlide=t,e.slides=[],H))n.isVirtual&&e.slides.push(n)}eO(),!1!==(x=e).enabled&&(E=ep.Init,K("init"),function(){for(let[e,t]of Object.entries({...o,...x.plugins||{}}))if(e&&!M[e]&&t instanceof Function){let n=t();n.init(eI,eb),M[e]=n}K("initPlugins")}(),function(){if(!L)return;let e=Y("classes")||{};h(L,e.container);let t=Y("style");if(t&&l(t))for(let[e,n]of Object.entries(t))L.style.setProperty(e,n);(S=L.querySelector(`.${e.viewport}`))||(h(S=document.createElement("div"),e.viewport),S.append(...ef(L,`.${e.slide}`)),L.insertAdjacentElement("afterbegin",S)),L.carousel=eI,K("initLayout")}(),function(){if(!S)return;let e=Y("classes")||{};for(let t of(H=[],[...ef(S,`.${e.slide}`)].forEach(e=>{if(e.parentElement){let t=ed({el:e,isVirtual:!1,...e.dataset||{}});K("createSlide",t),H.push(t)}}),eE(),H))K("addSlide",t);for(let e of(eu(Y("slides")),H)){let t=e.el;t?.parentElement===S&&(h(t,x.classes.slide),h(t,e.class),eR(e),K("attachSlideEl",e))}K("initSlides")}(),ew(),function(){if(L&&S&&(L.addEventListener("click",eS,{passive:!1}),document.addEventListener("mousemove",ee),!d)){let e=null;(d=new ResizeObserver(t=>{e||(e=requestAnimationFrame(()=>{(function(e){if(!S)return;if(E===ep.Init){let t=e[0]?.contentBoxSize[0],n=t?.blockSize||0,o=t?.inlineSize||0;W=n,Z=o,E=ep.Ready,h(L,(Y("classes")||{}).isEnabled),eA(),c=D().on("start",()=>{i&&i.isPointerDown()||(eo(),eA())}).on("step",e=>{let t=O;(O=e.pos)!==t&&(z=!1,eA())}).on("end",e=>{!i?.isPointerDown()&&(O=e.pos,c&&!P&&(O_)?c.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:O}).to({pos:m(F,O,_)}).start():z||(z=!0,K("settle")))}),et(),ei(),K("ready");return}if(E!==ep.Ready)return;let t=B.length;ew(),et();let n=S.getBoundingClientRect(),o=n.height,l=n.width;if(!(t>1&&(C&&.5>Math.abs(o-W)||!C&&.5>Math.abs(l-Z))))W=o,Z=l,(!C||o)&&(C||l)&&L&&S&&(t===B.length&&i?.isPointerDown()||(Y("dragFree")&&(P||O>F&&O<_)?(eo(),eA()):eC(k,{transition:!1})))})(t),e=null}))})).observe(S)}}())}}function ee(e){n=e}function et(){if(!S)return;let e=Y("gestures");if(!1===e){i&&(i.destroy(),i=void 0);return}i||(i=J(S,e).on("start",e=>{if(!c)return;let{srcEvent:t}=e;C&&V(t)&&!u(t.target)&&em(t),c.pause(),c.getCurrentVelocities().pos=0;let n=B[k]?.slides[0];n&&N.has(n.index)&&n.el&&(O=(n.offset||0)+(function(e){let t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return{width:t.m41||0,height:t.m42||0}}(n.el)[A]||0)*(R&&!C?1:-1)),eM(),!P&&(O_)&&c.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:c.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:O}).to({pos:m(F,O,_)}).start()}).on("move",e=>{let{srcEvent:t,axis:n}=e,o=t.target;if(n||(em(t),t.stopPropagation(),t.stopImmediatePropagation()),("y"===n&&C||"x"===n&&!C)&&(em(t),t.stopPropagation()),!n)return;let{deltaX:i,deltaY:l}=e;if(!c||V(t)&&t.touches?.length>1||"y"===n&&!C||"x"===n&&C||o&&u(o)&&!("x"===n&&!C))return;let r=R&&!C?1:-1,a=C?l:i,s=c?.isRunning()?c.getEndValues().pos:O,d=1;!P&&(s<=F&&a*r<0?d=.2*Math.max(.01,1-Math.abs(1/ea()*Math.abs(s-F))):s>=_&&a*r>0&&(d=.2*Math.max(.01,1-Math.abs(1/ea()*Math.abs(s-_))))),s+=a*d*r,c.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:c.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:O}).to({pos:s}).start()}).on("panstart",e=>{e?.axis===(C?"y":"x")&&h(S,"is-dragging")}).on("panend",()=>{y(S,"is-dragging")}).on("end",e=>{let{srcEvent:t,axis:n,velocityX:o,velocityY:i,currentTouch:l}=e;if(l.length>0||!c)return;let r=t.target,a=r&&u(r)&&!("x"===n&&!C);C&&V(t)&&!e.axis&&eS(t);let s=B.length,d=Y("dragFree");if(!s)return;let f=Y("vertical")?i:o,g=c?.isRunning()?c.getEndValues().pos:O,p=R&&!C?1:-1;if(a||(g+=f*(d?5:1)*p),!P&&(f*p<=0&&g=0&&g>_)){let e=0;Math.abs(f)>0&&(e=2*Math.abs(f),e=Math.min(.3*ea(),e)),g=m(F+-1*e,g,_+e),c.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*f,restDelta:1,restSpeed:1}).from({pos:O}).to({pos:g}).start();return}if(d||M.Autoscroll?.isEnabled())return void(Math.abs(f)>10?c.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*f,restDelta:1,restSpeed:1}).from({pos:O}).to({pos:g}).start():c.isRunning()||z||(z=!0,K("settle")));if(!(d||M.Autoscroll?.isEnabled())&&(!(e.offsetX||e.offsetY)||"y"===n&&!C||"x"===n&&C))return void eC(k,{transition:"tween"});let h=er(g);Math.abs(f)>10&&h===k&&(f>0?h+=R&&!C?1:-1:h+=R&&!C?-1:1),eC(h,{transition:"tween",tween:{velocity:-1*f}})}).init())}function en(e="*"){let t=[];for(let n of H)("*"===e||n.class&&n.class.includes(e)||n.el&&n.el?.classList.contains(e))&&t.push(n);g=void 0,$=e,j=[...t]}function eo(){if(!c)return;let e=er(c?.isRunning()?c.getEndValues().pos:O);e!==k&&(g=k,k=e,eR(),ei(),el(),K("change",k,g))}function ei(){if(!L)return;for(let e of(v(S,"is-draggable",!!i&&B.length>0),L.querySelectorAll("[data-carousel-index]")))e.innerHTML=k+"";for(let e of L.querySelectorAll("[data-carousel-page]"))e.innerHTML=k+1+"";for(let e of L.querySelectorAll("[data-carousel-pages]"))e.innerHTML=B.length+"";for(let e of L.querySelectorAll("[data-carousel-go-prev]"))e.toggleAttribute("aria-disabled",!ez()),ez()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");for(let e of L.querySelectorAll("[data-carousel-go-next]"))e.toggleAttribute("aria-disabled",!ek()),ek()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");let e=!1,t=B[k]?.slides[0];for(let n of(t&&(t.downloadSrc||"image"===t.type&&t.src)&&(e=!0),L.querySelectorAll("[data-carousel-download]")))n.toggleAttribute("aria-disabled",!e)}function el(e){e||(e=B[k]?.slides[0]);let t=e.el;if(t)for(let n of t.querySelectorAll("[data-slide-index]"))n.innerHTML=e.index+1+""}function er(e){if(!B.length||!c)return 0;let t=es(),n=e;P?n-=Math.floor((e-B[0]?.pos)/t)*t:n=m(B[0]?.pos,e,B[B.length-1]?.pos);let o=new Map,i=0;for(let e of B){let l=Math.abs(e.pos-n),r=Math.min(l,Math.abs(e.pos-n-t),Math.abs(e.pos-n+t));o.set(i,r),i++}return parseInt((o.size>0?[...o.entries()].reduce((e,t)=>t[1]e+t.dim,0)+(j.length-(P&&e?0:1))*G}function ec(e){let t=es(),n=ea();if(!S)return[];let o=[];if(!t||!n)return[];e=void 0===e?O:e,P&&(e-=Math.floor(e/t)*t);let i=0,l=0;if(T){let e=S.getBoundingClientRect();i=Math.abs(e.left),l=Math.abs(window.innerWidth-e.right)}let r=0;for(let a of j){let s=(t=0)=>{!(o.indexOf(a)>-1)&&(a.pos=r-e+t||0,a.offset+t>e-a.dim-i+.51&&a.offset+te.index){n=o.el;break}S.insertBefore(t,n&&S.contains(n)?n:null),K("attachSlideEl",e)}return el(e),t}}function eh(e){let t=e?.el;t&&(t.remove(),ex(t),K("detachSlideEl",e))}function eE(){for(let e=0;e.05||l>=o)&&(B.push({index:B.length,slides:[],dim:0,offset:0,pos:0}),i=0,l=0),B[B.length-1]?.slides.push(e),i+=e.dim+G,l++;let r=Y("center"),a=Y("fill"),s=0;for(let e of B){for(let t of(e.dim=(e.slides.length-1)*G,e.slides))e.dim+=t.dim;e.offset=s,e.pos=s,!1!==r&&(e.pos-=(t-e.dim)*.5),a&&!P&&n>t&&(e.pos=m(0,e.pos,n-t)),s+=e.dim+G}let c=[];for(let t of B){let n={...t};e&&.1>Math.abs(n.pos-e.pos)?(e.dim+=n.dim,e.slides=[...e.slides,...n.slides]):(e=n,n.index=c.length,c.push(n))}B=c,ei()}(),F=B[0]?.pos||0,_=B[B.length-1]?.pos||0,E===ep.Init){g=void 0,k=Y("initialPage");let e=Y("initialSlide")||void 0;void 0!==e&&(k=eI.getPageIndex(e)||0),k=m(0,k,B.length-1),I=O=B[k]?.pos||0}else{let e=c?.isRunning()?c.getEndValues().pos:O;(e_)&&(k=m(0,k,B.length-1),I=B[k||0]?.pos||0)}K("refresh")}function ex(e){if(!e||!a(e))return;let t=parseInt(e.getAttribute("index")||"-1"),n="";for(let t of Array.from(e.classList)){let e=t.match(/^f-(\w+)(Out|In)$/);e&&e[1]&&(n=e[1]+"")}if(!e||!n)return;let o=[`f-${n}Out`,`f-${n}In`,"to-prev","to-next","from-prev","from-next"];e.removeEventListener("animationend",eL),y(e,o.join(" ")),N.delete(t)}function eM(){if(!S)return;let e=N.size>0;for(let e of j)ex(e.el);N.clear(),e&&eA()}function eL(e){"f-"===e.animationName.substring(0,2)&&(ex(e.target),!N.size&&(y(L,"in-transition"),!z&&.5>Math.abs(eI.getPosition(!0)-I)&&(z=!0,K("settle"))),eA())}function eS(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.closest("[data-carousel-go-prev]")){em(e),eI.prev();return}if(t.closest("[data-carousel-go-next]")){em(e),eI.next();return}let n=t.closest("[data-carousel-go-to]");if(n){em(e),eI.goTo(parseFloat(n.dataset.carouselGoTo||"")||0);return}if(t.closest("[data-carousel-download]")){em(e);let t=B[k]?.slides[0];if(t&&(t.downloadSrc||"image"===t.type&&t.src)){let e=t.downloadFilename,n=document.createElement("a"),o=t.downloadSrc||t.src||"";n.href=o,n.target="_blank",n.download=e||o,n.click()}return}K("click",e)}function eT(e){let t=e.el;t&&t.querySelector(".f-spinner")?.remove()}function eP(e){let t=e.el;t&&(t.querySelector(".f-html.is-error")?.remove(),y(t,"has-error"))}function eR(e){e||(e=B[k]?.slides[0]);let t=e?.el;if(!t)return;let n=Y("formatCaption",e);void 0===n&&(n=e.caption),n=n||"";let o=Y("captionEl");if(o&&o instanceof HTMLElement){if(e.index!==k)return;if(r(n)&&(o.innerHTML=U(n+"")),n instanceof HTMLElement){if(n.parentElement===o)return;o.innerHTML="",n.parentElement&&(n=n.cloneNode(!0)),o.append(n)}return}if(!n)return;let i=e.captionEl||t.querySelector(".f-caption");!i&&n instanceof HTMLElement&&n.classList.contains("f-caption")&&(i=n),!i&&(h(i=document.createElement("div"),"f-caption"),r(n)?i.innerHTML=U(n+""):n instanceof HTMLElement&&(n.parentElement&&(n=n.cloneNode(!0)),i.append(n)));let l=`f-caption-${ev}_${e.index}`;i.setAttribute("id",l),i.dataset.selectable="true",h(t,"has-caption"),t.setAttribute("aria-labelledby",l),e.captionEl=i,t.insertAdjacentElement("beforeend",i)}function eC(e,t={}){let{transition:n,tween:o}={...{transition:x.transition,tween:x.tween},...t||{}};if(!L||!c)return;let i=B.length;if(!i||function(e,t){if(!L||!c||!t||!r(t)||"tween"===t||B[k]?.slides.length>1)return!1;let n=B.length,o=e>k?1:-1;e=P?(e%n+n)%n:m(0,e,n-1),R&&(o*=-1);let i=B[k]?.slides[0],l=i?.index,a=B[e]?.slides[0],s=a?.index,u=B[e]?.pos;if(void 0===s||void 0===l||l===s||O===u||Math.abs(ea()-(a?.dim||0))>1)return!1;z=!1,c.pause(),eM(),h(L,"in-transition"),O=I=u;let d=eg(i),f=eg(a);return eo(),d&&(N.add(l),d.style.transform="",d.addEventListener("animationend",eL),y(d,x.classes.isSelected),d.inert=!1,h(d,`f-${t}Out to-${o>0?"next":"prev"}`)),f&&(N.add(s),f.style.transform="",f.addEventListener("animationend",eL),h(f,x.classes.isSelected),f.inert=!1,h(f,`f-${t}In from-${o>0?"prev":"next"}`)),eA(),!0}(e,n))return;e=P?(e%i+i)%i:m(0,e,i-1),I=B[e||0]?.pos||0;let a=c.isRunning()?c.getEndValues().pos:O;if(1>Math.abs(I-a)){O=I,k!==e&&(eR(),ei(),el(),g=k,K("change",k=e,g)),eA(),z||(z=!0,K("settle"));return}if(c.pause(),eM(),P){let e=es(),t=Math.floor((a-B[0]?.pos)/e),n=I+t*e,o=n-e;I=[n+e,n,o].reduce(function(e,t){return Math.abs(t-a)-1,a=o?.slides?.indexOf(i)>-1;if(i.isVirtual&&!l&&!r)continue;let s=eg(i);if(s&&(n.push(i),a&&t.add(s),Y("adaptiveHeight")&&a)){let t=(s.firstElementChild||s).getBoundingClientRect().height;e=void 0==e?t:Math.max(e,t)}}S&&e&&(S.style.height=`${e}px`),[...ef(S,`.${x.classes.slide}`)].forEach(e=>{v(e,x.classes.isSelected,t.has(e));let n=H[parseInt(e.getAttribute("index")||"-1")];if(!n){e.remove(),ex(e);return}let o=N.has(n.index),l=q.indexOf(n)>-1;if(n.isVirtual&&!o&&!l)return void eh(n);e.inert=!l;let r=n.pos?Math.round(1e4*n.pos)/1e4:0,a=0,s=0,c=0,u=0;o||(a=C?0:R?-1*r:r,s=C?r:0,c=p(a,0,n.dim,0,100),u=p(s,0,n.dim,0,100)),i instanceof Function&&!o?i(eI,n,{x:a,y:s,xPercent:c,yPercent:u}):e.style.transform=a||s?`translate3d(${c}%, ${u}%,0)`:""}),K("render",n)}function eO(){for(let e of(L?.removeEventListener("click",eS),eM(),document.removeEventListener("mousemove",ee),d?.disconnect(),d=void 0,H))e.el&&a(e.el)&&(e.state=void 0,eT(e),eP(e),eh(e),e.isVirtual?(e.el?.remove(),e.el=void 0):(e.el.style.transform="",S?.appendChild(e.el)));for(let e of Object.values(M))e?.destroy();for(let[e,t]of(M={},i?.destroy(),i=void 0,c?.destroy(),c=void 0,Object.entries(x.classes||{})))"container"!==e&&y(L,t);y(S,"is-draggable")}function ez(){return P||k>0}function ek(){return P||kk?-1:1;let o=es(),i=G,l=n.pos,r=eI.getPosition();if(P&&!0!==t){let e=Math.floor((r-B[0]?.pos)/o);r-=e*o,l=[l+o,l,l-o].reduce(function(e,t){return Math.abs(t-r)k?-1:1;let n=eI.getPosition(),o=ea(),i=t.pos;if(P){let e=eI.getPosition(),t=es(),n=i+Math.floor((e-B[0]?.pos)/t)*t,o=n-t;i=[n+t,n,o].reduce(function(t,n){return Math.abs(n-e)n&&i+t.dimn+o?(n+o-i)/t.dim:0},getPages:function(){return B},getPlugins:function(){return M},getPosition:function(e){let t=O;if(P&&!0!==e){let e=es();t-=Math.floor((O-B[0]?.pos||0)/e)*e}return t},getSlides:function(){return H},getState:function(){return E},getTotalSlideDim:es,getTween:function(){return c},getViewport:function(){return S},getViewportDim:ea,getVisibleSlides:function(e){return void 0===e?q:ec(e)},goTo:eC,hasNavigated:function(){return void 0!==g},hideError:eP,hideLoading:eT,init:function(){if(!e||!a(e))throw Error("No Element found");return E!==ep.Init&&(eO(),E=ep.Init),L=e,w=t,window.removeEventListener("resize",Q),w.breakpoints&&window.addEventListener("resize",Q),Q(),eI},isInfinite:function(){return P},isInTransition:function(){return N.size>0},isRTL:function(){return R},isSettled:function(){return z},isVertical:function(){return C},localize:function(e,t=[]){return U(e,t)},next:function(e={}){return eC(k+1,e),eI},off:function(e,t){for(let n of e instanceof Array?e:[e])X.has(n)&&X.set(n,X.get(n).filter(e=>e!==t));return eI},on:function(e,t){for(let n of e instanceof Array?e:[e])X.set(n,[...X.get(n)||[],t]);return eI},prev:function(e={}){return eC(k-1,e),eI},remove:function(e){void 0===e&&(e=H.length-1);let t=H[e];return t&&(K("removeSlide",t),t.el&&(ex(t.el),t.el.remove(),t.el=void 0),H.splice(e,1),en($),ew(),eA()),eI},setPosition:function(e){O=e,eo(),eA()},showError:function(e,t){eT(e),eP(e);let n=e.el;if(n){let o=document.createElement("div");h(o,"f-html"),h(o,"is-error"),o.innerHTML=U(t||"

    {{ERROR}}

    "),e.htmlEl=o,h(n,"has-html"),h(n,"has-error"),n.insertAdjacentElement("afterbegin",o),K("contentReady",e)}return eI},showLoading:function(e){let t=e.el,n=t?.querySelector(".f-spinner");if(!t||n)return eI;let o=s(Y("spinnerTpl"));return o&&(h(o,"f-spinner"),t.insertAdjacentElement("beforeend",o)),eI},version:"6.0.34"};return eI};eb.l10n={en_EN:eg},eb.getDefaults=()=>ey;let eE=function(e="",t="",n=""){return e.split(t).join(n)},ew={tpl:e=>`{{alt}}`},ex=()=>{let e;function t(t,n){let o=e?.getOptions().Zoomable,i=(l(o)?{...ew,...o}:ew)[t];return i&&"function"==typeof i&&n?i(n):i}function n(){e&&!1!==e.getOptions().Zoomable&&(e.on("addSlide",a),e.on("removeSlide",s),e.on("attachSlideEl",c),e.on("click",i),e.on("change",o),e.on("ready",o))}function o(){u();let t=e?.getVisibleSlides()||[];if(t.length>1||e?.getOption("transition")==="slide")for(let n of t){let t=n.panzoomRef;t&&0>(e?.getPage().slides||[]).indexOf(n)&&t.execute(eo.ZoomTo,{...t.getStartPosition()})}}function i(e,t){let n=t.target;n&&!t.defaultPrevented&&n.dataset.panzoomAction&&d(n.dataset.panzoomAction)}function a(n,o){let i=o.el;if(!e||!i||o.panzoomRef)return;let l=o.src||o.lazySrc||"",a=o.alt||o.caption||`Image #${o.index}`,s=o.srcset||o.lazySrcset||"",c=o.sizes||o.lazySizes||"";if(l&&r(l)&&!o.html&&(!o.type||"image"===o.type)){o.type="image",o.thumbSrc=o.thumbSrc||l;let e=t("tpl",o);e=eE(e,"{{src}}",l+""),e=eE(e,"{{srcset}}",s+""),e=eE(e,"{{sizes}}",c+""),i.insertAdjacentHTML("afterbegin",e)}let d=i.querySelector(".f-panzoom__content");if(!d)return;d.setAttribute("alt",a+"");let f=ed(i,{width:o.width&&"auto"!==o.width?parseFloat(o.width+""):"auto",height:o.height&&"auto"!==o.height?parseFloat(o.height+""):"auto",classes:{container:"f-zoomable"},event:()=>e?.getLastMouseMove(),spinnerTpl:()=>e?.getOption("spinnerTpl")||"",...t("Panzoom")});f.on("*",(t,n,...i)=>{e&&("loading"===n&&(o.state=0),"loaded"===n&&(o.state=1),"error"===n&&(o.state=2,e?.showError(o,"{{IMAGE_ERROR}}")),e.emit(`panzoom:${n}`,o,...i),"ready"===n&&e.emit("contentReady",o),o.index===e?.getPageIndex()&&u())}),o.panzoomRef=f}function s(e,t){t.panzoomRef&&(t.panzoomRef.destroy(),t.panzoomRef=void 0)}function c(e,t){let n=t.panzoomRef;if(n)switch(n.getState()){case er.Init:n.init();break;case er.Ready:n.execute(eo.ZoomTo,{...n.getStartPosition(),velocity:0})}}function u(){let t=e?.getContainer()||void 0,n=e?.getPage()?.slides[0]?.panzoomRef;if(t)if(n)n.updateControls(t);else for(let e of t.querySelectorAll("[data-panzoom-action]")||[])e.setAttribute("aria-disabled",""),e.setAttribute("tabindex","-1")}function d(t,...n){e?.getPage().slides[0].panzoomRef?.execute(t,...n)}return{init:function(t){(e=t).on("initPlugins",n)},destroy:function(){if(e)for(let t of(e.off("initPlugins",n),e.off("addSlide",a),e.off("removeSlide",s),e.off("attachSlideEl",c),e.off("click",i),e.off("change",o),e.off("ready",o),e.getSlides()))s(e,t);e=void 0},execute:d}},eM={syncOnChange:!1,syncOnClick:!0,syncOnHover:!1},eL=()=>{let e,t;function n(){let t=e?.getOptions().Sync;return l(t)?{...eM,...t}:eM}function o(){let o=n().target;e&&o&&e&&o&&(t=o,e.getOptions().classes={...e.getOptions().classes,isSelected:""},e.getOptions().initialSlide=t.getPage()?.slides[0]?.index||0,n().syncOnChange&&e.on("change",r),n().syncOnClick&&e.on("click",s),n().syncOnHover&&e.getViewport()?.addEventListener("mouseover",c),e&&t&&(e.on("ready",i),e.on("refresh",u),t.on("change",a),t.on("filter",d)))}function i(){f()}function r(){if(e&&t){let n=e.getPage()?.slides||[],o=t.getPageIndex(n[0].index||0);o>-1&&t.goTo(o,e.hasNavigated()?void 0:{tween:!1,transition:!1}),f()}}function a(){if(e&&t){let n=e.getPageIndex(t.getPage()?.slides[0].index||0);n>-1&&e.goTo(n,t.hasNavigated()?void 0:{tween:!1,transition:!1}),f()}}function s(n,o){if(!e||!t||e.getTween()?.isRunning())return;let i=e?.getOptions().classes.slide;if(!i)return;let l=i?o.target.closest(`.${i}`):null;if(l){let e=parseInt(l.getAttribute("index")||"")||0,n=t.getPageIndex(e);t.goTo(n)}}function c(t){e&&s(e,t)}function u(){if(e&&t){let n=e.getPageIndex(t.getPage()?.slides[0].index||0);n>-1&&e.goTo(n,{tween:!1,transition:!1}),f()}}function d(n,o){e&&t&&(e.filter(o),a())}function f(){if(!t)return;let n=t.getPage()?.slides[0]?.index||0;for(let t of e?.getSlides()||[])t.el?.classList.toggle("is-selected",t.index===n)}return{init:function(t){(e=t).on("initSlides",o)},destroy:function(){e?.off("ready",i),e?.off("refresh",u),e?.off("change",r),e?.off("click",s),e?.getViewport()?.removeEventListener("mouseover",c),t?.off("change",a),t?.off("filter",d),t=void 0,e?.off("initSlides",o),e=void 0},getTarget:function(){return t}}},eS={showLoading:!0,preload:1},eT="is-lazyloading",eP="is-lazyloaded",eR=()=>{let e;function t(){let t=e?.getOptions().Lazyload;return l(t)?{...eS,...t}:eS}function n(){if(!e)return;let n=[...e.getVisibleSlides()],o=t().preload;if(o>0){let t=e.getPosition(),i=e.getViewportDim();n.push(...e.getVisibleSlides(t+i*o),...e.getVisibleSlides(t-i*o))}for(let o of n)!function(n){let o=n.el;if(!o)return;let i="[data-lazy-src],[data-lazy-srcset],[data-lazy-bg]",l=Array.from(o.querySelectorAll(i));for(let r of(o.matches(i)&&l.push(o),l)){let o=r.dataset.lazySrc,i=r.dataset.lazySrcset,l=r.dataset.lazySizes,a=r.dataset.lazyBg,s=(r instanceof HTMLImageElement||r instanceof HTMLSourceElement)&&(o||i),c=r instanceof HTMLElement&&a;if(!(s||c))continue;let u=o||i||a;if(u){if(s&&u){let a=r.parentElement?.classList.contains("f-panzoom__wrapper");t().showLoading&&e?.showLoading(n),r.addEventListener("load",()=>{e?.hideLoading(n),r instanceof HTMLImageElement?r.decode().then(()=>{r.classList.remove(eT),r.classList.add(eP)}):(r.classList.remove(eT),r.classList.add(eP)),a||e?.emit("lazyLoad:loaded",n,r,u)}),r.addEventListener("error",()=>{e?.hideLoading(n),r.classList.remove(eT),r.classList.add("has-lazyerror"),a||e?.emit("lazyLoad:error",n,r,u)}),r.classList.add("f-lazyload"),r.classList.add(eT),a||e?.emit("lazyLoad:load",n,r,u),o&&(r.src=o),i&&(r.srcset=i),l&&(r.sizes=l)}else c&&(document.body.contains(r)||(document.createElement("img").src=a),r.style.backgroundImage=`url('${a}')`);delete r.dataset.lazySrc,delete r.dataset.lazySrcset,delete r.dataset.lazySizes,delete r.dataset.lazyBg}}}(o)}return{init:function(t){(e=t).on("render",n)},destroy:function(){e?.off("render",n),e=void 0}}},eC={prevTpl:'',nextTpl:''},eA=()=>{let e,t,n;function o(){let t=e?.getOptions().Arrows;return l(t)?{...eC,...t}:eC}function i(t){if(!e)return;let n=``};let eI=((z={}).Left="left",z.middle="middle",z.right="right",z),eF={counter:{tpl:'
    /
    '},download:{tpl:''},autoplay:{tpl:''},thumbs:{tpl:''},...ek},e_={absolute:!1,display:{left:[],middle:["zoomIn","zoomOut","toggle1to1","rotateCCW","rotateCW","flipX","flipY","reset"],right:[]},enabled:"auto",items:{}},e$=()=>{let e,t;function n(t){let n=e?.getOptions().Toolbar,o=(l(n)?{...e_,...n}:e_)[t];return o&&"function"==typeof o&&e?o(e):o}function o(){if(!e?.getOptions().Toolbar||!e||t)return;let o=e.getContainer();if(!o)return;let i=n("enabled");if(!i)return;let a=n("absolute"),c=e.getSlides().length>1,u=!1,d=!1;for(let t of e.getSlides())t.panzoomRef&&(u=!0),(t.downloadSrc||"image"===t.type&&t.src)&&(d=!0);let g=e.getPlugins().Thumbs?.isEnabled()||!1,m=c&&e.getPlugins().Autoplay||!1,p=e.getPlugins().Fullscreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled);if("auto"===i&&(i=u),!i)return;(t=o.querySelector(".f-carousel__toolbar")||void 0)||(t=document.createElement("div")).classList.add("f-carousel__toolbar");let h=n("display"),y=f({},eF,n("items"));for(let n of["left","middle","right"]){let o=h[n]||[],i=document.createElement("div");for(let t of(i.classList.add("f-carousel__toolbar__column"),i.classList.add(`is-${n}`),o)){let n;if(r(t)){if("counter"===t&&!c||"autoplay"===t&&!m||ek[t]&&!u||"fullscreen"===t&&!p||"thumbs"===t&&!g||"download"===t&&!d)continue;n=y[t]}if(l(t)&&(n=t),n&&n.tpl){let t=e.localize(n.tpl),o=s(t=t.split("").join(''));o&&("function"==typeof n.click&&e&&o.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof n.click&&e&&n.click(e,t)}),i.append(o))}}t.append(i)}if(t.childElementCount){if(a&&t.classList.add("is-absolute"),!t.parentElement){let o=n("parentEl");o?o.insertAdjacentElement("afterbegin",t):e.getViewport()?.insertAdjacentElement("beforebegin",t)}o.contains(t)&&o.classList.add("has-toolbar")}}return{init:function(t){e=t,e?.on("initSlides",o)},destroy:function(){e?.off("initSlides",o),e?.getContainer()?.classList.remove("has-toolbar"),t?.remove(),t=void 0},add:function(e,t){eF[e]=t},isEnabled:function(){return!!t}}},eH={autoStart:!0,pauseOnHover:!0,showProgressbar:!0,timeout:2e3},eD=()=>{let e,t,n=!1,o=!1,i=!1,r=null;function a(t){let n=e?.getOptions().Autoplay,o=(l(n)?{...eH,...n}:eH)[t];return o&&"function"==typeof o&&e?o(e):o}function s(){clearTimeout(t),t=void 0}function c(){!n||i||o||t||!e?.isSettled()||function(){for(let t of e?.getPage()?.slides||[])if(0===t.state)return!0;return!1}()||(function(){if(!e||(f(),!a("showProgressbar")))return;let t=a("progressbarParentEl");if(!t&&e.getPlugins().Toolbar?.isEnabled()&&(t=e.getContainer()),!t&&e.getPlugins().Toolbar?.isEnabled()!==!0){let n=e.getPages()[0]?.slides||[],o=e.getPage()?.slides||[];1===n.length&&1===o.length&&(t=o[0].el)}if(t||(t=e.getViewport()),!t)return;(r=document.createElement("div")).classList.add("f-progressbar"),t.prepend(r);let n=a("timeout")||1e3;r.style.animationDuration=`${n}ms`}(),t=setTimeout(()=>{if(e&&n&&!o){if(!e.isInfinite()&&e.getPageIndex()===e.getPages().length-1)return void e.goTo(0);e.next()}},a("timeout")))}function u(){if(!e||e.getPages().length<2||!1===e.getOptions().Autoplay||n)return;n=!0,e.emit("autoplay:start",a("timeout")),e.getContainer()?.classList.add("has-autoplay"),e.getTween()?.on("start",v);let t=e?.getContainer();t&&a("pauseOnHover")&&matchMedia("(hover: hover)").matches&&(t.addEventListener("mouseenter",b,!1),t.addEventListener("mouseleave",E,!1)),e.on("change",h),e.on("settle",y),e.on("contentReady",m),e.on("panzoom:touchStart",d),e.on("panzoom:wheel",d),e.isSettled()&&c()}function d(){if(s(),f(),n&&e){e.emit("autoplay:end"),e.getContainer()?.classList.remove("has-autoplay"),e.getTween()?.off("start",v);let t=e?.getContainer();t&&(t.removeEventListener("mouseenter",b,!1),t.removeEventListener("mouseleave",E,!1))}e&&(e.off("change",h),e.off("settle",y),e.off("contentReady",m),e.off("panzoom:touchStart",d),e.off("panzoom:wheel",d)),n=!1,o=!1}function f(){r&&(r.remove(),r=null)}function g(){e&&e.getPages().length>1&&a("autoStart")&&u()}function m(){e&&c()}function p(e,t){let n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.autoplayAction&&w.toggle()}function h(){e&&(e?.isInfinite()||e.getPageIndex()!==e.getPages().length-1)?(f(),s()):d()}function y(){c()}function v(){s(),f()}function b(){i=!0,n&&(f(),s())}function E(){i=!1,n&&!o&&e?.isSettled()&&c()}let w={init:function(t){(e=t).on("ready",g),e.on("click",p)},destroy:function(){d(),e?.off("ready",g),e?.off("click",p),e=void 0},isEnabled:()=>n,pause:function(){o=!0,s()},resume:function(){o=!1,n&&!i&&c()},start(){u()},stop(){d()},toggle(){n?d():u()}};return w},eV={Carousel:{Lazyload:{showLoading:!1}},minCount:2,showOnStart:!0,thumbTpl:'{{alt}}',type:"modern"},ej=()=>{let e,t,n,i=0,r=0,a=!0;function s(t){let n=e?.getOptions().Thumbs,o=(l(n)?{...eV,...n}:eV)[t];return o&&"function"==typeof o&&e?o(e):o}function c(){if(!e||e?.getOptions().Thumbs===!1)return!1;let t=0;for(let n of e.getSlides())n.thumbSrc&&t++;return t>=s("minCount")}function u(){return"modern"===s("type")}function d(t=!1){let o=e?.getContainer();if(!e||!o||n||!c())return;let i=s("Carousel")?.classes||{};if(i.container=i.container||"f-thumbs",!n){let e=o.nextElementSibling;e?.classList.contains(i.container)&&(n=e)}if(!n){n=document.createElement("div");let e=s("parentEl");e?e.insertAdjacentElement("beforeend",n):o.insertAdjacentElement("afterend",n)}h(n,i.container),h(n,"f-thumbs"),h(n,`is-${s("type")}`),h(n,"is-syncing"),t&&(n.style.maxHeight="0px")}function g(e){let t=e.thumb?e.thumb instanceof HTMLImageElement?e.thumb.src:e.thumb:e.thumbSrc||void 0,n=void 0===e.thumbAlt?`Thumbnail #${e.index}`:e.thumbAlt+"",o=s("thumbTpl");return o=eE(o,"{{alt}}",n),o=eE(o,"{{src}}",t+""),o=eE(o,"{{index}}",`${e.index}`),{html:o=eE(o,"{{page}}",`${e.index||1}`),class:e.thumbClass}}function p(){if(!o||!e||!n||t)return;let l=[];for(let t of e.getSlides())l.push(g(t));l.length&&((t=o(n,f({},{Sync:{target:e},Lazyload:{preload:1},slides:l,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",slide:"f-thumbs__slide"},center:!0,fill:!u(),infinite:!1,dragFree:!0,rtl:e.getOptions().rtl||!1,slidesPerPage:e=>{let t=0;return(u()&&(function(){if(!u()||!n)return;let e=e=>n&&parseFloat(getComputedStyle(n).getPropertyValue("--f-thumb-"+e))||0;i=e("width"),r=e("clip-width")}(),t=(i-r)*4),e&&e.getTotalSlideDim()<=e.getViewportDim()-t)?1/0:1}},eV.Carousel||{},s("Carousel")||{}),{Sync:eL,Lazyload:eR})).on("ready",()=>{e?.emit("thumbs:ready"),u()&&(e?.on("change",w),e?.on("render",E))}),t.on("destroy",()=>{e?.emit("thumbs:destroy")}),t.init(),t.getGestures()?.on("start",()=>{a=!1}),t.on("click",(e,t)=>{let n=t.target;if(n){let e=n.matches("button")?n:n.firstElementChild;e&&e.matches("button")&&(t.preventDefault(),e.focus({preventScroll:!0}))}}),h(e.getContainer(),"has-thumbs"),L())}function y(){c()&&s("showOnStart")&&(d(),p())}function v(){c()&&(e?.on("addSlide",x),e?.on("click",M),e?.getGestures()?.on("start",b))}function b(){a=!0,document.activeElement?.closest(".f-thumbs")&&document.activeElement?.blur()}function E(){n?.classList.toggle("is-syncing",e?.hasNavigated()===!1||e?.getTween()?.isRunning()),L(),e?.getGestures()?.isPointerDown()&&function(){if(!u()||!e||!t||!a)return;let n=t.getTween(),o=t.getPages(),l=e.getPageIndex()||0,s=e.getPageProgress()||0;if(!e||!o||!o[l]||!n)return;let c=n.isRunning()?n.getCurrentValues().pos:t.getPosition();if(void 0===c)return;let d=o[l].pos+s*(i-r);d=m(o[0].pos,d,o[o.length-1].pos),n.from({pos:c}).to({pos:d}).start()}()}function w(){a=!0}function x(e,n){t?.add(g(n),n.index)}function M(e,o){let i=o.target;i&&!o.defaultPrevented&&"toggle"===i.dataset.thumbsAction&&function(){if(n||(d(!0),p()),!n)return;let e=t?.isVertical()?"maxWidth":"maxHeight";n.style[e]?n.style[e]="":n.style[e]="0px"}()}function L(){if(!u()||!e||!t)return;let n=t?.getSlides()||[],o=-.5*i;for(let t of n){let n=t.el;if(!n)continue;let l=e.getPageProgress(t.index)||0;(l=Math.max(-1,Math.min(1,l)))>-1&&l<1&&(o+=.5*i*(1-Math.abs(l))),l=Math.round(1e4*l)/1e4,o=Math.round(1e4*o)/1e4,n.style.setProperty("--progress",`${Math.abs(l)}`),n.style.setProperty("--shift",`${e?.isRTL()?-1*o:o}px`),l>-1&&l<1&&(o+=.5*i*(1-Math.abs(l)))}}return{init:function(t,n){o=n,(e=t).on("ready",v),e.on("initSlides",y)},destroy:function(){e?.off("ready",v),e?.off("initSlides",y),e?.off("change",w),e?.off("render",E),e?.off("addSlide",x),e?.off("click",M),e?.getGestures()?.off("start",b),e?.getContainer()?.classList.remove("has-thumbs"),e=void 0,t?.destroy(),t=void 0,n?.remove(),n=void 0},getCarousel:function(){return t},getContainer:function(){return n},isEnabled:function(){return c()}}},eN={iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"}},eq=()=>{let e;function t(e,t){let n=t.src;if(!r(n))return;let o=t.type;if(!o){if(!o&&("#"===n.charAt(0)?o="inline":n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?o="pdf":n.match(/\.(html|php)((\?|#).*)?$/i)&&(o="iframe")),!o){let e=n.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i);e&&(n=`https://maps.google.${e[1]}/?ll=${(e[2]?e[2]+"&z="+Math.floor(parseFloat(e[3]))+(e[4]?e[4].replace(/^\//,"&"):""):e[4]+"").replace(/\?/,"&")}&output=${e[4]&&e[4].indexOf("layer=c")>0?"svembed":"embed"}`,o="gmap")}if(!o){let e=n.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i);e&&(n=`https://maps.google.${e[1]}/maps?q=${e[2].replace("query=","q=").replace("api=1","")}&output=embed`,o="gmap")}t.src=n,t.type=o}}function n(t,n){("iframe"===n.type||"pdf"===n.type||"gmap"===n.type)&&function(t){if(!e||!t.el||!t.src)return;let n=document.createElement("iframe");for(let[t,o]of(n.classList.add("f-iframe"),Object.entries(function(){let t=e?.getOptions().Html;return l(t)?{...eN,...t}:eN}().iframeAttr||{})))n.setAttribute(t,o);n.onerror=()=>{e&&1===e.getState()&&e.showError(t,"{{IFRAME_ERROR}}")},n.src=t.src;let o=document.createElement("div");if(o.classList.add("f-html"),o.append(n),t.width){let e=`${t.width}`;e.match(/^\d+$/)&&(e+="px"),o.style.maxWidth=`${e}`}if(t.height){let e=`${t.height}`;e.match(/^\d+$/)&&(e+="px"),o.style.maxHeight=`${e}`}if(t.aspectRatio){let e=t.el.getBoundingClientRect();o.style.aspectRatio=`${t.aspectRatio}`,o.style[e.width>e.height?"width":"height"]="auto",o.style[e.width>e.height?"maxWidth":"maxHeight"]="none"}t.contentEl=n,t.htmlEl=o,t.el.classList.add("has-html"),t.el.classList.add("has-iframe"),t.el.classList.add(`has-${t.type}`),t.el.prepend(o),e.emit("contentReady",t)}(n)}function o(t,n){("iframe"===n.type||"pdf"===n.type||"gmap"===n.type)&&(e?.hideError(n),n.contentEl?.remove(),n.contentEl=void 0,n.htmlEl?.remove(),n.htmlEl=void 0)}return{init:function(i){(e=i).on("addSlide",t),e.on("attachSlideEl",n),e.on("detachSlideEl",o)},destroy:function(){e?.off("addSlide",t),e?.off("attachSlideEl",n),e?.off("detachSlideEl",o),e=void 0}}},eB=(e,t={})=>{let n=new URLSearchParams(new URL(e).search),o=new URLSearchParams;for(let[e,i]of[...n,...Object.entries(t)]){let t=i+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&o.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else o.set(e,t)}let i=o+"",l=e.match(/#t=((.*)?\d+s)/);return l&&(i+=`#t=${l[1]}`),i},eW={autoplay:!1,html5videoTpl:``,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto",credentialless:""},vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},eZ=()=>{let e,t=!1;function n(){let t=e?.getOptions().Video;return l(t)?{...eW,...t}:eW}function o(){return e?.getPage()?.slides[0]}let i=t=>{try{let n=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===n.event)for(let n of Array.from(e?.getContainer()?.getElementsByClassName("f-iframe")||[]))n instanceof HTMLIFrameElement&&n.contentWindow===t.source&&(n.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===n.event){let e=document.getElementById(n.id);e&&(e.dataset.ready="true")}}catch(e){}};function a(e,t){let o=t.src;if(!r(o))return;let i=t.type;if(!i||"html5video"===i){let e=o.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i);e&&(i="html5video",t.html5videoFormat=t.html5videoFormat||"video/"+("ogv"===e[1]?"ogg":e[1]))}if(!i||"youtube"===i){let e=o.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i);if(e){let l={...n().youtube,...t.youtube||{}},r=`www.youtube${l.nocookie?"-nocookie":""}.com`,a=eB(o,l),s=encodeURIComponent(e[2]);t.videoId=s,t.src=`https://${r}/embed/${s}?${a}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${s}/mqdefault.jpg`,i="youtube"}}if(!i||"vimeo"===i){let e=o.match(/^.+vimeo.com\/(?:\/)?(video\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/);if(e){let l=eB(o,{...n().vimeo,...t.vimeo||{}}),r=encodeURIComponent(e[2]),a=e[5]||"";t.videoId=r,t.src=`https://player.vimeo.com/video/${r}?${a?`h=${a}${l?"&":""}`:""}${l}`,i="vimeo"}}t.type=i}function c(t,o){"html5video"===o.type&&function(t){if(!e||!t.el||!t.src)return;let{el:o,src:i}=t;if(!o||!i)return;let l=t.html5videoTpl||n().html5videoTpl,a=t.html5videoFormat||n().html5videoFormat;if(!l)return;let c=t.poster||(t.thumb&&r(t.thumb)?t.thumb:""),u=s(l.replace(/\{\{src\}\}/gi,i+"").replace(/\{\{format\}\}/gi,a||"").replace(/\{\{poster\}\}/gi,c+""));if(!u)return;let d=document.createElement("div");d.classList.add("f-html"),d.append(u),t.contentEl=u,t.htmlEl=d,o.classList.add(`has-${t.type}`),o.prepend(d),g(t),e.emit("contentReady",t)}(o),("youtube"===o.type||"vimeo"===o.type)&&function(t){if(!e||!t.el||!t.src)return;let o=document.createElement("iframe");for(let[e,i]of(o.classList.add("f-iframe"),o.setAttribute("id",`f-iframe_${t.videoId}`),Object.entries(n().iframeAttr||{})))o.setAttribute(e,i);o.onload=()=>{e&&1===e.getState()&&"youtube"===t.type&&o.contentWindow?.postMessage(JSON.stringify({event:"listening",id:o.getAttribute("id")}),"*")},o.onerror=()=>{e&&1===e.getState()&&e?.showError(t,"{{IFRAME_ERROR}}")},o.src=t.src;let i=document.createElement("div");i.classList.add("f-html"),i.append(o),t.contentEl=o,t.htmlEl=i,t.el.classList.add("has-html"),t.el.classList.add("has-iframe"),t.el.classList.add(`has-${t.type}`),t.el.prepend(i),g(t),e.emit("contentReady",t)}(o)}function u(e,t){("html5video"===t.type||"youtube"===t.type||"vimeo"===t.type)&&(t.contentEl?.remove(),t.contentEl=void 0,t.htmlEl?.remove(),t.htmlEl=void 0),t.poller&&clearTimeout(t.poller)}function d(){t=!1}function f(){if(t)return;t=!0;let e=o();(e&&void 0!==e.autoplay?e.autoplay:n().autoplay)&&(!function(){let e=o(),t=e?.el;if(t&&e?.type==="html5video")try{let e=t.querySelector("video");if(e){let t=e.play();void 0!==t&&t.then(()=>{}).catch(t=>{e.muted=!0,e.play()})}}catch(e){}let n=e?.htmlEl;n instanceof HTMLIFrameElement&&n.contentWindow?.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")}(),function(){let e=o(),t=e?.type;if(!(e?.el&&("youtube"===t||"vimeo"===t)))return;let n=()=>{if(e.contentEl&&e.contentEl instanceof HTMLIFrameElement&&e.contentEl.contentWindow){let t;if("true"===e.contentEl.dataset.ready){(t="youtube"===e.type?{event:"command",func:"playVideo"}:{method:"play",value:"true"})&&e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"),e.poller=void 0;return}"youtube"===e.type&&(t={event:"listening",id:e.contentEl.getAttribute("id")},e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(n,250)};n()}())}function g(e){let t=e?.htmlEl;if(e&&t&&("html5video"===e.type||"youtube"===e.type||"vimeo"===e.type)){if(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width){let n=`${e.width}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxWidth=`${n}`}if(e.height){let n=`${e.height}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxHeight=`${n}`}if(e.aspectRatio){let n=e.aspectRatio.split("/"),o=parseFloat(n[0].trim()),i=n[1]?parseFloat(n[1].trim()):0;t.offsetHeight;let l=t.getBoundingClientRect(),r=(o&&i?o/i:o)<(l.width||1)/(l.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=r?"auto":"",t.style.height=r?"":"auto"}}}function m(){g(o())}return{init:function(t){(e=t).on("addSlide",a),e.on("attachSlideEl",c),e.on("detachSlideEl",u),e.on("ready",f),e.on("change",d),e.on("settle",f),e.on("refresh",m),window.addEventListener("message",i)},destroy:function(){e?.off("addSlide",a),e?.off("attachSlideEl",c),e?.off("detachSlideEl",u),e?.off("ready",f),e?.off("change",d),e?.off("settle",f),e?.off("refresh",m),window.removeEventListener("message",i),e=void 0}}},eG={autoStart:!1,btnTpl:''},eY="in-fullscreen-mode",eU=()=>{let e;function t(t){let n=e?.getOptions().Fullscreen,o=(l(n)?{...eG,...n}:eG)[t];return o&&"function"==typeof o&&e?o(e):o}function n(){e?.getPlugins().Toolbar?.add("fullscreen",{tpl:t("btnTpl")})}function o(){if(t("autoStart")){let e=r();e&&s(e)}}function i(e,t){let n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.fullscreenAction&&u()}function r(){return t("el")||e?.getContainer()||void 0}function a(){let e=document;return e.fullscreenEnabled?!!e.fullscreenElement:!!e.webkitFullscreenEnabled&&!!e.webkitFullscreenElement}function s(e){let t,n=document;return e||(e=n.documentElement),n.fullscreenEnabled?t=e.requestFullscreen():n.webkitFullscreenEnabled&&(t=e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)),t&&t.then(()=>{e.classList.add(eY)}),t}function c(){let e,t=document;return t.fullscreenEnabled?e=t.fullscreenElement&&t.exitFullscreen():t.webkitFullscreenEnabled&&(e=t.webkitFullscreenElement&&t.webkitExitFullscreen()),e&&e.then(()=>{r()?.classList.remove(eY)}),e}function u(){let e=r();e&&(a()?c():s(e))}return{init:function(t){(e=t).on("initPlugins",n),e.on("ready",o),e.on("click",i)},destroy:function(){e?.off("initPlugins",n),e?.off("ready",o),e?.off("click",i)},exit:c,inFullscreen:a,request:s,toggle:u}},eX=!1,eK=!1,eJ=!1,eQ=!1,e0=()=>{let e=new URL(document.URL).hash,t=e.slice(1).split("-"),n=t[t.length-1],o=n&&/^\+?\d+$/.test(n)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:o}},e1=()=>{if(!i||i.getInstance())return;let{slug:e,index:t}=e0();if(!e||!i||i.getInstance())return;let n=document.querySelectorAll(`[data-fancybox="${e}"]`);if(!n.length)return;let o=n[t-1];o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0}))},e2=()=>{if(!i||eJ)return;let e=i?.getInstance();if(e?.getOptions().Hash===!1)return;let{slug:t,index:n}=e0(),o=e?.getSlide()?.fancybox||void 0;e&&o&&(t===o?e.getCarousel()?.goTo(n-1):(eQ=!0,e.close(),eQ=!1)),e1()},e5=()=>{i&&setTimeout(()=>{eX=!0,e1(),eX=!1,window.addEventListener("hashchange",e2,!1)},300)},e4=()=>{let e,t="auto",n="";function o(){if(!e||!e.isTopMost()||!1===e.getOptions().Hash)return;let o=e.getCarousel();if(!o)return;let{hash:l,slug:r}=e0(),a=e.getSlide();if(!a)return;let s=a.fancybox||"",c=parseInt(a.index+"",10)+1;if(!s)return;let u=`#${s}-${c}`;if(2>(e.getCarousel()?.getPages()?.length||0)&&(u=`#${s}`),l!==u&&(n=l),history.scrollRestoration&&(t=history.scrollRestoration,history.scrollRestoration="manual"),o.on("change",i),!eX)if(s===r)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+u)}catch(e){}else try{window.history.pushState({},document.title,window.location.pathname+window.location.search+u),eK=!0}catch(e){}}function i(){if(!e||!e.isTopMost()||!1===e.getOptions().Hash)return;let{slug:t}=e0(),n=e.getSlide();if(!n)return;let o=n.fancybox||"",i=n.index+1,l=`#${o}-${i}`;if(o===t){eJ=!0;try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+l)}catch(e){}eJ=!1}}function l(){if(eQ||!e||!e.isTopMost()||!1===e.getOptions().Hash)return;let t=e.getSlide();if(t&&t.fancybox){eJ=!0;try{eK&&!eX&&!function(){if(window.parent===window)return!1;try{var e=window.frameElement}catch(t){e=null}return null===e?"data:"===location.protocol:e.hasAttribute("sandbox")}()?window.history.back():window.history.replaceState({},document.title,window.location.pathname+window.location.search+n)}catch(e){}eJ=!1}}return{init:function(t){(e=t).on("ready",o),e.on("close",l)},destroy:function(){e?.off("ready",o),e?.off("close",l);let n=e?.getCarousel();n&&n.off("change",i),e=void 0,history.scrollRestoration&&t&&(history.scrollRestoration=t)}}};e4.startFromUrl=e1,e4.setup=function(e){!i&&(i=e,g()&&(/complete|interactive|loaded/.test(document.readyState)?e5():document.addEventListener("DOMContentLoaded",e5)))};let e3={...eg,CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ELEMENT_NOT_FOUND:"HTML Element Not Found",IFRAME_ERROR:"Error Loading Page"},e6='';e$().add("close",{tpl:e6});let e7=e=>{e.cancelable&&e.preventDefault()},e9=e=>{e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))},e8=(e=null,t="",n)=>{if(!e||!e.parentElement||!t){n&&n();return}e9(e);let o=i=>{i.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",o),delete e.dataset.animationName,n&&n(),e.classList.remove(t))};e.dataset.animationName=t,e.addEventListener("animationend",o),h(e,t)},te=((k={})[k.Init=0]="Init",k[k.Ready=1]="Ready",k[k.Closing=2]="Closing",k[k.Destroyed=3]="Destroyed",k),tt={ajax:null,backdropClick:"close",Carousel:{},closeButton:"auto",closeExisting:!1,delegateEl:void 0,dragToClose:!0,fadeEffect:!0,groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,id:void 0,idle:!1,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:e3,mainClass:"",mainStyle:{},mainTpl:` -
    -
    - -
    -
    `,on:{},parentEl:void 0,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,sync:void 0,theme:"dark",triggerEl:void 0,triggerEvent:void 0,zoomEffect:!0},tn=new Map,to=0,ti="with-fancybox",tl={Plugins:{Hash:e4},version:"6.0.34",openers:new Map,bind:function(e,t,n){if(!g())return;let o=document.body,i="[data-fancybox]",l={};if(r(e)?(o=document.body,i=e,"object"==typeof t&&(l=t||{})):e instanceof Element&&(o=e,r(t)&&(i=t),"object"==typeof n&&(l=n||{})),!(o&&o instanceof Element)||!i)return!1;let a=tl.openers.get(o)||new Map;if(a.set(i,l),tl.openers.set(o,a),1===a.size)for(let e of(o.addEventListener("click",tl.fromEvent),Object.values(tl.Plugins))){let t=e.setup;"function"==typeof t&&t(tl)}return!0},close:function(e=!0,...t){if(e)for(let e of tn.values())e.close(...t);else{let e=tl.getInstance();e&&e.close(...t)}},destroy:function(){let e;for(;e=tl.getInstance();)e.destroy();for(let e of tl.openers.keys())e.removeEventListener("click",tl.fromEvent);tl.openers.clear()},fromEvent:function(e){let t,n;if(e.defaultPrevented||e.button&&0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey)return;let o=e.composedPath()[0];if(o.closest(".fancybox__container.is-hiding")){e7(e),e.stopPropagation();return}let i=o.closest("[data-fancybox-delegate]")||void 0;if(i){let e=i.dataset.fancyboxDelegate||"",t=document.querySelectorAll(`[data-fancybox="${e}"]`);o=t[parseInt(i.dataset.fancyboxIndex||"",10)||0]||t[0]}if(!(o&&o instanceof Element))return;let l={};for(let[e,i]of tl.openers)if(i&&e.contains(o))for(let[r,a]of i){let i=null;try{i=o.closest(r)}catch(e){}i&&(o=i,t=e,n=r,f(l,a||{}))}if(!t||!n)return;e7(e);let r=f({},tt,{triggerEvent:e,triggerEl:o,delegateEl:i},l),a=r.groupAll,s=r.groupAttr,c=s&&o?o.getAttribute(`${s}`):"",u=[],d=o.closest(".f-carousel")?.carousel;if(d){let e=[];for(let t of d?.getSlides()){let o=t.el;o&&(o.matches(n)?e.push(o):e.push(...[].slice.call(o.querySelectorAll(n))))}e.length&&(u=[...e],d.getPlugins().Autoplay?.pause(),d.getPlugins().Autoscroll?.pause(),r.sync=d)}else(!o||c||a)&&(u=[].slice.call(t.querySelectorAll(n)));if(o&&!a&&(u=s&&c?u.filter(e=>e.getAttribute(`${s}`)===c):[o]),!u.length)return;let g=tl.getInstance();if(g){let e=g.getOptions().triggerEl;if(e&&u.indexOf(e)>-1)return}return({...r.Carousel||{}}).rtl&&(u=u.reverse()),o&&(r.startIndex=u.indexOf(o)),tl.fromNodes(u,r)},fromNodes:function(e,t){t=f({},tt,t||{});let n=[],o=e=>e instanceof HTMLImageElement?e:e instanceof HTMLElement?e.querySelector("img:not([aria-hidden])"):void 0;for(let i of e){let l=i.dataset||{},r=t.delegateEl&&e.indexOf(i)===t.startIndex?t.delegateEl:void 0,a=o(r)||o(i)||void 0,s=l.src||i.getAttribute("href")||i.getAttribute("currentSrc")||i.getAttribute("src")||void 0,c=l.thumb||l.thumbSrc||a?.getAttribute("currentSrc")||a?.getAttribute("src")||a?.dataset.lazySrc||void 0,u={src:s,alt:l.alt||a?.getAttribute("alt")||void 0,thumbSrc:c,thumbEl:a,triggerEl:i,delegateEl:r};for(let e in l){let t=l[e]+"";t="false"!==t&&("true"===t||t),u[e]=t}n.push(u)}return tl.show(n,t)},fromSelector:function(e,t,n){let o=document.body,i="",l={};if(r(e)?i=e:e instanceof Element&&(o=e,r(t)&&(i=t),"object"==typeof n&&(l=n||{})),!(o&&o instanceof Element)||!i)return;let a=tl.openers.get(o);if(a&&(l=f({},a.get(i)||{},l)))return tl.fromNodes(Array.from(o.querySelectorAll(i)),l)},getCarousel:function(){return tl.getInstance()?.getCarousel()||void 0},getDefaults:function(){return tt},getInstance:function(e){if(e){let t=tn.get(e);return t&&t.getState()!==te.Destroyed?t:void 0}return Array.from(tn.values()).reverse().find(e=>{if(e.getState()!==te.Destroyed)return e})||void 0},getSlide:function(){return tl.getInstance()?.getSlide()||void 0},show:function(e=[],t={}){return(()=>{let e,t,n,o,i,c,g,m=te.Init,b={...tt},E=-1,w={},x=[],M=!1,L=!0,S=0;function T(e,...t){let n=b[e];return n&&"function"==typeof n?n(eu,...t):n}function P(e,t=[]){let n=T("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;nt)}let R=new Map;function C(e,...t){let n=[...R.get(e)||[]];for(let[t,o]of Object.entries(b.on||{}))(t===e||t.split(" ").indexOf(e)>-1)&&n.push(o);for(let e of n)e&&"function"==typeof e&&e(eu,...t);"*"!==e&&C("*",e,...t)}function A(){y(c,"is-revealing");try{document.activeElement===i&&(c?.querySelector("[autofocus]")||c).focus()}catch(e){}}function O(t,n){Z(n),j(),n.el?.addEventListener("click",k),("inline"===n.type||"clone"===n.type)&&function(t){if(!e||!t||!t.el)return;let n=null;if(r(t.src)){let e=t.src.split("#",2).pop();n=e?document.getElementById(e):null}if(n){if(h(n,"f-html"),"clone"===t.type||n.closest(".fancybox__carousel")){let e=(n=n.cloneNode(!0)).dataset.animationName;e&&(n.classList.remove(e),delete n.dataset.animationName);let o=n.getAttribute("id");o=o?`${o}--clone`:`clone-${E}-${t.index}`,n.setAttribute("id",o)}else if(n.parentNode){let e=document.createElement("div");e.inert=!0,n.parentNode.insertBefore(e,n),t.placeholderEl=e}t.htmlEl=n,h(t.el,"has-html"),t.el.prepend(n),n.classList.remove("hidden"),"none"===n.style.display&&(n.style.display=""),"none"===getComputedStyle(n).getPropertyValue("display")&&(n.style.display=n.dataset.display||"flex"),e?.emit("contentReady",t)}else e?.showError(t,"{{ELEMENT_NOT_FOUND}}")}(n),"ajax"===n.type&&function(t){let n=t.el;if(!n||t.htmlEl||t.xhr)return;e?.showLoading(t),t.state=eh.Loading;let o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE&&m===te.Ready)if(e?.hideLoading(t),t.state=eh.Loaded,200===o.status){let i=o.responseText+"",l=null,r=null;if(t.filter){let e=document.createElement("div");e.innerHTML=i,r=e.querySelector(t.filter+"")}r&&r instanceof HTMLElement?l=r:(l=document.createElement("div")).innerHTML=i,l.classList.add("f-html"),t.htmlEl=l,n.classList.add("has-html"),n.classList.add("has-ajax"),n.prepend(l),e?.emit("contentReady",t)}else e?.showError(t)};let i=T("ajax")||null;o.open(i?"POST":"GET",t.src+""),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(i),t.xhr=o}(n)}function z(e,t){var n;(n=t).closeButtonEl&&(n.closeButtonEl.remove(),n.closeButtonEl=void 0),t.el?.removeEventListener("click",k),("inline"===t.type||"clone"===t.type)&&function(e){let t=e.htmlEl,n=e.placeholderEl;t&&("none"!==getComputedStyle(t).getPropertyValue("display")&&(t.style.display="none"),t.offsetHeight),n&&(t&&n.parentNode&&n.parentNode.insertBefore(t,n),n.remove()),e.htmlEl=void 0,e.placeholderEl=void 0}(t),t.xhr&&(t.xhr.abort(),t.xhr=void 0)}function k(e){if(!Y())return;if(m!==te.Ready){e7(e),e.stopPropagation();return}if(e.defaultPrevented||!J.isClickAllowed())return;let t=e.composedPath()[0];t.closest(".fancybox__carousel")&&t.classList.contains("fancybox__slide")&&N(e)}function I(){L=!1,c&&e&&c.classList.remove("is-revealing"),j();let t=T("sync");if(e&&t){let n=t.getPageIndex(e.getPageIndex())||0;t.goTo(n,{transition:!1})}}function F(){if(m!==te.Ready)return;G(U()),function(){if(!T("dragToClose")||!e)return;let o=e.getViewport();if(!o||!(t=J(o).init()))return;let i=!1,l=0,r=0,a={},s=1;function d(){n?.spring({clamp:!0,mass:1,tension:0===r?140:800,friction:17,restDelta:.1,restSpeed:.1,maxSpeed:1/0}).from({y:l}).to({y:r}).start();let t=e?.getViewport()?.getBoundingClientRect().height||0,o=U()?.panzoomRef;if(t&&o)if(0===r)o.execute(eo.Reset);else{let e=p(Math.abs(l),0,.33*t,s,.75*s,!1);o.execute(eo.ZoomTo,{scale:e})}}let f=t=>{let n=t.srcEvent,o=n.target;return e&&!(V(n)&&n.touches?.length>1)&&o&&!u(o)};n=D().on("step",e=>{if(c&&o&&m===te.Ready){let t=o.getBoundingClientRect().height,n=p(Math.abs(l=Math.min(t,Math.max(-1*t,e.y))),0,.5*t,1,0,!0);c.style.setProperty("--f-drag-opacity",n+""),c.style.setProperty("--f-drag-offset",l+"px")}}),t.on("start",function(){i||(n?.pause(),r=l)}).on("panstart",t=>{if(!i&&f(t)&&"y"===t.axis){e7(t.srcEvent),i=!0,er(),e?.getViewport()?.classList.add("is-dragging");let n=U()?.panzoomRef;if(n){s=n.getTransform().scale||1;let e=n.getOptions();a={...e},e.bounds=!1,e.gestures=!1}}else i=!1}).on("pan",function(e){i&&f(e)&&(e7(e.srcEvent),e.srcEvent.stopPropagation(),"y"===e.axis&&(r+=e.deltaY,d()))}).on("end",t=>{if(e?.getViewport()?.classList.remove("is-dragging"),i){let e=U()?.panzoomRef;if(e){e.getTween()?.end();let t=e.getOptions();t.bounds=a.bounds||!1,t.gestures=a.gestures||!1}f(t)&&"y"===t.axis&&(Math.abs(t.velocityY)>5||Math.abs(l)>50)&&ea(t.srcEvent,"f-throwOut"+(t.velocityY>0?"Down":"Up"))}i=!1,m===te.Ready&&0!==l&&(r=0,d())})}(),document.body.addEventListener("click",W),document.body.addEventListener("keydown",B,{passive:!1,capture:!0}),j(),ee();let o=T("sync");o&&o.getTween()?.start()}function _(){e?.canGoNext()?ee():ei()}function $(e,t){Z(t),G(t)}function H(){let t=e?.getPlugins().Thumbs;v(c,"has-thumbs",t?.isEnabled()||!1),v(c,"has-vertical-thumbs",t?.getCarousel()?.isVertical()||!1)}function j(){if(c){let t=e?.getPages()||[],n=e?.getPageIndex()||0;for(let e of c.querySelectorAll("[data-fancybox-index]"))e.innerHTML=n+"";for(let e of c.querySelectorAll("[data-fancybox-page]"))e.innerHTML=n+1+"";for(let e of c.querySelectorAll("[data-fancybox-pages]"))e.innerHTML=t.length+""}}function N(e){if(e.composedPath()[0].closest("[data-fancybox-close]"))return void ea(e);C("backdropClick",e),!e.defaultPrevented&&T("backdropClick")&&ea(e)}function q(){en()}function B(t){if(!Y()||m!==te.Ready)return;let n=t.key,o=T("keyboard");if(!o||t.ctrlKey||t.altKey||t.shiftKey)return;let i=t.composedPath()[0];if(!a(i)||"Escape"!==n&&(e=>{let t="input,textarea,select,option,video,iframe,[contenteditable],[data-selectable],[data-draggable]";return e.matches(t)||e.closest(t)})(i)||(C("keydown",t),t.defaultPrevented))return;let l=o[n];if(l)switch(l){case"close":ea(t);break;case"next":e7(t),e?.next();break;case"prev":e7(t),e?.prev()}}function W(e){if(!Y()||m!==te.Ready||(en(),e.defaultPrevented))return;let t=e.composedPath()[0],n=!!t.closest("[data-fancybox-close]"),o=t.classList.contains("fancybox__backdrop");(n||o)&&N(e)}function Z(t){let{el:n,htmlEl:o,closeButtonEl:i}=t;if(!n||!o||i)return;let l=T("closeButton");if("auto"===l&&(l=e?.getPlugins().Toolbar?.isEnabled()!==!0),l){let e=s(P(e6));e&&(h(e,"is-close-button"),t.closeButtonEl=o.insertAdjacentElement("afterbegin",e),n.classList.add("has-close-btn"))}}function G(t){if(!(L&&e&&e.getState()===ep.Ready&&t&&t.index===e.getOptions().initialPage&&t.el&&t.el.parentElement)||void 0!==t.state&&t.state!==eh.Loaded)return;L=!1;let n=t.panzoomRef,o=n?.getTween(),i=T("zoomEffect")&&o?K(t):void 0;if(n&&o&&i){let{x:e,y:t,scale:l}=n.getStartPosition();o.spring({tension:215,friction:25,restDelta:.001,restSpeed:.001,maxSpeed:1/0}).from(i).to({x:e,y:t,scale:l}).start();return}let l=n?.getContent()||t.htmlEl;l&&e8(l,T("showClass",t))}function Y(){return tl.getInstance()?.getId()===E}function U(){return e?.getPage()?.slides[0]}function X(){let e=U();return e?e.triggerEl||T("triggerEl"):void 0}function K(e){let t=e.thumbEl;if(!t||!(e=>{let t=e.getBoundingClientRect(),n=e.closest("[style]"),o=n?.parentElement;if(n&&n.style.transform&&o){let e=o.getBoundingClientRect();if(t.lefte.left+e.width-t.width||t.tope.top+e.height-t.height)return!1}let i=Math.max(document.documentElement.clientHeight,window.innerHeight),l=Math.max(document.documentElement.clientWidth,window.innerWidth);return!(t.bottom<0)&&!(t.top-i>=0)&&!(t.right<0)&&!(t.left-l>=0)})(t))return;let n=e.panzoomRef?.getWrapper()?.getBoundingClientRect(),o=n?.width,i=n?.height;if(!o||!i)return;let l=t.getBoundingClientRect(),r=l.width,a=l.height,s=l.left,c=l.top;if(!l||!r||!a)return;if(t instanceof HTMLImageElement){let e=window.getComputedStyle(t).getPropertyValue("object-fit");if("contain"===e||"scale-down"===e){let{width:n,height:o}=((e,t,n,o,i="contain")=>{if("contain"===i||e>n||t>o){let i=Math.min(n/e,o/t);e*=i,t*=i}return{width:e,height:t}})(t.naturalWidth,t.naturalHeight,r,a,e);s+=(r-n)*.5,c+=(a-o)*.5,r=n,a=o}}if(Math.abs(o/i-r/a)>.1)return;let u=s+.5*r-(n.left+.5*o);return{x:u,y:c+.5*a-(n.top+.5*i),scale:r/o}}function Q(){o&&clearTimeout(o),o=void 0,document.removeEventListener("mousemove",q)}function ee(){if(M||o)return;let e=T("idle");e&&(o=setTimeout(et,e))}function et(){c&&(Q(),h(c,"is-idle"),document.addEventListener("mousemove",q),M=!0)}function en(){M&&(ei(),ee())}function ei(){Q(),c?.classList.remove("is-idle"),M=!1}function er(){if(T("placeFocusBack")){var e;let t=X();t&&!((e=t.getBoundingClientRect()).bottom>0&&e.right>0&&e.left<(window.innerWidth||document.documentElement.clientWidth)&&e.top<(window.innerHeight||document.documentElement.clientHeight))&&t.scrollIntoView({behavior:"instant",block:"center",inline:"center"})}}function ea(o,i){if(m===te.Closing||m===te.Destroyed)return;let l=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(C("shouldClose",l,o),l.defaultPrevented)return;if(Q(),o){if(o.defaultPrevented)return;e7(o),o.stopPropagation(),o.stopImmediatePropagation()}if(m=te.Closing,n?.pause(),t?.destroy(),e)for(let t of(e.getGestures()?.destroy(),e.getTween()?.pause(),e.getSlides())){let e=t.panzoomRef;e&&(f(e.getOptions(),{clickAction:!1,dblClickAction:!1,wheelAction:!1,bounds:!1,minScale:0,maxScale:1/0}),e.getGestures()?.destroy(),e.getTween()?.pause())}let r=e?.getPlugins();r?.Autoplay?.stop();let a=r?.Fullscreen;a&&a.inFullscreen()?Promise.resolve(a.exit()).then(()=>{setTimeout(()=>{es(o,i)},150)}):es(o,i)}function es(t,n){if(m!==te.Closing)return;C("close",t),document.body.removeEventListener("click",W),document.body.removeEventListener("keydown",B,{passive:!1,capture:!0}),er(),T("fadeEffect")&&(c?.classList.remove("is-ready"),c?.classList.add("is-hiding")),c?.classList.add("is-closing");let o=U(),i=o?.panzoomRef,l=o?.panzoomRef?.getTween(),r=n||T("hideClass"),a=!1,s=!1;if(e&&o&&i&&l){let t;T("zoomEffect")&&700>(e.getTween()?.getCurrentVelocities()?.pos||0)&&o.state===eh.Loaded&&(t=K(o)),t&&(a=!0,e.on("refresh",()=>{let e=K(o);e&&l.to({...el,...e})}),l.easing(D.Easings.EaseOut).duration(350).from({...i.getTransform()}).to({...el,...t}).start())}let u=o?.htmlEl||o?.panzoomRef?.getWrapper();u&&e9(u),!a&&r&&u&&(s=!0,e8(u,r,()=>{ec()})),a||s?setTimeout(()=>{ec()},350):ec()}function ec(){if(m===te.Destroyed)return;m=te.Destroyed;let t=X();for(let t of(C("destroy"),T("sync")?.getPlugins().Autoplay?.resume(),T("sync")?.getPlugins().Autoscroll?.resume(),i instanceof HTMLDialogElement&&i.close(),e?.getContainer()?.classList.remove("is-idle"),e?.destroy(),Object.values(w)))t?.destroy();if(w={},i?.remove(),i=void 0,c=void 0,e=void 0,tn.delete(E),!tn.size&&(d(!1),document.documentElement.classList.remove(ti),T("placeFocusBack")))try{t?.focus({preventScroll:!0})}catch(e){}}let eu={close:ea,destroy:ec,getCarousel:function(){return e},getContainer:function(){return c},getId:function(){return E},getOptions:function(){return b},getPlugins:function(){return w},getSlide:function(){return U()},getState:function(){return m},init:function(t=[],n={}){return!function(t=[],n={}){m!==te.Init&&(eu.destroy(),m=te.Init),b=f({},tt,n),E=T("id")||`fancybox-${++to}`;let o=tn.get(E);if(o&&o.destroy(),tn.set(E,eu),C("init"),function(){for(let[e,t]of Object.entries({...tl.Plugins,...b.plugins||{}}))if(e&&!w[e]&&t instanceof Function){let n=t();n.init(eu),w[e]=n}C("initPlugins")}(),function(e=[]){C("initSlides",e),x=[...e]}(t),function(){let t=T("parentEl")||document.body;if(!(t&&t instanceof HTMLElement)||!(i=s(P(T("mainTpl")||""))||void 0)||!((c=i.querySelector(".fancybox__container"))&&c instanceof HTMLElement))return;let n=T("mainClass");n&&h(c,n);let o=T("mainStyle");if(o&&l(o))for(let[e,t]of Object.entries(o))c.style.setProperty(e,t);let r=T("theme"),a="auto"===r?window.matchMedia("(prefers-color-scheme:light)").matches:"light"===r;c.setAttribute("theme",a?"light":"dark"),i.setAttribute("id",`${E}`),i.addEventListener("keydown",e=>{"Escape"===e.key&&e7(e)}),i.addEventListener("wheel",t=>{let n=t.target,o=T("wheel",t);n.closest(".f-thumbs")&&(o="slide");let i="slide"===o,l=Math.max(-1,Math.min(1,[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),r=Date.now();if(S&&r-S<300){i&&e7(t);return}S=r,C("wheel",t,l),t.defaultPrevented||("close"===o?ea(t):"slide"===o&&e&&!u(n)&&(e7(t),e[l>0?"prev":"next"]()))},{capture:!0,passive:!1}),i.addEventListener("cancel",e=>{ea(e)}),t.append(i),1===tn.size&&(T("hideScrollbar")&&d(!0),document.documentElement.classList.add(ti)),i instanceof HTMLDialogElement&&i.showModal(),C("initLayout")}(),function(){if(!(g=i?.querySelector(".fancybox__carousel")||void 0))return;g.fancybox=eu;let t=f({},{Autoplay:{autoStart:!1,pauseOnHover:!1,progressbarParentEl:e=>{let t=e.getContainer();return t?.querySelector(".f-carousel__toolbar [data-autoplay-action]")||t}},Fullscreen:{el:c},Toolbar:{absolute:!0,items:{counter:{tpl:'
    /
    '}},display:{left:["counter"],right:["toggleFull","autoplay","fullscreen","thumbs","close"]}},Video:{autoplay:!0},Thumbs:{minCount:2,Carousel:{classes:{container:"fancybox__thumbs"}}},classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",slide:"fancybox__slide"},spinnerTpl:'
    ',dragFree:!1,slidesPerPage:1,plugins:{Sync:eL,Arrows:eA,Lazyload:eR,Zoomable:ex,Html:eq,Video:eZ,Autoplay:eD,Fullscreen:eU,Thumbs:ej,Toolbar:e$}},T("Carousel")||{},{slides:x,enabled:!0,initialPage:T("startIndex")||0,l10n:T("l10n")});C("initCarousel",e=eb(g,t)),e.on("*",(e,t,...n)=>{C(`Carousel.${t}`,e,...n)}),e.on("attachSlideEl",O),e.on("detachSlideEl",z),e.on("contentReady",$),e.on("ready",F),e.on("change",I),e.on("settle",_),e.on("thumbs:ready",H),e.on("thumbs:destroy",H),e.init()}(),i&&c){if(T("closeExisting"))for(let[e,t]of tn.entries())e!==E&&t.close();T("fadeEffect")?(setTimeout(()=>{A()},500),h(c,"is-revealing")):A(),c.classList.add("is-ready"),m=te.Ready,C("ready")}}(t,n),eu},isCurrentSlide:function(e){let t=U();return!!e&&!!t&&t.index===e.index},isTopMost:function(){return Y()},off:function(e,t){return R.has(e)&&R.set(e,R.get(e).filter(e=>e!==t)),eu},on:function(e,t){return R.set(e,[...R.get(e)||[],t]),eu},toggleIdle(e){(M||!0===e)&&et(),M&&!1!==e||ei()}};return eu})().init(e,t)},unbind:function(e,t){let n=document.body,o="";if(r(e)?o=e:e instanceof Element&&(n=e,r(t)&&(o=t)),n){let e=tl.openers.get(n);e&&o&&e.delete(o),e?.size&&o||tl.openers.delete(n),n.removeEventListener("click",tl.fromEvent)}}};e.Arrows=eA,e.Autoplay=eD,e.Carousel=eb,e.CarouselSlideContentState=eh,e.CarouselState=ep,e.Fancybox=tl,e.FancyboxState=te,e.Fullscreen=eU,e.Html=eq,e.Lazyload=eR,e.PANZOOM_DEFAULT_POS=el,e.Panzoom=ed,e.PanzoomAction=eo,e.PanzoomState=er,e.PanzoomZoomLevel=ei,e.Sync=eL,e.Thumbs=ej,e.Toolbar=e$,e.ToolbarColumn=eI,e.Video=eZ,e.Zoomable=ex}); \ No newline at end of file diff --git a/pluginsSrc/@fortawesome/fontawesome-free/css/all.min.css b/pluginsSrc/@fortawesome/fontawesome-free/css/all.min.css deleted file mode 100644 index b568f8d9..00000000 --- a/pluginsSrc/@fortawesome/fontawesome-free/css/all.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - * Copyright 2025 Fonticons, Inc. - */ -.fa,.fa-brands,.fa-classic,.fa-regular,.fa-solid,.fab,.far,.fas{--_fa-family:var(--fa-family,var(--fa-style-family,"Font Awesome 7 Free"));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:var(--fa-display,inline-block);font-family:var(--_fa-family);font-feature-settings:normal;font-style:normal;font-synthesis:none;font-variant:normal;font-weight:var(--fa-style,900);line-height:1;text-align:center;text-rendering:auto;width:var(--fa-width,1.25em)}:is(.fas,.far,.fab,.fa-solid,.fa-regular,.fa-brands,.fa-classic,.fa):before{content:var(--fa)/""}@supports not (content:""/""){:is(.fas,.far,.fab,.fa-solid,.fa-regular,.fa-brands,.fa-classic,.fa):before{content:var(--fa)}}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{font-size:.625em;line-height:.1em;vertical-align:.225em}.fa-xs{font-size:.75em;line-height:.08333em;vertical-align:.125em}.fa-sm{font-size:.875em;line-height:.07143em;vertical-align:.05357em}.fa-lg{font-size:1.25em;line-height:.05em;vertical-align:-.075em}.fa-xl{font-size:1.5em;line-height:.04167em;vertical-align:-.125em}.fa-2xl{font-size:2em;line-height:.03125em;vertical-align:-.1875em}.fa-width-auto{--fa-width:auto}.fa-fw,.fa-width-fixed{--fa-width:1.25em}.fa-ul{list-style-type:none;margin-inline-start:var(--fa-li-margin,2.5em);padding-inline-start:0}.fa-ul>li{position:relative}.fa-li{inset-inline-start:calc(var(--fa-li-width, 2em)*-1);position:absolute;text-align:center;width:var(--fa-li-width,2em);line-height:inherit}.fa-border{border-radius:var(--fa-border-radius,.1em);border:var(--fa-border-width,.0625em) var(--fa-border-style,solid) var(--fa-border-color,#eee);box-sizing:var(--fa-border-box-sizing,content-box);padding:var(--fa-border-padding,.1875em .25em)}.fa-pull-left,.fa-pull-start{float:inline-start;margin-inline-end:var(--fa-pull-margin,.3em)}.fa-pull-end,.fa-pull-right{float:inline-end;margin-inline-start:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade,.fa-fade{animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s)}.fa-beat-fade{animation-name:fa-beat-fade;animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-shake,.fa-spin{animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal)}.fa-spin{animation-name:fa-spin;animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media (prefers-reduced-motion:reduce){.fa-beat,.fa-beat-fade,.fa-bounce,.fa-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{animation:none!important;transition:none!important}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1) translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9)) translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1)) translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95)) translateY(0)}57%{transform:scale(1) translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1) translateY(0)}to{transform:scale(1) translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,to{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}8%,24%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}40%,to{transform:rotate(0deg)}}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{--fa-width:100%;inset:0;position:absolute;text-align:center;width:var(--fa-width);z-index:var(--fa-stack-z-index,auto)}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:var(--fa-inverse,#fff)} - -.fa-0{--fa:"\30 "}.fa-1{--fa:"\31 "}.fa-2{--fa:"\32 "}.fa-3{--fa:"\33 "}.fa-4{--fa:"\34 "}.fa-5{--fa:"\35 "}.fa-6{--fa:"\36 "}.fa-7{--fa:"\37 "}.fa-8{--fa:"\38 "}.fa-9{--fa:"\39 "}.fa-exclamation{--fa:"\!"}.fa-hashtag{--fa:"\#"}.fa-dollar,.fa-dollar-sign,.fa-usd{--fa:"\$"}.fa-percent,.fa-percentage{--fa:"\%"}.fa-asterisk{--fa:"\*"}.fa-add,.fa-plus{--fa:"\+"}.fa-less-than{--fa:"\<"}.fa-equals{--fa:"\="}.fa-greater-than{--fa:"\>"}.fa-question{--fa:"\?"}.fa-at{--fa:"\@"}.fa-a{--fa:"A"}.fa-b{--fa:"B"}.fa-c{--fa:"C"}.fa-d{--fa:"D"}.fa-e{--fa:"E"}.fa-f{--fa:"F"}.fa-g{--fa:"G"}.fa-h{--fa:"H"}.fa-i{--fa:"I"}.fa-j{--fa:"J"}.fa-k{--fa:"K"}.fa-l{--fa:"L"}.fa-m{--fa:"M"}.fa-n{--fa:"N"}.fa-o{--fa:"O"}.fa-p{--fa:"P"}.fa-q{--fa:"Q"}.fa-r{--fa:"R"}.fa-s{--fa:"S"}.fa-t{--fa:"T"}.fa-u{--fa:"U"}.fa-v{--fa:"V"}.fa-w{--fa:"W"}.fa-x{--fa:"X"}.fa-y{--fa:"Y"}.fa-z{--fa:"Z"}.fa-faucet{--fa:"\e005"}.fa-faucet-drip{--fa:"\e006"}.fa-house-chimney-window{--fa:"\e00d"}.fa-house-signal{--fa:"\e012"}.fa-temperature-arrow-down,.fa-temperature-down{--fa:"\e03f"}.fa-temperature-arrow-up,.fa-temperature-up{--fa:"\e040"}.fa-trailer{--fa:"\e041"}.fa-bacteria{--fa:"\e059"}.fa-bacterium{--fa:"\e05a"}.fa-box-tissue{--fa:"\e05b"}.fa-hand-holding-medical{--fa:"\e05c"}.fa-hand-sparkles{--fa:"\e05d"}.fa-hands-bubbles,.fa-hands-wash{--fa:"\e05e"}.fa-handshake-alt-slash,.fa-handshake-simple-slash,.fa-handshake-slash{--fa:"\e060"}.fa-head-side-cough{--fa:"\e061"}.fa-head-side-cough-slash{--fa:"\e062"}.fa-head-side-mask{--fa:"\e063"}.fa-head-side-virus{--fa:"\e064"}.fa-house-chimney-user{--fa:"\e065"}.fa-house-laptop,.fa-laptop-house{--fa:"\e066"}.fa-lungs-virus{--fa:"\e067"}.fa-people-arrows,.fa-people-arrows-left-right{--fa:"\e068"}.fa-plane-slash{--fa:"\e069"}.fa-pump-medical{--fa:"\e06a"}.fa-pump-soap{--fa:"\e06b"}.fa-shield-virus{--fa:"\e06c"}.fa-sink{--fa:"\e06d"}.fa-soap{--fa:"\e06e"}.fa-stopwatch-20{--fa:"\e06f"}.fa-shop-slash,.fa-store-alt-slash{--fa:"\e070"}.fa-store-slash{--fa:"\e071"}.fa-toilet-paper-slash{--fa:"\e072"}.fa-users-slash{--fa:"\e073"}.fa-virus{--fa:"\e074"}.fa-virus-slash{--fa:"\e075"}.fa-viruses{--fa:"\e076"}.fa-vest{--fa:"\e085"}.fa-vest-patches{--fa:"\e086"}.fa-arrow-trend-down{--fa:"\e097"}.fa-arrow-trend-up{--fa:"\e098"}.fa-arrow-up-from-bracket{--fa:"\e09a"}.fa-austral-sign{--fa:"\e0a9"}.fa-baht-sign{--fa:"\e0ac"}.fa-bitcoin-sign{--fa:"\e0b4"}.fa-bolt-lightning{--fa:"\e0b7"}.fa-book-bookmark{--fa:"\e0bb"}.fa-camera-rotate{--fa:"\e0d8"}.fa-cedi-sign{--fa:"\e0df"}.fa-chart-column{--fa:"\e0e3"}.fa-chart-gantt{--fa:"\e0e4"}.fa-clapperboard{--fa:"\e131"}.fa-clover{--fa:"\e139"}.fa-code-compare{--fa:"\e13a"}.fa-code-fork{--fa:"\e13b"}.fa-code-pull-request{--fa:"\e13c"}.fa-colon-sign{--fa:"\e140"}.fa-cruzeiro-sign{--fa:"\e152"}.fa-display{--fa:"\e163"}.fa-dong-sign{--fa:"\e169"}.fa-elevator{--fa:"\e16d"}.fa-filter-circle-xmark{--fa:"\e17b"}.fa-florin-sign{--fa:"\e184"}.fa-folder-closed{--fa:"\e185"}.fa-franc-sign{--fa:"\e18f"}.fa-guarani-sign{--fa:"\e19a"}.fa-gun{--fa:"\e19b"}.fa-hands-clapping{--fa:"\e1a8"}.fa-home-user,.fa-house-user{--fa:"\e1b0"}.fa-indian-rupee,.fa-indian-rupee-sign,.fa-inr{--fa:"\e1bc"}.fa-kip-sign{--fa:"\e1c4"}.fa-lari-sign{--fa:"\e1c8"}.fa-litecoin-sign{--fa:"\e1d3"}.fa-manat-sign{--fa:"\e1d5"}.fa-mask-face{--fa:"\e1d7"}.fa-mill-sign{--fa:"\e1ed"}.fa-money-bills{--fa:"\e1f3"}.fa-naira-sign{--fa:"\e1f6"}.fa-notdef{--fa:"\e1fe"}.fa-panorama{--fa:"\e209"}.fa-peseta-sign{--fa:"\e221"}.fa-peso-sign{--fa:"\e222"}.fa-plane-up{--fa:"\e22d"}.fa-rupiah-sign{--fa:"\e23d"}.fa-stairs{--fa:"\e289"}.fa-timeline{--fa:"\e29c"}.fa-truck-front{--fa:"\e2b7"}.fa-try,.fa-turkish-lira,.fa-turkish-lira-sign{--fa:"\e2bb"}.fa-vault{--fa:"\e2c5"}.fa-magic-wand-sparkles,.fa-wand-magic-sparkles{--fa:"\e2ca"}.fa-wheat-alt,.fa-wheat-awn{--fa:"\e2cd"}.fa-wheelchair-alt,.fa-wheelchair-move{--fa:"\e2ce"}.fa-bangladeshi-taka-sign{--fa:"\e2e6"}.fa-bowl-rice{--fa:"\e2eb"}.fa-person-pregnant{--fa:"\e31e"}.fa-home-lg,.fa-house-chimney{--fa:"\e3af"}.fa-house-crack{--fa:"\e3b1"}.fa-house-medical{--fa:"\e3b2"}.fa-cent-sign{--fa:"\e3f5"}.fa-plus-minus{--fa:"\e43c"}.fa-sailboat{--fa:"\e445"}.fa-section{--fa:"\e447"}.fa-shrimp{--fa:"\e448"}.fa-brazilian-real-sign{--fa:"\e46c"}.fa-chart-simple{--fa:"\e473"}.fa-diagram-next{--fa:"\e476"}.fa-diagram-predecessor{--fa:"\e477"}.fa-diagram-successor{--fa:"\e47a"}.fa-earth-oceania,.fa-globe-oceania{--fa:"\e47b"}.fa-bug-slash{--fa:"\e490"}.fa-file-circle-plus{--fa:"\e494"}.fa-shop-lock{--fa:"\e4a5"}.fa-virus-covid{--fa:"\e4a8"}.fa-virus-covid-slash{--fa:"\e4a9"}.fa-anchor-circle-check{--fa:"\e4aa"}.fa-anchor-circle-exclamation{--fa:"\e4ab"}.fa-anchor-circle-xmark{--fa:"\e4ac"}.fa-anchor-lock{--fa:"\e4ad"}.fa-arrow-down-up-across-line{--fa:"\e4af"}.fa-arrow-down-up-lock{--fa:"\e4b0"}.fa-arrow-right-to-city{--fa:"\e4b3"}.fa-arrow-up-from-ground-water{--fa:"\e4b5"}.fa-arrow-up-from-water-pump{--fa:"\e4b6"}.fa-arrow-up-right-dots{--fa:"\e4b7"}.fa-arrows-down-to-line{--fa:"\e4b8"}.fa-arrows-down-to-people{--fa:"\e4b9"}.fa-arrows-left-right-to-line{--fa:"\e4ba"}.fa-arrows-spin{--fa:"\e4bb"}.fa-arrows-split-up-and-left{--fa:"\e4bc"}.fa-arrows-to-circle{--fa:"\e4bd"}.fa-arrows-to-dot{--fa:"\e4be"}.fa-arrows-to-eye{--fa:"\e4bf"}.fa-arrows-turn-right{--fa:"\e4c0"}.fa-arrows-turn-to-dots{--fa:"\e4c1"}.fa-arrows-up-to-line{--fa:"\e4c2"}.fa-bore-hole{--fa:"\e4c3"}.fa-bottle-droplet{--fa:"\e4c4"}.fa-bottle-water{--fa:"\e4c5"}.fa-bowl-food{--fa:"\e4c6"}.fa-boxes-packing{--fa:"\e4c7"}.fa-bridge{--fa:"\e4c8"}.fa-bridge-circle-check{--fa:"\e4c9"}.fa-bridge-circle-exclamation{--fa:"\e4ca"}.fa-bridge-circle-xmark{--fa:"\e4cb"}.fa-bridge-lock{--fa:"\e4cc"}.fa-bridge-water{--fa:"\e4ce"}.fa-bucket{--fa:"\e4cf"}.fa-bugs{--fa:"\e4d0"}.fa-building-circle-arrow-right{--fa:"\e4d1"}.fa-building-circle-check{--fa:"\e4d2"}.fa-building-circle-exclamation{--fa:"\e4d3"}.fa-building-circle-xmark{--fa:"\e4d4"}.fa-building-flag{--fa:"\e4d5"}.fa-building-lock{--fa:"\e4d6"}.fa-building-ngo{--fa:"\e4d7"}.fa-building-shield{--fa:"\e4d8"}.fa-building-un{--fa:"\e4d9"}.fa-building-user{--fa:"\e4da"}.fa-building-wheat{--fa:"\e4db"}.fa-burst{--fa:"\e4dc"}.fa-car-on{--fa:"\e4dd"}.fa-car-tunnel{--fa:"\e4de"}.fa-child-combatant,.fa-child-rifle{--fa:"\e4e0"}.fa-children{--fa:"\e4e1"}.fa-circle-nodes{--fa:"\e4e2"}.fa-clipboard-question{--fa:"\e4e3"}.fa-cloud-showers-water{--fa:"\e4e4"}.fa-computer{--fa:"\e4e5"}.fa-cubes-stacked{--fa:"\e4e6"}.fa-envelope-circle-check{--fa:"\e4e8"}.fa-explosion{--fa:"\e4e9"}.fa-ferry{--fa:"\e4ea"}.fa-file-circle-exclamation{--fa:"\e4eb"}.fa-file-circle-minus{--fa:"\e4ed"}.fa-file-circle-question{--fa:"\e4ef"}.fa-file-shield{--fa:"\e4f0"}.fa-fire-burner{--fa:"\e4f1"}.fa-fish-fins{--fa:"\e4f2"}.fa-flask-vial{--fa:"\e4f3"}.fa-glass-water{--fa:"\e4f4"}.fa-glass-water-droplet{--fa:"\e4f5"}.fa-group-arrows-rotate{--fa:"\e4f6"}.fa-hand-holding-hand{--fa:"\e4f7"}.fa-handcuffs{--fa:"\e4f8"}.fa-hands-bound{--fa:"\e4f9"}.fa-hands-holding-child{--fa:"\e4fa"}.fa-hands-holding-circle{--fa:"\e4fb"}.fa-heart-circle-bolt{--fa:"\e4fc"}.fa-heart-circle-check{--fa:"\e4fd"}.fa-heart-circle-exclamation{--fa:"\e4fe"}.fa-heart-circle-minus{--fa:"\e4ff"}.fa-heart-circle-plus{--fa:"\e500"}.fa-heart-circle-xmark{--fa:"\e501"}.fa-helicopter-symbol{--fa:"\e502"}.fa-helmet-un{--fa:"\e503"}.fa-hill-avalanche{--fa:"\e507"}.fa-hill-rockslide{--fa:"\e508"}.fa-house-circle-check{--fa:"\e509"}.fa-house-circle-exclamation{--fa:"\e50a"}.fa-house-circle-xmark{--fa:"\e50b"}.fa-house-fire{--fa:"\e50c"}.fa-house-flag{--fa:"\e50d"}.fa-house-flood-water{--fa:"\e50e"}.fa-house-flood-water-circle-arrow-right{--fa:"\e50f"}.fa-house-lock{--fa:"\e510"}.fa-house-medical-circle-check{--fa:"\e511"}.fa-house-medical-circle-exclamation{--fa:"\e512"}.fa-house-medical-circle-xmark{--fa:"\e513"}.fa-house-medical-flag{--fa:"\e514"}.fa-house-tsunami{--fa:"\e515"}.fa-jar{--fa:"\e516"}.fa-jar-wheat{--fa:"\e517"}.fa-jet-fighter-up{--fa:"\e518"}.fa-jug-detergent{--fa:"\e519"}.fa-kitchen-set{--fa:"\e51a"}.fa-land-mine-on{--fa:"\e51b"}.fa-landmark-flag{--fa:"\e51c"}.fa-laptop-file{--fa:"\e51d"}.fa-lines-leaning{--fa:"\e51e"}.fa-location-pin-lock{--fa:"\e51f"}.fa-locust{--fa:"\e520"}.fa-magnifying-glass-arrow-right{--fa:"\e521"}.fa-magnifying-glass-chart{--fa:"\e522"}.fa-mars-and-venus-burst{--fa:"\e523"}.fa-mask-ventilator{--fa:"\e524"}.fa-mattress-pillow{--fa:"\e525"}.fa-mobile-retro{--fa:"\e527"}.fa-money-bill-transfer{--fa:"\e528"}.fa-money-bill-trend-up{--fa:"\e529"}.fa-money-bill-wheat{--fa:"\e52a"}.fa-mosquito{--fa:"\e52b"}.fa-mosquito-net{--fa:"\e52c"}.fa-mound{--fa:"\e52d"}.fa-mountain-city{--fa:"\e52e"}.fa-mountain-sun{--fa:"\e52f"}.fa-oil-well{--fa:"\e532"}.fa-people-group{--fa:"\e533"}.fa-people-line{--fa:"\e534"}.fa-people-pulling{--fa:"\e535"}.fa-people-robbery{--fa:"\e536"}.fa-people-roof{--fa:"\e537"}.fa-person-arrow-down-to-line{--fa:"\e538"}.fa-person-arrow-up-from-line{--fa:"\e539"}.fa-person-breastfeeding{--fa:"\e53a"}.fa-person-burst{--fa:"\e53b"}.fa-person-cane{--fa:"\e53c"}.fa-person-chalkboard{--fa:"\e53d"}.fa-person-circle-check{--fa:"\e53e"}.fa-person-circle-exclamation{--fa:"\e53f"}.fa-person-circle-minus{--fa:"\e540"}.fa-person-circle-plus{--fa:"\e541"}.fa-person-circle-question{--fa:"\e542"}.fa-person-circle-xmark{--fa:"\e543"}.fa-person-dress-burst{--fa:"\e544"}.fa-person-drowning{--fa:"\e545"}.fa-person-falling{--fa:"\e546"}.fa-person-falling-burst{--fa:"\e547"}.fa-person-half-dress{--fa:"\e548"}.fa-person-harassing{--fa:"\e549"}.fa-person-military-pointing{--fa:"\e54a"}.fa-person-military-rifle{--fa:"\e54b"}.fa-person-military-to-person{--fa:"\e54c"}.fa-person-rays{--fa:"\e54d"}.fa-person-rifle{--fa:"\e54e"}.fa-person-shelter{--fa:"\e54f"}.fa-person-walking-arrow-loop-left{--fa:"\e551"}.fa-person-walking-arrow-right{--fa:"\e552"}.fa-person-walking-dashed-line-arrow-right{--fa:"\e553"}.fa-person-walking-luggage{--fa:"\e554"}.fa-plane-circle-check{--fa:"\e555"}.fa-plane-circle-exclamation{--fa:"\e556"}.fa-plane-circle-xmark{--fa:"\e557"}.fa-plane-lock{--fa:"\e558"}.fa-plate-wheat{--fa:"\e55a"}.fa-plug-circle-bolt{--fa:"\e55b"}.fa-plug-circle-check{--fa:"\e55c"}.fa-plug-circle-exclamation{--fa:"\e55d"}.fa-plug-circle-minus{--fa:"\e55e"}.fa-plug-circle-plus{--fa:"\e55f"}.fa-plug-circle-xmark{--fa:"\e560"}.fa-ranking-star{--fa:"\e561"}.fa-road-barrier{--fa:"\e562"}.fa-road-bridge{--fa:"\e563"}.fa-road-circle-check{--fa:"\e564"}.fa-road-circle-exclamation{--fa:"\e565"}.fa-road-circle-xmark{--fa:"\e566"}.fa-road-lock{--fa:"\e567"}.fa-road-spikes{--fa:"\e568"}.fa-rug{--fa:"\e569"}.fa-sack-xmark{--fa:"\e56a"}.fa-school-circle-check{--fa:"\e56b"}.fa-school-circle-exclamation{--fa:"\e56c"}.fa-school-circle-xmark{--fa:"\e56d"}.fa-school-flag{--fa:"\e56e"}.fa-school-lock{--fa:"\e56f"}.fa-sheet-plastic{--fa:"\e571"}.fa-shield-cat{--fa:"\e572"}.fa-shield-dog{--fa:"\e573"}.fa-shield-heart{--fa:"\e574"}.fa-square-nfi{--fa:"\e576"}.fa-square-person-confined{--fa:"\e577"}.fa-square-virus{--fa:"\e578"}.fa-rod-asclepius,.fa-rod-snake,.fa-staff-aesculapius,.fa-staff-snake{--fa:"\e579"}.fa-sun-plant-wilt{--fa:"\e57a"}.fa-tarp{--fa:"\e57b"}.fa-tarp-droplet{--fa:"\e57c"}.fa-tent{--fa:"\e57d"}.fa-tent-arrow-down-to-line{--fa:"\e57e"}.fa-tent-arrow-left-right{--fa:"\e57f"}.fa-tent-arrow-turn-left{--fa:"\e580"}.fa-tent-arrows-down{--fa:"\e581"}.fa-tents{--fa:"\e582"}.fa-toilet-portable{--fa:"\e583"}.fa-toilets-portable{--fa:"\e584"}.fa-tower-cell{--fa:"\e585"}.fa-tower-observation{--fa:"\e586"}.fa-tree-city{--fa:"\e587"}.fa-trowel{--fa:"\e589"}.fa-trowel-bricks{--fa:"\e58a"}.fa-truck-arrow-right{--fa:"\e58b"}.fa-truck-droplet{--fa:"\e58c"}.fa-truck-field{--fa:"\e58d"}.fa-truck-field-un{--fa:"\e58e"}.fa-truck-plane{--fa:"\e58f"}.fa-users-between-lines{--fa:"\e591"}.fa-users-line{--fa:"\e592"}.fa-users-rays{--fa:"\e593"}.fa-users-rectangle{--fa:"\e594"}.fa-users-viewfinder{--fa:"\e595"}.fa-vial-circle-check{--fa:"\e596"}.fa-vial-virus{--fa:"\e597"}.fa-wheat-awn-circle-exclamation{--fa:"\e598"}.fa-worm{--fa:"\e599"}.fa-xmarks-lines{--fa:"\e59a"}.fa-child-dress{--fa:"\e59c"}.fa-child-reaching{--fa:"\e59d"}.fa-file-circle-check{--fa:"\e5a0"}.fa-file-circle-xmark{--fa:"\e5a1"}.fa-person-through-window{--fa:"\e5a9"}.fa-plant-wilt{--fa:"\e5aa"}.fa-stapler{--fa:"\e5af"}.fa-train-tram{--fa:"\e5b4"}.fa-table-cells-column-lock{--fa:"\e678"}.fa-table-cells-row-lock{--fa:"\e67a"}.fa-thumb-tack-slash,.fa-thumbtack-slash{--fa:"\e68f"}.fa-table-cells-row-unlock{--fa:"\e691"}.fa-chart-diagram{--fa:"\e695"}.fa-comment-nodes{--fa:"\e696"}.fa-file-fragment{--fa:"\e697"}.fa-file-half-dashed{--fa:"\e698"}.fa-hexagon-nodes{--fa:"\e699"}.fa-hexagon-nodes-bolt{--fa:"\e69a"}.fa-square-binary{--fa:"\e69b"}.fa-pentagon{--fa:"\e790"}.fa-non-binary{--fa:"\e807"}.fa-spiral{--fa:"\e80a"}.fa-mobile-vibrate{--fa:"\e816"}.fa-single-quote-left{--fa:"\e81b"}.fa-single-quote-right{--fa:"\e81c"}.fa-bus-side{--fa:"\e81d"}.fa-heptagon,.fa-septagon{--fa:"\e820"}.fa-glass-martini,.fa-martini-glass-empty{--fa:"\f000"}.fa-music{--fa:"\f001"}.fa-magnifying-glass,.fa-search{--fa:"\f002"}.fa-heart{--fa:"\f004"}.fa-star{--fa:"\f005"}.fa-user,.fa-user-alt,.fa-user-large{--fa:"\f007"}.fa-film,.fa-film-alt,.fa-film-simple{--fa:"\f008"}.fa-table-cells-large,.fa-th-large{--fa:"\f009"}.fa-table-cells,.fa-th{--fa:"\f00a"}.fa-table-list,.fa-th-list{--fa:"\f00b"}.fa-check{--fa:"\f00c"}.fa-close,.fa-multiply,.fa-remove,.fa-times,.fa-xmark{--fa:"\f00d"}.fa-magnifying-glass-plus,.fa-search-plus{--fa:"\f00e"}.fa-magnifying-glass-minus,.fa-search-minus{--fa:"\f010"}.fa-power-off{--fa:"\f011"}.fa-signal,.fa-signal-5,.fa-signal-perfect{--fa:"\f012"}.fa-cog,.fa-gear{--fa:"\f013"}.fa-home,.fa-home-alt,.fa-home-lg-alt,.fa-house{--fa:"\f015"}.fa-clock,.fa-clock-four{--fa:"\f017"}.fa-road{--fa:"\f018"}.fa-download{--fa:"\f019"}.fa-inbox{--fa:"\f01c"}.fa-arrow-right-rotate,.fa-arrow-rotate-forward,.fa-arrow-rotate-right,.fa-redo{--fa:"\f01e"}.fa-arrows-rotate,.fa-refresh,.fa-sync{--fa:"\f021"}.fa-list-alt,.fa-rectangle-list{--fa:"\f022"}.fa-lock{--fa:"\f023"}.fa-flag{--fa:"\f024"}.fa-headphones,.fa-headphones-alt,.fa-headphones-simple{--fa:"\f025"}.fa-volume-off{--fa:"\f026"}.fa-volume-down,.fa-volume-low{--fa:"\f027"}.fa-volume-high,.fa-volume-up{--fa:"\f028"}.fa-qrcode{--fa:"\f029"}.fa-barcode{--fa:"\f02a"}.fa-tag{--fa:"\f02b"}.fa-tags{--fa:"\f02c"}.fa-book{--fa:"\f02d"}.fa-bookmark{--fa:"\f02e"}.fa-print{--fa:"\f02f"}.fa-camera,.fa-camera-alt{--fa:"\f030"}.fa-font{--fa:"\f031"}.fa-bold{--fa:"\f032"}.fa-italic{--fa:"\f033"}.fa-text-height{--fa:"\f034"}.fa-text-width{--fa:"\f035"}.fa-align-left{--fa:"\f036"}.fa-align-center{--fa:"\f037"}.fa-align-right{--fa:"\f038"}.fa-align-justify{--fa:"\f039"}.fa-list,.fa-list-squares{--fa:"\f03a"}.fa-dedent,.fa-outdent{--fa:"\f03b"}.fa-indent{--fa:"\f03c"}.fa-video,.fa-video-camera{--fa:"\f03d"}.fa-image{--fa:"\f03e"}.fa-location-pin,.fa-map-marker{--fa:"\f041"}.fa-adjust,.fa-circle-half-stroke{--fa:"\f042"}.fa-droplet,.fa-tint{--fa:"\f043"}.fa-edit,.fa-pen-to-square{--fa:"\f044"}.fa-arrows,.fa-arrows-up-down-left-right{--fa:"\f047"}.fa-backward-step,.fa-step-backward{--fa:"\f048"}.fa-backward-fast,.fa-fast-backward{--fa:"\f049"}.fa-backward{--fa:"\f04a"}.fa-play{--fa:"\f04b"}.fa-pause{--fa:"\f04c"}.fa-stop{--fa:"\f04d"}.fa-forward{--fa:"\f04e"}.fa-fast-forward,.fa-forward-fast{--fa:"\f050"}.fa-forward-step,.fa-step-forward{--fa:"\f051"}.fa-eject{--fa:"\f052"}.fa-chevron-left{--fa:"\f053"}.fa-chevron-right{--fa:"\f054"}.fa-circle-plus,.fa-plus-circle{--fa:"\f055"}.fa-circle-minus,.fa-minus-circle{--fa:"\f056"}.fa-circle-xmark,.fa-times-circle,.fa-xmark-circle{--fa:"\f057"}.fa-check-circle,.fa-circle-check{--fa:"\f058"}.fa-circle-question,.fa-question-circle{--fa:"\f059"}.fa-circle-info,.fa-info-circle{--fa:"\f05a"}.fa-crosshairs{--fa:"\f05b"}.fa-ban,.fa-cancel{--fa:"\f05e"}.fa-arrow-left{--fa:"\f060"}.fa-arrow-right{--fa:"\f061"}.fa-arrow-up{--fa:"\f062"}.fa-arrow-down{--fa:"\f063"}.fa-mail-forward,.fa-share{--fa:"\f064"}.fa-expand{--fa:"\f065"}.fa-compress{--fa:"\f066"}.fa-minus,.fa-subtract{--fa:"\f068"}.fa-circle-exclamation,.fa-exclamation-circle{--fa:"\f06a"}.fa-gift{--fa:"\f06b"}.fa-leaf{--fa:"\f06c"}.fa-fire{--fa:"\f06d"}.fa-eye{--fa:"\f06e"}.fa-eye-slash{--fa:"\f070"}.fa-exclamation-triangle,.fa-triangle-exclamation,.fa-warning{--fa:"\f071"}.fa-plane{--fa:"\f072"}.fa-calendar-alt,.fa-calendar-days{--fa:"\f073"}.fa-random,.fa-shuffle{--fa:"\f074"}.fa-comment{--fa:"\f075"}.fa-magnet{--fa:"\f076"}.fa-chevron-up{--fa:"\f077"}.fa-chevron-down{--fa:"\f078"}.fa-retweet{--fa:"\f079"}.fa-cart-shopping,.fa-shopping-cart{--fa:"\f07a"}.fa-folder,.fa-folder-blank{--fa:"\f07b"}.fa-folder-open{--fa:"\f07c"}.fa-arrows-up-down,.fa-arrows-v{--fa:"\f07d"}.fa-arrows-h,.fa-arrows-left-right{--fa:"\f07e"}.fa-bar-chart,.fa-chart-bar{--fa:"\f080"}.fa-camera-retro{--fa:"\f083"}.fa-key{--fa:"\f084"}.fa-cogs,.fa-gears{--fa:"\f085"}.fa-comments{--fa:"\f086"}.fa-star-half{--fa:"\f089"}.fa-arrow-right-from-bracket,.fa-sign-out{--fa:"\f08b"}.fa-thumb-tack,.fa-thumbtack{--fa:"\f08d"}.fa-arrow-up-right-from-square,.fa-external-link{--fa:"\f08e"}.fa-arrow-right-to-bracket,.fa-sign-in{--fa:"\f090"}.fa-trophy{--fa:"\f091"}.fa-upload{--fa:"\f093"}.fa-lemon{--fa:"\f094"}.fa-phone{--fa:"\f095"}.fa-phone-square,.fa-square-phone{--fa:"\f098"}.fa-unlock{--fa:"\f09c"}.fa-credit-card,.fa-credit-card-alt{--fa:"\f09d"}.fa-feed,.fa-rss{--fa:"\f09e"}.fa-hard-drive,.fa-hdd{--fa:"\f0a0"}.fa-bullhorn{--fa:"\f0a1"}.fa-certificate{--fa:"\f0a3"}.fa-hand-point-right{--fa:"\f0a4"}.fa-hand-point-left{--fa:"\f0a5"}.fa-hand-point-up{--fa:"\f0a6"}.fa-hand-point-down{--fa:"\f0a7"}.fa-arrow-circle-left,.fa-circle-arrow-left{--fa:"\f0a8"}.fa-arrow-circle-right,.fa-circle-arrow-right{--fa:"\f0a9"}.fa-arrow-circle-up,.fa-circle-arrow-up{--fa:"\f0aa"}.fa-arrow-circle-down,.fa-circle-arrow-down{--fa:"\f0ab"}.fa-globe{--fa:"\f0ac"}.fa-wrench{--fa:"\f0ad"}.fa-list-check,.fa-tasks{--fa:"\f0ae"}.fa-filter{--fa:"\f0b0"}.fa-briefcase{--fa:"\f0b1"}.fa-arrows-alt,.fa-up-down-left-right{--fa:"\f0b2"}.fa-users{--fa:"\f0c0"}.fa-chain,.fa-link{--fa:"\f0c1"}.fa-cloud{--fa:"\f0c2"}.fa-flask{--fa:"\f0c3"}.fa-cut,.fa-scissors{--fa:"\f0c4"}.fa-copy{--fa:"\f0c5"}.fa-paperclip{--fa:"\f0c6"}.fa-floppy-disk,.fa-save{--fa:"\f0c7"}.fa-square{--fa:"\f0c8"}.fa-bars,.fa-navicon{--fa:"\f0c9"}.fa-list-dots,.fa-list-ul{--fa:"\f0ca"}.fa-list-1-2,.fa-list-numeric,.fa-list-ol{--fa:"\f0cb"}.fa-strikethrough{--fa:"\f0cc"}.fa-underline{--fa:"\f0cd"}.fa-table{--fa:"\f0ce"}.fa-magic,.fa-wand-magic{--fa:"\f0d0"}.fa-truck{--fa:"\f0d1"}.fa-money-bill{--fa:"\f0d6"}.fa-caret-down{--fa:"\f0d7"}.fa-caret-up{--fa:"\f0d8"}.fa-caret-left{--fa:"\f0d9"}.fa-caret-right{--fa:"\f0da"}.fa-columns,.fa-table-columns{--fa:"\f0db"}.fa-sort,.fa-unsorted{--fa:"\f0dc"}.fa-sort-desc,.fa-sort-down{--fa:"\f0dd"}.fa-sort-asc,.fa-sort-up{--fa:"\f0de"}.fa-envelope{--fa:"\f0e0"}.fa-arrow-left-rotate,.fa-arrow-rotate-back,.fa-arrow-rotate-backward,.fa-arrow-rotate-left,.fa-undo{--fa:"\f0e2"}.fa-gavel,.fa-legal{--fa:"\f0e3"}.fa-bolt,.fa-zap{--fa:"\f0e7"}.fa-sitemap{--fa:"\f0e8"}.fa-umbrella{--fa:"\f0e9"}.fa-file-clipboard,.fa-paste{--fa:"\f0ea"}.fa-lightbulb{--fa:"\f0eb"}.fa-arrow-right-arrow-left,.fa-exchange{--fa:"\f0ec"}.fa-cloud-arrow-down,.fa-cloud-download,.fa-cloud-download-alt{--fa:"\f0ed"}.fa-cloud-arrow-up,.fa-cloud-upload,.fa-cloud-upload-alt{--fa:"\f0ee"}.fa-user-doctor,.fa-user-md{--fa:"\f0f0"}.fa-stethoscope{--fa:"\f0f1"}.fa-suitcase{--fa:"\f0f2"}.fa-bell{--fa:"\f0f3"}.fa-coffee,.fa-mug-saucer{--fa:"\f0f4"}.fa-hospital,.fa-hospital-alt,.fa-hospital-wide{--fa:"\f0f8"}.fa-ambulance,.fa-truck-medical{--fa:"\f0f9"}.fa-medkit,.fa-suitcase-medical{--fa:"\f0fa"}.fa-fighter-jet,.fa-jet-fighter{--fa:"\f0fb"}.fa-beer,.fa-beer-mug-empty{--fa:"\f0fc"}.fa-h-square,.fa-square-h{--fa:"\f0fd"}.fa-plus-square,.fa-square-plus{--fa:"\f0fe"}.fa-angle-double-left,.fa-angles-left{--fa:"\f100"}.fa-angle-double-right,.fa-angles-right{--fa:"\f101"}.fa-angle-double-up,.fa-angles-up{--fa:"\f102"}.fa-angle-double-down,.fa-angles-down{--fa:"\f103"}.fa-angle-left{--fa:"\f104"}.fa-angle-right{--fa:"\f105"}.fa-angle-up{--fa:"\f106"}.fa-angle-down{--fa:"\f107"}.fa-laptop{--fa:"\f109"}.fa-tablet-button{--fa:"\f10a"}.fa-mobile-button{--fa:"\f10b"}.fa-quote-left,.fa-quote-left-alt{--fa:"\f10d"}.fa-quote-right,.fa-quote-right-alt{--fa:"\f10e"}.fa-spinner{--fa:"\f110"}.fa-circle{--fa:"\f111"}.fa-face-smile,.fa-smile{--fa:"\f118"}.fa-face-frown,.fa-frown{--fa:"\f119"}.fa-face-meh,.fa-meh{--fa:"\f11a"}.fa-gamepad{--fa:"\f11b"}.fa-keyboard{--fa:"\f11c"}.fa-flag-checkered{--fa:"\f11e"}.fa-terminal{--fa:"\f120"}.fa-code{--fa:"\f121"}.fa-mail-reply-all,.fa-reply-all{--fa:"\f122"}.fa-location-arrow{--fa:"\f124"}.fa-crop{--fa:"\f125"}.fa-code-branch{--fa:"\f126"}.fa-chain-broken,.fa-chain-slash,.fa-link-slash,.fa-unlink{--fa:"\f127"}.fa-info{--fa:"\f129"}.fa-superscript{--fa:"\f12b"}.fa-subscript{--fa:"\f12c"}.fa-eraser{--fa:"\f12d"}.fa-puzzle-piece{--fa:"\f12e"}.fa-microphone{--fa:"\f130"}.fa-microphone-slash{--fa:"\f131"}.fa-shield,.fa-shield-blank{--fa:"\f132"}.fa-calendar{--fa:"\f133"}.fa-fire-extinguisher{--fa:"\f134"}.fa-rocket{--fa:"\f135"}.fa-chevron-circle-left,.fa-circle-chevron-left{--fa:"\f137"}.fa-chevron-circle-right,.fa-circle-chevron-right{--fa:"\f138"}.fa-chevron-circle-up,.fa-circle-chevron-up{--fa:"\f139"}.fa-chevron-circle-down,.fa-circle-chevron-down{--fa:"\f13a"}.fa-anchor{--fa:"\f13d"}.fa-unlock-alt,.fa-unlock-keyhole{--fa:"\f13e"}.fa-bullseye{--fa:"\f140"}.fa-ellipsis,.fa-ellipsis-h{--fa:"\f141"}.fa-ellipsis-v,.fa-ellipsis-vertical{--fa:"\f142"}.fa-rss-square,.fa-square-rss{--fa:"\f143"}.fa-circle-play,.fa-play-circle{--fa:"\f144"}.fa-ticket{--fa:"\f145"}.fa-minus-square,.fa-square-minus{--fa:"\f146"}.fa-arrow-turn-up,.fa-level-up{--fa:"\f148"}.fa-arrow-turn-down,.fa-level-down{--fa:"\f149"}.fa-check-square,.fa-square-check{--fa:"\f14a"}.fa-pen-square,.fa-pencil-square,.fa-square-pen{--fa:"\f14b"}.fa-external-link-square,.fa-square-arrow-up-right{--fa:"\f14c"}.fa-share-from-square,.fa-share-square{--fa:"\f14d"}.fa-compass{--fa:"\f14e"}.fa-caret-square-down,.fa-square-caret-down{--fa:"\f150"}.fa-caret-square-up,.fa-square-caret-up{--fa:"\f151"}.fa-caret-square-right,.fa-square-caret-right{--fa:"\f152"}.fa-eur,.fa-euro,.fa-euro-sign{--fa:"\f153"}.fa-gbp,.fa-pound-sign,.fa-sterling-sign{--fa:"\f154"}.fa-rupee,.fa-rupee-sign{--fa:"\f156"}.fa-cny,.fa-jpy,.fa-rmb,.fa-yen,.fa-yen-sign{--fa:"\f157"}.fa-rouble,.fa-rub,.fa-ruble,.fa-ruble-sign{--fa:"\f158"}.fa-krw,.fa-won,.fa-won-sign{--fa:"\f159"}.fa-file{--fa:"\f15b"}.fa-file-alt,.fa-file-lines,.fa-file-text{--fa:"\f15c"}.fa-arrow-down-a-z,.fa-sort-alpha-asc,.fa-sort-alpha-down{--fa:"\f15d"}.fa-arrow-up-a-z,.fa-sort-alpha-up{--fa:"\f15e"}.fa-arrow-down-wide-short,.fa-sort-amount-asc,.fa-sort-amount-down{--fa:"\f160"}.fa-arrow-up-wide-short,.fa-sort-amount-up{--fa:"\f161"}.fa-arrow-down-1-9,.fa-sort-numeric-asc,.fa-sort-numeric-down{--fa:"\f162"}.fa-arrow-up-1-9,.fa-sort-numeric-up{--fa:"\f163"}.fa-thumbs-up{--fa:"\f164"}.fa-thumbs-down{--fa:"\f165"}.fa-arrow-down-long,.fa-long-arrow-down{--fa:"\f175"}.fa-arrow-up-long,.fa-long-arrow-up{--fa:"\f176"}.fa-arrow-left-long,.fa-long-arrow-left{--fa:"\f177"}.fa-arrow-right-long,.fa-long-arrow-right{--fa:"\f178"}.fa-female,.fa-person-dress{--fa:"\f182"}.fa-male,.fa-person{--fa:"\f183"}.fa-sun{--fa:"\f185"}.fa-moon{--fa:"\f186"}.fa-archive,.fa-box-archive{--fa:"\f187"}.fa-bug{--fa:"\f188"}.fa-caret-square-left,.fa-square-caret-left{--fa:"\f191"}.fa-circle-dot,.fa-dot-circle{--fa:"\f192"}.fa-wheelchair{--fa:"\f193"}.fa-lira-sign{--fa:"\f195"}.fa-shuttle-space,.fa-space-shuttle{--fa:"\f197"}.fa-envelope-square,.fa-square-envelope{--fa:"\f199"}.fa-bank,.fa-building-columns,.fa-institution,.fa-museum,.fa-university{--fa:"\f19c"}.fa-graduation-cap,.fa-mortar-board{--fa:"\f19d"}.fa-language{--fa:"\f1ab"}.fa-fax{--fa:"\f1ac"}.fa-building{--fa:"\f1ad"}.fa-child{--fa:"\f1ae"}.fa-paw{--fa:"\f1b0"}.fa-cube{--fa:"\f1b2"}.fa-cubes{--fa:"\f1b3"}.fa-recycle{--fa:"\f1b8"}.fa-automobile,.fa-car{--fa:"\f1b9"}.fa-cab,.fa-taxi{--fa:"\f1ba"}.fa-tree{--fa:"\f1bb"}.fa-database{--fa:"\f1c0"}.fa-file-pdf{--fa:"\f1c1"}.fa-file-word{--fa:"\f1c2"}.fa-file-excel{--fa:"\f1c3"}.fa-file-powerpoint{--fa:"\f1c4"}.fa-file-image{--fa:"\f1c5"}.fa-file-archive,.fa-file-zipper{--fa:"\f1c6"}.fa-file-audio{--fa:"\f1c7"}.fa-file-video{--fa:"\f1c8"}.fa-file-code{--fa:"\f1c9"}.fa-life-ring{--fa:"\f1cd"}.fa-circle-notch{--fa:"\f1ce"}.fa-paper-plane{--fa:"\f1d8"}.fa-clock-rotate-left,.fa-history{--fa:"\f1da"}.fa-header,.fa-heading{--fa:"\f1dc"}.fa-paragraph{--fa:"\f1dd"}.fa-sliders,.fa-sliders-h{--fa:"\f1de"}.fa-share-alt,.fa-share-nodes{--fa:"\f1e0"}.fa-share-alt-square,.fa-square-share-nodes{--fa:"\f1e1"}.fa-bomb{--fa:"\f1e2"}.fa-futbol,.fa-futbol-ball,.fa-soccer-ball{--fa:"\f1e3"}.fa-teletype,.fa-tty{--fa:"\f1e4"}.fa-binoculars{--fa:"\f1e5"}.fa-plug{--fa:"\f1e6"}.fa-newspaper{--fa:"\f1ea"}.fa-wifi,.fa-wifi-3,.fa-wifi-strong{--fa:"\f1eb"}.fa-calculator{--fa:"\f1ec"}.fa-bell-slash{--fa:"\f1f6"}.fa-trash{--fa:"\f1f8"}.fa-copyright{--fa:"\f1f9"}.fa-eye-dropper,.fa-eye-dropper-empty,.fa-eyedropper{--fa:"\f1fb"}.fa-paint-brush,.fa-paintbrush{--fa:"\f1fc"}.fa-birthday-cake,.fa-cake,.fa-cake-candles{--fa:"\f1fd"}.fa-area-chart,.fa-chart-area{--fa:"\f1fe"}.fa-chart-pie,.fa-pie-chart{--fa:"\f200"}.fa-chart-line,.fa-line-chart{--fa:"\f201"}.fa-toggle-off{--fa:"\f204"}.fa-toggle-on{--fa:"\f205"}.fa-bicycle{--fa:"\f206"}.fa-bus{--fa:"\f207"}.fa-closed-captioning{--fa:"\f20a"}.fa-ils,.fa-shekel,.fa-shekel-sign,.fa-sheqel,.fa-sheqel-sign{--fa:"\f20b"}.fa-cart-plus{--fa:"\f217"}.fa-cart-arrow-down{--fa:"\f218"}.fa-diamond{--fa:"\f219"}.fa-ship{--fa:"\f21a"}.fa-user-secret{--fa:"\f21b"}.fa-motorcycle{--fa:"\f21c"}.fa-street-view{--fa:"\f21d"}.fa-heart-pulse,.fa-heartbeat{--fa:"\f21e"}.fa-venus{--fa:"\f221"}.fa-mars{--fa:"\f222"}.fa-mercury{--fa:"\f223"}.fa-mars-and-venus{--fa:"\f224"}.fa-transgender,.fa-transgender-alt{--fa:"\f225"}.fa-venus-double{--fa:"\f226"}.fa-mars-double{--fa:"\f227"}.fa-venus-mars{--fa:"\f228"}.fa-mars-stroke{--fa:"\f229"}.fa-mars-stroke-up,.fa-mars-stroke-v{--fa:"\f22a"}.fa-mars-stroke-h,.fa-mars-stroke-right{--fa:"\f22b"}.fa-neuter{--fa:"\f22c"}.fa-genderless{--fa:"\f22d"}.fa-server{--fa:"\f233"}.fa-user-plus{--fa:"\f234"}.fa-user-times,.fa-user-xmark{--fa:"\f235"}.fa-bed{--fa:"\f236"}.fa-train{--fa:"\f238"}.fa-subway,.fa-train-subway{--fa:"\f239"}.fa-battery,.fa-battery-5,.fa-battery-full{--fa:"\f240"}.fa-battery-4,.fa-battery-three-quarters{--fa:"\f241"}.fa-battery-3,.fa-battery-half{--fa:"\f242"}.fa-battery-2,.fa-battery-quarter{--fa:"\f243"}.fa-battery-0,.fa-battery-empty{--fa:"\f244"}.fa-arrow-pointer,.fa-mouse-pointer{--fa:"\f245"}.fa-i-cursor{--fa:"\f246"}.fa-object-group{--fa:"\f247"}.fa-object-ungroup{--fa:"\f248"}.fa-note-sticky,.fa-sticky-note{--fa:"\f249"}.fa-clone{--fa:"\f24d"}.fa-balance-scale,.fa-scale-balanced{--fa:"\f24e"}.fa-hourglass-1,.fa-hourglass-start{--fa:"\f251"}.fa-hourglass-2,.fa-hourglass-half{--fa:"\f252"}.fa-hourglass-3,.fa-hourglass-end{--fa:"\f253"}.fa-hourglass,.fa-hourglass-empty{--fa:"\f254"}.fa-hand-back-fist,.fa-hand-rock{--fa:"\f255"}.fa-hand,.fa-hand-paper{--fa:"\f256"}.fa-hand-scissors{--fa:"\f257"}.fa-hand-lizard{--fa:"\f258"}.fa-hand-spock{--fa:"\f259"}.fa-hand-pointer{--fa:"\f25a"}.fa-hand-peace{--fa:"\f25b"}.fa-trademark{--fa:"\f25c"}.fa-registered{--fa:"\f25d"}.fa-television,.fa-tv,.fa-tv-alt{--fa:"\f26c"}.fa-calendar-plus{--fa:"\f271"}.fa-calendar-minus{--fa:"\f272"}.fa-calendar-times,.fa-calendar-xmark{--fa:"\f273"}.fa-calendar-check{--fa:"\f274"}.fa-industry{--fa:"\f275"}.fa-map-pin{--fa:"\f276"}.fa-map-signs,.fa-signs-post{--fa:"\f277"}.fa-map{--fa:"\f279"}.fa-comment-alt,.fa-message{--fa:"\f27a"}.fa-circle-pause,.fa-pause-circle{--fa:"\f28b"}.fa-circle-stop,.fa-stop-circle{--fa:"\f28d"}.fa-bag-shopping,.fa-shopping-bag{--fa:"\f290"}.fa-basket-shopping,.fa-shopping-basket{--fa:"\f291"}.fa-universal-access{--fa:"\f29a"}.fa-blind,.fa-person-walking-with-cane{--fa:"\f29d"}.fa-audio-description{--fa:"\f29e"}.fa-phone-volume,.fa-volume-control-phone{--fa:"\f2a0"}.fa-braille{--fa:"\f2a1"}.fa-assistive-listening-systems,.fa-ear-listen{--fa:"\f2a2"}.fa-american-sign-language-interpreting,.fa-asl-interpreting,.fa-hands-american-sign-language-interpreting,.fa-hands-asl-interpreting{--fa:"\f2a3"}.fa-deaf,.fa-deafness,.fa-ear-deaf,.fa-hard-of-hearing{--fa:"\f2a4"}.fa-hands,.fa-sign-language,.fa-signing{--fa:"\f2a7"}.fa-eye-low-vision,.fa-low-vision{--fa:"\f2a8"}.fa-handshake,.fa-handshake-alt,.fa-handshake-simple{--fa:"\f2b5"}.fa-envelope-open{--fa:"\f2b6"}.fa-address-book,.fa-contact-book{--fa:"\f2b9"}.fa-address-card,.fa-contact-card,.fa-vcard{--fa:"\f2bb"}.fa-circle-user,.fa-user-circle{--fa:"\f2bd"}.fa-id-badge{--fa:"\f2c1"}.fa-drivers-license,.fa-id-card{--fa:"\f2c2"}.fa-temperature-4,.fa-temperature-full,.fa-thermometer-4,.fa-thermometer-full{--fa:"\f2c7"}.fa-temperature-3,.fa-temperature-three-quarters,.fa-thermometer-3,.fa-thermometer-three-quarters{--fa:"\f2c8"}.fa-temperature-2,.fa-temperature-half,.fa-thermometer-2,.fa-thermometer-half{--fa:"\f2c9"}.fa-temperature-1,.fa-temperature-quarter,.fa-thermometer-1,.fa-thermometer-quarter{--fa:"\f2ca"}.fa-temperature-0,.fa-temperature-empty,.fa-thermometer-0,.fa-thermometer-empty{--fa:"\f2cb"}.fa-shower{--fa:"\f2cc"}.fa-bath,.fa-bathtub{--fa:"\f2cd"}.fa-podcast{--fa:"\f2ce"}.fa-window-maximize{--fa:"\f2d0"}.fa-window-minimize{--fa:"\f2d1"}.fa-window-restore{--fa:"\f2d2"}.fa-square-xmark,.fa-times-square,.fa-xmark-square{--fa:"\f2d3"}.fa-microchip{--fa:"\f2db"}.fa-snowflake{--fa:"\f2dc"}.fa-spoon,.fa-utensil-spoon{--fa:"\f2e5"}.fa-cutlery,.fa-utensils{--fa:"\f2e7"}.fa-rotate-back,.fa-rotate-backward,.fa-rotate-left,.fa-undo-alt{--fa:"\f2ea"}.fa-trash-alt,.fa-trash-can{--fa:"\f2ed"}.fa-rotate,.fa-sync-alt{--fa:"\f2f1"}.fa-stopwatch{--fa:"\f2f2"}.fa-right-from-bracket,.fa-sign-out-alt{--fa:"\f2f5"}.fa-right-to-bracket,.fa-sign-in-alt{--fa:"\f2f6"}.fa-redo-alt,.fa-rotate-forward,.fa-rotate-right{--fa:"\f2f9"}.fa-poo{--fa:"\f2fe"}.fa-images{--fa:"\f302"}.fa-pencil,.fa-pencil-alt{--fa:"\f303"}.fa-pen{--fa:"\f304"}.fa-pen-alt,.fa-pen-clip{--fa:"\f305"}.fa-octagon{--fa:"\f306"}.fa-down-long,.fa-long-arrow-alt-down{--fa:"\f309"}.fa-left-long,.fa-long-arrow-alt-left{--fa:"\f30a"}.fa-long-arrow-alt-right,.fa-right-long{--fa:"\f30b"}.fa-long-arrow-alt-up,.fa-up-long{--fa:"\f30c"}.fa-hexagon{--fa:"\f312"}.fa-file-edit,.fa-file-pen{--fa:"\f31c"}.fa-expand-arrows-alt,.fa-maximize{--fa:"\f31e"}.fa-clipboard{--fa:"\f328"}.fa-arrows-alt-h,.fa-left-right{--fa:"\f337"}.fa-arrows-alt-v,.fa-up-down{--fa:"\f338"}.fa-alarm-clock{--fa:"\f34e"}.fa-arrow-alt-circle-down,.fa-circle-down{--fa:"\f358"}.fa-arrow-alt-circle-left,.fa-circle-left{--fa:"\f359"}.fa-arrow-alt-circle-right,.fa-circle-right{--fa:"\f35a"}.fa-arrow-alt-circle-up,.fa-circle-up{--fa:"\f35b"}.fa-external-link-alt,.fa-up-right-from-square{--fa:"\f35d"}.fa-external-link-square-alt,.fa-square-up-right{--fa:"\f360"}.fa-exchange-alt,.fa-right-left{--fa:"\f362"}.fa-repeat{--fa:"\f363"}.fa-code-commit{--fa:"\f386"}.fa-code-merge{--fa:"\f387"}.fa-desktop,.fa-desktop-alt{--fa:"\f390"}.fa-gem{--fa:"\f3a5"}.fa-level-down-alt,.fa-turn-down{--fa:"\f3be"}.fa-level-up-alt,.fa-turn-up{--fa:"\f3bf"}.fa-lock-open{--fa:"\f3c1"}.fa-location-dot,.fa-map-marker-alt{--fa:"\f3c5"}.fa-microphone-alt,.fa-microphone-lines{--fa:"\f3c9"}.fa-mobile-alt,.fa-mobile-screen-button{--fa:"\f3cd"}.fa-mobile,.fa-mobile-android,.fa-mobile-phone{--fa:"\f3ce"}.fa-mobile-android-alt,.fa-mobile-screen{--fa:"\f3cf"}.fa-money-bill-1,.fa-money-bill-alt{--fa:"\f3d1"}.fa-phone-slash{--fa:"\f3dd"}.fa-image-portrait,.fa-portrait{--fa:"\f3e0"}.fa-mail-reply,.fa-reply{--fa:"\f3e5"}.fa-shield-alt,.fa-shield-halved{--fa:"\f3ed"}.fa-tablet-alt,.fa-tablet-screen-button{--fa:"\f3fa"}.fa-tablet,.fa-tablet-android{--fa:"\f3fb"}.fa-ticket-alt,.fa-ticket-simple{--fa:"\f3ff"}.fa-rectangle-times,.fa-rectangle-xmark,.fa-times-rectangle,.fa-window-close{--fa:"\f410"}.fa-compress-alt,.fa-down-left-and-up-right-to-center{--fa:"\f422"}.fa-expand-alt,.fa-up-right-and-down-left-from-center{--fa:"\f424"}.fa-baseball-bat-ball{--fa:"\f432"}.fa-baseball,.fa-baseball-ball{--fa:"\f433"}.fa-basketball,.fa-basketball-ball{--fa:"\f434"}.fa-bowling-ball{--fa:"\f436"}.fa-chess{--fa:"\f439"}.fa-chess-bishop{--fa:"\f43a"}.fa-chess-board{--fa:"\f43c"}.fa-chess-king{--fa:"\f43f"}.fa-chess-knight{--fa:"\f441"}.fa-chess-pawn{--fa:"\f443"}.fa-chess-queen{--fa:"\f445"}.fa-chess-rook{--fa:"\f447"}.fa-dumbbell{--fa:"\f44b"}.fa-football,.fa-football-ball{--fa:"\f44e"}.fa-golf-ball,.fa-golf-ball-tee{--fa:"\f450"}.fa-hockey-puck{--fa:"\f453"}.fa-broom-ball,.fa-quidditch,.fa-quidditch-broom-ball{--fa:"\f458"}.fa-square-full{--fa:"\f45c"}.fa-ping-pong-paddle-ball,.fa-table-tennis,.fa-table-tennis-paddle-ball{--fa:"\f45d"}.fa-volleyball,.fa-volleyball-ball{--fa:"\f45f"}.fa-allergies,.fa-hand-dots{--fa:"\f461"}.fa-band-aid,.fa-bandage{--fa:"\f462"}.fa-box{--fa:"\f466"}.fa-boxes,.fa-boxes-alt,.fa-boxes-stacked{--fa:"\f468"}.fa-briefcase-medical{--fa:"\f469"}.fa-burn,.fa-fire-flame-simple{--fa:"\f46a"}.fa-capsules{--fa:"\f46b"}.fa-clipboard-check{--fa:"\f46c"}.fa-clipboard-list{--fa:"\f46d"}.fa-diagnoses,.fa-person-dots-from-line{--fa:"\f470"}.fa-dna{--fa:"\f471"}.fa-dolly,.fa-dolly-box{--fa:"\f472"}.fa-cart-flatbed,.fa-dolly-flatbed{--fa:"\f474"}.fa-file-medical{--fa:"\f477"}.fa-file-medical-alt,.fa-file-waveform{--fa:"\f478"}.fa-first-aid,.fa-kit-medical{--fa:"\f479"}.fa-circle-h,.fa-hospital-symbol{--fa:"\f47e"}.fa-id-card-alt,.fa-id-card-clip{--fa:"\f47f"}.fa-notes-medical{--fa:"\f481"}.fa-pallet{--fa:"\f482"}.fa-pills{--fa:"\f484"}.fa-prescription-bottle{--fa:"\f485"}.fa-prescription-bottle-alt,.fa-prescription-bottle-medical{--fa:"\f486"}.fa-bed-pulse,.fa-procedures{--fa:"\f487"}.fa-shipping-fast,.fa-truck-fast{--fa:"\f48b"}.fa-smoking{--fa:"\f48d"}.fa-syringe{--fa:"\f48e"}.fa-tablets{--fa:"\f490"}.fa-thermometer{--fa:"\f491"}.fa-vial{--fa:"\f492"}.fa-vials{--fa:"\f493"}.fa-warehouse{--fa:"\f494"}.fa-weight,.fa-weight-scale{--fa:"\f496"}.fa-x-ray{--fa:"\f497"}.fa-box-open{--fa:"\f49e"}.fa-comment-dots,.fa-commenting{--fa:"\f4ad"}.fa-comment-slash{--fa:"\f4b3"}.fa-couch{--fa:"\f4b8"}.fa-circle-dollar-to-slot,.fa-donate{--fa:"\f4b9"}.fa-dove{--fa:"\f4ba"}.fa-hand-holding{--fa:"\f4bd"}.fa-hand-holding-heart{--fa:"\f4be"}.fa-hand-holding-dollar,.fa-hand-holding-usd{--fa:"\f4c0"}.fa-hand-holding-droplet,.fa-hand-holding-water{--fa:"\f4c1"}.fa-hands-holding{--fa:"\f4c2"}.fa-hands-helping,.fa-handshake-angle{--fa:"\f4c4"}.fa-parachute-box{--fa:"\f4cd"}.fa-people-carry,.fa-people-carry-box{--fa:"\f4ce"}.fa-piggy-bank{--fa:"\f4d3"}.fa-ribbon{--fa:"\f4d6"}.fa-route{--fa:"\f4d7"}.fa-seedling,.fa-sprout{--fa:"\f4d8"}.fa-sign,.fa-sign-hanging{--fa:"\f4d9"}.fa-face-smile-wink,.fa-smile-wink{--fa:"\f4da"}.fa-tape{--fa:"\f4db"}.fa-truck-loading,.fa-truck-ramp-box{--fa:"\f4de"}.fa-truck-moving{--fa:"\f4df"}.fa-video-slash{--fa:"\f4e2"}.fa-wine-glass{--fa:"\f4e3"}.fa-user-astronaut{--fa:"\f4fb"}.fa-user-check{--fa:"\f4fc"}.fa-user-clock{--fa:"\f4fd"}.fa-user-cog,.fa-user-gear{--fa:"\f4fe"}.fa-user-edit,.fa-user-pen{--fa:"\f4ff"}.fa-user-friends,.fa-user-group{--fa:"\f500"}.fa-user-graduate{--fa:"\f501"}.fa-user-lock{--fa:"\f502"}.fa-user-minus{--fa:"\f503"}.fa-user-ninja{--fa:"\f504"}.fa-user-shield{--fa:"\f505"}.fa-user-alt-slash,.fa-user-large-slash,.fa-user-slash{--fa:"\f506"}.fa-user-tag{--fa:"\f507"}.fa-user-tie{--fa:"\f508"}.fa-users-cog,.fa-users-gear{--fa:"\f509"}.fa-balance-scale-left,.fa-scale-unbalanced{--fa:"\f515"}.fa-balance-scale-right,.fa-scale-unbalanced-flip{--fa:"\f516"}.fa-blender{--fa:"\f517"}.fa-book-open{--fa:"\f518"}.fa-broadcast-tower,.fa-tower-broadcast{--fa:"\f519"}.fa-broom{--fa:"\f51a"}.fa-blackboard,.fa-chalkboard{--fa:"\f51b"}.fa-chalkboard-teacher,.fa-chalkboard-user{--fa:"\f51c"}.fa-church{--fa:"\f51d"}.fa-coins{--fa:"\f51e"}.fa-compact-disc{--fa:"\f51f"}.fa-crow{--fa:"\f520"}.fa-crown{--fa:"\f521"}.fa-dice{--fa:"\f522"}.fa-dice-five{--fa:"\f523"}.fa-dice-four{--fa:"\f524"}.fa-dice-one{--fa:"\f525"}.fa-dice-six{--fa:"\f526"}.fa-dice-three{--fa:"\f527"}.fa-dice-two{--fa:"\f528"}.fa-divide{--fa:"\f529"}.fa-door-closed{--fa:"\f52a"}.fa-door-open{--fa:"\f52b"}.fa-feather{--fa:"\f52d"}.fa-frog{--fa:"\f52e"}.fa-gas-pump{--fa:"\f52f"}.fa-glasses{--fa:"\f530"}.fa-greater-than-equal{--fa:"\f532"}.fa-helicopter{--fa:"\f533"}.fa-infinity{--fa:"\f534"}.fa-kiwi-bird{--fa:"\f535"}.fa-less-than-equal{--fa:"\f537"}.fa-memory{--fa:"\f538"}.fa-microphone-alt-slash,.fa-microphone-lines-slash{--fa:"\f539"}.fa-money-bill-wave{--fa:"\f53a"}.fa-money-bill-1-wave,.fa-money-bill-wave-alt{--fa:"\f53b"}.fa-money-check{--fa:"\f53c"}.fa-money-check-alt,.fa-money-check-dollar{--fa:"\f53d"}.fa-not-equal{--fa:"\f53e"}.fa-palette{--fa:"\f53f"}.fa-parking,.fa-square-parking{--fa:"\f540"}.fa-diagram-project,.fa-project-diagram{--fa:"\f542"}.fa-receipt{--fa:"\f543"}.fa-robot{--fa:"\f544"}.fa-ruler{--fa:"\f545"}.fa-ruler-combined{--fa:"\f546"}.fa-ruler-horizontal{--fa:"\f547"}.fa-ruler-vertical{--fa:"\f548"}.fa-school{--fa:"\f549"}.fa-screwdriver{--fa:"\f54a"}.fa-shoe-prints{--fa:"\f54b"}.fa-skull{--fa:"\f54c"}.fa-ban-smoking,.fa-smoking-ban{--fa:"\f54d"}.fa-store{--fa:"\f54e"}.fa-shop,.fa-store-alt{--fa:"\f54f"}.fa-bars-staggered,.fa-reorder,.fa-stream{--fa:"\f550"}.fa-stroopwafel{--fa:"\f551"}.fa-toolbox{--fa:"\f552"}.fa-shirt,.fa-t-shirt,.fa-tshirt{--fa:"\f553"}.fa-person-walking,.fa-walking{--fa:"\f554"}.fa-wallet{--fa:"\f555"}.fa-angry,.fa-face-angry{--fa:"\f556"}.fa-archway{--fa:"\f557"}.fa-atlas,.fa-book-atlas{--fa:"\f558"}.fa-award{--fa:"\f559"}.fa-backspace,.fa-delete-left{--fa:"\f55a"}.fa-bezier-curve{--fa:"\f55b"}.fa-bong{--fa:"\f55c"}.fa-brush{--fa:"\f55d"}.fa-bus-alt,.fa-bus-simple{--fa:"\f55e"}.fa-cannabis{--fa:"\f55f"}.fa-check-double{--fa:"\f560"}.fa-cocktail,.fa-martini-glass-citrus{--fa:"\f561"}.fa-bell-concierge,.fa-concierge-bell{--fa:"\f562"}.fa-cookie{--fa:"\f563"}.fa-cookie-bite{--fa:"\f564"}.fa-crop-alt,.fa-crop-simple{--fa:"\f565"}.fa-digital-tachograph,.fa-tachograph-digital{--fa:"\f566"}.fa-dizzy,.fa-face-dizzy{--fa:"\f567"}.fa-compass-drafting,.fa-drafting-compass{--fa:"\f568"}.fa-drum{--fa:"\f569"}.fa-drum-steelpan{--fa:"\f56a"}.fa-feather-alt,.fa-feather-pointed{--fa:"\f56b"}.fa-file-contract{--fa:"\f56c"}.fa-file-arrow-down,.fa-file-download{--fa:"\f56d"}.fa-arrow-right-from-file,.fa-file-export{--fa:"\f56e"}.fa-arrow-right-to-file,.fa-file-import{--fa:"\f56f"}.fa-file-invoice{--fa:"\f570"}.fa-file-invoice-dollar{--fa:"\f571"}.fa-file-prescription{--fa:"\f572"}.fa-file-signature{--fa:"\f573"}.fa-file-arrow-up,.fa-file-upload{--fa:"\f574"}.fa-fill{--fa:"\f575"}.fa-fill-drip{--fa:"\f576"}.fa-fingerprint{--fa:"\f577"}.fa-fish{--fa:"\f578"}.fa-face-flushed,.fa-flushed{--fa:"\f579"}.fa-face-frown-open,.fa-frown-open{--fa:"\f57a"}.fa-glass-martini-alt,.fa-martini-glass{--fa:"\f57b"}.fa-earth-africa,.fa-globe-africa{--fa:"\f57c"}.fa-earth,.fa-earth-america,.fa-earth-americas,.fa-globe-americas{--fa:"\f57d"}.fa-earth-asia,.fa-globe-asia{--fa:"\f57e"}.fa-face-grimace,.fa-grimace{--fa:"\f57f"}.fa-face-grin,.fa-grin{--fa:"\f580"}.fa-face-grin-wide,.fa-grin-alt{--fa:"\f581"}.fa-face-grin-beam,.fa-grin-beam{--fa:"\f582"}.fa-face-grin-beam-sweat,.fa-grin-beam-sweat{--fa:"\f583"}.fa-face-grin-hearts,.fa-grin-hearts{--fa:"\f584"}.fa-face-grin-squint,.fa-grin-squint{--fa:"\f585"}.fa-face-grin-squint-tears,.fa-grin-squint-tears{--fa:"\f586"}.fa-face-grin-stars,.fa-grin-stars{--fa:"\f587"}.fa-face-grin-tears,.fa-grin-tears{--fa:"\f588"}.fa-face-grin-tongue,.fa-grin-tongue{--fa:"\f589"}.fa-face-grin-tongue-squint,.fa-grin-tongue-squint{--fa:"\f58a"}.fa-face-grin-tongue-wink,.fa-grin-tongue-wink{--fa:"\f58b"}.fa-face-grin-wink,.fa-grin-wink{--fa:"\f58c"}.fa-grid-horizontal,.fa-grip,.fa-grip-horizontal{--fa:"\f58d"}.fa-grid-vertical,.fa-grip-vertical{--fa:"\f58e"}.fa-headset{--fa:"\f590"}.fa-highlighter{--fa:"\f591"}.fa-hot-tub,.fa-hot-tub-person{--fa:"\f593"}.fa-hotel{--fa:"\f594"}.fa-joint{--fa:"\f595"}.fa-face-kiss,.fa-kiss{--fa:"\f596"}.fa-face-kiss-beam,.fa-kiss-beam{--fa:"\f597"}.fa-face-kiss-wink-heart,.fa-kiss-wink-heart{--fa:"\f598"}.fa-face-laugh,.fa-laugh{--fa:"\f599"}.fa-face-laugh-beam,.fa-laugh-beam{--fa:"\f59a"}.fa-face-laugh-squint,.fa-laugh-squint{--fa:"\f59b"}.fa-face-laugh-wink,.fa-laugh-wink{--fa:"\f59c"}.fa-cart-flatbed-suitcase,.fa-luggage-cart{--fa:"\f59d"}.fa-map-location,.fa-map-marked{--fa:"\f59f"}.fa-map-location-dot,.fa-map-marked-alt{--fa:"\f5a0"}.fa-marker{--fa:"\f5a1"}.fa-medal{--fa:"\f5a2"}.fa-face-meh-blank,.fa-meh-blank{--fa:"\f5a4"}.fa-face-rolling-eyes,.fa-meh-rolling-eyes{--fa:"\f5a5"}.fa-monument{--fa:"\f5a6"}.fa-mortar-pestle{--fa:"\f5a7"}.fa-paint-roller{--fa:"\f5aa"}.fa-passport{--fa:"\f5ab"}.fa-pen-fancy{--fa:"\f5ac"}.fa-pen-nib{--fa:"\f5ad"}.fa-pen-ruler,.fa-pencil-ruler{--fa:"\f5ae"}.fa-plane-arrival{--fa:"\f5af"}.fa-plane-departure{--fa:"\f5b0"}.fa-prescription{--fa:"\f5b1"}.fa-face-sad-cry,.fa-sad-cry{--fa:"\f5b3"}.fa-face-sad-tear,.fa-sad-tear{--fa:"\f5b4"}.fa-shuttle-van,.fa-van-shuttle{--fa:"\f5b6"}.fa-signature{--fa:"\f5b7"}.fa-face-smile-beam,.fa-smile-beam{--fa:"\f5b8"}.fa-solar-panel{--fa:"\f5ba"}.fa-spa{--fa:"\f5bb"}.fa-splotch{--fa:"\f5bc"}.fa-spray-can{--fa:"\f5bd"}.fa-stamp{--fa:"\f5bf"}.fa-star-half-alt,.fa-star-half-stroke{--fa:"\f5c0"}.fa-suitcase-rolling{--fa:"\f5c1"}.fa-face-surprise,.fa-surprise{--fa:"\f5c2"}.fa-swatchbook{--fa:"\f5c3"}.fa-person-swimming,.fa-swimmer{--fa:"\f5c4"}.fa-ladder-water,.fa-swimming-pool,.fa-water-ladder{--fa:"\f5c5"}.fa-droplet-slash,.fa-tint-slash{--fa:"\f5c7"}.fa-face-tired,.fa-tired{--fa:"\f5c8"}.fa-tooth{--fa:"\f5c9"}.fa-umbrella-beach{--fa:"\f5ca"}.fa-weight-hanging{--fa:"\f5cd"}.fa-wine-glass-alt,.fa-wine-glass-empty{--fa:"\f5ce"}.fa-air-freshener,.fa-spray-can-sparkles{--fa:"\f5d0"}.fa-apple-alt,.fa-apple-whole{--fa:"\f5d1"}.fa-atom{--fa:"\f5d2"}.fa-bone{--fa:"\f5d7"}.fa-book-open-reader,.fa-book-reader{--fa:"\f5da"}.fa-brain{--fa:"\f5dc"}.fa-car-alt,.fa-car-rear{--fa:"\f5de"}.fa-battery-car,.fa-car-battery{--fa:"\f5df"}.fa-car-burst,.fa-car-crash{--fa:"\f5e1"}.fa-car-side{--fa:"\f5e4"}.fa-charging-station{--fa:"\f5e7"}.fa-diamond-turn-right,.fa-directions{--fa:"\f5eb"}.fa-draw-polygon,.fa-vector-polygon{--fa:"\f5ee"}.fa-laptop-code{--fa:"\f5fc"}.fa-layer-group{--fa:"\f5fd"}.fa-location,.fa-location-crosshairs{--fa:"\f601"}.fa-lungs{--fa:"\f604"}.fa-microscope{--fa:"\f610"}.fa-oil-can{--fa:"\f613"}.fa-poop{--fa:"\f619"}.fa-shapes,.fa-triangle-circle-square{--fa:"\f61f"}.fa-star-of-life{--fa:"\f621"}.fa-dashboard,.fa-gauge,.fa-gauge-med,.fa-tachometer-alt-average{--fa:"\f624"}.fa-gauge-high,.fa-tachometer-alt,.fa-tachometer-alt-fast{--fa:"\f625"}.fa-gauge-simple,.fa-gauge-simple-med,.fa-tachometer-average{--fa:"\f629"}.fa-gauge-simple-high,.fa-tachometer,.fa-tachometer-fast{--fa:"\f62a"}.fa-teeth{--fa:"\f62e"}.fa-teeth-open{--fa:"\f62f"}.fa-masks-theater,.fa-theater-masks{--fa:"\f630"}.fa-traffic-light{--fa:"\f637"}.fa-truck-monster{--fa:"\f63b"}.fa-truck-pickup{--fa:"\f63c"}.fa-ad,.fa-rectangle-ad{--fa:"\f641"}.fa-ankh{--fa:"\f644"}.fa-bible,.fa-book-bible{--fa:"\f647"}.fa-briefcase-clock,.fa-business-time{--fa:"\f64a"}.fa-city{--fa:"\f64f"}.fa-comment-dollar{--fa:"\f651"}.fa-comments-dollar{--fa:"\f653"}.fa-cross{--fa:"\f654"}.fa-dharmachakra{--fa:"\f655"}.fa-envelope-open-text{--fa:"\f658"}.fa-folder-minus{--fa:"\f65d"}.fa-folder-plus{--fa:"\f65e"}.fa-filter-circle-dollar,.fa-funnel-dollar{--fa:"\f662"}.fa-gopuram{--fa:"\f664"}.fa-hamsa{--fa:"\f665"}.fa-bahai,.fa-haykal{--fa:"\f666"}.fa-jedi{--fa:"\f669"}.fa-book-journal-whills,.fa-journal-whills{--fa:"\f66a"}.fa-kaaba{--fa:"\f66b"}.fa-khanda{--fa:"\f66d"}.fa-landmark{--fa:"\f66f"}.fa-envelopes-bulk,.fa-mail-bulk{--fa:"\f674"}.fa-menorah{--fa:"\f676"}.fa-mosque{--fa:"\f678"}.fa-om{--fa:"\f679"}.fa-pastafarianism,.fa-spaghetti-monster-flying{--fa:"\f67b"}.fa-peace{--fa:"\f67c"}.fa-place-of-worship{--fa:"\f67f"}.fa-poll,.fa-square-poll-vertical{--fa:"\f681"}.fa-poll-h,.fa-square-poll-horizontal{--fa:"\f682"}.fa-person-praying,.fa-pray{--fa:"\f683"}.fa-hands-praying,.fa-praying-hands{--fa:"\f684"}.fa-book-quran,.fa-quran{--fa:"\f687"}.fa-magnifying-glass-dollar,.fa-search-dollar{--fa:"\f688"}.fa-magnifying-glass-location,.fa-search-location{--fa:"\f689"}.fa-socks{--fa:"\f696"}.fa-square-root-alt,.fa-square-root-variable{--fa:"\f698"}.fa-star-and-crescent{--fa:"\f699"}.fa-star-of-david{--fa:"\f69a"}.fa-synagogue{--fa:"\f69b"}.fa-scroll-torah,.fa-torah{--fa:"\f6a0"}.fa-torii-gate{--fa:"\f6a1"}.fa-vihara{--fa:"\f6a7"}.fa-volume-mute,.fa-volume-times,.fa-volume-xmark{--fa:"\f6a9"}.fa-yin-yang{--fa:"\f6ad"}.fa-blender-phone{--fa:"\f6b6"}.fa-book-dead,.fa-book-skull{--fa:"\f6b7"}.fa-campground{--fa:"\f6bb"}.fa-cat{--fa:"\f6be"}.fa-chair{--fa:"\f6c0"}.fa-cloud-moon{--fa:"\f6c3"}.fa-cloud-sun{--fa:"\f6c4"}.fa-cow{--fa:"\f6c8"}.fa-dice-d20{--fa:"\f6cf"}.fa-dice-d6{--fa:"\f6d1"}.fa-dog{--fa:"\f6d3"}.fa-dragon{--fa:"\f6d5"}.fa-drumstick-bite{--fa:"\f6d7"}.fa-dungeon{--fa:"\f6d9"}.fa-file-csv{--fa:"\f6dd"}.fa-fist-raised,.fa-hand-fist{--fa:"\f6de"}.fa-ghost{--fa:"\f6e2"}.fa-hammer{--fa:"\f6e3"}.fa-hanukiah{--fa:"\f6e6"}.fa-hat-wizard{--fa:"\f6e8"}.fa-hiking,.fa-person-hiking{--fa:"\f6ec"}.fa-hippo{--fa:"\f6ed"}.fa-horse{--fa:"\f6f0"}.fa-house-chimney-crack,.fa-house-damage{--fa:"\f6f1"}.fa-hryvnia,.fa-hryvnia-sign{--fa:"\f6f2"}.fa-mask{--fa:"\f6fa"}.fa-mountain{--fa:"\f6fc"}.fa-network-wired{--fa:"\f6ff"}.fa-otter{--fa:"\f700"}.fa-ring{--fa:"\f70b"}.fa-person-running,.fa-running{--fa:"\f70c"}.fa-scroll{--fa:"\f70e"}.fa-skull-crossbones{--fa:"\f714"}.fa-slash{--fa:"\f715"}.fa-spider{--fa:"\f717"}.fa-toilet-paper,.fa-toilet-paper-alt,.fa-toilet-paper-blank{--fa:"\f71e"}.fa-tractor{--fa:"\f722"}.fa-user-injured{--fa:"\f728"}.fa-vr-cardboard{--fa:"\f729"}.fa-wand-sparkles{--fa:"\f72b"}.fa-wind{--fa:"\f72e"}.fa-wine-bottle{--fa:"\f72f"}.fa-cloud-meatball{--fa:"\f73b"}.fa-cloud-moon-rain{--fa:"\f73c"}.fa-cloud-rain{--fa:"\f73d"}.fa-cloud-showers-heavy{--fa:"\f740"}.fa-cloud-sun-rain{--fa:"\f743"}.fa-democrat{--fa:"\f747"}.fa-flag-usa{--fa:"\f74d"}.fa-hurricane{--fa:"\f751"}.fa-landmark-alt,.fa-landmark-dome{--fa:"\f752"}.fa-meteor{--fa:"\f753"}.fa-person-booth{--fa:"\f756"}.fa-poo-bolt,.fa-poo-storm{--fa:"\f75a"}.fa-rainbow{--fa:"\f75b"}.fa-republican{--fa:"\f75e"}.fa-smog{--fa:"\f75f"}.fa-temperature-high{--fa:"\f769"}.fa-temperature-low{--fa:"\f76b"}.fa-cloud-bolt,.fa-thunderstorm{--fa:"\f76c"}.fa-tornado{--fa:"\f76f"}.fa-volcano{--fa:"\f770"}.fa-check-to-slot,.fa-vote-yea{--fa:"\f772"}.fa-water{--fa:"\f773"}.fa-baby{--fa:"\f77c"}.fa-baby-carriage,.fa-carriage-baby{--fa:"\f77d"}.fa-biohazard{--fa:"\f780"}.fa-blog{--fa:"\f781"}.fa-calendar-day{--fa:"\f783"}.fa-calendar-week{--fa:"\f784"}.fa-candy-cane{--fa:"\f786"}.fa-carrot{--fa:"\f787"}.fa-cash-register{--fa:"\f788"}.fa-compress-arrows-alt,.fa-minimize{--fa:"\f78c"}.fa-dumpster{--fa:"\f793"}.fa-dumpster-fire{--fa:"\f794"}.fa-ethernet{--fa:"\f796"}.fa-gifts{--fa:"\f79c"}.fa-champagne-glasses,.fa-glass-cheers{--fa:"\f79f"}.fa-glass-whiskey,.fa-whiskey-glass{--fa:"\f7a0"}.fa-earth-europe,.fa-globe-europe{--fa:"\f7a2"}.fa-grip-lines{--fa:"\f7a4"}.fa-grip-lines-vertical{--fa:"\f7a5"}.fa-guitar{--fa:"\f7a6"}.fa-heart-broken,.fa-heart-crack{--fa:"\f7a9"}.fa-holly-berry{--fa:"\f7aa"}.fa-horse-head{--fa:"\f7ab"}.fa-icicles{--fa:"\f7ad"}.fa-igloo{--fa:"\f7ae"}.fa-mitten{--fa:"\f7b5"}.fa-mug-hot{--fa:"\f7b6"}.fa-radiation{--fa:"\f7b9"}.fa-circle-radiation,.fa-radiation-alt{--fa:"\f7ba"}.fa-restroom{--fa:"\f7bd"}.fa-satellite{--fa:"\f7bf"}.fa-satellite-dish{--fa:"\f7c0"}.fa-sd-card{--fa:"\f7c2"}.fa-sim-card{--fa:"\f7c4"}.fa-person-skating,.fa-skating{--fa:"\f7c5"}.fa-person-skiing,.fa-skiing{--fa:"\f7c9"}.fa-person-skiing-nordic,.fa-skiing-nordic{--fa:"\f7ca"}.fa-sleigh{--fa:"\f7cc"}.fa-comment-sms,.fa-sms{--fa:"\f7cd"}.fa-person-snowboarding,.fa-snowboarding{--fa:"\f7ce"}.fa-snowman{--fa:"\f7d0"}.fa-snowplow{--fa:"\f7d2"}.fa-tenge,.fa-tenge-sign{--fa:"\f7d7"}.fa-toilet{--fa:"\f7d8"}.fa-screwdriver-wrench,.fa-tools{--fa:"\f7d9"}.fa-cable-car,.fa-tram{--fa:"\f7da"}.fa-fire-alt,.fa-fire-flame-curved{--fa:"\f7e4"}.fa-bacon{--fa:"\f7e5"}.fa-book-medical{--fa:"\f7e6"}.fa-bread-slice{--fa:"\f7ec"}.fa-cheese{--fa:"\f7ef"}.fa-clinic-medical,.fa-house-chimney-medical{--fa:"\f7f2"}.fa-clipboard-user{--fa:"\f7f3"}.fa-comment-medical{--fa:"\f7f5"}.fa-crutch{--fa:"\f7f7"}.fa-disease{--fa:"\f7fa"}.fa-egg{--fa:"\f7fb"}.fa-folder-tree{--fa:"\f802"}.fa-burger,.fa-hamburger{--fa:"\f805"}.fa-hand-middle-finger{--fa:"\f806"}.fa-hard-hat,.fa-hat-hard,.fa-helmet-safety{--fa:"\f807"}.fa-hospital-user{--fa:"\f80d"}.fa-hotdog{--fa:"\f80f"}.fa-ice-cream{--fa:"\f810"}.fa-laptop-medical{--fa:"\f812"}.fa-pager{--fa:"\f815"}.fa-pepper-hot{--fa:"\f816"}.fa-pizza-slice{--fa:"\f818"}.fa-sack-dollar{--fa:"\f81d"}.fa-book-tanakh,.fa-tanakh{--fa:"\f827"}.fa-bars-progress,.fa-tasks-alt{--fa:"\f828"}.fa-trash-arrow-up,.fa-trash-restore{--fa:"\f829"}.fa-trash-can-arrow-up,.fa-trash-restore-alt{--fa:"\f82a"}.fa-user-nurse{--fa:"\f82f"}.fa-wave-square{--fa:"\f83e"}.fa-biking,.fa-person-biking{--fa:"\f84a"}.fa-border-all{--fa:"\f84c"}.fa-border-none{--fa:"\f850"}.fa-border-style,.fa-border-top-left{--fa:"\f853"}.fa-digging,.fa-person-digging{--fa:"\f85e"}.fa-fan{--fa:"\f863"}.fa-heart-music-camera-bolt,.fa-icons{--fa:"\f86d"}.fa-phone-alt,.fa-phone-flip{--fa:"\f879"}.fa-phone-square-alt,.fa-square-phone-flip{--fa:"\f87b"}.fa-photo-film,.fa-photo-video{--fa:"\f87c"}.fa-remove-format,.fa-text-slash{--fa:"\f87d"}.fa-arrow-down-z-a,.fa-sort-alpha-desc,.fa-sort-alpha-down-alt{--fa:"\f881"}.fa-arrow-up-z-a,.fa-sort-alpha-up-alt{--fa:"\f882"}.fa-arrow-down-short-wide,.fa-sort-amount-desc,.fa-sort-amount-down-alt{--fa:"\f884"}.fa-arrow-up-short-wide,.fa-sort-amount-up-alt{--fa:"\f885"}.fa-arrow-down-9-1,.fa-sort-numeric-desc,.fa-sort-numeric-down-alt{--fa:"\f886"}.fa-arrow-up-9-1,.fa-sort-numeric-up-alt{--fa:"\f887"}.fa-spell-check{--fa:"\f891"}.fa-voicemail{--fa:"\f897"}.fa-hat-cowboy{--fa:"\f8c0"}.fa-hat-cowboy-side{--fa:"\f8c1"}.fa-computer-mouse,.fa-mouse{--fa:"\f8cc"}.fa-radio{--fa:"\f8d7"}.fa-record-vinyl{--fa:"\f8d9"}.fa-walkie-talkie{--fa:"\f8ef"}.fa-caravan{--fa:"\f8ff"} -:host,:root{--fa-family-brands:"Font Awesome 7 Brands";--fa-font-brands:normal 400 1em/1 var(--fa-family-brands)}@font-face{font-family:"Font Awesome 7 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.woff2)}.fa-brands,.fa-classic.fa-brands,.fab{--fa-family:var(--fa-family-brands);--fa-style:400}.fa-firefox-browser{--fa:"\e007"}.fa-ideal{--fa:"\e013"}.fa-microblog{--fa:"\e01a"}.fa-pied-piper-square,.fa-square-pied-piper{--fa:"\e01e"}.fa-unity{--fa:"\e049"}.fa-dailymotion{--fa:"\e052"}.fa-instagram-square,.fa-square-instagram{--fa:"\e055"}.fa-mixer{--fa:"\e056"}.fa-shopify{--fa:"\e057"}.fa-deezer{--fa:"\e077"}.fa-edge-legacy{--fa:"\e078"}.fa-google-pay{--fa:"\e079"}.fa-rust{--fa:"\e07a"}.fa-tiktok{--fa:"\e07b"}.fa-unsplash{--fa:"\e07c"}.fa-cloudflare{--fa:"\e07d"}.fa-guilded{--fa:"\e07e"}.fa-hive{--fa:"\e07f"}.fa-42-group,.fa-innosoft{--fa:"\e080"}.fa-instalod{--fa:"\e081"}.fa-octopus-deploy{--fa:"\e082"}.fa-perbyte{--fa:"\e083"}.fa-uncharted{--fa:"\e084"}.fa-watchman-monitoring{--fa:"\e087"}.fa-wodu{--fa:"\e088"}.fa-wirsindhandwerk,.fa-wsh{--fa:"\e2d0"}.fa-bots{--fa:"\e340"}.fa-cmplid{--fa:"\e360"}.fa-bilibili{--fa:"\e3d9"}.fa-golang{--fa:"\e40f"}.fa-pix{--fa:"\e43a"}.fa-sitrox{--fa:"\e44a"}.fa-hashnode{--fa:"\e499"}.fa-meta{--fa:"\e49b"}.fa-padlet{--fa:"\e4a0"}.fa-nfc-directional{--fa:"\e530"}.fa-nfc-symbol{--fa:"\e531"}.fa-screenpal{--fa:"\e570"}.fa-space-awesome{--fa:"\e5ac"}.fa-square-font-awesome{--fa:"\e5ad"}.fa-gitlab-square,.fa-square-gitlab{--fa:"\e5ae"}.fa-odysee{--fa:"\e5c6"}.fa-stubber{--fa:"\e5c7"}.fa-debian{--fa:"\e60b"}.fa-shoelace{--fa:"\e60c"}.fa-threads{--fa:"\e618"}.fa-square-threads{--fa:"\e619"}.fa-square-x-twitter{--fa:"\e61a"}.fa-x-twitter{--fa:"\e61b"}.fa-opensuse{--fa:"\e62b"}.fa-letterboxd{--fa:"\e62d"}.fa-square-letterboxd{--fa:"\e62e"}.fa-mintbit{--fa:"\e62f"}.fa-google-scholar{--fa:"\e63b"}.fa-brave{--fa:"\e63c"}.fa-brave-reverse{--fa:"\e63d"}.fa-pixiv{--fa:"\e640"}.fa-upwork{--fa:"\e641"}.fa-webflow{--fa:"\e65c"}.fa-signal-messenger{--fa:"\e663"}.fa-bluesky{--fa:"\e671"}.fa-jxl{--fa:"\e67b"}.fa-square-upwork{--fa:"\e67c"}.fa-web-awesome{--fa:"\e682"}.fa-square-web-awesome{--fa:"\e683"}.fa-square-web-awesome-stroke{--fa:"\e684"}.fa-dart-lang{--fa:"\e693"}.fa-flutter{--fa:"\e694"}.fa-files-pinwheel{--fa:"\e69f"}.fa-css{--fa:"\e6a2"}.fa-square-bluesky{--fa:"\e6a3"}.fa-openai{--fa:"\e7cf"}.fa-square-linkedin{--fa:"\e7d0"}.fa-cash-app{--fa:"\e7d4"}.fa-disqus{--fa:"\e7d5"}.fa-11ty,.fa-eleventy{--fa:"\e7d6"}.fa-kakao-talk{--fa:"\e7d7"}.fa-linktree{--fa:"\e7d8"}.fa-notion{--fa:"\e7d9"}.fa-pandora{--fa:"\e7da"}.fa-pixelfed{--fa:"\e7db"}.fa-tidal{--fa:"\e7dc"}.fa-vsco{--fa:"\e7dd"}.fa-w3c{--fa:"\e7de"}.fa-lumon{--fa:"\e7e2"}.fa-lumon-drop{--fa:"\e7e3"}.fa-square-figma{--fa:"\e7e4"}.fa-tex{--fa:"\e7ff"}.fa-duolingo{--fa:"\e812"}.fa-square-twitter,.fa-twitter-square{--fa:"\f081"}.fa-facebook-square,.fa-square-facebook{--fa:"\f082"}.fa-linkedin{--fa:"\f08c"}.fa-github-square,.fa-square-github{--fa:"\f092"}.fa-twitter{--fa:"\f099"}.fa-facebook{--fa:"\f09a"}.fa-github{--fa:"\f09b"}.fa-pinterest{--fa:"\f0d2"}.fa-pinterest-square,.fa-square-pinterest{--fa:"\f0d3"}.fa-google-plus-square,.fa-square-google-plus{--fa:"\f0d4"}.fa-google-plus-g{--fa:"\f0d5"}.fa-linkedin-in{--fa:"\f0e1"}.fa-github-alt{--fa:"\f113"}.fa-maxcdn{--fa:"\f136"}.fa-html5{--fa:"\f13b"}.fa-css3{--fa:"\f13c"}.fa-btc{--fa:"\f15a"}.fa-youtube{--fa:"\f167"}.fa-xing{--fa:"\f168"}.fa-square-xing,.fa-xing-square{--fa:"\f169"}.fa-dropbox{--fa:"\f16b"}.fa-stack-overflow{--fa:"\f16c"}.fa-instagram{--fa:"\f16d"}.fa-flickr{--fa:"\f16e"}.fa-adn{--fa:"\f170"}.fa-bitbucket{--fa:"\f171"}.fa-tumblr{--fa:"\f173"}.fa-square-tumblr,.fa-tumblr-square{--fa:"\f174"}.fa-apple{--fa:"\f179"}.fa-windows{--fa:"\f17a"}.fa-android{--fa:"\f17b"}.fa-linux{--fa:"\f17c"}.fa-dribbble{--fa:"\f17d"}.fa-skype{--fa:"\f17e"}.fa-foursquare{--fa:"\f180"}.fa-trello{--fa:"\f181"}.fa-gratipay{--fa:"\f184"}.fa-vk{--fa:"\f189"}.fa-weibo{--fa:"\f18a"}.fa-renren{--fa:"\f18b"}.fa-pagelines{--fa:"\f18c"}.fa-stack-exchange{--fa:"\f18d"}.fa-square-vimeo,.fa-vimeo-square{--fa:"\f194"}.fa-slack,.fa-slack-hash{--fa:"\f198"}.fa-wordpress{--fa:"\f19a"}.fa-openid{--fa:"\f19b"}.fa-yahoo{--fa:"\f19e"}.fa-google{--fa:"\f1a0"}.fa-reddit{--fa:"\f1a1"}.fa-reddit-square,.fa-square-reddit{--fa:"\f1a2"}.fa-stumbleupon-circle{--fa:"\f1a3"}.fa-stumbleupon{--fa:"\f1a4"}.fa-delicious{--fa:"\f1a5"}.fa-digg{--fa:"\f1a6"}.fa-pied-piper-pp{--fa:"\f1a7"}.fa-pied-piper-alt{--fa:"\f1a8"}.fa-drupal{--fa:"\f1a9"}.fa-joomla{--fa:"\f1aa"}.fa-behance{--fa:"\f1b4"}.fa-behance-square,.fa-square-behance{--fa:"\f1b5"}.fa-steam{--fa:"\f1b6"}.fa-square-steam,.fa-steam-square{--fa:"\f1b7"}.fa-spotify{--fa:"\f1bc"}.fa-deviantart{--fa:"\f1bd"}.fa-soundcloud{--fa:"\f1be"}.fa-vine{--fa:"\f1ca"}.fa-codepen{--fa:"\f1cb"}.fa-jsfiddle{--fa:"\f1cc"}.fa-rebel{--fa:"\f1d0"}.fa-empire{--fa:"\f1d1"}.fa-git-square,.fa-square-git{--fa:"\f1d2"}.fa-git{--fa:"\f1d3"}.fa-hacker-news{--fa:"\f1d4"}.fa-tencent-weibo{--fa:"\f1d5"}.fa-qq{--fa:"\f1d6"}.fa-weixin{--fa:"\f1d7"}.fa-slideshare{--fa:"\f1e7"}.fa-twitch{--fa:"\f1e8"}.fa-yelp{--fa:"\f1e9"}.fa-paypal{--fa:"\f1ed"}.fa-google-wallet{--fa:"\f1ee"}.fa-cc-visa{--fa:"\f1f0"}.fa-cc-mastercard{--fa:"\f1f1"}.fa-cc-discover{--fa:"\f1f2"}.fa-cc-amex{--fa:"\f1f3"}.fa-cc-paypal{--fa:"\f1f4"}.fa-cc-stripe{--fa:"\f1f5"}.fa-lastfm{--fa:"\f202"}.fa-lastfm-square,.fa-square-lastfm{--fa:"\f203"}.fa-ioxhost{--fa:"\f208"}.fa-angellist{--fa:"\f209"}.fa-buysellads{--fa:"\f20d"}.fa-connectdevelop{--fa:"\f20e"}.fa-dashcube{--fa:"\f210"}.fa-forumbee{--fa:"\f211"}.fa-leanpub{--fa:"\f212"}.fa-sellsy{--fa:"\f213"}.fa-shirtsinbulk{--fa:"\f214"}.fa-simplybuilt{--fa:"\f215"}.fa-skyatlas{--fa:"\f216"}.fa-pinterest-p{--fa:"\f231"}.fa-whatsapp{--fa:"\f232"}.fa-viacoin{--fa:"\f237"}.fa-medium,.fa-medium-m{--fa:"\f23a"}.fa-y-combinator{--fa:"\f23b"}.fa-optin-monster{--fa:"\f23c"}.fa-opencart{--fa:"\f23d"}.fa-expeditedssl{--fa:"\f23e"}.fa-cc-jcb{--fa:"\f24b"}.fa-cc-diners-club{--fa:"\f24c"}.fa-creative-commons{--fa:"\f25e"}.fa-gg{--fa:"\f260"}.fa-gg-circle{--fa:"\f261"}.fa-odnoklassniki{--fa:"\f263"}.fa-odnoklassniki-square,.fa-square-odnoklassniki{--fa:"\f264"}.fa-get-pocket{--fa:"\f265"}.fa-wikipedia-w{--fa:"\f266"}.fa-safari{--fa:"\f267"}.fa-chrome{--fa:"\f268"}.fa-firefox{--fa:"\f269"}.fa-opera{--fa:"\f26a"}.fa-internet-explorer{--fa:"\f26b"}.fa-contao{--fa:"\f26d"}.fa-500px{--fa:"\f26e"}.fa-amazon{--fa:"\f270"}.fa-houzz{--fa:"\f27c"}.fa-vimeo-v{--fa:"\f27d"}.fa-black-tie{--fa:"\f27e"}.fa-fonticons{--fa:"\f280"}.fa-reddit-alien{--fa:"\f281"}.fa-edge{--fa:"\f282"}.fa-codiepie{--fa:"\f284"}.fa-modx{--fa:"\f285"}.fa-fort-awesome{--fa:"\f286"}.fa-usb{--fa:"\f287"}.fa-product-hunt{--fa:"\f288"}.fa-mixcloud{--fa:"\f289"}.fa-scribd{--fa:"\f28a"}.fa-bluetooth{--fa:"\f293"}.fa-bluetooth-b{--fa:"\f294"}.fa-gitlab{--fa:"\f296"}.fa-wpbeginner{--fa:"\f297"}.fa-wpforms{--fa:"\f298"}.fa-envira{--fa:"\f299"}.fa-glide{--fa:"\f2a5"}.fa-glide-g{--fa:"\f2a6"}.fa-viadeo{--fa:"\f2a9"}.fa-square-viadeo,.fa-viadeo-square{--fa:"\f2aa"}.fa-snapchat,.fa-snapchat-ghost{--fa:"\f2ab"}.fa-snapchat-square,.fa-square-snapchat{--fa:"\f2ad"}.fa-pied-piper{--fa:"\f2ae"}.fa-first-order{--fa:"\f2b0"}.fa-yoast{--fa:"\f2b1"}.fa-themeisle{--fa:"\f2b2"}.fa-google-plus{--fa:"\f2b3"}.fa-font-awesome,.fa-font-awesome-flag,.fa-font-awesome-logo-full{--fa:"\f2b4"}.fa-linode{--fa:"\f2b8"}.fa-quora{--fa:"\f2c4"}.fa-free-code-camp{--fa:"\f2c5"}.fa-telegram,.fa-telegram-plane{--fa:"\f2c6"}.fa-bandcamp{--fa:"\f2d5"}.fa-grav{--fa:"\f2d6"}.fa-etsy{--fa:"\f2d7"}.fa-imdb{--fa:"\f2d8"}.fa-ravelry{--fa:"\f2d9"}.fa-sellcast{--fa:"\f2da"}.fa-superpowers{--fa:"\f2dd"}.fa-wpexplorer{--fa:"\f2de"}.fa-meetup{--fa:"\f2e0"}.fa-font-awesome-alt,.fa-square-font-awesome-stroke{--fa:"\f35c"}.fa-accessible-icon{--fa:"\f368"}.fa-accusoft{--fa:"\f369"}.fa-adversal{--fa:"\f36a"}.fa-affiliatetheme{--fa:"\f36b"}.fa-algolia{--fa:"\f36c"}.fa-amilia{--fa:"\f36d"}.fa-angrycreative{--fa:"\f36e"}.fa-app-store{--fa:"\f36f"}.fa-app-store-ios{--fa:"\f370"}.fa-apper{--fa:"\f371"}.fa-asymmetrik{--fa:"\f372"}.fa-audible{--fa:"\f373"}.fa-avianex{--fa:"\f374"}.fa-aws{--fa:"\f375"}.fa-bimobject{--fa:"\f378"}.fa-bitcoin{--fa:"\f379"}.fa-bity{--fa:"\f37a"}.fa-blackberry{--fa:"\f37b"}.fa-blogger{--fa:"\f37c"}.fa-blogger-b{--fa:"\f37d"}.fa-buromobelexperte{--fa:"\f37f"}.fa-centercode{--fa:"\f380"}.fa-cloudscale{--fa:"\f383"}.fa-cloudsmith{--fa:"\f384"}.fa-cloudversify{--fa:"\f385"}.fa-cpanel{--fa:"\f388"}.fa-css3-alt{--fa:"\f38b"}.fa-cuttlefish{--fa:"\f38c"}.fa-d-and-d{--fa:"\f38d"}.fa-deploydog{--fa:"\f38e"}.fa-deskpro{--fa:"\f38f"}.fa-digital-ocean{--fa:"\f391"}.fa-discord{--fa:"\f392"}.fa-discourse{--fa:"\f393"}.fa-dochub{--fa:"\f394"}.fa-docker{--fa:"\f395"}.fa-draft2digital{--fa:"\f396"}.fa-dribbble-square,.fa-square-dribbble{--fa:"\f397"}.fa-dyalog{--fa:"\f399"}.fa-earlybirds{--fa:"\f39a"}.fa-erlang{--fa:"\f39d"}.fa-facebook-f{--fa:"\f39e"}.fa-facebook-messenger{--fa:"\f39f"}.fa-firstdraft{--fa:"\f3a1"}.fa-fonticons-fi{--fa:"\f3a2"}.fa-fort-awesome-alt{--fa:"\f3a3"}.fa-freebsd{--fa:"\f3a4"}.fa-gitkraken{--fa:"\f3a6"}.fa-gofore{--fa:"\f3a7"}.fa-goodreads{--fa:"\f3a8"}.fa-goodreads-g{--fa:"\f3a9"}.fa-google-drive{--fa:"\f3aa"}.fa-google-play{--fa:"\f3ab"}.fa-gripfire{--fa:"\f3ac"}.fa-grunt{--fa:"\f3ad"}.fa-gulp{--fa:"\f3ae"}.fa-hacker-news-square,.fa-square-hacker-news{--fa:"\f3af"}.fa-hire-a-helper{--fa:"\f3b0"}.fa-hotjar{--fa:"\f3b1"}.fa-hubspot{--fa:"\f3b2"}.fa-itunes{--fa:"\f3b4"}.fa-itunes-note{--fa:"\f3b5"}.fa-jenkins{--fa:"\f3b6"}.fa-joget{--fa:"\f3b7"}.fa-js{--fa:"\f3b8"}.fa-js-square,.fa-square-js{--fa:"\f3b9"}.fa-keycdn{--fa:"\f3ba"}.fa-kickstarter,.fa-square-kickstarter{--fa:"\f3bb"}.fa-kickstarter-k{--fa:"\f3bc"}.fa-laravel{--fa:"\f3bd"}.fa-line{--fa:"\f3c0"}.fa-lyft{--fa:"\f3c3"}.fa-magento{--fa:"\f3c4"}.fa-medapps{--fa:"\f3c6"}.fa-medrt{--fa:"\f3c8"}.fa-microsoft{--fa:"\f3ca"}.fa-mix{--fa:"\f3cb"}.fa-mizuni{--fa:"\f3cc"}.fa-monero{--fa:"\f3d0"}.fa-napster{--fa:"\f3d2"}.fa-node-js{--fa:"\f3d3"}.fa-npm{--fa:"\f3d4"}.fa-ns8{--fa:"\f3d5"}.fa-nutritionix{--fa:"\f3d6"}.fa-page4{--fa:"\f3d7"}.fa-palfed{--fa:"\f3d8"}.fa-patreon{--fa:"\f3d9"}.fa-periscope{--fa:"\f3da"}.fa-phabricator{--fa:"\f3db"}.fa-phoenix-framework{--fa:"\f3dc"}.fa-playstation{--fa:"\f3df"}.fa-pushed{--fa:"\f3e1"}.fa-python{--fa:"\f3e2"}.fa-red-river{--fa:"\f3e3"}.fa-rendact,.fa-wpressr{--fa:"\f3e4"}.fa-replyd{--fa:"\f3e6"}.fa-resolving{--fa:"\f3e7"}.fa-rocketchat{--fa:"\f3e8"}.fa-rockrms{--fa:"\f3e9"}.fa-schlix{--fa:"\f3ea"}.fa-searchengin{--fa:"\f3eb"}.fa-servicestack{--fa:"\f3ec"}.fa-sistrix{--fa:"\f3ee"}.fa-speakap{--fa:"\f3f3"}.fa-staylinked{--fa:"\f3f5"}.fa-steam-symbol{--fa:"\f3f6"}.fa-sticker-mule{--fa:"\f3f7"}.fa-studiovinari{--fa:"\f3f8"}.fa-supple{--fa:"\f3f9"}.fa-uber{--fa:"\f402"}.fa-uikit{--fa:"\f403"}.fa-uniregistry{--fa:"\f404"}.fa-untappd{--fa:"\f405"}.fa-ussunnah{--fa:"\f407"}.fa-vaadin{--fa:"\f408"}.fa-viber{--fa:"\f409"}.fa-vimeo{--fa:"\f40a"}.fa-vnv{--fa:"\f40b"}.fa-square-whatsapp,.fa-whatsapp-square{--fa:"\f40c"}.fa-whmcs{--fa:"\f40d"}.fa-wordpress-simple{--fa:"\f411"}.fa-xbox{--fa:"\f412"}.fa-yandex{--fa:"\f413"}.fa-yandex-international{--fa:"\f414"}.fa-apple-pay{--fa:"\f415"}.fa-cc-apple-pay{--fa:"\f416"}.fa-fly{--fa:"\f417"}.fa-node{--fa:"\f419"}.fa-osi{--fa:"\f41a"}.fa-react{--fa:"\f41b"}.fa-autoprefixer{--fa:"\f41c"}.fa-less{--fa:"\f41d"}.fa-sass{--fa:"\f41e"}.fa-vuejs{--fa:"\f41f"}.fa-angular{--fa:"\f420"}.fa-aviato{--fa:"\f421"}.fa-ember{--fa:"\f423"}.fa-gitter{--fa:"\f426"}.fa-hooli{--fa:"\f427"}.fa-strava{--fa:"\f428"}.fa-stripe{--fa:"\f429"}.fa-stripe-s{--fa:"\f42a"}.fa-typo3{--fa:"\f42b"}.fa-amazon-pay{--fa:"\f42c"}.fa-cc-amazon-pay{--fa:"\f42d"}.fa-ethereum{--fa:"\f42e"}.fa-korvue{--fa:"\f42f"}.fa-elementor{--fa:"\f430"}.fa-square-youtube,.fa-youtube-square{--fa:"\f431"}.fa-flipboard{--fa:"\f44d"}.fa-hips{--fa:"\f452"}.fa-php{--fa:"\f457"}.fa-quinscape{--fa:"\f459"}.fa-readme{--fa:"\f4d5"}.fa-java{--fa:"\f4e4"}.fa-pied-piper-hat{--fa:"\f4e5"}.fa-creative-commons-by{--fa:"\f4e7"}.fa-creative-commons-nc{--fa:"\f4e8"}.fa-creative-commons-nc-eu{--fa:"\f4e9"}.fa-creative-commons-nc-jp{--fa:"\f4ea"}.fa-creative-commons-nd{--fa:"\f4eb"}.fa-creative-commons-pd{--fa:"\f4ec"}.fa-creative-commons-pd-alt{--fa:"\f4ed"}.fa-creative-commons-remix{--fa:"\f4ee"}.fa-creative-commons-sa{--fa:"\f4ef"}.fa-creative-commons-sampling{--fa:"\f4f0"}.fa-creative-commons-sampling-plus{--fa:"\f4f1"}.fa-creative-commons-share{--fa:"\f4f2"}.fa-creative-commons-zero{--fa:"\f4f3"}.fa-ebay{--fa:"\f4f4"}.fa-keybase{--fa:"\f4f5"}.fa-mastodon{--fa:"\f4f6"}.fa-r-project{--fa:"\f4f7"}.fa-researchgate{--fa:"\f4f8"}.fa-teamspeak{--fa:"\f4f9"}.fa-first-order-alt{--fa:"\f50a"}.fa-fulcrum{--fa:"\f50b"}.fa-galactic-republic{--fa:"\f50c"}.fa-galactic-senate{--fa:"\f50d"}.fa-jedi-order{--fa:"\f50e"}.fa-mandalorian{--fa:"\f50f"}.fa-old-republic{--fa:"\f510"}.fa-phoenix-squadron{--fa:"\f511"}.fa-sith{--fa:"\f512"}.fa-trade-federation{--fa:"\f513"}.fa-wolf-pack-battalion{--fa:"\f514"}.fa-hornbill{--fa:"\f592"}.fa-mailchimp{--fa:"\f59e"}.fa-megaport{--fa:"\f5a3"}.fa-nimblr{--fa:"\f5a8"}.fa-rev{--fa:"\f5b2"}.fa-shopware{--fa:"\f5b5"}.fa-squarespace{--fa:"\f5be"}.fa-themeco{--fa:"\f5c6"}.fa-weebly{--fa:"\f5cc"}.fa-wix{--fa:"\f5cf"}.fa-ello{--fa:"\f5f1"}.fa-hackerrank{--fa:"\f5f7"}.fa-kaggle{--fa:"\f5fa"}.fa-markdown{--fa:"\f60f"}.fa-neos{--fa:"\f612"}.fa-zhihu{--fa:"\f63f"}.fa-alipay{--fa:"\f642"}.fa-the-red-yeti{--fa:"\f69d"}.fa-critical-role{--fa:"\f6c9"}.fa-d-and-d-beyond{--fa:"\f6ca"}.fa-dev{--fa:"\f6cc"}.fa-fantasy-flight-games{--fa:"\f6dc"}.fa-wizards-of-the-coast{--fa:"\f730"}.fa-think-peaks{--fa:"\f731"}.fa-reacteurope{--fa:"\f75d"}.fa-artstation{--fa:"\f77a"}.fa-atlassian{--fa:"\f77b"}.fa-canadian-maple-leaf{--fa:"\f785"}.fa-centos{--fa:"\f789"}.fa-confluence{--fa:"\f78d"}.fa-dhl{--fa:"\f790"}.fa-diaspora{--fa:"\f791"}.fa-fedex{--fa:"\f797"}.fa-fedora{--fa:"\f798"}.fa-figma{--fa:"\f799"}.fa-intercom{--fa:"\f7af"}.fa-invision{--fa:"\f7b0"}.fa-jira{--fa:"\f7b1"}.fa-mendeley{--fa:"\f7b3"}.fa-raspberry-pi{--fa:"\f7bb"}.fa-redhat{--fa:"\f7bc"}.fa-sketch{--fa:"\f7c6"}.fa-sourcetree{--fa:"\f7d3"}.fa-suse{--fa:"\f7d6"}.fa-ubuntu{--fa:"\f7df"}.fa-ups{--fa:"\f7e0"}.fa-usps{--fa:"\f7e1"}.fa-yarn{--fa:"\f7e3"}.fa-airbnb{--fa:"\f834"}.fa-battle-net{--fa:"\f835"}.fa-bootstrap{--fa:"\f836"}.fa-buffer{--fa:"\f837"}.fa-chromecast{--fa:"\f838"}.fa-evernote{--fa:"\f839"}.fa-itch-io{--fa:"\f83a"}.fa-salesforce{--fa:"\f83b"}.fa-speaker-deck{--fa:"\f83c"}.fa-symfony{--fa:"\f83d"}.fa-waze{--fa:"\f83f"}.fa-yammer{--fa:"\f840"}.fa-git-alt{--fa:"\f841"}.fa-stackpath{--fa:"\f842"}.fa-cotton-bureau{--fa:"\f89e"}.fa-buy-n-large{--fa:"\f8a6"}.fa-mdb{--fa:"\f8ca"}.fa-orcid{--fa:"\f8d2"}.fa-swift{--fa:"\f8e1"}.fa-umbraco{--fa:"\f8e8"}:host,:root{--fa-font-regular:normal 400 1em/1 var(--fa-family-classic)}@font-face{font-family:"Font Awesome 7 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.woff2)}.far{--fa-family:var(--fa-family-classic)}.fa-regular,.far{--fa-style:400}:host,:root{--fa-family-classic:"Font Awesome 7 Free";--fa-font-solid:normal 900 1em/1 var(--fa-family-classic);--fa-style-family-classic:var(--fa-family-classic)}@font-face{font-family:"Font Awesome 7 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2)}.fas{--fa-style:900}.fa-classic,.fas{--fa-family:var(--fa-family-classic)}.fa-solid{--fa-style:900}@font-face{font-family:"Font Awesome 5 Brands";font-display:block;font-weight:400;src:url(../webfonts/fa-brands-400.woff2) format("woff2")}@font-face{font-family:"Font Awesome 5 Free";font-display:block;font-weight:900;src:url(../webfonts/fa-solid-900.woff2) format("woff2")}@font-face{font-family:"Font Awesome 5 Free";font-display:block;font-weight:400;src:url(../webfonts/fa-regular-400.woff2) format("woff2")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-brands-400.woff2) format("woff2")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2");unicode-range:u+f003,u+f006,u+f014,u+f016-f017,u+f01a-f01b,u+f01d,u+f022,u+f03e,u+f044,u+f046,u+f05c-f05d,u+f06e,u+f070,u+f087-f088,u+f08a,u+f094,u+f096-f097,u+f09d,u+f0a0,u+f0a2,u+f0a4-f0a7,u+f0c5,u+f0c7,u+f0e5-f0e6,u+f0eb,u+f0f6-f0f8,u+f10c,u+f114-f115,u+f118-f11a,u+f11c-f11d,u+f133,u+f147,u+f14e,u+f150-f152,u+f185-f186,u+f18e,u+f190-f192,u+f196,u+f1c1-f1c9,u+f1d9,u+f1db,u+f1e3,u+f1ea,u+f1f7,u+f1f9,u+f20a,u+f247-f248,u+f24a,u+f24d,u+f255-f25b,u+f25d,u+f271-f274,u+f278,u+f27b,u+f28c,u+f28e,u+f29c,u+f2b5,u+f2b7,u+f2ba,u+f2bc,u+f2be,u+f2c0-f2c1,u+f2c3,u+f2d0,u+f2d2,u+f2d4,u+f2dc}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-v4compatibility.woff2) format("woff2");unicode-range:u+f041,u+f047,u+f065-f066,u+f07d-f07e,u+f080,u+f08b,u+f08e,u+f090,u+f09a,u+f0ac,u+f0ae,u+f0b2,u+f0d0,u+f0d6,u+f0e4,u+f0ec,u+f10a-f10b,u+f123,u+f13e,u+f148-f149,u+f14c,u+f156,u+f15e,u+f160-f161,u+f163,u+f175-f178,u+f195,u+f1f8,u+f219,u+f27a} \ No newline at end of file diff --git a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 b/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 deleted file mode 100644 index d0b8f69e..00000000 Binary files a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 and /dev/null differ diff --git a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 b/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 deleted file mode 100644 index 2eca12b0..00000000 Binary files a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 and /dev/null differ diff --git a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 b/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 deleted file mode 100644 index c20c7f4f..00000000 Binary files a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 and /dev/null differ diff --git a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 b/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 deleted file mode 100644 index 275e92fc..00000000 Binary files a/pluginsSrc/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2 and /dev/null differ diff --git a/pluginsSrc/@waline/client/dist/waline.css b/pluginsSrc/@waline/client/dist/waline.css deleted file mode 100644 index f17bfd85..00000000 --- a/pluginsSrc/@waline/client/dist/waline.css +++ /dev/null @@ -1 +0,0 @@ -:root{--waline-font-size: 1rem;--waline-white: #fff;--waline-light-grey: #999;--waline-dark-grey: #666;--waline-theme-color: #27ae60;--waline-active-color: #2ecc71;--waline-color: #444;--waline-bg-color: #fff;--waline-bg-color-light: #f8f8f8;--waline-bg-color-hover: #f0f0f0;--waline-border-color: #ddd;--waline-disable-bg-color: #f8f8f8;--waline-disable-color: #000;--waline-code-bg-color: #282c34;--waline-bq-color: #f0f0f0;--waline-avatar-size: 3.25rem;--waline-m-avatar-size: calc(var(--waline-avatar-size) * 9 / 13);--waline-badge-color: #3498db;--waline-badge-font-size: 0.75em;--waline-info-bg-color: #f8f8f8;--waline-info-color: #999;--waline-info-font-size: 0.625em;--waline-border: 1px solid var(--waline-border-color);--waline-avatar-radius: 50%;--waline-box-shadow: none}[data-waline]{font-size:var(--waline-font-size);text-align:start}[dir=rtl] [data-waline]{direction:rtl}[data-waline] *{box-sizing:content-box;line-height:1.75}[data-waline] p{color:var(--waline-color)}[data-waline] a{position:relative;display:inline-block;color:var(--waline-theme-color);text-decoration:none;overflow-wrap:break-word;cursor:pointer}[data-waline] a:hover{color:var(--waline-active-color)}[data-waline] img{max-width:100%;max-height:400px;border:none}[data-waline] hr{margin:.825em 0;border-style:dashed;border-color:var(--waline-bg-color-light)}[data-waline] code,[data-waline] pre{margin:0;padding:.2em .4em;border-radius:3px;background:var(--waline-bg-color-light);font-size:85%}[data-waline] pre{overflow:auto;padding:10px;line-height:1.45}[data-waline] pre::-webkit-scrollbar{width:6px;height:6px}[data-waline] pre::-webkit-scrollbar-track-piece:horizontal{border-radius:6px;background:rgba(0,0,0,.1)}[data-waline] pre::-webkit-scrollbar-thumb:horizontal{width:6px;border-radius:6px;background:var(--waline-theme-color)}[data-waline] pre code{padding:0;background:rgba(0,0,0,0);color:var(--waline-color);white-space:pre-wrap;word-break:keep-all}[data-waline] blockquote{margin:.5em 0;padding:.5em 0 .5em 1em;border-inline-start:8px solid var(--waline-bq-color);color:var(--waline-dark-grey)}[data-waline] blockquote>p{margin:0}[data-waline] ol,[data-waline] ul{margin-inline-start:1.25em;padding:0}[data-waline] input[type=checkbox],[data-waline] input[type=radio]{display:inline-block;vertical-align:middle;margin-top:-2px}.wl-btn{display:inline-block;vertical-align:middle;min-width:2.5em;margin-bottom:0;padding:.5em 1em;border:1px solid var(--waline-border-color);border-radius:.5em;background:rgba(0,0,0,0);color:var(--waline-color);font-weight:400;font-size:.75em;line-height:1.5;text-align:center;white-space:nowrap;cursor:pointer;user-select:none;touch-action:manipulation;transition-duration:.4s}.wl-btn:hover,.wl-btn:active{border-color:var(--waline-theme-color);color:var(--waline-theme-color)}.wl-btn:disabled{border-color:var(--waline-border-color);background:var(--waline-disable-bg-color);color:var(--waline-disable-color);cursor:not-allowed}.wl-btn.primary{border-color:var(--waline-theme-color);background:var(--waline-theme-color);color:var(--waline-white)}.wl-btn.primary:hover,.wl-btn.primary:active{border-color:var(--waline-active-color);background:var(--waline-active-color);color:var(--waline-white)}.wl-btn.primary:disabled{border-color:var(--waline-border-color);background:var(--waline-disable-bg-color);color:var(--waline-disable-color);cursor:not-allowed}.wl-loading{text-align:center}.wl-loading svg{margin:0 auto}.wl-comment{position:relative;display:flex;margin-bottom:.75em}.wl-close{position:absolute;inset-inline-end:-4px;top:-4px;padding:0;border:none;background:rgba(0,0,0,0);line-height:1;cursor:pointer}.wl-login-info{max-width:80px;margin-top:.75em;text-align:center}.wl-logout-btn{position:absolute;inset-inline-end:-10px;top:-10px;padding:3px;border:none;background:rgba(0,0,0,0);line-height:0;cursor:pointer}.wl-avatar{position:relative;width:var(--waline-avatar-size);height:var(--waline-avatar-size);margin:0 auto;border:var(--waline-border);border-radius:var(--waline-avatar-radius)}@media(max-width: 720px){.wl-avatar{width:var(--waline-m-avatar-size);height:var(--waline-m-avatar-size)}}.wl-avatar img{width:100%;height:100%;border-radius:var(--waline-avatar-radius)}.wl-login-nick{display:block;color:var(--waline-theme-color);font-size:.75em;word-break:break-all}.wl-panel{position:relative;flex-shrink:1;width:100%;margin:.5em;border:var(--waline-border);border-radius:.75em;background:var(--waline-bg-color);box-shadow:var(--waline-box-shadow)}.wl-header{display:flex;overflow:hidden;padding:0 4px;border-bottom:2px dashed var(--waline-border-color);border-top-left-radius:.75em;border-top-right-radius:.75em}@media(max-width: 580px){.wl-header{display:block}}.wl-header label{min-width:40px;padding:.75em .5em;color:var(--waline-color);font-size:.75em;text-align:center}.wl-header input{flex:1;resize:none;width:0;padding:.5em;background:rgba(0,0,0,0);font-size:.625em}.wl-header-item{display:flex;flex:1}@media(max-width: 580px){.wl-header-item:not(:last-child){border-bottom:2px dashed var(--waline-border-color)}}.wl-header-1 .wl-header-item{width:100%}.wl-header-2 .wl-header-item{width:50%}@media(max-width: 580px){.wl-header-2 .wl-header-item{flex:0;width:100%}}.wl-header-3 .wl-header-item{width:33.33%}@media(max-width: 580px){.wl-header-3 .wl-header-item{width:100%}}.wl-editor{position:relative;resize:vertical;box-sizing:border-box;width:calc(100% - 1em);min-height:8.75em;margin:.75em .5em;border-radius:.5em;background:rgba(0,0,0,0);font-size:.875em}.wl-editor,.wl-input{max-width:100%;border:none;color:var(--waline-color);outline:none;transition:all .25s ease}.wl-editor:focus,.wl-input:focus{background:var(--waline-bg-color-light)}.wl-preview{padding:0 .5em .5em}.wl-preview h4{margin:.25em;font-weight:bold;font-size:.9375em}.wl-preview .wl-content{min-height:1.25em;padding:.25em;overflow-wrap:break-word;hyphens:auto}.wl-preview .wl-content>*:first-child{margin-top:0}.wl-preview .wl-content>*:last-child{margin-bottom:0}.wl-footer{position:relative;display:flex;flex-wrap:wrap;margin:.5em .75em}.wl-actions{display:flex;flex:2;align-items:center}.wl-action{display:inline-flex;align-items:center;justify-content:center;width:1.5em;height:1.5em;margin:2px;padding:0;border:none;background:rgba(0,0,0,0);color:var(--waline-color);font-size:16px;cursor:pointer}.wl-action:hover{color:var(--waline-theme-color)}.wl-action.active{color:var(--waline-active-color)}#wl-image-upload{display:none}#wl-image-upload:focus+label{color:var(--waline-color)}#wl-image-upload:focus-visible+label{outline:-webkit-focus-ring-color auto 1px}.wl-info{display:flex;flex:3;align-items:center;justify-content:flex-end}.wl-info .wl-text-number{color:var(--waline-info-color);font-size:.75em}.wl-info .wl-text-number .illegal{color:red}.wl-info button{margin-inline-start:.75em}.wl-info button svg{display:block;margin:0 auto;line-height:18px}.wl-emoji-popup{position:absolute;inset-inline-start:1.25em;top:100%;z-index:10;display:none;width:100%;max-width:526px;border:var(--waline-border);border-radius:6px;background:var(--waline-bg-color);box-shadow:var(--waline-box-shadow)}.wl-emoji-popup.display{display:block}.wl-emoji-popup button{display:inline-block;vertical-align:middle;width:2em;margin:.125em;padding:0;border-width:0;background:rgba(0,0,0,0);font-size:inherit;line-height:2;text-align:center;cursor:pointer}.wl-emoji-popup button:hover{background:var(--waline-bg-color-hover)}.wl-emoji-popup .wl-emoji{display:inline-block;vertical-align:middle;max-width:1.5em;max-height:1.5em}.wl-emoji-popup .wl-tab-wrapper{overflow-y:auto;max-height:145px;padding:.5em}.wl-emoji-popup .wl-tab-wrapper::-webkit-scrollbar{width:6px;height:6px}.wl-emoji-popup .wl-tab-wrapper::-webkit-scrollbar-track-piece:vertical{border-radius:6px;background:rgba(0,0,0,.1)}.wl-emoji-popup .wl-tab-wrapper::-webkit-scrollbar-thumb:vertical{width:6px;border-radius:6px;background:var(--waline-theme-color)}.wl-emoji-popup .wl-tabs{position:relative;overflow-x:auto;padding:0 6px;white-space:nowrap}.wl-emoji-popup .wl-tabs::before{content:" ";position:absolute;top:0;right:0;left:0;z-index:2;height:1px;background:var(--waline-border-color)}.wl-emoji-popup .wl-tabs::-webkit-scrollbar{width:6px;height:6px}.wl-emoji-popup .wl-tabs::-webkit-scrollbar-track-piece:horizontal{border-radius:6px;background:rgba(0,0,0,.1)}.wl-emoji-popup .wl-tabs::-webkit-scrollbar-thumb:horizontal{height:6px;border-radius:6px;background:var(--waline-theme-color)}.wl-emoji-popup .wl-tab{position:relative;margin:0;padding:0 .5em}.wl-emoji-popup .wl-tab.active{z-index:3;border:1px solid var(--waline-border-color);border-top-width:0;border-bottom-right-radius:6px;border-bottom-left-radius:6px;background:var(--waline-bg-color)}.wl-gif-popup{position:absolute;inset-inline-start:1.25em;top:100%;z-index:10;width:calc(100% - 3em);padding:.75em .75em .25em;border:var(--waline-border);border-radius:6px;background:var(--waline-bg-color);box-shadow:var(--waline-box-shadow);opacity:0;visibility:hidden;transition:transform .2s ease-out,opacity .2s ease-out;transform:scale(0.9, 0.9);transform-origin:0 0}.wl-gif-popup.display{opacity:1;visibility:visible;transform:none}.wl-gif-popup input{box-sizing:border-box;width:100%;margin-bottom:10px;padding:3px 5px;border:var(--waline-border)}.wl-gif-popup img{display:block;box-sizing:border-box;width:100%;border-width:2px;border-style:solid;border-color:#fff;cursor:pointer}.wl-gif-popup img:hover{border-color:var(--waline-theme-color);border-radius:2px}.wl-gallery{display:flex;overflow-y:auto;max-height:80vh}.wl-gallery-column{display:flex;flex:1;flex-direction:column;height:-webkit-max-content;height:-moz-max-content;height:max-content}.wl-cards .wl-user{--avatar-size: var(--waline-avatar-size);position:relative;margin-inline-end:.75em}@media(max-width: 720px){.wl-cards .wl-user{--avatar-size: var(--waline-m-avatar-size)}}.wl-cards .wl-user .wl-user-avatar{width:var(--avatar-size);height:var(--avatar-size);border-radius:var(--waline-avatar-radius);box-shadow:var(--waline-box-shadow)}.wl-cards .wl-user .verified-icon{position:absolute;inset-inline-start:calc(var(--avatar-size)*3/4);top:calc(var(--avatar-size)*3/4);border-radius:50%;background:var(--waline-bg-color);box-shadow:var(--waline-box-shadow)}.wl-card-item{position:relative;display:flex;padding:.5em}.wl-card-item .wl-card-item{padding-inline-end:0}.wl-card{flex:1;width:0;padding-bottom:.5em;border-bottom:1px dashed var(--waline-border-color)}.wl-card:first-child{margin-inline-start:1em}.wl-card-item:last-child>.wl-card{border-bottom:none}.wl-card .wl-nick svg{position:relative;bottom:-0.125em;line-height:1}.wl-card .wl-head{overflow:hidden;line-height:1.5}.wl-card .wl-head .wl-nick{position:relative;display:inline-block;margin-inline-end:.5em;font-weight:bold;font-size:.875em;line-height:1;text-decoration:none}.wl-card span.wl-nick{color:var(--waline-dark-grey)}.wl-card .wl-badge{display:inline-block;margin-inline-end:1em;padding:0 .3em;border:1px solid var(--waline-badge-color);border-radius:4px;color:var(--waline-badge-color);font-size:var(--waline-badge-font-size)}.wl-card .wl-time{margin-inline-end:.875em;color:var(--waline-info-color);font-size:.75em}.wl-card .wl-meta{position:relative;line-height:1}.wl-card .wl-meta>span{display:inline-block;margin-inline-end:.25em;padding:2px 4px;border-radius:.2em;background:var(--waline-info-bg-color);color:var(--waline-info-color);font-size:var(--waline-info-font-size);line-height:1.5}.wl-card .wl-meta>span:empty{display:none}.wl-card .wl-comment-actions{float:right;line-height:1}[dir=rtl] .wl-card .wl-comment-actions{float:left}.wl-card .wl-delete,.wl-card .wl-like,.wl-card .wl-reply,.wl-card .wl-edit{display:inline-flex;align-items:center;border:none;background:rgba(0,0,0,0);color:var(--waline-color);line-height:1;cursor:pointer;transition:color .2s ease}.wl-card .wl-delete:hover,.wl-card .wl-like:hover,.wl-card .wl-reply:hover,.wl-card .wl-edit:hover{color:var(--waline-theme-color)}.wl-card .wl-delete.active,.wl-card .wl-like.active,.wl-card .wl-reply.active,.wl-card .wl-edit.active{color:var(--waline-active-color)}.wl-card .wl-content{position:relative;margin-bottom:.75em;padding-top:.625em;font-size:.875em;line-height:2;word-wrap:break-word}.wl-card .wl-content.expand{overflow:hidden;max-height:8em;cursor:pointer}.wl-card .wl-content.expand::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:3.15em;z-index:999;display:block;width:100%;background:linear-gradient(180deg, #000, rgba(255, 255, 255, 0.9))}.wl-card .wl-content.expand::after{content:attr(data-expand);position:absolute;inset-inline-start:0;bottom:0;z-index:999;display:block;width:100%;height:3.15em;background:hsla(0,0%,100%,.9);color:#828586;line-height:3.15em;text-align:center}.wl-card .wl-content>*:first-child{margin-top:0}.wl-card .wl-content>*:last-child{margin-bottom:0}.wl-card .wl-admin-actions{margin:8px 0;font-size:12px;text-align:right}.wl-card .wl-comment-status{margin:0 8px}.wl-card .wl-comment-status .wl-btn{border-radius:0}.wl-card .wl-comment-status .wl-btn:first-child{border-inline-end:0;border-radius:.5em 0 0 .5em}.wl-card .wl-comment-status .wl-btn:last-child{border-inline-start:0;border-radius:0 .5em .5em 0}.wl-card .wl-quote{border-inline-start:1px dashed rgba(237,237,237,.5)}.wl-card .wl-quote .wl-user{--avatar-size: var(--waline-m-avatar-size)}.wl-close-icon{color:var(--waline-border-color)}.wl-content .vemoji,.wl-content .wl-emoji{display:inline-block;vertical-align:baseline;height:1.25em;margin:-0.125em .25em}.wl-content .wl-tex{background:var(--waline-info-bg-color);color:var(--waline-info-color)}.wl-content span.wl-tex{display:inline-block;margin-inline-end:.25em;padding:2px 4px;border-radius:.2em;font-size:var(--waline-info-font-size);line-height:1.5}.wl-content p.wl-tex{text-align:center}.wl-content .katex-display{overflow:auto hidden;padding-top:.2em;padding-bottom:.2em;-webkit-overflow-scrolling:touch}.wl-content .katex-display::-webkit-scrollbar{height:3px}.wl-content .katex-error{color:red}.wl-count{flex:1;font-weight:bold;font-size:1.25em}.wl-empty{overflow:auto;padding:1.25em;color:var(--waline-color);text-align:center}.wl-operation{text-align:center}.wl-operation button{margin:1em 0}.wl-power{padding:.5em 0;color:var(--waline-light-grey);font-size:var(--waline-info-font-size);text-align:end}.wl-meta-head{display:flex;flex-direction:row;align-items:center;padding:.375em}.wl-sort{margin:0;list-style-type:none}.wl-sort li{display:inline-block;color:var(--waline-info-color);font-size:.75em;cursor:pointer}.wl-sort li.active{color:var(--waline-theme-color)}.wl-sort li+li{margin-inline-start:1em}.wl-reaction{overflow:auto hidden;margin-bottom:1.75em;text-align:center}.wl-reaction img{width:100%;height:100%;transition:all 250ms ease-in-out}.wl-reaction-title{margin:16px auto;font-weight:bold;font-size:18px}.wl-reaction-list{display:flex;flex-direction:row;gap:16px;justify-content:center;margin:0;padding:8px;list-style-type:none}@media(max-width: 580px){.wl-reaction-list{gap:12px}}[data-waline] .wl-reaction-list{margin-inline-start:0}.wl-reaction-item{display:flex;flex-direction:column;align-items:center;cursor:pointer}.wl-reaction-item:hover img,.wl-reaction-item.active img{transform:scale(1.15)}.wl-reaction-img{position:relative;width:42px;height:42px}@media(max-width: 580px){.wl-reaction-img{width:32px;height:32px}}.wl-reaction-loading{position:absolute;inset-inline-end:-5px;top:-4px;width:18px;height:18px;color:var(--waline-theme-color)}.wl-reaction-votes{position:absolute;inset-inline-end:-9px;top:-9px;min-width:1em;padding:2px;border:1px solid var(--waline-theme-color);border-radius:1em;background:var(--waline-bg-color);color:var(--waline-theme-color);font-weight:700;font-size:.75em;line-height:1}.wl-reaction-item.active .wl-reaction-votes{background:var(--waline-theme-color);color:var(--waline-bg-color)}.wl-reaction-text{font-size:.875em}.wl-reaction-item.active .wl-reaction-text{color:var(--waline-theme-color)}.wl-content pre,.wl-content pre[class*=language-]{overflow:auto;margin:.75rem 0;padding:1rem 1.25rem;border-radius:6px;background:var(--waline-code-bg-color);line-height:1.4}.wl-content pre code,.wl-content pre[class*=language-] code{padding:0;border-radius:0;background:rgba(0,0,0,0) !important;color:#bbb;direction:ltr}.wl-content code[class*=language-],.wl-content pre[class*=language-]{background:none;color:#ccc;font-size:1em;font-family:Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;text-align:left;white-space:pre;word-spacing:normal;word-wrap:normal;word-break:normal;tab-size:4;hyphens:none}.wl-content pre[class*=language-]{overflow:auto}.wl-content :not(pre)>code[class*=language-],.wl-content pre[class*=language-]{background:#2d2d2d}.wl-content :not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.wl-content .token.comment,.wl-content .token.block-comment,.wl-content .token.prolog,.wl-content .token.doctype,.wl-content .token.cdata{color:#999}.wl-content .token.punctuation{color:#ccc}.wl-content .token.tag,.wl-content .token.attr-name,.wl-content .token.namespace,.wl-content .token.deleted{color:#e2777a}.wl-content .token.function-name{color:#6196cc}.wl-content .token.boolean,.wl-content .token.number,.wl-content .token.function{color:#f08d49}.wl-content .token.property,.wl-content .token.class-name,.wl-content .token.constant,.wl-content .token.symbol{color:#f8c555}.wl-content .token.selector,.wl-content .token.important,.wl-content .token.atrule,.wl-content .token.keyword,.wl-content .token.builtin{color:#cc99cd}.wl-content .token.string,.wl-content .token.char,.wl-content .token.attr-value,.wl-content .token.regex,.wl-content .token.variable{color:#7ec699}.wl-content .token.operator,.wl-content .token.entity,.wl-content .token.url{color:#67cdcc}.wl-content .token.important,.wl-content .token.bold{font-weight:bold}.wl-content .token.italic{font-style:italic}.wl-content .token.entity{cursor:help}.wl-content .token.inserted{color:green}.wl-recent-item p{display:inline}.wl-user-list{padding:0;list-style:none}.wl-user-list a,.wl-user-list a:hover,.wl-user-list a:visited{color:var(--waline-color);text-decoration:none}.wl-user-list .wl-user-avatar{position:relative;display:inline-block;overflow:hidden;margin-inline-end:10px;border-radius:4px;line-height:0}.wl-user-list .wl-user-avatar>img{width:var(--waline-user-avatar-size, 48px);height:var(--waline-user-avatar-size, 48px)}.wl-user-list .wl-user-badge{position:absolute;inset-inline-end:0;bottom:0;min-width:.7em;height:1.5em;padding:0 .4em;border-radius:4px;background:var(--waline-info-bg-color);color:var(--waline-info-color);font-weight:bold;font-size:10px;line-height:1.5em;text-align:center}.wl-user-list .wl-user-item{margin:10px 0}.wl-user-list .wl-user-item:nth-child(1) .wl-user-badge{background:var(--waline-rank-gold-bg-color, #fa3939);color:var(--waline-white);font-weight:bold}.wl-user-list .wl-user-item:nth-child(2) .wl-user-badge{background:var(--waline-rank-silver-bg-color, #fb811c);color:var(--waline-white);font-weight:bold}.wl-user-list .wl-user-item:nth-child(3) .wl-user-badge{background:var(--waline-rank-copper-bg-color, #feb207);color:var(--waline-white)}.wl-user-list .wl-user-meta{display:inline-block;vertical-align:top}.wl-user-list .wl-badge{display:inline-block;vertical-align:text-top;margin-inline-start:.5em;padding:0 .3em;border:1px solid var(--waline-badge-color);border-radius:4px;color:var(--waline-badge-color);font-size:var(--waline-badge-font-size)}.wl-user-wall{padding:0;list-style:none}.wl-user-wall .wl-user-badge,.wl-user-wall .wl-user-meta{display:none}.wl-user-wall .wl-user-item{position:relative;display:inline-block;transition:transform ease-in-out .2s}.wl-user-wall .wl-user-item::before,.wl-user-wall .wl-user-item::after{position:absolute;bottom:100%;left:50%;z-index:10;opacity:0;pointer-events:none;transition:all .18s ease-out .18s;transform:translate(-50%, 4px);transform-origin:top}.wl-user-wall .wl-user-item::before{content:"";width:0;height:0;border:5px solid rgba(0,0,0,0);border-top-color:rgba(16,16,16,.95)}.wl-user-wall .wl-user-item::after{content:attr(aria-label);margin-bottom:10px;padding:.5em 1em;border-radius:2px;background:rgba(16,16,16,.95);color:#fff;font-size:12px;white-space:nowrap}.wl-user-wall .wl-user-item:hover{transform:scale(1.1)}.wl-user-wall .wl-user-item:hover::before,.wl-user-wall .wl-user-item:hover::after{opacity:1;pointer-events:none;transform:translate(-50%, 0)}.wl-user-wall .wl-user-item img{width:var(--waline-user-avatar-size, 48px);height:var(--waline-user-avatar-size, 48px)}/*# sourceMappingURL=waline.css.map */ diff --git a/pluginsSrc/@waline/client/dist/waline.js b/pluginsSrc/@waline/client/dist/waline.js deleted file mode 100644 index 58c35d6f..00000000 --- a/pluginsSrc/@waline/client/dist/waline.js +++ /dev/null @@ -1,84 +0,0 @@ -var Eo=Object.defineProperty;var To=(e,t,n)=>t in e?Eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Os=(e,t,n)=>To(e,typeof t!="symbol"?t+"":t,n);var Ts;const js={"Content-Type":"application/json"},Ye=e=>`${e.replace(/\/?$/,"/")}api/`,_t=(e,t="")=>{if(typeof e=="object"&&e.errno)throw new TypeError(`${t} failed with ${e.errno}: ${e.errmsg}`);return e},Tr=({serverURL:e,lang:t,paths:n,type:r,signal:s})=>fetch(`${Ye(e)}article?path=${encodeURIComponent(n.join(","))}&type=${encodeURIComponent(r.join(","))}&lang=${t}`,{signal:s}).then(i=>i.json()).then(i=>_t(i,"Get counter").data),zn=({serverURL:e,lang:t,path:n,type:r,action:s})=>fetch(`${Ye(e)}article?lang=${t}`,{method:"POST",headers:js,body:JSON.stringify({path:n,type:r,action:s})}).then(i=>i.json()).then(i=>_t(i,"Update counter").data),zs=({serverURL:e,lang:t,path:n,page:r,pageSize:s,sortBy:i,signal:l,token:o})=>{const a={};return o&&(a.Authorization=`Bearer ${o}`),fetch(`${Ye(e)}comment?path=${encodeURIComponent(n)}&pageSize=${s}&page=${r}&lang=${t}&sortBy=${i}`,{signal:l,headers:a}).then(c=>c.json()).then(c=>_t(c,"Get comment data").data)},Fs=({serverURL:e,lang:t,token:n,comment:r})=>{const s={"Content-Type":"application/json"};return n&&(s.Authorization=`Bearer ${n}`),fetch(`${Ye(e)}comment?lang=${t}`,{method:"POST",headers:s,body:JSON.stringify(r)}).then(i=>i.json())},Ds=({serverURL:e,lang:t,token:n,objectId:r})=>fetch(`${Ye(e)}comment/${r}?lang=${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${n}`}}).then(s=>s.json()).then(s=>_t(s,"Delete comment")),tn=({serverURL:e,lang:t,token:n,objectId:r,comment:s})=>fetch(`${Ye(e)}comment/${r}?lang=${t}`,{method:"PUT",headers:{...js,Authorization:`Bearer ${n}`},body:JSON.stringify(s)}).then(i=>i.json()).then(i=>_t(i,"Update comment")),Hs=({serverURL:e,lang:t,paths:n,signal:r})=>fetch(`${Ye(e)}comment?type=count&url=${encodeURIComponent(n.join(","))}&lang=${t}`,{signal:r}).then(s=>s.json()).then(s=>_t(s,"Get comment count").data),Us=({lang:e,serverURL:t})=>{const n=(window.innerWidth-450)/2,r=(window.innerHeight-450)/2,s=window.open(`${t.replace(/\/$/,"")}/ui/login?lng=${encodeURIComponent(e)}`,"_blank",`width=450,height=450,left=${n},top=${r},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);return s==null||s.postMessage({type:"TOKEN",data:null},"*"),new Promise(i=>{const l=({data:o})=>{!o||typeof o!="object"||o.type!=="userInfo"||o.data.token&&(s==null||s.close(),window.removeEventListener("message",l),i(o.data))};window.addEventListener("message",l)})},Ns=({serverURL:e,lang:t,paths:n,signal:r})=>Tr({serverURL:e,lang:t,paths:n,type:["time"],signal:r}),Vs=e=>zn({...e,type:"time",action:"inc"}),Bs=({serverURL:e,lang:t,count:n,signal:r,token:s})=>{const i={};return s&&(i.Authorization=`Bearer ${s}`),fetch(`${Ye(e)}comment?type=recent&count=${n}&lang=${t}`,{signal:r,headers:i}).then(l=>l.json())},Ws=({serverURL:e,signal:t,pageSize:n,lang:r})=>fetch(`${Ye(e)}user?pageSize=${n}&lang=${r}`,{signal:t}).then(s=>s.json()).then(s=>_t(s,"user list")).then(s=>s.data),Io=["nick","mail","link"],qs=e=>e.filter(t=>Io.includes(t)),Ks=["//unpkg.com/@waline/emojis@1.1.0/weibo"],Lo=["//unpkg.com/@waline/emojis/tieba/tieba_agree.png","//unpkg.com/@waline/emojis/tieba/tieba_look_down.png","//unpkg.com/@waline/emojis/tieba/tieba_sunglasses.png","//unpkg.com/@waline/emojis/tieba/tieba_pick_nose.png","//unpkg.com/@waline/emojis/tieba/tieba_awkward.png","//unpkg.com/@waline/emojis/tieba/tieba_sleep.png"],Mo=e=>new Promise((t,n)=>{if(e.size>128e3)return n(new Error("File too large! File size limit 128KB"));const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=n}),Po=e=>e?'

    TeX is not available in preview

    ':'TeX is not available in preview',Oo=e=>{const t=async(n,r={})=>fetch(`https://api.giphy.com/v1/gifs/${n}?${new URLSearchParams({lang:e,limit:"20",rating:"g",api_key:"6CIMLkNMMOhRcXPoMCPkFy4Ybk2XUiMp",...r}).toString()}`).then(s=>s.json()).then(({data:s})=>s.map(i=>({title:i.title,src:i.images.downsized_medium.url})));return{search:n=>t("search",{q:n,offset:"0"}),default:()=>t("trending",{}),more:(n,r=0)=>t("search",{q:n,offset:r.toString()})}},jo=/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/,zo=/{let t=0;return e.replace(Ho,(n,r,s)=>{if(s)return`${s}`;if(r==="<")return"<";let i;Ir[r]?i=Ir[r]:(i=Gs[t],Ir[r]=i);const l=`${r}`;return t=++t%Gs.length,l})},No=["nick","nickError","mail","mailError","link","optional","placeholder","sofa","submit","like","cancelLike","reply","cancelReply","comment","refresh","more","preview","emoji","uploadImage","seconds","minutes","hours","days","now","uploading","login","logout","admin","sticky","word","wordHint","anonymous","level0","level1","level2","level3","level4","level5","gif","gifSearchPlaceholder","profile","approved","waiting","spam","unsticky","oldest","latest","hottest","reactionTitle"],Be=e=>Object.fromEntries(e.map((t,n)=>[No[n],t]));var Vo=Be(["Benutzername","Der Benutzername darf nicht weniger als 3 Bytes umfassen.","E-Mail","Bitte bestätigen Sie Ihre E-Mail-Adresse.","Webseite","Optional","Kommentieren Sie hier...","Noch keine Kommentare.","Senden","Gefällt mir","Gefällt mir nicht mehr","Antworten","Antwort abbrechen","Kommentare","Aktualisieren","Mehr laden...","Vorschau","Emoji","Ein Bild hochladen","Vor einigen Sekunden","Vor einigen Minuten","Vor einigen Stunden","Vor einigen Tagen","Gerade eben","Hochladen läuft","Anmelden","Abmelden","Admin","Angeheftet","Wörter","Bitte geben Sie Kommentare zwischen $0 und $1 Wörtern ein! Aktuelle Anzahl der Wörter: $2","Anonym","Zwerge","Hobbits","Ents","Magier","Elfen","Maïar","GIF","Nach einem GIF suchen","Profil","Genehmigt","Ausstehend","Spam","Lösen","Älteste","Neueste","Am beliebtesten","Was denken Sie?"]),Zs=Be(["NickName","NickName cannot be less than 3 bytes.","E-Mail","Please confirm your email address.","Website","Optional","Comment here...","No comment yet.","Submit","Like","Cancel like","Reply","Cancel reply","Comments","Refresh","Load More...","Preview","Emoji","Upload Image","seconds ago","minutes ago","hours ago","days ago","just now","Uploading","Login","logout","Admin","Sticky","Words",`Please input comments between $0 and $1 words! - Current word number: $2`,"Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest","What do you think?"]),Js=Be(["Nombre de usuario","El nombre de usuario no puede tener menos de 3 bytes.","Correo electrónico","Por favor confirma tu dirección de correo electrónico.","Sitio web","Opcional","Comenta aquí...","Sin comentarios todavía.","Enviar","Like","Anular like","Responder","Anular respuesta","Comentarios","Recargar","Cargar Más...","Previsualizar","Emoji","Subir Imagen","segundos atrás","minutos atrás","horas atrás","días atrás","justo ahora","Subiendo","Iniciar sesión","cerrar sesión","Admin","Fijado","Palabras",`Por favor escriba entre $0 y $1 palabras! - El número actual de palabras: $2`,"Anónimo","Enanos","Hobbits","Ents","Magos","Elfos","Maiar","GIF","Buscar GIF","Perfil","Aprobado","Esperando","Spam","Desfijar","Más antiguos","Más recientes","Más vistos","¿Qué piensas?"]),Ys=Be(["Pseudo","Le pseudo ne peut pas faire moins de 3 octets.","E-mail","Veuillez confirmer votre adresse e-mail.","Site Web","Optionnel","Commentez ici...","Aucun commentaire pour l'instant.","Envoyer","J'aime","Annuler le j'aime","Répondre","Annuler la réponse","Commentaires","Actualiser","Charger plus...","Aperçu","Emoji","Télécharger une image","Il y a quelques secondes","Il y a quelques minutes","Il y a quelques heures","Il y a quelques jours","À l'instant","Téléchargement en cours","Connexion","Déconnexion","Admin","Épinglé","Mots",`Veuillez saisir des commentaires entre $0 et $1 mots ! - Nombre actuel de mots : $2`,"Anonyme","Nains","Hobbits","Ents","Mages","Elfes","Maïar","GIF","Rechercher un GIF","Profil","Approuvé","En attente","Indésirable","Détacher","Le plus ancien","Dernier","Le plus populaire","Qu'en pensez-vous ?"]),Qs=Be(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード",`コメントは $0 から $1 ワードの間でなければなりません! - 現在の単語番号: $2`,"匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順","どう思いますか?"]),Bo=Be(["Apelido","Apelido não pode ser menor que 3 bytes.","E-Mail","Por favor, confirme seu endereço de e-mail.","Website","Opcional","Comente aqui...","Nenhum comentário, ainda.","Enviar","Like","Cancel like","Responder","Cancelar resposta","Comentários","Refrescar","Carregar Mais...","Visualizar","Emoji","Enviar Imagem","segundos atrás","minutos atrás","horas atrás","dias atrás","agora mesmo","Enviando","Entrar","Sair","Admin","Sticky","Palavras",`Favor enviar comentário com $0 a $1 palavras! - Número de palavras atuais: $2`,"Anônimo","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Pesquisar GIF","informação pessoal","Aprovado","Espera","Spam","Unsticky","Mais velho","Mais recentes","Mais quente","O que você acha?"]),Xs=Be(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова",`Пожалуйста, введите комментарии от $0 до $1 слов! -Номер текущего слова: $2`,"Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий","Что вы думаете?"]),ei=Be(["Tên","Tên không được nhỏ hơn 3 ký tự.","E-Mail","Vui lòng xác nhập địa chỉ email của bạn.","Website","Tùy chọn","Hãy bình luận có văn hoá!","Chưa có bình luận","Gửi","Thích","Bỏ thích","Trả lời","Hủy bỏ","bình luận","Làm mới","Tải thêm...","Xem trước","Emoji","Tải lên hình ảnh","giây trước","phút trước","giờ trước","ngày trước","Vừa xong","Đang tải lên","Đăng nhập","đăng xuất","Quản trị viên","Dính","từ",`Bình luận phải có độ dài giữa $0 và $1 từ! - Số từ hiện tại: $2`,"Vô danh","Người lùn","Người tí hon","Thần rừng","Pháp sư","Tiên tộc","Maiar","Ảnh GIF","Tìm kiếm ảnh GIF","thông tin cá nhân","Đã được phê duyệt","Đang chờ đợi","Thư rác","Không dính","lâu đời nhất","muộn nhất","nóng nhất","What do you think?"]),ti=Be(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字",`评论字数应在 $0 到 $1 字之间! -当前字数:$2`,"匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度","你认为这篇文章怎么样?"]),Wo=Be(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎留言","來發留言吧~","送出","喜歡","取消喜歡","回覆","取消回覆","留言","重整","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登入","登出","管理者","置頂","字",`留言字數應在 $0 到 $1 字之間! -目前字數:$2`,"匿名","潛水","冒泡","吐槽","活躍","多話","傳說","表情包","搜尋表情包","個人資料","通過","待審核","垃圾","取消置頂","最早","最新","熱門","你認為這篇文章怎麼樣?"]);const ni="en-US",Fn={zh:ti,"zh-cn":ti,"zh-tw":Wo,en:Zs,"en-us":Zs,fr:Ys,"fr-fr":Ys,jp:Qs,"jp-jp":Qs,"pt-br":Bo,ru:Xs,"ru-ru":Xs,vi:ei,"vi-vn":ei,de:Vo,es:Js,"es-mx":Js},ri=e=>Fn[e.toLowerCase()]||Fn[ni.toLowerCase()],si=e=>Object.keys(Fn).includes(e.toLowerCase())?e:ni,ii={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},qo=Object.keys(ii),Dn=Symbol("waline-config"),li=e=>{try{e=decodeURI(e)}catch{}return e},oi=(e="")=>e.replace(/\/$/u,""),ai=e=>/^(https?:)?\/\//.test(e),Hn=e=>{const t=oi(e);return ai(t)?t:`https://${t}`},Ko=e=>Array.isArray(e)?e:e?[0,e]:!1,nn=(e,t)=>e==null||e===!0?t:e===!1?null:e,Go=({serverURL:e,path:t=location.pathname,lang:n=typeof navigator>"u"?"en-US":navigator.language,locale:r,meta:s=["nick","mail","link"],requiredMeta:i=[],dark:l=!1,pageSize:o=10,wordLimit:a,noCopyright:c=!1,login:u="enable",recaptchaV3Key:f="",turnstileKey:d="",commentSorting:m="latest",emoji:x=Ks,imageUploader:b,highlighter:E,texRenderer:w,search:$,reaction:H,...I})=>({serverURL:Hn(e),path:li(t),lang:si(n),locale:{...ri(si(n)),...typeof r=="object"?r:{}},wordLimit:Ko(a),meta:qs(s),requiredMeta:qs(i),dark:l,pageSize:o,commentSorting:m,login:u,noCopyright:c,recaptchaV3Key:f,turnstileKey:d,...I,reaction:H===!0?Lo:H||null,imageUploader:nn(b,Mo),highlighter:nn(E,Uo),texRenderer:nn(w,Po),emoji:nn(x,Ks),search:nn($,Oo(n))}),zt=e=>typeof e=="string",Lr="{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bg-color:#1e1e1e;--waline-bg-color-light:#272727;--waline-bg-color-hover: #444;--waline-border-color:#333;--waline-disable-bg-color:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bg-color:#272727;--waline-info-color:#666}",Zo=e=>zt(e)?e==="auto"?`@media(prefers-color-scheme:dark){body${Lr}}`:`${e}${Lr}`:e===!0?`:root${Lr}`:"",Mr=(e,t)=>{let n=e.toString();for(;n.length{const t=Mr(e.getDate(),2),n=Mr(e.getMonth()+1,2);return`${Mr(e.getFullYear(),2)}-${n}-${t}`},Yo=(e,t,n)=>{if(!e)return"";const r=zt(e)?new Date(e.includes(" ")?e.replace(/-/g,"/"):e):e,s=t.getTime()-r.getTime(),i=Math.floor(s/(24*3600*1e3));if(i===0){const l=s%864e5,o=Math.floor(l/(3600*1e3));if(o===0){const a=l%36e5,c=Math.floor(a/(60*1e3));if(c===0){const u=a%6e4;return`${Math.round(u/1e3)} ${n.seconds}`}return`${c} ${n.minutes}`}return`${o} ${n.hours}`}return i<0?n.now:i<8?`${i} ${n.days}`:Jo(r)},Qo=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Xo=e=>Qo.test(e);/** -* @vue/shared v3.5.17 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Pr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ce={},Ft=[],$t=()=>{},ea=()=>!1,Un=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Or=e=>e.startsWith("onUpdate:"),je=Object.assign,ci=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ta=Object.prototype.hasOwnProperty,re=(e,t)=>ta.call(e,t),K=Array.isArray,Dt=e=>rn(e)==="[object Map]",Ht=e=>rn(e)==="[object Set]",ui=e=>rn(e)==="[object Date]",se=e=>typeof e=="function",we=e=>typeof e=="string",We=e=>typeof e=="symbol",de=e=>e!==null&&typeof e=="object",fi=e=>(de(e)||se(e))&&se(e.then)&&se(e.catch),hi=Object.prototype.toString,rn=e=>hi.call(e),na=e=>rn(e).slice(8,-1),pi=e=>rn(e)==="[object Object]",jr=e=>we(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,sn=Pr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ra=/-(\w)/g,ze=Nn(e=>e.replace(ra,(t,n)=>n?n.toUpperCase():"")),sa=/\B([A-Z])/g,Ct=Nn(e=>e.replace(sa,"-$1").toLowerCase()),Vn=Nn(e=>e.charAt(0).toUpperCase()+e.slice(1)),zr=Nn(e=>e?`on${Vn(e)}`:""),ct=(e,t)=>!Object.is(e,t),Bn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Wn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let di;const ln=()=>di||(di=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function on(e){if(K(e)){const t={};for(let n=0;n{if(n){const r=n.split(la);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function be(e){let t="";if(we(e))t=e;else if(K(e))for(let n=0;nSt(n,t))}const mi=e=>!!(e&&e.__v_isRef===!0),ee=e=>we(e)?e:e==null?"":K(e)||de(e)&&(e.toString===hi||!se(e.toString))?mi(e)?ee(e.value):JSON.stringify(e,vi,2):String(e),vi=(e,t)=>mi(t)?vi(e,t.value):Dt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Hr(r,i)+" =>"]=s,n),{})}:Ht(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hr(n))}:We(t)?Hr(t):de(t)&&!K(t)&&!pi(t)?String(t):t,Hr=(e,t="")=>{var n;return We(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.17 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let _e;class ha{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_e,!t&&_e&&(this.index=(_e.scopes||(_e.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(_e=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(cn){let t=cn;for(cn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;an;){let t=an;for(an=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function xi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _i(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Wr(r),da(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Br(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($i(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $i(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===un)||(e.globalVersion=un,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Br(e))))return;e.flags|=2;const t=e.dep,n=he,r=Ne;he=e,Ne=!0;try{xi(e);const s=e.fn(e._value);(t.version===0||ct(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{he=n,Ne=r,_i(e),e.flags&=-3}}function Wr(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Wr(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function da(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ne=!0;const Ci=[];function ut(){Ci.push(Ne),Ne=!1}function ft(){const e=Ci.pop();Ne=e===void 0?!0:e}function Si(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=he;he=void 0;try{t()}finally{he=n}}}let un=0;class ga{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!he||!Ne||he===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==he)n=this.activeLink=new ga(he,this),he.deps?(n.prevDep=he.depsTail,he.depsTail.nextDep=n,he.depsTail=n):he.deps=he.depsTail=n,Ri(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=he.depsTail,n.nextDep=void 0,he.depsTail.nextDep=n,he.depsTail=n,he.deps===n&&(he.deps=r)}return n}trigger(t){this.version++,un++,this.notify(t)}notify(t){Nr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Vr()}}}function Ri(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)Ri(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Kn=new WeakMap,Rt=Symbol(""),qr=Symbol(""),fn=Symbol("");function $e(e,t,n){if(Ne&&he){let r=Kn.get(e);r||Kn.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new qn),s.map=r,s.key=n),s.track()}}function Qe(e,t,n,r,s,i){const l=Kn.get(e);if(!l){un++;return}const o=a=>{a&&a.trigger()};if(Nr(),t==="clear")l.forEach(o);else{const a=K(e),c=a&&jr(n);if(a&&n==="length"){const u=Number(r);l.forEach((f,d)=>{(d==="length"||d===fn||!We(d)&&d>=u)&&o(f)})}else switch((n!==void 0||l.has(void 0))&&o(l.get(n)),c&&o(l.get(fn)),t){case"add":a?c&&o(l.get("length")):(o(l.get(Rt)),Dt(e)&&o(l.get(qr)));break;case"delete":a||(o(l.get(Rt)),Dt(e)&&o(l.get(qr)));break;case"set":Dt(e)&&o(l.get(Rt));break}}Vr()}function ma(e,t){const n=Kn.get(e);return n&&n.get(t)}function Ut(e){const t=te(e);return t===e?t:($e(t,"iterate",fn),Fe(e)?t:t.map(xe))}function Gn(e){return $e(e=te(e),"iterate",fn),e}const va={__proto__:null,[Symbol.iterator](){return Kr(this,Symbol.iterator,xe)},concat(...e){return Ut(this).concat(...e.map(t=>K(t)?Ut(t):t))},entries(){return Kr(this,"entries",e=>(e[1]=xe(e[1]),e))},every(e,t){return Xe(this,"every",e,t,void 0,arguments)},filter(e,t){return Xe(this,"filter",e,t,n=>n.map(xe),arguments)},find(e,t){return Xe(this,"find",e,t,xe,arguments)},findIndex(e,t){return Xe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xe(this,"findLast",e,t,xe,arguments)},findLastIndex(e,t){return Xe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xe(this,"forEach",e,t,void 0,arguments)},includes(...e){return Gr(this,"includes",e)},indexOf(...e){return Gr(this,"indexOf",e)},join(e){return Ut(this).join(e)},lastIndexOf(...e){return Gr(this,"lastIndexOf",e)},map(e,t){return Xe(this,"map",e,t,void 0,arguments)},pop(){return hn(this,"pop")},push(...e){return hn(this,"push",e)},reduce(e,...t){return Ai(this,"reduce",e,t)},reduceRight(e,...t){return Ai(this,"reduceRight",e,t)},shift(){return hn(this,"shift")},some(e,t){return Xe(this,"some",e,t,void 0,arguments)},splice(...e){return hn(this,"splice",e)},toReversed(){return Ut(this).toReversed()},toSorted(e){return Ut(this).toSorted(e)},toSpliced(...e){return Ut(this).toSpliced(...e)},unshift(...e){return hn(this,"unshift",e)},values(){return Kr(this,"values",xe)}};function Kr(e,t,n){const r=Gn(e),s=r[t]();return r!==e&&!Fe(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=n(i.value)),i}),s}const ba=Array.prototype;function Xe(e,t,n,r,s,i){const l=Gn(e),o=l!==e&&!Fe(e),a=l[t];if(a!==ba[t]){const f=a.apply(e,i);return o?xe(f):f}let c=n;l!==e&&(o?c=function(f,d){return n.call(this,xe(f),d,e)}:n.length>2&&(c=function(f,d){return n.call(this,f,d,e)}));const u=a.call(l,c,r);return o&&s?s(u):u}function Ai(e,t,n,r){const s=Gn(e);let i=n;return s!==e&&(Fe(e)?n.length>3&&(i=function(l,o,a){return n.call(this,l,o,a,e)}):i=function(l,o,a){return n.call(this,l,xe(o),a,e)}),s[t](i,...r)}function Gr(e,t,n){const r=te(e);$e(r,"iterate",fn);const s=r[t](...n);return(s===-1||s===!1)&&Jr(n[0])?(n[0]=te(n[0]),r[t](...n)):s}function hn(e,t,n=[]){ut(),Nr();const r=te(e)[t].apply(e,n);return Vr(),ft(),r}const ya=Pr("__proto__,__v_isRef,__isVue"),Ei=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(We));function wa(e){We(e)||(e=String(e));const t=te(this);return $e(t,"has",e),t.hasOwnProperty(e)}class Ti{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?ji:Oi:i?Pi:Mi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const l=K(t);if(!s){let a;if(l&&(a=va[n]))return a;if(n==="hasOwnProperty")return wa}const o=Reflect.get(t,n,ye(t)?t:r);return(We(n)?Ei.has(n):ya(n))||(s||$e(t,"get",n),i)?o:ye(o)?l&&jr(n)?o:o.value:de(o)?s?Nt(o):pn(o):o}}class Ii extends Ti{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const a=ht(i);if(!Fe(r)&&!ht(r)&&(i=te(i),r=te(r)),!K(t)&&ye(i)&&!ye(r))return a?!1:(i.value=r,!0)}const l=K(t)&&jr(n)?Number(n)e,Zn=e=>Reflect.getPrototypeOf(e);function Ca(e,t,n){return function(...r){const s=this.__v_raw,i=te(s),l=Dt(i),o=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=s[e](...r),u=n?Zr:t?Xn:xe;return!t&&$e(i,"iterate",a?qr:Rt),{next(){const{value:f,done:d}=c.next();return d?{value:f,done:d}:{value:o?[u(f[0]),u(f[1])]:u(f),done:d}},[Symbol.iterator](){return this}}}}function Jn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Sa(e,t){const n={get(s){const i=this.__v_raw,l=te(i),o=te(s);e||(ct(s,o)&&$e(l,"get",s),$e(l,"get",o));const{has:a}=Zn(l),c=t?Zr:e?Xn:xe;if(a.call(l,s))return c(i.get(s));if(a.call(l,o))return c(i.get(o));i!==l&&i.get(s)},get size(){const s=this.__v_raw;return!e&&$e(te(s),"iterate",Rt),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,l=te(i),o=te(s);return e||(ct(s,o)&&$e(l,"has",s),$e(l,"has",o)),s===o?i.has(s):i.has(s)||i.has(o)},forEach(s,i){const l=this,o=l.__v_raw,a=te(o),c=t?Zr:e?Xn:xe;return!e&&$e(a,"iterate",Rt),o.forEach((u,f)=>s.call(i,c(u),c(f),l))}};return je(n,e?{add:Jn("add"),set:Jn("set"),delete:Jn("delete"),clear:Jn("clear")}:{add(s){!t&&!Fe(s)&&!ht(s)&&(s=te(s));const i=te(this);return Zn(i).has.call(i,s)||(i.add(s),Qe(i,"add",s,s)),this},set(s,i){!t&&!Fe(i)&&!ht(i)&&(i=te(i));const l=te(this),{has:o,get:a}=Zn(l);let c=o.call(l,s);c||(s=te(s),c=o.call(l,s));const u=a.call(l,s);return l.set(s,i),c?ct(i,u)&&Qe(l,"set",s,i):Qe(l,"add",s,i),this},delete(s){const i=te(this),{has:l,get:o}=Zn(i);let a=l.call(i,s);a||(s=te(s),a=l.call(i,s)),o&&o.call(i,s);const c=i.delete(s);return a&&Qe(i,"delete",s,void 0),c},clear(){const s=te(this),i=s.size!==0,l=s.clear();return i&&Qe(s,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Ca(s,e,t)}),n}function Yn(e,t){const n=Sa(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(re(n,s)&&s in r?n:r,s,i)}const Ra={get:Yn(!1,!1)},Aa={get:Yn(!1,!0)},Ea={get:Yn(!0,!1)},Ta={get:Yn(!0,!0)},Mi=new WeakMap,Pi=new WeakMap,Oi=new WeakMap,ji=new WeakMap;function Ia(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function La(e){return e.__v_skip||!Object.isExtensible(e)?0:Ia(na(e))}function pn(e){return ht(e)?e:Qn(e,!1,ka,Ra,Mi)}function Ma(e){return Qn(e,!1,_a,Aa,Pi)}function Nt(e){return Qn(e,!0,xa,Ea,Oi)}function Pa(e){return Qn(e,!0,$a,Ta,ji)}function Qn(e,t,n,r,s){if(!de(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=La(e);if(i===0)return e;const l=s.get(e);if(l)return l;const o=new Proxy(e,i===2?r:n);return s.set(e,o),o}function Vt(e){return ht(e)?Vt(e.__v_raw):!!(e&&e.__v_isReactive)}function ht(e){return!!(e&&e.__v_isReadonly)}function Fe(e){return!!(e&&e.__v_isShallow)}function Jr(e){return e?!!e.__v_raw:!1}function te(e){const t=e&&e.__v_raw;return t?te(t):e}function Oa(e){return!re(e,"__v_skip")&&Object.isExtensible(e)&&Fr(e,"__v_skip",!0),e}const xe=e=>de(e)?pn(e):e,Xn=e=>de(e)?Nt(e):e;function ye(e){return e?e.__v_isRef===!0:!1}function ae(e){return zi(e,!1)}function At(e){return zi(e,!0)}function zi(e,t){return ye(e)?e:new ja(e,t)}class ja{constructor(t,n){this.dep=new qn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:te(t),this._value=n?t:xe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Fe(t)||ht(t);t=r?t:te(t),ct(t,n)&&(this._rawValue=t,this._value=r?t:xe(t),this.dep.trigger())}}function G(e){return ye(e)?e.value:e}function Ie(e){return se(e)?e():G(e)}const za={get:(e,t,n)=>t==="__v_raw"?e:G(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return ye(s)&&!ye(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function Fi(e){return Vt(e)?e:new Proxy(e,za)}class Fa{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new qn,{get:r,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Da(e){return new Fa(e)}class Ha{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return ma(te(this._object),this._key)}}class Ua{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Na(e,t,n){return ye(e)?e:se(e)?new Ua(e):de(e)&&arguments.length>1?Va(e,t,n):ae(e)}function Va(e,t,n){const r=e[t];return ye(r)?r:new Ha(e,t,n)}class Ba{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=un-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return ki(this,!0),!0}get value(){const t=this.dep.track();return $i(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Wa(e,t,n=!1){let r,s;return se(e)?r=e:(r=e.get,s=e.set),new Ba(r,s,n)}const er={},tr=new WeakMap;let Et;function qa(e,t=!1,n=Et){if(n){let r=tr.get(n);r||tr.set(n,r=[]),r.push(e)}}function Ka(e,t,n=ce){const{immediate:r,deep:s,once:i,scheduler:l,augmentJob:o,call:a}=n,c=I=>s?I:Fe(I)||s===!1||s===0?et(I,1):et(I);let u,f,d,m,x=!1,b=!1;if(ye(e)?(f=()=>e.value,x=Fe(e)):Vt(e)?(f=()=>c(e),x=!0):K(e)?(b=!0,x=e.some(I=>Vt(I)||Fe(I)),f=()=>e.map(I=>{if(ye(I))return I.value;if(Vt(I))return c(I);if(se(I))return a?a(I,2):I()})):se(e)?t?f=a?()=>a(e,2):e:f=()=>{if(d){ut();try{d()}finally{ft()}}const I=Et;Et=u;try{return a?a(e,3,[m]):e(m)}finally{Et=I}}:f=$t,t&&s){const I=f,P=s===!0?1/0:s;f=()=>et(I(),P)}const E=bi(),w=()=>{u.stop(),E&&E.active&&ci(E.effects,u)};if(i&&t){const I=t;t=(...P)=>{I(...P),w()}}let $=b?new Array(e.length).fill(er):er;const H=I=>{if(!(!(u.flags&1)||!u.dirty&&!I))if(t){const P=u.run();if(s||x||(b?P.some((W,Z)=>ct(W,$[Z])):ct(P,$))){d&&d();const W=Et;Et=u;try{const Z=[P,$===er?void 0:b&&$[0]===er?[]:$,m];$=P,a?a(t,3,Z):t(...Z)}finally{Et=W}}}else u.run()};return o&&o(H),u=new yi(f),u.scheduler=l?()=>l(H,!1):H,m=I=>qa(I,!1,u),d=u.onStop=()=>{const I=tr.get(u);if(I){if(a)a(I,4);else for(const P of I)P();tr.delete(u)}},t?r?H(!0):$=u.run():l?l(H.bind(null,!0),!0):u.run(),w.pause=u.pause.bind(u),w.resume=u.resume.bind(u),w.stop=w,w}function et(e,t=1/0,n){if(t<=0||!de(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,ye(e))et(e.value,t,n);else if(K(e))for(let r=0;r{et(r,t,n)});else if(pi(e)){for(const r in e)et(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&et(e[r],t,n)}return e}/** -* @vue/runtime-core v3.5.17 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function dn(e,t,n,r){try{return r?e(...r):e()}catch(s){nr(s,t,n)}}function tt(e,t,n,r){if(se(e)){const s=dn(e,t,n,r);return s&&fi(s)&&s.catch(i=>{nr(i,t,n)}),s}if(K(e)){const s=[];for(let i=0;i>>1,s=Se[r],i=gn(s);i=gn(n)?Se.push(e):Se.splice(Za(t),0,e),e.flags|=1,Hi()}}function Hi(){rr||(rr=Di.then(Vi))}function Ja(e){K(e)?Bt.push(...e):pt&&e.id===-1?pt.splice(Wt+1,0,e):e.flags&1||(Bt.push(e),e.flags|=1),Hi()}function Ui(e,t,n=qe+1){for(;ngn(n)-gn(r));if(Bt.length=0,pt){pt.push(...t);return}for(pt=t,Wt=0;Wte.id==null?e.flags&2?-1:1/0:e.id;function Vi(e){try{for(qe=0;qe{r._d&&cl(-1);const i=sr(t);let l;try{l=e(...s)}finally{sr(i),r._d&&cl(1)}return l};return r._n=!0,r._c=!0,r._d=!0,r}function ir(e,t){if(Ee===null)return e;const n=hr(Ee),r=e.dirs||(e.dirs=[]);for(let s=0;se.__isTeleport;function Qr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Qr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function mn(e,t){return se(e)?je({name:e.name},t,{setup:e}):e}function ec(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function dt(e){const t=hl(),n=At(null);if(t){const s=t.refs===ce?t.refs={}:t.refs;Object.defineProperty(s,e,{enumerable:!0,get:()=>n.value,set:i=>n.value=i})}return n}function vn(e,t,n,r,s=!1){if(K(e)){e.forEach((x,b)=>vn(x,t&&(K(t)?t[b]:t),n,r,s));return}if(bn(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&vn(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?hr(r.component):r.el,l=s?null:i,{i:o,r:a}=e,c=t&&t.r,u=o.refs===ce?o.refs={}:o.refs,f=o.setupState,d=te(f),m=f===ce?()=>!1:x=>re(d,x);if(c!=null&&c!==a&&(we(c)?(u[c]=null,m(c)&&(f[c]=null)):ye(c)&&(c.value=null)),se(a))dn(a,o,12,[l,u]);else{const x=we(a),b=ye(a);if(x||b){const E=()=>{if(e.f){const w=x?m(a)?f[a]:u[a]:a.value;s?K(w)&&ci(w,i):K(w)?w.includes(i)||w.push(i):x?(u[a]=[i],m(a)&&(f[a]=u[a])):(a.value=[i],e.k&&(u[e.k]=a.value))}else x?(u[a]=l,m(a)&&(f[a]=l)):b&&(a.value=l,e.k&&(u[e.k]=l))};l?(E.id=-1,Le(E,n)):E()}}}ln().requestIdleCallback,ln().cancelIdleCallback;const bn=e=>!!e.type.__asyncLoader,tc=e=>e.type.__isKeepAlive;function nc(e,t,n=Re,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{ut();const o=us(n),a=tt(t,n,e,l);return o(),ft(),a});return r?s.unshift(i):s.push(i),i}}const Xr=e=>(t,n=Re)=>{(!$n||e==="sp")&&nc(e,(...r)=>t(...r),n)},yn=Xr("m"),rc=Xr("bum"),es=Xr("um"),sc="components";function ic(e,t){return oc(sc,e,!0,t)||e}const lc=Symbol.for("v-ndc");function oc(e,t,n=!0,r=!1){const s=Ee||Re;if(s){const i=s.type;{const o=Bc(i,!1);if(o&&(o===t||o===ze(t)||o===Vn(ze(t))))return i}const l=Wi(s[e]||i[e],t)||Wi(s.appContext[e],t);return!l&&r?i:l}}function Wi(e,t){return e&&(e[t]||e[ze(t)]||e[Vn(ze(t))])}function De(e,t,n,r){let s;const i=n,l=K(e);if(l||we(e)){const o=l&&Vt(e);let a=!1,c=!1;o&&(a=!Fe(e),c=ht(e),e=Gn(e)),s=new Array(e.length);for(let u=0,f=e.length;ut(o,a,void 0,i));else{const o=Object.keys(e);s=new Array(o.length);for(let a=0,c=o.length;ae?dl(e)?hr(e):ts(e.parent):null,wn=je(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ts(e.parent),$root:e=>ts(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{Yr(e.update)}),$nextTick:e=>e.n||(e.n=qt.bind(e.proxy)),$watch:e=>$t}),ns=(e,t)=>e!==ce&&!e.__isScriptSetup&&re(e,t),ac={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:l,type:o,appContext:a}=e;let c;if(t[0]!=="$"){const m=l[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(ns(r,t))return l[t]=1,r[t];if(s!==ce&&re(s,t))return l[t]=2,s[t];if((c=e.propsOptions[0])&&re(c,t))return l[t]=3,i[t];if(n!==ce&&re(n,t))return l[t]=4,n[t];l[t]=0}}const u=wn[t];let f,d;if(u)return t==="$attrs"&&$e(e.attrs,"get",""),u(e);if((f=o.__cssModules)&&(f=f[t]))return f;if(n!==ce&&re(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,re(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return ns(s,t)?(s[t]=n,!0):r!==ce&&re(r,t)?(r[t]=n,!0):re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},l){let o;return!!n[l]||e!==ce&&re(e,l)||ns(t,l)||(o=i[0])&&re(o,l)||re(r,l)||re(wn,l)||re(s.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:re(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function qi(){return{app:null,config:{isNativeTag:ea,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let cc=0;function uc(e,t){return function(r,s=null){se(r)||(r=je({},r)),s!=null&&!de(s)&&(s=null);const i=qi(),l=new WeakSet,o=[];let a=!1;const c=i.app={_uid:cc++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:qc,get config(){return i.config},set config(u){},use(u,...f){return l.has(u)||(u&&se(u.install)?(l.add(u),u.install(c,...f)):se(u)&&(l.add(u),u(c,...f))),c},mixin(u){return c},component(u,f){return f?(i.components[u]=f,c):i.components[u]},directive(u,f){return f?(i.directives[u]=f,c):i.directives[u]},mount(u,f,d){if(!a){const m=c._ceVNode||ue(r,s);return m.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),e(m,u,d),a=!0,c._container=u,u.__vue_app__=c,hr(m.component)}},onUnmount(u){o.push(u)},unmount(){a&&(tt(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return i.provides[u]=f,c},runWithContext(u){const f=Kt;Kt=c;try{return u()}finally{Kt=f}}};return c}}let Kt=null;function fc(e,t){if(Re){let n=Re.provides;const r=Re.parent&&Re.parent.provides;r===n&&(n=Re.provides=Object.create(r)),n[e]=t}}function lr(e,t,n=!1){const r=Re||Ee;if(r||Kt){let s=Kt?Kt._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&se(t)?t.call(r&&r.proxy):t}}const Ki={},Gi=()=>Object.create(Ki),Zi=e=>Object.getPrototypeOf(e)===Ki;function hc(e,t,n,r=!1){const s={},i=Gi();e.propsDefaults=Object.create(null),Ji(e,t,s,i);for(const l in e.propsOptions[0])l in s||(s[l]=void 0);n?e.props=r?s:Ma(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function pc(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:l}}=e,o=te(s),[a]=e.propsOptions;let c=!1;if((r||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let f=0;fe[0]==="_"||e==="$stable",is=e=>K(e)?e.map(Ke):[Ke(e)],gc=(e,t,n)=>{if(t._n)return t;const r=Ya((...s)=>is(t(...s)),n);return r._c=!1,r},Qi=(e,t,n)=>{const r=e._ctx;for(const s in e){if(ss(s))continue;const i=e[s];if(se(i))t[s]=gc(s,i,r);else if(i!=null){const l=is(i);t[s]=()=>l}}},Xi=(e,t)=>{const n=is(t);e.slots.default=()=>n},el=(e,t,n)=>{for(const r in t)(n||!ss(r))&&(e[r]=t[r])},mc=(e,t,n)=>{const r=e.slots=Gi();if(e.vnode.shapeFlag&32){const s=t.__;s&&Fr(r,"__",s,!0);const i=t._;i?(el(r,t,n),n&&Fr(r,"_",i,!0)):Qi(t,r)}else t&&Xi(e,t)},vc=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,l=ce;if(r.shapeFlag&32){const o=t._;o?n&&o===1?i=!1:el(s,t,n):(i=!t.$stable,Qi(t,s)),l=t}else t&&(Xi(e,t),l={default:1});if(i)for(const o in s)!ss(o)&&l[o]==null&&delete s[o]};function bc(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(ln().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const Le=Lc;function yc(e){return wc(e)}function wc(e,t){bc();const n=ln();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:l,createText:o,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:d,setScopeId:m=$t,insertStaticContent:x}=e,b=(h,p,g,y=null,k=null,v=null,A=void 0,C=null,S=!!p.dynamicChildren)=>{if(h===p)return;h&&!_n(h,p)&&(y=xt(h),Ue(h,k,v,!0),h=null),p.patchFlag===-2&&(S=!1,p.dynamicChildren=null);const{type:_,ref:D,shapeFlag:T}=p;switch(_){case ar:E(h,p,g,y);break;case mt:w(h,p,g,y);break;case os:h==null&&$(p,g,y,A);break;case pe:Y(h,p,g,y,k,v,A,C,S);break;default:T&1?P(h,p,g,y,k,v,A,C,S):T&6?V(h,p,g,y,k,v,A,C,S):(T&64||T&128)&&_.process(h,p,g,y,k,v,A,C,S,R)}D!=null&&k?vn(D,h&&h.ref,v,p||h,!p):D==null&&h&&h.ref!=null&&vn(h.ref,null,v,h,!0)},E=(h,p,g,y)=>{if(h==null)r(p.el=o(p.children),g,y);else{const k=p.el=h.el;p.children!==h.children&&c(k,p.children)}},w=(h,p,g,y)=>{h==null?r(p.el=a(p.children||""),g,y):p.el=h.el},$=(h,p,g,y)=>{[h.el,h.anchor]=x(h.children,p,g,y,h.el,h.anchor)},H=({el:h,anchor:p},g,y)=>{let k;for(;h&&h!==p;)k=d(h),r(h,g,y),h=k;r(p,g,y)},I=({el:h,anchor:p})=>{let g;for(;h&&h!==p;)g=d(h),s(h),h=g;s(p)},P=(h,p,g,y,k,v,A,C,S)=>{p.type==="svg"?A="svg":p.type==="math"&&(A="mathml"),h==null?W(p,g,y,k,v,A,C,S):ke(h,p,k,v,A,C,S)},W=(h,p,g,y,k,v,A,C)=>{let S,_;const{props:D,shapeFlag:T,transition:j,dirs:B}=h;if(S=h.el=l(h.type,v,D&&D.is,D),T&8?u(S,h.children):T&16&&N(h.children,S,null,y,k,ls(h,v),A,C),B&&Tt(h,null,y,"created"),Z(S,h,h.scopeId,A,y),D){for(const oe in D)oe!=="value"&&!sn(oe)&&i(S,oe,null,D[oe],v,y);"value"in D&&i(S,"value",null,D.value,v),(_=D.onVnodeBeforeMount)&&Ge(_,y,h)}B&&Tt(h,null,y,"beforeMount");const J=kc(k,j);J&&j.beforeEnter(S),r(S,p,g),((_=D&&D.onVnodeMounted)||J||B)&&Le(()=>{_&&Ge(_,y,h),J&&j.enter(S),B&&Tt(h,null,y,"mounted")},k)},Z=(h,p,g,y,k)=>{if(g&&m(h,g),y)for(let v=0;v{for(let _=S;_{const C=p.el=h.el;let{patchFlag:S,dynamicChildren:_,dirs:D}=p;S|=h.patchFlag&16;const T=h.props||ce,j=p.props||ce;let B;if(g&&It(g,!1),(B=j.onVnodeBeforeUpdate)&&Ge(B,g,p,h),D&&Tt(p,h,g,"beforeUpdate"),g&&It(g,!0),(T.innerHTML&&j.innerHTML==null||T.textContent&&j.textContent==null)&&u(C,""),_?me(h.dynamicChildren,_,C,g,y,ls(p,k),v):A||at(h,p,C,null,g,y,ls(p,k),v,!1),S>0){if(S&16)U(C,T,j,g,k);else if(S&2&&T.class!==j.class&&i(C,"class",null,j.class,k),S&4&&i(C,"style",T.style,j.style,k),S&8){const J=p.dynamicProps;for(let oe=0;oe{B&&Ge(B,g,p,h),D&&Tt(p,h,g,"updated")},y)},me=(h,p,g,y,k,v,A)=>{for(let C=0;C{if(p!==g){if(p!==ce)for(const v in p)!sn(v)&&!(v in g)&&i(h,v,p[v],null,k,y);for(const v in g){if(sn(v))continue;const A=g[v],C=p[v];A!==C&&v!=="value"&&i(h,v,C,A,k,y)}"value"in g&&i(h,"value",p.value,g.value,k)}},Y=(h,p,g,y,k,v,A,C,S)=>{const _=p.el=h?h.el:o(""),D=p.anchor=h?h.anchor:o("");let{patchFlag:T,dynamicChildren:j,slotScopeIds:B}=p;B&&(C=C?C.concat(B):B),h==null?(r(_,g,y),r(D,g,y),N(p.children||[],g,D,k,v,A,C,S)):T>0&&T&64&&j&&h.dynamicChildren?(me(h.dynamicChildren,j,g,k,v,A,C),(p.key!=null||k&&p===k.subTree)&&tl(h,p,!0)):at(h,p,g,D,k,v,A,C,S)},V=(h,p,g,y,k,v,A,C,S)=>{p.slotScopeIds=C,h==null?p.shapeFlag&512?k.ctx.activate(p,g,y,A,S):F(p,g,y,k,v,A,S):Q(h,p,S)},F=(h,p,g,y,k,v,A)=>{const C=h.component=Dc(h,y,k);if(tc(h)&&(C.ctx.renderer=R),Hc(C,!1,A),C.asyncDep){if(k&&k.registerDep(C,ne,A),!h.el){const S=C.subTree=ue(mt);w(null,S,p,g)}}else ne(C,h,p,g,k,v,A)},Q=(h,p,g)=>{const y=p.component=h.component;if(Tc(h,p,g))if(y.asyncDep&&!y.asyncResolved){Je(y,p,g);return}else y.next=p,y.update();else p.el=h.el,y.vnode=p},ne=(h,p,g,y,k,v,A)=>{const C=()=>{if(h.isMounted){let{next:T,bu:j,u:B,parent:J,vnode:oe}=h;{const Xt=nl(h);if(Xt){T&&(T.el=oe.el,Je(h,T,A)),Xt.asyncDep.then(()=>{h.isUnmounted||C()});return}}let fe=T,Pe;It(h,!1),T?(T.el=oe.el,Je(h,T,A)):T=oe,j&&Bn(j),(Pe=T.props&&T.props.onVnodeBeforeUpdate)&&Ge(Pe,J,T,oe),It(h,!0);const Ce=ll(h),Oe=h.subTree;h.subTree=Ce,b(Oe,Ce,f(Oe.el),xt(Oe),h,k,v),T.el=Ce.el,fe===null&&Ic(h,Ce.el),B&&Le(B,k),(Pe=T.props&&T.props.onVnodeUpdated)&&Le(()=>Ge(Pe,J,T,oe),k)}else{let T;const{props:j}=p,{bm:B,m:J,parent:oe,root:fe,type:Pe}=h,Ce=bn(p);It(h,!1),B&&Bn(B),!Ce&&(T=j&&j.onVnodeBeforeMount)&&Ge(T,oe,p),It(h,!0);{fe.ce&&fe.ce._def.shadowRoot!==!1&&fe.ce._injectChildStyle(Pe);const Oe=h.subTree=ll(h);b(null,Oe,g,y,h,k,v),p.el=Oe.el}if(J&&Le(J,k),!Ce&&(T=j&&j.onVnodeMounted)){const Oe=p;Le(()=>Ge(T,oe,Oe),k)}(p.shapeFlag&256||oe&&bn(oe.vnode)&&oe.vnode.shapeFlag&256)&&h.a&&Le(h.a,k),h.isMounted=!0,p=g=y=null}};h.scope.on();const S=h.effect=new yi(C);h.scope.off();const _=h.update=S.run.bind(S),D=h.job=S.runIfDirty.bind(S);D.i=h,D.id=h.uid,S.scheduler=()=>Yr(D),It(h,!0),_()},Je=(h,p,g)=>{p.component=h;const y=h.vnode.props;h.vnode=p,h.next=null,pc(h,p.props,y,g),vc(h,p.children,g),ut(),Ui(h),ft()},at=(h,p,g,y,k,v,A,C,S=!1)=>{const _=h&&h.children,D=h?h.shapeFlag:0,T=p.children,{patchFlag:j,shapeFlag:B}=p;if(j>0){if(j&128){Pn(_,T,g,y,k,v,A,C,S);return}else if(j&256){Qt(_,T,g,y,k,v,A,C,S);return}}B&8?(D&16&&kt(_,k,v),T!==_&&u(g,T)):D&16?B&16?Pn(_,T,g,y,k,v,A,C,S):kt(_,k,v,!0):(D&8&&u(g,""),B&16&&N(T,g,y,k,v,A,C,S))},Qt=(h,p,g,y,k,v,A,C,S)=>{h=h||Ft,p=p||Ft;const _=h.length,D=p.length,T=Math.min(_,D);let j;for(j=0;jD?kt(h,k,v,!0,!1,T):N(p,g,y,k,v,A,C,S,T)},Pn=(h,p,g,y,k,v,A,C,S)=>{let _=0;const D=p.length;let T=h.length-1,j=D-1;for(;_<=T&&_<=j;){const B=h[_],J=p[_]=S?vt(p[_]):Ke(p[_]);if(_n(B,J))b(B,J,g,null,k,v,A,C,S);else break;_++}for(;_<=T&&_<=j;){const B=h[T],J=p[j]=S?vt(p[j]):Ke(p[j]);if(_n(B,J))b(B,J,g,null,k,v,A,C,S);else break;T--,j--}if(_>T){if(_<=j){const B=j+1,J=Bj)for(;_<=T;)Ue(h[_],k,v,!0),_++;else{const B=_,J=_,oe=new Map;for(_=J;_<=j;_++){const Te=p[_]=S?vt(p[_]):Ke(p[_]);Te.key!=null&&oe.set(Te.key,_)}let fe,Pe=0;const Ce=j-J+1;let Oe=!1,Xt=0;const en=new Array(Ce);for(_=0;_=Ce){Ue(Te,k,v,!0);continue}let Ve;if(Te.key!=null)Ve=oe.get(Te.key);else for(fe=J;fe<=j;fe++)if(en[fe-J]===0&&_n(Te,p[fe])){Ve=fe;break}Ve===void 0?Ue(Te,k,v,!0):(en[Ve-J]=_+1,Ve>=Xt?Xt=Ve:Oe=!0,b(Te,p[Ve],g,null,k,v,A,C,S),Pe++)}const Ms=Oe?xc(en):Ft;for(fe=Ms.length-1,_=Ce-1;_>=0;_--){const Te=J+_,Ve=p[Te],Ps=Te+1{const{el:v,type:A,transition:C,children:S,shapeFlag:_}=h;if(_&6){Ot(h.component.subTree,p,g,y);return}if(_&128){h.suspense.move(p,g,y);return}if(_&64){A.move(h,p,g,R);return}if(A===pe){r(v,p,g);for(let T=0;TC.enter(v),k);else{const{leave:T,delayLeave:j,afterLeave:B}=C,J=()=>{h.ctx.isUnmounted?s(v):r(v,p,g)},oe=()=>{T(v,()=>{J(),B&&B()})};j?j(v,J,oe):oe()}else r(v,p,g)},Ue=(h,p,g,y=!1,k=!1)=>{const{type:v,props:A,ref:C,children:S,dynamicChildren:_,shapeFlag:D,patchFlag:T,dirs:j,cacheIndex:B}=h;if(T===-2&&(k=!1),C!=null&&(ut(),vn(C,null,g,h,!0),ft()),B!=null&&(p.renderCache[B]=void 0),D&256){p.ctx.deactivate(h);return}const J=D&1&&j,oe=!bn(h);let fe;if(oe&&(fe=A&&A.onVnodeBeforeUnmount)&&Ge(fe,p,h),D&6)jn(h.component,g,y);else{if(D&128){h.suspense.unmount(g,y);return}J&&Tt(h,null,p,"beforeUnmount"),D&64?h.type.remove(h,p,g,R,y):_&&!_.hasOnce&&(v!==pe||T>0&&T&64)?kt(_,p,g,!1,!0):(v===pe&&T&384||!k&&D&16)&&kt(S,p,g),y&&On(h)}(oe&&(fe=A&&A.onVnodeUnmounted)||J)&&Le(()=>{fe&&Ge(fe,p,h),J&&Tt(h,null,p,"unmounted")},g)},On=h=>{const{type:p,el:g,anchor:y,transition:k}=h;if(p===pe){Er(g,y);return}if(p===os){I(h);return}const v=()=>{s(g),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if(h.shapeFlag&1&&k&&!k.persisted){const{leave:A,delayLeave:C}=k,S=()=>A(g,v);C?C(h.el,v,S):S()}else v()},Er=(h,p)=>{let g;for(;h!==p;)g=d(h),s(h),h=g;s(p)},jn=(h,p,g)=>{const{bum:y,scope:k,job:v,subTree:A,um:C,m:S,a:_,parent:D,slots:{__:T}}=h;rl(S),rl(_),y&&Bn(y),D&&K(T)&&T.forEach(j=>{D.renderCache[j]=void 0}),k.stop(),v&&(v.flags|=8,Ue(A,h,p,g)),C&&Le(C,p),Le(()=>{h.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},kt=(h,p,g,y=!1,k=!1,v=0)=>{for(let A=v;A{if(h.shapeFlag&6)return xt(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const p=d(h.anchor||h.el),g=p&&p[Qa];return g?d(g):p};let jt=!1;const O=(h,p,g)=>{h==null?p._vnode&&Ue(p._vnode,null,null,!0):b(p._vnode||null,h,p,null,null,null,g),p._vnode=h,jt||(jt=!0,Ui(),Ni(),jt=!1)},R={p:b,um:Ue,m:Ot,r:On,mt:F,mc:N,pc:at,pbc:me,n:xt,o:e};return{render:O,hydrate:void 0,createApp:uc(O)}}function ls({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function It({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function kc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function tl(e,t,n=!1){const r=e.children,s=t.children;if(K(r)&&K(s))for(let i=0;i>1,e[n[o]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function nl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:nl(t)}function rl(e){if(e)for(let t=0;tlr(_c);function sl(e,t){return il(e,null,t)}function gt(e,t,n){return il(e,t,n)}function il(e,t,n=ce){const{immediate:r,flush:s}=n,i=je({},n),l=t&&r||!t&&s!=="post";let o;if($n){if(s==="sync"){const f=$c();o=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=$t,f.resume=$t,f.pause=$t,f}}const a=Re;i.call=(f,d,m)=>tt(f,a,d,m);let c=!1;s==="post"?i.scheduler=f=>{Le(f,a&&a.suspense)}:s!=="sync"&&(c=!0,i.scheduler=(f,d)=>{d?f():Yr(f)}),i.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,a&&(f.id=a.uid,f.i=a))};const u=Ka(e,t,i);return $n&&(o?o.push(u):l&&u()),u}const Cc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ze(t)}Modifiers`]||e[`${Ct(t)}Modifiers`];function Sc(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ce;let s=n;const i=t.startsWith("update:"),l=i&&Cc(r,t.slice(7));l&&(l.trim&&(s=n.map(u=>we(u)?u.trim():u)),l.number&&(s=n.map(Wn)));let o,a=r[o=zr(t)]||r[o=zr(ze(t))];!a&&i&&(a=r[o=zr(Ct(t))]),a&&tt(a,e,6,s);const c=r[o+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,tt(c,e,6,s)}}function Rc(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let l={};return i?(K(i)?i.forEach(o=>l[o]=null):je(l,i),de(e)&&r.set(e,l),l):(de(e)&&r.set(e,null),null)}function or(e,t){return!e||!Un(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,Ct(t))||re(e,t))}function ll(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:l,attrs:o,emit:a,render:c,renderCache:u,props:f,data:d,setupState:m,ctx:x,inheritAttrs:b}=e,E=sr(e);let w,$;try{if(n.shapeFlag&4){const I=s||r,P=I;w=Ke(c.call(P,I,u,f,m,d,x)),$=o}else{const I=t;w=Ke(I.length>1?I(f,{attrs:o,slots:l,emit:a}):I(f,null)),$=t.props?o:Ac(o)}}catch(I){kn.length=0,nr(I,e,1),w=ue(mt)}let H=w;if($&&b!==!1){const I=Object.keys($),{shapeFlag:P}=H;I.length&&P&7&&(i&&I.some(Or)&&($=Ec($,i)),H=Gt(H,$,!1,!0))}return n.dirs&&(H=Gt(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition&&Qr(H,n.transition),w=H,sr(E),w}const Ac=e=>{let t;for(const n in e)(n==="class"||n==="style"||Un(n))&&((t||(t={}))[n]=e[n]);return t},Ec=(e,t)=>{const n={};for(const r in e)(!Or(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Tc(e,t,n){const{props:r,children:s,component:i}=e,{props:l,children:o,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?ol(r,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function Lc(e,t){t&&t.pendingBranch?K(e)?t.effects.push(...e):t.effects.push(e):Ja(e)}const pe=Symbol.for("v-fgt"),ar=Symbol.for("v-txt"),mt=Symbol.for("v-cmt"),os=Symbol.for("v-stc"),kn=[];let Me=null;function L(e=!1){kn.push(Me=e?null:[])}function Mc(){kn.pop(),Me=kn[kn.length-1]||null}let xn=1;function cl(e,t=!1){xn+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function ul(e){return e.dynamicChildren=xn>0?Me||Ft:null,Mc(),xn>0&&Me&&Me.push(e),e}function M(e,t,n,r,s,i){return ul(z(e,t,n,r,s,i,!0))}function nt(e,t,n,r,s){return ul(ue(e,t,n,r,s,!0))}function cr(e){return e?e.__v_isVNode===!0:!1}function _n(e,t){return e.type===t.type&&e.key===t.key}const fl=({key:e})=>e??null,ur=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?we(e)||ye(e)||se(e)?{i:Ee,r:e,k:t,f:!!n}:e:null);function z(e,t=null,n=null,r=0,s=null,i=e===pe?0:1,l=!1,o=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&fl(t),ref:t&&ur(t),scopeId:Bi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ee};return o?(as(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=we(n)?8:16),xn>0&&!l&&Me&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Me.push(a),a}const ue=Pc;function Pc(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===lc)&&(e=mt),cr(e)){const o=Gt(e,t,!0);return n&&as(o,n),xn>0&&!i&&Me&&(o.shapeFlag&6?Me[Me.indexOf(e)]=o:Me.push(o)),o.patchFlag=-2,o}if(Wc(e)&&(e=e.__vccOpts),t){t=Oc(t);let{class:o,style:a}=t;o&&!we(o)&&(t.class=be(o)),de(a)&&(Jr(a)&&!K(a)&&(a=je({},a)),t.style=on(a))}const l=we(e)?1:al(e)?128:Xa(e)?64:de(e)?4:se(e)?2:0;return z(e,t,n,r,s,l,i,!0)}function Oc(e){return e?Jr(e)||Zi(e)?je({},e):e:null}function Gt(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:l,children:o,transition:a}=e,c=t?jc(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&fl(c),ref:t&&t.ref?n&&i?K(i)?i.concat(ur(t)):[i,ur(t)]:ur(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==pe?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&Qr(u,a.clone(u)),u}function rt(e=" ",t=0){return ue(ar,null,e,t)}function X(e="",t=!1){return t?(L(),nt(mt,null,e)):ue(mt,null,e)}function Ke(e){return e==null||typeof e=="boolean"?ue(mt):K(e)?ue(pe,null,e.slice()):cr(e)?vt(e):ue(ar,null,String(e))}function vt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function as(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(K(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),as(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Zi(t)?t._ctx=Ee:s===3&&Ee&&(Ee.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else se(t)?(t={default:t,_ctx:Ee},n=32):(t=String(t),r&64?(n=16,t=[rt(t)]):n=8);e.children=t,e.shapeFlag|=n}function jc(...e){const t={};for(let n=0;nRe||Ee;let fr,cs;{const e=ln(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(l=>l(i)):s[0](i)}};fr=t("__VUE_INSTANCE_SETTERS__",n=>Re=n),cs=t("__VUE_SSR_SETTERS__",n=>$n=n)}const us=e=>{const t=Re;return fr(e),e.scope.on(),()=>{e.scope.off(),fr(t)}},pl=()=>{Re&&Re.scope.off(),fr(null)};function dl(e){return e.vnode.shapeFlag&4}let $n=!1;function Hc(e,t=!1,n=!1){t&&cs(t);const{props:r,children:s}=e.vnode,i=dl(e);hc(e,r,i,t),mc(e,s,n||t);const l=i?Uc(e,t):void 0;return t&&cs(!1),l}function Uc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ac);const{setup:r}=n;if(r){ut();const s=e.setupContext=r.length>1?Vc(e):null,i=us(e),l=dn(r,e,0,[e.props,s]),o=fi(l);if(ft(),i(),(o||e.sp)&&!bn(e)&&ec(e),o){if(l.then(pl,pl),t)return l.then(a=>{gl(e,a,t)}).catch(a=>{nr(a,e,0)});e.asyncDep=l}else gl(e,l,t)}else vl(e,t)}function gl(e,t,n){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:de(t)&&(e.setupState=Fi(t)),vl(e,n)}let ml;function vl(e,t,n){const r=e.type;if(!e.render){if(!t&&ml&&!r.render){const s=r.template||!1;if(s){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:o,compilerOptions:a}=r,c=je(je({isCustomElement:i,delimiters:o},l),a);r.render=ml(s,c)}}e.render=r.render||$t}}const Nc={get(e,t){return $e(e,"get",""),e[t]}};function Vc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Nc),slots:e.slots,emit:e.emit,expose:t}}function hr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Fi(Oa(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in wn)return wn[n](e)},has(t,n){return n in t||n in wn}})):e.proxy}function Bc(e,t=!0){return se(e)?e.displayName||e.name:e.name||t&&e.__name}function Wc(e){return se(e)&&"__vccOpts"in e}const ve=(e,t)=>Wa(e,t,$n);function ie(e,t,n){const r=arguments.length;return r===2?de(t)&&!K(t)?cr(t)?ue(e,null,[t]):ue(e,t):ue(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&cr(n)&&(n=[n]),ue(e,t,n))}const qc="3.5.17";/** -* @vue/runtime-dom v3.5.17 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let fs;const bl=typeof window<"u"&&window.trustedTypes;if(bl)try{fs=bl.createPolicy("vue",{createHTML:e=>e})}catch{}const yl=fs?e=>fs.createHTML(e):e=>e,Kc="http://www.w3.org/2000/svg",Gc="http://www.w3.org/1998/Math/MathML",st=typeof document<"u"?document:null,wl=st&&st.createElement("template"),Zc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?st.createElementNS(Kc,e):t==="mathml"?st.createElementNS(Gc,e):n?st.createElement(e,{is:n}):st.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>st.createTextNode(e),createComment:e=>st.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>st.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const l=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{wl.innerHTML=yl(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const o=wl.content;if(r==="svg"||r==="mathml"){const a=o.firstChild;for(;a.firstChild;)o.appendChild(a.firstChild);o.removeChild(a)}t.insertBefore(o,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Jc=Symbol("_vtc");function Yc(e,t,n){const r=e[Jc];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const pr=Symbol("_vod"),kl=Symbol("_vsh"),xl={beforeMount(e,{value:t},{transition:n}){e[pr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Cn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Cn(e,!0),r.enter(e)):r.leave(e,()=>{Cn(e,!1)}):Cn(e,t))},beforeUnmount(e,{value:t}){Cn(e,t)}};function Cn(e,t){e.style.display=t?e[pr]:"none",e[kl]=!t}const Qc=Symbol(""),Xc=/(^|;)\s*display\s*:/;function eu(e,t,n){const r=e.style,s=we(n);let i=!1;if(n&&!s){if(t)if(we(t))for(const l of t.split(";")){const o=l.slice(0,l.indexOf(":")).trim();n[o]==null&&dr(r,o,"")}else for(const l in t)n[l]==null&&dr(r,l,"");for(const l in n)l==="display"&&(i=!0),dr(r,l,n[l])}else if(s){if(t!==n){const l=r[Qc];l&&(n+=";"+l),r.cssText=n,i=Xc.test(n)}}else t&&e.removeAttribute("style");pr in e&&(e[pr]=i?r.display:"",e[kl]&&(r.display="none"))}const _l=/\s*!important$/;function dr(e,t,n){if(K(n))n.forEach(r=>dr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=tu(e,t);_l.test(n)?e.setProperty(Ct(r),n.replace(_l,""),"important"):e[r]=n}}const $l=["Webkit","Moz","ms"],hs={};function tu(e,t){const n=hs[t];if(n)return n;let r=ze(t);if(r!=="filter"&&r in e)return hs[t]=r;r=Vn(r);for(let s=0;s<$l.length;s++){const i=$l[s]+r;if(i in e)return hs[t]=i}return t}const Cl="http://www.w3.org/1999/xlink";function Sl(e,t,n,r,s,i=ua(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Cl,t.slice(6,t.length)):e.setAttributeNS(Cl,t,n):n==null||i&&!gi(n)?e.removeAttribute(t):e.setAttribute(t,i?"":We(n)?String(n):n)}function Rl(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?yl(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const o=i==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(o!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let l=!1;if(n===""||n==null){const o=typeof e[t];o==="boolean"?n=gi(n):n==null&&o==="string"?(n="",l=!0):o==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(s||t)}function it(e,t,n,r){e.addEventListener(t,n,r)}function nu(e,t,n,r){e.removeEventListener(t,n,r)}const Al=Symbol("_vei");function ru(e,t,n,r,s=null){const i=e[Al]||(e[Al]={}),l=i[t];if(r&&l)l.value=r;else{const[o,a]=su(t);if(r){const c=i[t]=ou(r,s);it(e,o,c,a)}else l&&(nu(e,o,l,a),i[t]=void 0)}}const El=/(?:Once|Passive|Capture)$/;function su(e){let t;if(El.test(e)){t={};let r;for(;r=e.match(El);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ct(e.slice(2)),t]}let ps=0;const iu=Promise.resolve(),lu=()=>ps||(iu.then(()=>ps=0),ps=Date.now());function ou(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;tt(au(r,n.value),t,5,[r])};return n.value=e,n.attached=lu(),n}function au(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Tl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cu=(e,t,n,r,s,i)=>{const l=s==="svg";t==="class"?Yc(e,r,l):t==="style"?eu(e,n,r):Un(t)?Or(t)||ru(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):uu(e,t,r,l))?(Rl(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Sl(e,t,r,l,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!we(r))?Rl(e,ze(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Sl(e,t,r,l))};function uu(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Tl(t)&&se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Tl(t)&&we(n)?!1:t in e}const bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return K(t)?n=>Bn(t,n):t};function fu(e){e.target.composing=!0}function Il(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const He=Symbol("_assign"),ds={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[He]=bt(s);const i=r||s.props&&s.props.type==="number";it(e,t?"change":"input",l=>{if(l.target.composing)return;let o=e.value;n&&(o=o.trim()),i&&(o=Wn(o)),e[He](o)}),n&&it(e,"change",()=>{e.value=e.value.trim()}),t||(it(e,"compositionstart",fu),it(e,"compositionend",Il),it(e,"change",Il))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},l){if(e[He]=bt(l),e.composing)return;const o=(i||e.type==="number")&&!/^0\d/.test(e.value)?Wn(e.value):e.value,a=t??"";o!==a&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===a)||(e.value=a))}},hu={deep:!0,created(e,t,n){e[He]=bt(n),it(e,"change",()=>{const r=e._modelValue,s=Zt(e),i=e.checked,l=e[He];if(K(r)){const o=Dr(r,s),a=o!==-1;if(i&&!a)l(r.concat(s));else if(!i&&a){const c=[...r];c.splice(o,1),l(c)}}else if(Ht(r)){const o=new Set(r);i?o.add(s):o.delete(s),l(o)}else l(Pl(e,i))})},mounted:Ll,beforeUpdate(e,t,n){e[He]=bt(n),Ll(e,t,n)}};function Ll(e,{value:t,oldValue:n},r){e._modelValue=t;let s;if(K(t))s=Dr(t,r.props.value)>-1;else if(Ht(t))s=t.has(r.props.value);else{if(t===n)return;s=St(t,Pl(e,!0))}e.checked!==s&&(e.checked=s)}const pu={created(e,{value:t},n){e.checked=St(t,n.props.value),e[He]=bt(n),it(e,"change",()=>{e[He](Zt(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[He]=bt(r),t!==n&&(e.checked=St(t,r.props.value))}},du={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=Ht(t);it(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?Wn(Zt(l)):Zt(l));e[He](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,qt(()=>{e._assigning=!1})}),e[He]=bt(r)},mounted(e,{value:t}){Ml(e,t)},beforeUpdate(e,t,n){e[He]=bt(n)},updated(e,{value:t}){e._assigning||Ml(e,t)}};function Ml(e,t){const n=e.multiple,r=K(t);if(!(n&&!r&&!Ht(t))){for(let s=0,i=e.options.length;sString(c)===String(o)):l.selected=Dr(t,o)>-1}else l.selected=t.has(o);else if(St(Zt(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zt(e){return"_value"in e?e._value:e.value}function Pl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const gu={created(e,t,n){gr(e,t,n,null,"created")},mounted(e,t,n){gr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){gr(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){gr(e,t,n,r,"updated")}};function mu(e,t){switch(e){case"SELECT":return du;case"TEXTAREA":return ds;default:switch(t){case"checkbox":return hu;case"radio":return pu;default:return ds}}}function gr(e,t,n,r,s){const l=mu(e.tagName,n.props&&n.props.type)[s];l&&l(e,t,n,r)}const vu=je({patchProp:cu},Zc);let Ol;function bu(){return Ol||(Ol=yc(vu))}const yu=(...e)=>{const t=bu().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=ku(r);if(!s)return;const i=t._component;!se(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const l=n(s,!1,wu(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t};function wu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ku(e){return we(e)?document.querySelector(e):e}function Sn(e){return bi()?(pa(e),!0):!1}const mr=typeof window<"u"&&typeof document<"u",xu=Object.prototype.toString,_u=e=>xu.call(e)==="[object Object]",vr=()=>{};function $u(...e){if(e.length!==1)return Na(...e);const t=e[0];return typeof t=="function"?Nt(Da(()=>({get:t,set:vr}))):ae(t)}function jl(e,t){function n(...r){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(i)})}return n}const zl=e=>e();function Cu(e,t={}){let n,r,s=vr;const i=a=>{clearTimeout(a),s(),s=vr};let l;return a=>{const c=Ie(e),u=Ie(t.maxWait);return n&&i(n),c<=0||u!==void 0&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(a())):new Promise((f,d)=>{s=t.rejectOnCancel?d:f,l=a,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,f(l())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,f(a())},c)})}}function Su(e=zl,t={}){const{initialState:n="active"}=t,r=$u(n==="active");function s(){r.value=!1}function i(){r.value=!0}const l=(...o)=>{r.value&&e(...o)};return{isActive:Nt(r),pause:s,resume:i,eventFilter:l}}function gs(e){return Array.isArray(e)?e:[e]}function Fl(e){return hl()}function Ru(e,t=200,n={}){return jl(Cu(t,n),e)}function Au(e,t,n={}){const{eventFilter:r=zl,...s}=n;return gt(e,jl(r,t),s)}function Eu(e,t,n={}){const{eventFilter:r,initialState:s="active",...i}=n,{eventFilter:l,pause:o,resume:a,isActive:c}=Su(r,{initialState:s});return{stop:Au(e,t,{...i,eventFilter:l}),pause:o,resume:a,isActive:c}}function ms(e,t=!0,n){Fl()?yn(e,n):t?e():qt(e)}function Tu(e,t){Fl()&&es(e,t)}function Iu(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const l=At(!1);function o(){i&&(clearInterval(i),i=null)}function a(){l.value=!1,o()}function c(){const u=Ie(t);u<=0||(l.value=!0,s&&e(),o(),l.value&&(i=setInterval(e,u)))}if(r&&mr&&c(),ye(t)||typeof t=="function"){const u=gt(t,()=>{l.value&&mr&&c()});Sn(u)}return Sn(a),{isActive:Pa(l),pause:a,resume:c}}function Jt(e,t,n){return gt(e,t,{...n,immediate:!0})}const br=mr?window:void 0,Dl=mr?window.document:void 0;function Lu(e){var t;const n=Ie(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Lt(...e){const t=[],n=()=>{t.forEach(o=>o()),t.length=0},r=(o,a,c,u)=>(o.addEventListener(a,c,u),()=>o.removeEventListener(a,c,u)),s=ve(()=>{const o=gs(Ie(e[0])).filter(a=>a!=null);return o.every(a=>typeof a!="string")?o:void 0}),i=Jt(()=>{var o,a;return[(a=(o=s.value)==null?void 0:o.map(c=>Lu(c)))!=null?a:[br].filter(c=>c!=null),gs(Ie(s.value?e[1]:e[0])),gs(G(s.value?e[2]:e[1])),Ie(s.value?e[3]:e[2])]},([o,a,c,u])=>{if(n(),!(o!=null&&o.length)||!(a!=null&&a.length)||!(c!=null&&c.length))return;const f=_u(u)?{...u}:u;t.push(...o.flatMap(d=>a.flatMap(m=>c.map(x=>r(d,m,x,f)))))},{flush:"post"}),l=()=>{i(),n()};return Sn(n),l}function Mu(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:s=br,once:i=!1}=t,l=At(!1),o=ve(()=>r?1e3/Ie(r):null);let a=0,c=null;function u(m){if(!l.value||!s)return;a||(a=m);const x=m-a;if(o.value&&xe==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Hl="vueuse-storage";function Yt(e,t,n,r={}){var s;const{flush:i="pre",deep:l=!0,listenToStorageChanges:o=!0,writeDefaults:a=!0,mergeDefaults:c=!1,shallow:u,window:f=br,eventFilter:d,onError:m=F=>{console.error(F)},initOnMounted:x}=r,b=(u?At:ae)(typeof t=="function"?t():t),E=ve(()=>Ie(e));if(!n)try{n=ju("getDefaultStorage",()=>{var F;return(F=br)==null?void 0:F.localStorage})()}catch(F){m(F)}if(!n)return b;const w=Ie(t),$=zu(w),H=(s=r.serializer)!=null?s:Fu[$],{pause:I,resume:P}=Eu(b,()=>me(b.value),{flush:i,deep:l,eventFilter:d});gt(E,()=>Y(),{flush:i});let W=!1;const Z=F=>{x&&!W||Y(F)},N=F=>{x&&!W||V(F)};f&&o&&(n instanceof Storage?Lt(f,"storage",Z,{passive:!0}):Lt(f,Hl,N)),x?ms(()=>{W=!0,Y()}):Y();function ke(F,Q){if(f){const ne={key:E.value,oldValue:F,newValue:Q,storageArea:n};f.dispatchEvent(n instanceof Storage?new StorageEvent("storage",ne):new CustomEvent(Hl,{detail:ne}))}}function me(F){try{const Q=n.getItem(E.value);if(F==null)ke(Q,null),n.removeItem(E.value);else{const ne=H.write(F);Q!==ne&&(n.setItem(E.value,ne),ke(Q,ne))}}catch(Q){m(Q)}}function U(F){const Q=F?F.newValue:n.getItem(E.value);if(Q==null)return a&&w!=null&&n.setItem(E.value,H.write(w)),w;if(!F&&c){const ne=H.read(Q);return typeof c=="function"?c(ne,w):$==="object"&&!Array.isArray(ne)?{...w,...ne}:ne}else return typeof Q!="string"?Q:H.read(Q)}function Y(F){if(!(F&&F.storageArea!==n)){if(F&&F.key==null){b.value=w;return}if(!(F&&F.key!==E.value)){I();try{(F==null?void 0:F.newValue)!==H.write(b.value)&&(b.value=U(F))}catch(Q){m(Q)}finally{F?qt(P):P()}}}}function V(F){Y(F.detail)}return b}function Du(e={}){const{controls:t=!1,interval:n="requestAnimationFrame",immediate:r=!0}=e,s=ae(new Date),i=()=>s.value=new Date,l=n==="requestAnimationFrame"?Mu(i,{immediate:r}):Iu(i,n,{immediate:r});return t?{now:s,...l}:s}function Hu(e,t=vr,n={}){const{immediate:r=!0,manual:s=!1,type:i="text/javascript",async:l=!0,crossOrigin:o,referrerPolicy:a,noModule:c,defer:u,document:f=Dl,attrs:d={},nonce:m=void 0}=n,x=At(null);let b=null;const E=H=>new Promise((I,P)=>{const W=me=>(x.value=me,I(me),me);if(!f){I(!1);return}let Z=!1,N=f.querySelector(`script[src="${Ie(e)}"]`);N?N.hasAttribute("data-loaded")&&W(N):(N=f.createElement("script"),N.type=i,N.async=l,N.src=Ie(e),u&&(N.defer=u),o&&(N.crossOrigin=o),c&&(N.noModule=c),a&&(N.referrerPolicy=a),m&&(N.nonce=m),Object.entries(d).forEach(([me,U])=>N==null?void 0:N.setAttribute(me,U)),Z=!0);const ke={passive:!0};Lt(N,"error",me=>P(me),ke),Lt(N,"abort",me=>P(me),ke),Lt(N,"load",()=>{N.setAttribute("data-loaded","true"),t(N),W(N)},ke),Z&&(N=f.head.appendChild(N)),H||W(N)}),w=(H=!0)=>(b||(b=E(H)),b),$=()=>{if(!f)return;b=null,x.value&&(x.value=null);const H=f.querySelector(`script[src="${Ie(e)}"]`);H&&f.head.removeChild(H)};return r&&!s&&ms(w),s||Tu($),{scriptTag:x,load:w,unload:$}}let Uu=0;function Nu(e,t={}){const n=At(!1),{document:r=Dl,immediate:s=!0,manual:i=!1,id:l=`vueuse_styletag_${++Uu}`}=t,o=At(e);let a=()=>{};const c=()=>{if(!r)return;const f=r.getElementById(l)||r.createElement("style");f.isConnected||(f.id=l,t.nonce&&(f.nonce=t.nonce),t.media&&(f.media=t.media),r.head.appendChild(f)),!n.value&&(a=gt(o,d=>{f.textContent=d},{immediate:!0}),n.value=!0)},u=()=>{!r||!n.value||(a(),r.head.removeChild(r.getElementById(l)),n.value=!1)};return s&&!i&&ms(c),i||Sn(u),{id:l,css:o,unload:u,load:c,isLoaded:Nt(n)}}const Vu="WALINE_EMOJI",Ul=Yt(Vu,{}),Bu=e=>!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(e),Wu=e=>{const t=Bu(e);if(t){const n=Ul.value[e];if(n)return Promise.resolve(n)}return fetch(`${e}/info.json`).then(n=>n.json()).then(n=>{const r={folder:e,...n};return t&&(Ul.value[e]=r),r})},Nl=(e,t="",n="",r="")=>`${t?`${t}/`:""}${n}${e}${r?`.${r}`:""}`,qu=e=>Promise.all(e?e.map(t=>zt(t)?Wu(oi(t)):Promise.resolve(t)):[]).then(t=>{const n={tabs:[],map:{}};return t.forEach(r=>{const{name:s,folder:i,icon:l,prefix:o="",type:a,items:c}=r;n.tabs.push({name:s,icon:Nl(l,i,o,a),items:c.map(u=>{const f=`${o}${u}`;return n.map[f]=Nl(u,i,o,a),f})})}),n}),Vl=e=>{e.name!=="AbortError"&&console.error(e.message)},vs=e=>e instanceof HTMLElement?e:zt(e)?document.querySelector(e):null,Ku=e=>e.type.includes("image"),Bl=e=>{const t=Array.from(e).find(Ku);return t?t.getAsFile():null};function bs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mt=bs();function Wl(e){Mt=e}var Rn={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(s,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(Ae.caret,"$1"),n=n.replace(s,l),r},getRegex:()=>new RegExp(n,t)};return r}var Ae={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Gu=/^(?:[ \t]*(?:\n|$))+/,Zu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ju=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,An=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ys=/(?:[*+-]|\d{1,9}[.)])/,ql=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kl=le(ql).replace(/bull/g,ys).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Qu=le(ql).replace(/bull/g,ys).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ws=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xu=/^[^\n]+/,ks=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ef=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ks).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tf=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ys).getRegex(),kr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xs=/|$))/,nf=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xs).replace("tag",kr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gl=le(ws).replace("hr",An).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",kr).getRegex(),rf=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gl).getRegex(),_s={blockquote:rf,code:Zu,def:ef,fences:Ju,heading:Yu,hr:An,html:nf,lheading:Kl,list:tf,newline:Gu,paragraph:Gl,table:Rn,text:Xu},Zl=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",An).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",kr).getRegex(),sf={..._s,lheading:Qu,table:Zl,paragraph:le(ws).replace("hr",An).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",kr).getRegex()},lf={..._s,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xs).replace(/tag/g,"(?!(?: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").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Rn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(ws).replace("hr",An).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},of=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,af=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Jl=/^( {2,}|\\)\n(?!\s*$)/,cf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Xl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,df=le(Xl,"u").replace(/punct/g,xr).getRegex(),gf=le(Xl,"u").replace(/punct/g,Ql).getRegex(),eo="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mf=le(eo,"gu").replace(/notPunctSpace/g,Yl).replace(/punctSpace/g,$s).replace(/punct/g,xr).getRegex(),vf=le(eo,"gu").replace(/notPunctSpace/g,hf).replace(/punctSpace/g,ff).replace(/punct/g,Ql).getRegex(),bf=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yl).replace(/punctSpace/g,$s).replace(/punct/g,xr).getRegex(),yf=le(/\\(punct)/,"gu").replace(/punct/g,xr).getRegex(),wf=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),kf=le(xs).replace("(?:-->|$)","-->").getRegex(),xf=le("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",kf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_r=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_f=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_r).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),to=le(/^!?\[(label)\]\[(ref)\]/).replace("label",_r).replace("ref",ks).getRegex(),no=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",ks).getRegex(),$f=le("reflink|nolink(?!\\()","g").replace("reflink",to).replace("nolink",no).getRegex(),Cs={_backpedal:Rn,anyPunctuation:yf,autolink:wf,blockSkip:pf,br:Jl,code:af,del:Rn,emStrongLDelim:df,emStrongRDelimAst:mf,emStrongRDelimUnd:bf,escape:of,link:_f,nolink:no,punctuation:uf,reflink:to,reflinkSearch:$f,tag:xf,text:cf,url:Rn},Cf={...Cs,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",_r).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_r).getRegex()},Ss={...Cs,emStrongRDelimAst:vf,emStrongLDelim:gf,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ro=e=>Rf[e];function Ze(e,t){if(t){if(Ae.escapeTest.test(e))return e.replace(Ae.escapeReplace,ro)}else if(Ae.escapeTestNoEncode.test(e))return e.replace(Ae.escapeReplaceNoEncode,ro);return e}function so(e){try{e=encodeURI(e).replace(Ae.percentDecode,"%")}catch{return null}return e}function io(e,t){var i;let n=e.replace(Ae.findPipe,(l,o,a)=>{let c=!1,u=o;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Ae.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length0?-2:-1}function lo(e,t,n,r,s){let i=t.href,l=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let a={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,a}function Ef(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(` -`).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[o]=l;return o.length>=s.length?i.slice(s.length):i}).join(` -`)}var Cr=class{options;rules;lexer;constructor(t){this.options=t||Mt}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Tn(r,` -`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],s=Ef(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:s}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let s=Tn(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:Tn(n[0],` -`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=Tn(n[0],` -`).split(` -`),s="",i="",l=[];for(;r.length>0;){let o=!1,a=[],c;for(c=0;c1,i={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let l=this.rules.other.listItemRegex(r),o=!1;for(;t;){let c=!1,u="",f="";if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let d=n[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,$=>" ".repeat(3*$.length)),m=t.split(` -`,1)[0],x=!d.trim(),b=0;if(this.options.pedantic?(b=2,f=d.trimStart()):x?b=n[1].length+1:(b=n[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,f=d.slice(b),b+=n[1].length),x&&this.rules.other.blankLine.test(m)&&(u+=m+` -`,t=t.substring(m.length+1),c=!0),!c){let $=this.rules.other.nextBulletRegex(b),H=this.rules.other.hrRegex(b),I=this.rules.other.fencesBeginRegex(b),P=this.rules.other.headingBeginRegex(b),W=this.rules.other.htmlBeginRegex(b);for(;t;){let Z=t.split(` -`,1)[0],N;if(m=Z,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),N=m):N=m.replace(this.rules.other.tabCharGlobal," "),I.test(m)||P.test(m)||W.test(m)||$.test(m)||H.test(m))break;if(N.search(this.rules.other.nonSpaceChar)>=b||!m.trim())f+=` -`+N.slice(b);else{if(x||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||I.test(d)||P.test(d)||H.test(d))break;f+=` -`+m}!x&&!m.trim()&&(x=!0),u+=Z+` -`,t=t.substring(Z.length+1),d=N.slice(b)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let E=null,w;this.options.gfm&&(E=this.rules.other.listIsTask.exec(f),E&&(w=E[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!E,checked:w,loose:!1,text:f,tokens:[]}),i.raw+=u}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c=0;cd.type==="space"),f=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=f}if(i.loose)for(let c=0;c({text:c,tokens:this.lexer.inline(c),header:!1,align:l.align[u]})));return l}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===` -`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=Tn(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=Af(n[2],"()");if(l===-2)return;if(l>-1){let o=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,o).trim(),n[3]=""}}let s=n[2],i="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),lo(n,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=n[s.toLowerCase()];if(!i){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return lo(r,i,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...s[0]].length-1,l,o,a=i,c=0,u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,n=n.slice(-1*t.length+i);(s=u.exec(n))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(o=[...l].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&i%3&&!((i+o)%3)){c+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+c);let f=[...s[0]][0].length,d=t.slice(0,i+s.index+f+o);if(Math.min(i,o)%2){let x=d.slice(1,-1);return{type:"em",raw:d,text:x,tokens:this.lexer.inlineTokens(x)}}let m=d.slice(2,-2);return{type:"strong",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,s;return n[2]==="@"?(r=n[1],s="mailto:"+r):(r=n[1],s=r),{type:"link",raw:n[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let n;if(n=this.rules.inline.url.exec(t)){let s,i;if(n[2]==="@")s=n[0],i="mailto:"+s;else{let l;do l=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(l!==n[0]);s=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},yt=class Is{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mt,this.options.tokenizer=this.options.tokenizer||new Cr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ae,block:$r.normal,inline:En.normal};this.options.pedantic?(n.block=$r.pedantic,n.inline=En.pedantic):this.options.gfm&&(n.block=$r.gfm,this.options.breaks?n.inline=En.breaks:n.inline=En.gfm),this.tokenizer.rules=n}static get rules(){return{block:$r,inline:En}}static lex(t,n){return new Is(n).lex(t)}static lexInline(t,n){return new Is(n).inlineTokens(t)}lex(t){t=t.replace(Ae.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let n=0;n(o=c.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let c=n.at(-1);o.raw.length===1&&c!==void 0?c.raw+=` -`:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=` -`+o.raw,c.text+=` -`+o.text,this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=` -`+o.raw,c.text+=` -`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}let a=t;if((l=this.options.extensions)!=null&&l.startBlock){let c=1/0,u=t.slice(1),f;this.options.extensions.startBlock.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(a=t.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let c=n.at(-1);r&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=` -`+o.raw,c.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o),r=a.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=` -`+o.raw,c.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var o,a,c;let r=t,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,l="";for(;t;){i||(l=""),i=!1;let u;if((a=(o=this.options.extensions)==null?void 0:o.inline)!=null&&a.some(d=>(u=d.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=n.at(-1);u.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,l)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startInline){let d=1/0,m=t.slice(1),x;this.options.extensions.startInline.forEach(b=>{x=b.call({lexer:this},m),typeof x=="number"&&x>=0&&(d=Math.min(d,x))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(f)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(l=u.raw.slice(-1)),i=!0;let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},Sr=class{options;parser;constructor(e){this.options=e||Mt}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let r=(i=(t||"").match(Ae.notSpaceStart))==null?void 0:i[0],s=e.replace(Ae.endingNewline,"")+` -`;return r?'
    '+(n?s:Ze(s,!0))+`
    -`:"
    "+(n?s:Ze(s,!0))+`
    -`}blockquote({tokens:e}){return`
    -${this.parser.parse(e)}
    -`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} -`}hr(e){return`
    -`}list(e){let t=e.ordered,n=e.start,r="";for(let l=0;l -`+r+" -`}listitem(e){var n;let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+Ze(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • -`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t="",n="";for(let s=0;s${r}`),` - -`+t+` -`+r+`
    -`}tablerow({text:e}){return` -${e} -`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Ze(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=so(e);if(s===null)return r;e=s;let i='
    ",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=so(e);if(s===null)return Ze(n);e=s;let i=`${n}{let a=l[o].flat(1/0);n=n.concat(this.walkTokens(a,t))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=t.renderers[s.name];i?t.renderers[s.name]=function(...l){let o=s.renderer.apply(this,l);return o===!1&&(o=i.apply(this,l)),o}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[s.level];i?i.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),r.extensions=t),n.renderer){let s=this.defaults.renderer||new Sr(this.defaults);for(let i in n.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,o=n.renderer[l],a=s[l];s[l]=(...c)=>{let u=o.apply(s,c);return u===!1&&(u=a.apply(s,c)),u||""}}r.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new Cr(this.defaults);for(let i in n.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,o=n.tokenizer[l],a=s[l];s[l]=(...c)=>{let u=o.apply(s,c);return u===!1&&(u=a.apply(s,c)),u}}r.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new Rr;for(let i in n.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,o=n.hooks[l],a=s[l];Rr.passThroughHooks.has(i)?s[l]=c=>{if(this.defaults.async)return Promise.resolve(o.call(s,c)).then(f=>a.call(s,f));let u=o.call(s,c);return a.call(s,u)}:s[l]=(...c)=>{let u=o.apply(s,c);return u===!1&&(u=a.apply(s,c)),u}}r.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(l){let o=[];return o.push(i.call(this,l)),s&&(o=o.concat(s.call(this,l))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return yt.lex(e,t??this.defaults)}parser(e,t){return wt.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},s={...this.defaults,...r},i=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);let l=s.hooks?s.hooks.provideLexer():e?yt.lex:yt.lexInline,o=s.hooks?s.hooks.provideParser():e?wt.parse:wt.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(a=>l(a,s)).then(a=>s.hooks?s.hooks.processAllTokens(a):a).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>o(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let a=l(t,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let c=o(a,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(a){return i(a)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){let r="

    An error occurred:

    "+Ze(n.message+"",!0)+"
    ";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Pt=new oo;function ge(e,t){return Pt.parse(e,t)}ge.options=ge.setOptions=function(e){return Pt.setOptions(e),ge.defaults=Pt.defaults,Wl(ge.defaults),ge},ge.getDefaults=bs,ge.defaults=Mt,ge.use=function(...e){return Pt.use(...e),ge.defaults=Pt.defaults,Wl(ge.defaults),ge},ge.walkTokens=function(e,t){return Pt.walkTokens(e,t)},ge.parseInline=Pt.parseInline,ge.Parser=wt,ge.parser=wt.parse,ge.Renderer=Sr,ge.TextRenderer=Rs,ge.Lexer=yt,ge.lexer=yt.lex,ge.Tokenizer=Cr,ge.Hooks=Rr,ge.parse=ge;function Tf(e){if(typeof e=="function"&&(e={highlight:e}),!e||typeof e.highlight!="function")throw new Error("Must provide highlight function");return typeof e.langPrefix!="string"&&(e.langPrefix="language-"),typeof e.emptyLangClass!="string"&&(e.emptyLangClass=""),{async:!!e.async,walkTokens(t){if(t.type!=="code")return;const n=ao(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||"")).then(co(t));const r=e.highlight(t.text,n,t.lang||"");if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");co(t)(r)},useNewRenderer:!0,renderer:{code(t,n,r){typeof t=="object"&&(r=t.escaped,n=t.lang,t=t.text);const s=ao(n),i=s?e.langPrefix+po(s):e.emptyLangClass,l=i?` class="${i}"`:"";return t=t.replace(/\n$/,""),`
    ${r?t:po(t,!0)}
    -
    `}}}}function ao(e){return(e||"").match(/\S*/)[0]}function co(e){return t=>{typeof t=="string"&&t!==e.text&&(e.escaped=!0,e.text=t)}}const uo=/[&<>"']/,If=new RegExp(uo.source,"g"),fo=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Lf=new RegExp(fo.source,"g"),Mf={"&":"&","<":"<",">":">",'"':""","'":"'"},ho=e=>Mf[e];function po(e,t){if(t){if(uo.test(e))return e.replace(If,ho)}else if(fo.test(e))return e.replace(Lf,ho);return e}const Pf=/\$.*?\$/,Of=/^\$(.*?)\$/,jf=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,zf=e=>[{name:"blockMath",level:"block",tokenizer(t){const n=jf.exec(t);if(n!==null)return{type:"html",raw:n[0],text:e(!0,n[1])}}},{name:"inlineMath",level:"inline",start(t){const n=t.search(Pf);return n!==-1?n:t.length},tokenizer(t){const n=Of.exec(t);if(n!==null)return{type:"html",raw:n[0],text:e(!1,n[1])}}}],go=(e="",t={})=>e.replace(/:(.+?):/g,(n,r)=>t[r]?`${r}`:n),Ff=(e,{emojiMap:t,highlighter:n,texRenderer:r})=>{const s=new oo;if(s.setOptions({breaks:!0}),n&&s.use(Tf({highlight:n})),r){const i=zf(r);s.use({extensions:i})}return s.parse(go(e,t))},As=e=>{const{path:t}=e.dataset;return t!=null&&t.length?t:null},Df=e=>e.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu),Hf=e=>e.match(/[\u4E00-\u9FD5]/gu),Uf=e=>{var t,n;return(((t=Df(e))==null?void 0:t.reduce((r,s)=>r+(["",",","."].includes(s.trim())?0:s.trim().split(/\s+/u).length),0))??0)+(((n=Hf(e))==null?void 0:n.length)??0)},Nf=async()=>{const{userAgentData:e}=navigator;let t=navigator.userAgent;if(!e||e.platform!=="Windows")return t;const{platformVersion:n}=await e.getHighEntropyValues(["platformVersion"]);return n&&parseInt(n.split(".")[0])>=13&&(t=t.replace("Windows NT 10.0","Windows NT 11.0")),t},mo=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:r=navigator.language})=>{const s=new AbortController,i=document.querySelectorAll(n);return i.length&&Hs({serverURL:Hn(e),paths:Array.from(i).map(l=>li(As(l)??t)),lang:r,signal:s.signal}).then(l=>{i.forEach((o,a)=>{o.innerText=l[a].toString()})}).catch(Vl),s.abort.bind(s)},vo=({size:e})=>ie("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:e,height:e},[ie("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),ie("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),Vf=()=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ie("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),Bf=()=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ie("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),Wf=()=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ie("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),ie("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),qf=({active:e=!1})=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ie("path",{d:`M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z${e?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"}`,fill:e?"red":"currentColor"})]),Kf=()=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ie("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),ie("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),Gf=()=>ie("svg",{width:"16",height:"16",ariaHidden:"true"},ie("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),Zf=()=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ie("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),Jf=()=>ie("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ie("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),Yf=()=>ie("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},ie("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),In=({size:e=100})=>ie("svg",{width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},ie("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},ie("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Qf=()=>ie("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[ie("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),ie("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]),Xf=()=>Yt("WALINE_USER_META",{nick:"",mail:"",link:""}),eh=()=>Yt("WALINE_COMMENT_BOX_EDITOR",""),th="WALINE_LIKE",nh=Yt(th,[]),bo=()=>nh,rh="WALINE_REACTION",sh=Yt(rh,{}),ih=()=>sh;var Es={},lt={},ot={},yo;function wo(){if(yo)return ot;yo=1;var e=ot&&ot.__awaiter||function(r,s,i,l){function o(a){return a instanceof i?a:new i(function(c){c(a)})}return new(i||(i=Promise))(function(a,c){function u(m){try{d(l.next(m))}catch(x){c(x)}}function f(m){try{d(l.throw(m))}catch(x){c(x)}}function d(m){m.done?a(m.value):o(m.value).then(u,f)}d((l=l.apply(r,s||[])).next())})},t=ot&&ot.__generator||function(r,s){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},l,o,a,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(d){return function(m){return f([d,m])}}function f(d){if(l)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(i=0)),i;)try{if(l=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return i.label++,{value:d[1],done:!1};case 5:i.label++,o=d[1],d=[0];continue;case 7:d=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){i=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]"u")return Promise.reject(new Error("This is a library for the browser!"));if(s.getLoadingState()===n.LOADED)return s.instance.getSiteKey()===i?Promise.resolve(s.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(s.getLoadingState()===n.LOADING)return i!==s.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(a,c){s.successfulLoadingConsumers.push(function(u){return a(u)}),s.errorLoadingRunnable.push(function(u){return c(u)})});s.instanceSiteKey=i,s.setLoadingState(n.LOADING);var o=new s;return new Promise(function(a,c){o.loadScript(i,l.useRecaptchaNet||!1,l.useEnterprise||!1,l.renderParameters?l.renderParameters:{},l.customUrl).then(function(){s.setLoadingState(n.LOADED);var u=o.doExplicitRender(grecaptcha,i,l.explicitRenderParameters?l.explicitRenderParameters:{},l.useEnterprise||!1),f=new t.ReCaptchaInstance(i,u,grecaptcha);s.successfulLoadingConsumers.forEach(function(d){return d(f)}),s.successfulLoadingConsumers=[],l.autoHideBadge&&f.hideBadge(),s.instance=f,a(f)}).catch(function(u){s.errorLoadingRunnable.forEach(function(f){return f(u)}),s.errorLoadingRunnable=[],c(u)})})},s.getInstance=function(){return s.instance},s.setLoadingState=function(i){s.loadingState=i},s.getLoadingState=function(){return s.loadingState===null?n.NOT_LOADED:s.loadingState},s.prototype.loadScript=function(i,l,o,a,c){var u=this;l===void 0&&(l=!1),o===void 0&&(o=!1),a===void 0&&(a={}),c===void 0&&(c="");var f=document.createElement("script");f.setAttribute("recaptcha-v3-script",""),f.setAttribute("async",""),f.setAttribute("defer","");var d="https://www.google.com/recaptcha/api.js";l?o?d="https://recaptcha.net/recaptcha/enterprise.js":d="https://recaptcha.net/recaptcha/api.js":o&&(d="https://www.google.com/recaptcha/enterprise.js"),c&&(d=c),a.render&&(a.render=void 0);var m=this.buildQueryString(a);return f.src=d+"?render=explicit"+m,new Promise(function(x,b){f.addEventListener("load",u.waitForScriptToLoad(function(){x(f)},o),!1),f.onerror=function(E){s.setLoadingState(n.NOT_LOADED),b(E)},document.head.appendChild(f)})},s.prototype.buildQueryString=function(i){var l=Object.keys(i);return l.length<1?"":"&"+Object.keys(i).filter(function(o){return!!i[o]}).map(function(o){return o+"="+i[o]}).join("&")},s.prototype.waitForScriptToLoad=function(i,l){var o=this;return function(){window.grecaptcha===void 0?setTimeout(function(){o.waitForScriptToLoad(i,l)},s.SCRIPT_LOAD_DELAY):l?window.grecaptcha.enterprise.ready(function(){i()}):window.grecaptcha.ready(function(){i()})}},s.prototype.doExplicitRender=function(i,l,o,a){var c=e({sitekey:l},o);return o.container?a?i.enterprise.render(o.container,c):i.render(o.container,c):a?i.enterprise.render(c):i.render(c)},s.loadingState=null,s.instance=null,s.instanceSiteKey=null,s.successfulLoadingConsumers=[],s.errorLoadingRunnable=[],s.SCRIPT_LOAD_DELAY=25,s}();return lt.load=r.load,lt.getInstance=r.getInstance,lt}var xo;function oh(){return xo||(xo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReCaptchaInstance=e.getInstance=e.load=void 0;var t=lh();Object.defineProperty(e,"load",{enumerable:!0,get:function(){return t.load}}),Object.defineProperty(e,"getInstance",{enumerable:!0,get:function(){return t.getInstance}});var n=wo();Object.defineProperty(e,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})}(Es)),Es}var ah=oh();const _o={},ch=e=>{const t=_o[e]??(_o[e]=ah.load(e,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:n=>t.then(r=>r.execute(n))}},uh=e=>({execute:async t=>{const{load:n}=Hu("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1});await n();const r=window.turnstile;return new Promise(s=>{r==null||r.ready(()=>{r.render(".wl-captcha-container",{sitekey:e,action:t,size:"compact",callback:s})})})}}),fh="WALINE_USER",hh=Yt(fh,{}),Ar=()=>hh,ph={key:0,class:"wl-reaction"},dh=["textContent"],gh={class:"wl-reaction-list"},mh=["onClick"],vh={class:"wl-reaction-img"},bh=["src","alt"],yh=["textContent"],wh=["textContent"];var kh=mn({__name:"ArticleReaction",setup(e){const t=ih(),n=lr(Dn),r=ae(-1),s=ae([]),i=ve(()=>n.value.locale),l=ve(()=>{const{reaction:f}=n.value;return f!=null&&f.length?f:null}),o=ve(()=>{var f;const{path:d}=n.value;return((f=l.value)==null?void 0:f.map((m,x)=>({icon:m,desc:i.value[`reaction${x}`],active:t.value[d]===x})))??null});let a;const c=async()=>{const{serverURL:f,lang:d,path:m}=n.value;if(!l.value)return;const x=new AbortController;a=x.abort.bind(x);const[b]=await Tr({serverURL:f,lang:d,paths:[m],type:l.value.map((E,w)=>`reaction${w}`),signal:x.signal});s.value=l.value.map((E,w)=>b[`reaction${w}`])},u=async f=>{if(r.value!==-1)return;const{serverURL:d,lang:m,path:x}=n.value,b=t.value[x];r.value=f,b!==void 0&&(await zn({serverURL:d,lang:m,path:x,type:`reaction${b}`,action:"desc"}),s.value[b]=Math.max(s.value[b]-1,0)),b!==f&&(await zn({serverURL:d,lang:m,path:x,type:`reaction${f}`}),s.value[f]=(s.value[f]||0)+1),b===f?delete t.value[x]:t.value[x]=f,r.value=-1};return yn(()=>{Jt(()=>[n.value.serverURL,n.value.path],()=>c())}),es(()=>{a==null||a()}),(f,d)=>o.value?(L(),M("div",ph,[z("div",{class:"wl-reaction-title",textContent:ee(i.value.reactionTitle)},null,8,dh),z("ul",gh,[(L(!0),M(pe,null,De(o.value,({active:m,icon:x,desc:b},E)=>(L(),M("li",{key:E,class:be(["wl-reaction-item",{active:m}]),onClick:w=>u(E)},[z("div",vh,[z("img",{src:x,alt:b},null,8,bh),r.value===E?(L(),nt(G(In),{key:0,class:"wl-reaction-loading"})):(L(),M("div",{key:1,class:"wl-reaction-votes",textContent:ee(s.value[E]||0)},null,8,yh))]),z("div",{class:"wl-reaction-text",textContent:ee(b)},null,8,wh)],10,mh))),128))])])):X("v-if",!0)}}),Ln=new Map;function xh(e){var t=Ln.get(e);t&&t.destroy()}function _h(e){var t=Ln.get(e);t&&t.update()}var Mn=null;typeof window>"u"?((Mn=function(e){return e}).destroy=function(e){return e},Mn.update=function(e){return e}):((Mn=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(n){return function(r){if(r&&r.nodeName&&r.nodeName==="TEXTAREA"&&!Ln.has(r)){var s,i=null,l=window.getComputedStyle(r),o=(s=r.value,function(){c({testForHeightReduction:s===""||!r.value.startsWith(s),restoreTextAlign:null}),s=r.value}),a=(function(f){r.removeEventListener("autosize:destroy",a),r.removeEventListener("autosize:update",u),r.removeEventListener("input",o),window.removeEventListener("resize",u),Object.keys(f).forEach(function(d){return r.style[d]=f[d]}),Ln.delete(r)}).bind(r,{height:r.style.height,resize:r.style.resize,textAlign:r.style.textAlign,overflowY:r.style.overflowY,overflowX:r.style.overflowX,wordWrap:r.style.wordWrap});r.addEventListener("autosize:destroy",a),r.addEventListener("autosize:update",u),r.addEventListener("input",o),window.addEventListener("resize",u),r.style.overflowX="hidden",r.style.wordWrap="break-word",Ln.set(r,{destroy:a,update:u}),u()}function c(f){var d,m,x=f.restoreTextAlign,b=x===void 0?null:x,E=f.testForHeightReduction,w=E===void 0||E,$=l.overflowY;if(r.scrollHeight!==0&&(l.resize==="vertical"?r.style.resize="none":l.resize==="both"&&(r.style.resize="horizontal"),w&&(d=function(I){for(var P=[];I&&I.parentNode&&I.parentNode instanceof Element;)I.parentNode.scrollTop&&P.push([I.parentNode,I.parentNode.scrollTop]),I=I.parentNode;return function(){return P.forEach(function(W){var Z=W[0],N=W[1];Z.style.scrollBehavior="auto",Z.scrollTop=N,Z.style.scrollBehavior=null})}}(r),r.style.height=""),m=l.boxSizing==="content-box"?r.scrollHeight-(parseFloat(l.paddingTop)+parseFloat(l.paddingBottom)):r.scrollHeight+parseFloat(l.borderTopWidth)+parseFloat(l.borderBottomWidth),l.maxHeight!=="none"&&m>parseFloat(l.maxHeight)?(l.overflowY==="hidden"&&(r.style.overflow="scroll"),m=parseFloat(l.maxHeight)):l.overflowY!=="hidden"&&(r.style.overflow="hidden"),r.style.height=m+"px",b&&(r.style.textAlign=b),d&&d(),i!==m&&(r.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=m),$!==l.overflow&&!b)){var H=l.textAlign;l.overflow==="hidden"&&(r.style.textAlign=H==="start"?"end":"start"),c({restoreTextAlign:H,testForHeightReduction:!0})}}function u(){c({testForHeightReduction:!0,restoreTextAlign:null})}}(n)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],xh),e},Mn.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],_h),e});var $o=Mn;const $h=["data-index"],Ch=["src","title","onClick"];var Sh=mn({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(e){const t=e;let n=null;const r=dt("wall"),s=ae({}),i=ae([]),l=()=>{const f=Math.floor((r.value.getBoundingClientRect().width+t.gap)/(t.columnWidth+t.gap));return f>0?f:1},o=f=>new Array(f).fill(null).map(()=>[]),a=async f=>{var d;if(f>=t.items.length)return;await qt();const m=Array.from(((d=r.value)==null?void 0:d.children)??[]).reduce((x,b)=>b.getBoundingClientRect().height{if(i.value.length===l()&&!f)return;i.value=o(l());const d=window.scrollY;await a(0),window.scrollTo({top:d})},u=f=>{s.value[f.target.src]=!0};return yn(()=>{c(!0),n=new ResizeObserver(()=>{c()}),n.observe(r.value),gt(()=>[t.items],()=>{s.value={},c(!0)}),gt(()=>[t.columnWidth,t.gap],()=>{c()})}),rc(()=>{n.unobserve(r.value)}),(f,d)=>(L(),M("div",{ref_key:"wall",ref:r,class:"wl-gallery",style:on({gap:`${f.gap}px`})},[(L(!0),M(pe,null,De(i.value,(m,x)=>(L(),M("div",{key:x,class:"wl-gallery-column","data-index":x,style:on({gap:`${f.gap}px`})},[(L(!0),M(pe,null,De(m,b=>(L(),M(pe,{key:b},[s.value[f.items[b].src]?X("v-if",!0):(L(),nt(G(In),{key:0,size:36,style:{margin:"20px auto"}})),z("img",{class:"wl-gallery-item",src:f.items[b].src,title:f.items[b].title,loading:"lazy",onLoad:u,onClick:E=>f.$emit("insert",`![](${f.items[b].src})`)},null,40,Ch)],64))),128))],12,$h))),128))],4))}});const Rh={key:0,class:"wl-login-info"},Ah={class:"wl-avatar"},Eh=["title"],Th=["title"],Ih=["src"],Lh=["title","textContent"],Mh={class:"wl-panel"},Ph=["for","textContent"],Oh=["id","onUpdate:modelValue","name","type"],jh=["placeholder"],zh={class:"wl-preview"},Fh=["innerHTML"],Dh={class:"wl-footer"},Hh={class:"wl-actions"},Uh={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},Nh=["title"],Vh=["title"],Bh=["title","aria-label"],Wh=["title"],qh={class:"wl-info"},Kh={class:"wl-text-number"},Gh={key:0},Zh=["textContent"],Jh=["textContent"],Yh=["disabled"],Qh=["placeholder"],Xh={key:1,class:"wl-loading"},ep={key:0,class:"wl-tab-wrapper"},tp=["title","onClick"],np=["src","alt"],rp={key:0,class:"wl-tabs"},sp=["onClick"],ip=["src","alt","title"],lp=["title"];var Co=mn({__name:"CommentBox",props:{edit:{},rootId:{},replyId:{},replyUser:{}},emits:["log","cancelEdit","cancelReply","submit"],setup(e,{emit:t}){const n=e,r=t,s=lr(Dn),i=eh(),l=Xf(),o=Ar(),a=ae({}),c=dt("textarea"),u=dt("image-uploader"),f=dt("emoji-button"),d=dt("emoji-popup"),m=dt("gif-button"),x=dt("gif-popup"),b=dt("gif-search"),E=ae({tabs:[],map:{}}),w=ae(0),$=ae(!1),H=ae(!1),I=ae(!1),P=ae(""),W=ae(0),Z=pn({loading:!0,list:[]}),N=ae(0),ke=ae(!1),me=ae(""),U=ae(!1),Y=ae(!1),V=ve(()=>s.value.locale),F=ve(()=>!!o.value.token),Q=ve(()=>s.value.imageUploader!==null),ne=O=>{const R=c.value,q=R.selectionStart,h=R.selectionEnd||0,p=R.scrollTop;i.value=R.value.substring(0,q)+O+R.value.substring(h,R.value.length),R.focus(),R.selectionStart=q+O.length,R.selectionEnd=q+O.length,R.scrollTop=p},Je=({key:O,ctrlKey:R,metaKey:q})=>{U.value||(R||q)&&O==="Enter"&&Ue()},at=async O=>{const R=`![${s.value.locale.uploading} ${O.name}]()`;ne(R),U.value=!0;try{const q=await s.value.imageUploader(O);i.value=i.value.replace(R,`\r -![${O.name}](${q})`)}catch(q){alert(q.message),i.value=i.value.replace(R,"")}finally{U.value=!1}},Qt=O=>{var R;if((R=O.dataTransfer)!=null&&R.items){const q=Bl(O.dataTransfer.items);q&&Q.value&&(at(q),O.preventDefault())}},Pn=O=>{if(O.clipboardData){const R=Bl(O.clipboardData.items);R&&Q.value&&at(R)}},Ot=()=>{const O=u.value;O.files&&Q.value&&at(O.files[0]).then(()=>{O.value=""})},Ue=async()=>{var O;const{serverURL:R,lang:q,login:h,wordLimit:p,requiredMeta:g,recaptchaV3Key:y,turnstileKey:k}=s.value,v={comment:me.value,nick:l.value.nick,mail:l.value.mail,link:l.value.link,url:s.value.path,ua:await Nf()};if(!n.edit)if(o.value.token)v.nick=o.value.display_name,v.mail=o.value.email,v.link=o.value.url;else{if(h==="force")return;if(g.includes("nick")&&!v.nick){a.value.nick.focus(),alert(V.value.nickError);return}if(g.includes("mail")&&!v.mail||v.mail&&!Xo(v.mail)){a.value.mail.focus(),alert(V.value.mailError);return}v.nick||(v.nick=V.value.anonymous)}if(!v.comment){c.value.focus();return}if(!ke.value){alert(V.value.wordHint.replace("$0",p[0].toString()).replace("$1",p[1].toString()).replace("$2",W.value.toString()));return}v.comment=go(v.comment,E.value.map),n.replyId&&n.rootId&&(v.pid=n.replyId,v.rid=n.rootId,v.at=n.replyUser),U.value=!0;try{y&&(v.recaptchaV3=await ch(y).execute("social")),k&&(v.turnstile=await uh(k).execute("social"));const A={serverURL:R,lang:q,token:o.value.token,comment:v},C=await(n.edit?tn({objectId:n.edit.objectId,...A}):Fs(A));if(U.value=!1,C.errmsg){alert(C.errmsg);return}r("submit",C.data),i.value="",P.value="",await qt(),n.replyId&&r("cancelReply"),(O=n.edit)!=null&&O.objectId&&r("cancelEdit")}catch(A){U.value=!1,alert(A.message)}},On=O=>{O.preventDefault();const{lang:R,serverURL:q}=s.value;Us({serverURL:q,lang:R}).then(h=>{o.value=h,(h.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(h)),r("log")})},Er=()=>{o.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),r("log")},jn=O=>{O.preventDefault();const{lang:R,serverURL:q}=s.value,h=800,p=800,g=(window.innerWidth-h)/2,y=(window.innerHeight-p)/2,k=new URLSearchParams({lng:R,token:o.value.token}),v=window.open(`${q}/ui/profile?${k.toString()}`,"_blank",`width=${h},height=${p},left=${g},top=${y},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);v==null||v.postMessage({type:"TOKEN",data:o.value.token},"*")},kt=O=>{var R,q,h,p;!((R=f.value)!=null&&R.contains(O.target))&&!((q=d.value)!=null&&q.contains(O.target))&&($.value=!1),!((h=m.value)!=null&&h.contains(O.target))&&!((p=x.value)!=null&&p.contains(O.target))&&(H.value=!1)},xt=async O=>{var R;const{scrollTop:q,clientHeight:h,scrollHeight:p}=O.target,g=(h+q)/p,y=s.value.search,k=((R=b.value)==null?void 0:R.value)??"";g<.9||Z.loading||Y.value||(Z.loading=!0,(y.more&&Z.list.length?await y.more(k,Z.list.length):await y.search(k)).length?Z.list=[...Z.list,...y.more&&Z.list.length?await y.more(k,Z.list.length):await y.search(k)]:Y.value=!0,Z.loading=!1,setTimeout(()=>{O.target.scrollTop=q},50))},jt=Ru(O=>{Z.list=[],Y.value=!1,xt(O)},300);return Lt("click",kt),Lt("message",({data:O})=>{!O||O.type!=="profile"||(o.value={...o.value,...O.data},[localStorage,sessionStorage].filter(R=>R.getItem("WALINE_USER")).forEach(R=>{R.setItem("WALINE_USER",JSON.stringify(o))}))}),Jt([s,W],([O,R])=>{const{wordLimit:q}=O;q?Rq[1]?(N.value=q[1],ke.value=!1):(N.value=q[1],ke.value=!0):(N.value=0,ke.value=!0)}),gt(H,async O=>{var R;if(!O)return;const q=s.value.search;b.value&&(b.value.value=""),Z.loading=!0,Z.list=await(((R=q.default)==null?void 0:R.call(q))??q.search("")),Z.loading=!1}),yn(()=>{var O;(O=n.edit)!=null&&O.objectId&&(i.value=n.edit.orig),Jt(()=>i.value,R=>{const{highlighter:q,texRenderer:h}=s.value;me.value=R,P.value=Ff(R,{emojiMap:E.value.map,highlighter:q,texRenderer:h}),W.value=Uf(R),R?$o(c.value):$o.destroy(c.value)}),Jt(()=>s.value.emoji,async R=>{E.value=await qu(R)})}),(O,R)=>{var q,h;return L(),M("div",{key:G(o).token,class:"wl-comment"},[G(s).login!=="disable"&&F.value&&!((q=O.edit)!=null&&q.objectId)?(L(),M("div",Rh,[z("div",Ah,[z("button",{type:"submit",class:"wl-logout-btn",title:V.value.logout,onClick:Er},[ue(G(vo),{size:14})],8,Eh),z("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:V.value.profile,onClick:jn},[z("img",{src:G(o).avatar,alt:"avatar"},null,8,Ih)],8,Th)]),z("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:V.value.profile,onClick:jn,textContent:ee(G(o).display_name)},null,8,Lh)])):X("v-if",!0),z("div",Mh,[G(s).login!=="force"&&G(s).meta.length&&!F.value?(L(),M("div",{key:0,class:be(["wl-header",`item${G(s).meta.length}`])},[(L(!0),M(pe,null,De(G(s).meta,p=>(L(),M("div",{key:p,class:"wl-header-item"},[z("label",{for:`wl-${p}`,textContent:ee(V.value[p]+(G(s).requiredMeta.includes(p)||!G(s).requiredMeta.length?"":`(${V.value.optional})`))},null,8,Ph),ir(z("input",{id:`wl-${p}`,ref_for:!0,ref:g=>{g&&(a.value[p]=g)},"onUpdate:modelValue":g=>G(l)[p]=g,class:be(["wl-input",`wl-${p}`]),name:p,type:p==="mail"?"email":"text"},null,10,Oh),[[gu,G(l)[p]]])]))),128))],2)):X("v-if",!0),ir(z("textarea",{id:"wl-edit",ref:"textarea","onUpdate:modelValue":R[0]||(R[0]=p=>ye(i)?i.value=p:null),class:"wl-editor",placeholder:O.replyUser?`@${O.replyUser}`:V.value.placeholder,onKeydown:Je,onDrop:Qt,onPaste:Pn},null,40,jh),[[ds,G(i)]]),ir(z("div",zh,[R[7]||(R[7]=z("hr",null,null,-1)),z("h4",null,ee(V.value.preview)+":",1),z("div",{class:"wl-content",innerHTML:P.value},null,8,Fh)],512),[[xl,I.value]]),z("div",Dh,[z("div",Hh,[z("a",Uh,[ue(G(Gf))]),ir(z("button",{ref:"emoji-button",type:"button",class:be(["wl-action",{active:$.value}]),title:V.value.emoji,onClick:R[1]||(R[1]=p=>$.value=!$.value)},[ue(G(Bf))],10,Nh),[[xl,E.value.tabs.length]]),G(s).search?(L(),M("button",{key:0,ref:"gif-button",type:"button",class:be(["wl-action",{active:H.value}]),title:V.value.gif,onClick:R[2]||(R[2]=p=>H.value=!H.value)},[ue(G(Qf))],10,Vh)):X("v-if",!0),z("input",{id:"wl-image-upload",ref:"image-uploader",class:"upload","aria-hidden":"true",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:Ot},null,544),Q.value?(L(),M("label",{key:1,for:"wl-image-upload",class:"wl-action",title:V.value.uploadImage,"aria-label":V.value.uploadImage},[ue(G(Wf))],8,Bh)):X("v-if",!0),z("button",{type:"button",class:be(["wl-action",{active:I.value}]),title:V.value.preview,onClick:R[3]||(R[3]=p=>I.value=!I.value)},[ue(G(Kf))],10,Wh)]),z("div",qh,[R[9]||(R[9]=z("div",{class:"wl-captcha-container"},null,-1)),z("div",Kh,[rt(ee(W.value)+" ",1),G(s).wordLimit?(L(),M("span",Gh,[R[8]||(R[8]=rt("  /  ")),z("span",{class:be({illegal:!ke.value}),textContent:ee(N.value)},null,10,Zh)])):X("v-if",!0),rt("  "+ee(V.value.word),1)]),G(s).login!=="disable"&&!F.value?(L(),M("button",{key:0,type:"button",class:"wl-btn",onClick:On,textContent:ee(V.value.login)},null,8,Jh)):X("v-if",!0),G(s).login!=="force"||F.value?(L(),M("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:U.value,onClick:Ue},[U.value?(L(),nt(G(In),{key:0,size:16})):(L(),M(pe,{key:1},[rt(ee(V.value.submit),1)],64))],8,Yh)):X("v-if",!0)]),z("div",{ref:"gif-popup",class:be(["wl-gif-popup",{display:H.value}])},[z("input",{ref:"gif-search",type:"text",placeholder:V.value.gifSearchPlaceholder,onInput:R[4]||(R[4]=(...p)=>G(jt)&&G(jt)(...p))},null,40,Qh),Z.list.length?(L(),nt(Sh,{key:0,items:Z.list,"column-width":200,gap:6,onInsert:R[5]||(R[5]=p=>ne(p)),onScroll:xt},null,8,["items"])):X("v-if",!0),Z.loading?(L(),M("div",Xh,[ue(G(In),{size:30})])):X("v-if",!0)],2),z("div",{ref:"emoji-popup",class:be(["wl-emoji-popup",{display:$.value}])},[(L(!0),M(pe,null,De(E.value.tabs,(p,g)=>(L(),M(pe,{key:p.name},[g===w.value?(L(),M("div",ep,[(L(!0),M(pe,null,De(p.items,y=>(L(),M("button",{key:y,type:"button",title:y,onClick:k=>ne(`:${y}:`)},[$.value?(L(),M("img",{key:0,class:"wl-emoji",src:E.value.map[y],alt:y,loading:"lazy",referrerPolicy:"no-referrer"},null,8,np)):X("v-if",!0)],8,tp))),128))])):X("v-if",!0)],64))),128)),E.value.tabs.length>1?(L(),M("div",rp,[(L(!0),M(pe,null,De(E.value.tabs,(p,g)=>(L(),M("button",{key:p.name,type:"button",class:be(["wl-tab",{active:w.value===g}]),onClick:y=>w.value=g},[z("img",{class:"wl-emoji",src:p.icon,alt:p.name,title:p.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,ip)],10,sp))),128))])):X("v-if",!0)],2)])]),O.replyId||(h=O.edit)!=null&&h.objectId?(L(),M("button",{key:1,type:"button",class:"wl-close",title:V.value.cancelReply,onClick:R[6]||(R[6]=p=>O.replyId?r("cancelReply"):r("cancelEdit"))},[ue(G(vo),{size:24})],8,lp)):X("v-if",!0)])}}});const op=["id"],ap={class:"wl-user","aria-hidden":"true"},cp=["src"],up={class:"wl-card"},fp={class:"wl-head"},hp=["href"],pp={key:1,class:"wl-nick"},dp=["textContent"],gp=["textContent"],mp=["textContent"],vp=["textContent"],bp=["textContent"],yp={class:"wl-comment-actions"},wp=["title"],kp=["title"],xp={class:"wl-meta","aria-hidden":"true"},_p=["data-value","textContent"],$p={key:0,class:"wl-content"},Cp={key:0},Sp=["href"],Rp=["innerHTML"],Ap={key:1,class:"wl-admin-actions"},Ep={class:"wl-comment-status"},Tp=["disabled","onClick","textContent"],Ip={key:3,class:"wl-quote"};var Lp=mn({__name:"CommentCard",props:{comment:{},edit:{},rootId:{},reply:{}},emits:["log","submit","delete","like","sticky","edit","reply","status"],setup(e,{emit:t}){const n=e,r=t,s=["approved","waiting","spam"],i=lr(Dn),l=bo(),o=Du(),a=Ar(),c=ve(()=>i.value.locale),u=ve(()=>{const{link:w}=n.comment;return w?ai(w)?w:`https://${w}`:""}),f=ve(()=>l.value.includes(n.comment.objectId)),d=ve(()=>Yo(new Date(n.comment.time),o.value,c.value)),m=ve(()=>a.value.type==="administrator"),x=ve(()=>n.comment.user_id&&a.value.objectId===n.comment.user_id),b=ve(()=>{var w;return n.comment.objectId===((w=n.reply)==null?void 0:w.objectId)}),E=ve(()=>{var w;return n.comment.objectId===((w=n.edit)==null?void 0:w.objectId)});return(w,$)=>{var H;const I=ic("CommentCard",!0);return L(),M("div",{id:w.comment.objectId.toString(),class:"wl-card-item"},[z("div",ap,[w.comment.avatar?(L(),M("img",{key:0,class:"wl-user-avatar",src:w.comment.avatar,alt:""},null,8,cp)):X("v-if",!0),w.comment.type?(L(),nt(G(Yf),{key:1})):X("v-if",!0)]),z("div",up,[z("div",fp,[u.value?(L(),M("a",{key:0,class:"wl-nick",href:u.value,target:"_blank",rel:"nofollow noopener noreferrer"},ee(w.comment.nick),9,hp)):(L(),M("span",pp,ee(w.comment.nick),1)),w.comment.type==="administrator"?(L(),M("span",{key:2,class:"wl-badge",textContent:ee(c.value.admin)},null,8,dp)):X("v-if",!0),w.comment.label?(L(),M("span",{key:3,class:"wl-badge",textContent:ee(w.comment.label)},null,8,gp)):X("v-if",!0),w.comment.sticky?(L(),M("span",{key:4,class:"wl-badge",textContent:ee(c.value.sticky)},null,8,mp)):X("v-if",!0),typeof w.comment.level=="number"?(L(),M("span",{key:5,class:be(`wl-badge level${w.comment.level}`),textContent:ee(c.value[`level${w.comment.level}`]||`Level ${w.comment.level}`)},null,10,vp)):X("v-if",!0),z("span",{class:"wl-time",textContent:ee(d.value)},null,8,bp),z("div",yp,[m.value||x.value?(L(),M(pe,{key:0},[z("button",{type:"button",class:"wl-edit",onClick:$[0]||($[0]=P=>r("edit",w.comment))},[ue(G(Jf))]),z("button",{type:"button",class:"wl-delete",onClick:$[1]||($[1]=P=>r("delete",w.comment))},[ue(G(Vf))])],64)):X("v-if",!0),z("button",{type:"button",class:"wl-like",title:f.value?c.value.cancelLike:c.value.like,onClick:$[2]||($[2]=P=>r("like",w.comment))},[ue(G(qf),{active:f.value},null,8,["active"]),rt(" "+ee("like"in w.comment?w.comment.like:""),1)],8,wp),z("button",{type:"button",class:be(["wl-reply",{active:b.value}]),title:b.value?c.value.cancelReply:c.value.reply,onClick:$[3]||($[3]=P=>r("reply",b.value?null:w.comment))},[ue(G(Zf))],10,kp)])]),z("div",xp,[(L(),M(pe,null,De(["addr","browser","os"],P=>(L(),M(pe,null,[w.comment[P]?(L(),M("span",{key:P,class:be(`wl-${P}`),"data-value":w.comment[P],textContent:ee(w.comment[P])},null,10,_p)):X("v-if",!0)],64))),64))]),E.value?X("v-if",!0):(L(),M("div",$p,["reply_user"in w.comment&&w.comment.reply_user?(L(),M("p",Cp,[z("a",{href:"#"+w.comment.pid},"@"+ee(w.comment.reply_user.nick),9,Sp),$[17]||($[17]=z("span",null,": ",-1))])):X("v-if",!0),z("div",{innerHTML:w.comment.comment},null,8,Rp)])),m.value&&!E.value?(L(),M("div",Ap,[z("span",Ep,[(L(),M(pe,null,De(s,P=>z("button",{key:P,type:"submit",class:be(`wl-btn wl-${P}`),disabled:w.comment.status===P,onClick:W=>r("status",{status:P,comment:w.comment}),textContent:ee(c.value[P])},null,10,Tp)),64))]),m.value&&!("rid"in w.comment)?(L(),M("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:$[4]||($[4]=P=>r("sticky",w.comment))},ee(w.comment.sticky?c.value.unsticky:c.value.sticky),1)):X("v-if",!0)])):X("v-if",!0),b.value||E.value?(L(),M("div",{key:2,class:be({"wl-reply-wrapper":b.value,"wl-edit-wrapper":E.value})},[ue(Co,{edit:w.edit,"reply-id":(H=w.reply)==null?void 0:H.objectId,"reply-user":w.comment.nick,"root-id":w.rootId,onLog:$[5]||($[5]=P=>r("log")),onCancelReply:$[6]||($[6]=P=>r("reply",null)),onCancelEdit:$[7]||($[7]=P=>r("edit",null)),onSubmit:$[8]||($[8]=P=>r("submit",P))},null,8,["edit","reply-id","reply-user","root-id"])],2)):X("v-if",!0),"children"in w.comment?(L(),M("div",Ip,[(L(!0),M(pe,null,De(w.comment.children,P=>(L(),nt(I,{key:P.objectId,comment:P,reply:w.reply,edit:w.edit,"root-id":w.rootId,onLog:$[9]||($[9]=W=>r("log")),onDelete:$[10]||($[10]=W=>r("delete",W)),onEdit:$[11]||($[11]=W=>r("edit",W)),onLike:$[12]||($[12]=W=>r("like",W)),onReply:$[13]||($[13]=W=>r("reply",W)),onStatus:$[14]||($[14]=W=>r("status",W)),onSticky:$[15]||($[15]=W=>r("sticky",W)),onSubmit:$[16]||($[16]=W=>r("submit",W))},null,8,["comment","reply","edit","root-id"]))),128))])):X("v-if",!0)])],8,op)}}});const So="3.6.0",Mp={"data-waline":""},Pp={class:"wl-meta-head"},Op={class:"wl-count"},jp=["textContent"],zp={class:"wl-sort"},Fp=["onClick"],Dp={class:"wl-cards"},Hp={key:1,class:"wl-operation"},Up=["textContent"],Np={key:2,class:"wl-loading"},Vp=["textContent"],Bp={key:4,class:"wl-operation"},Wp=["textContent"],qp={key:5,class:"wl-power"};var Kp=mn({__name:"WalineComment",props:{serverURL:{},path:{},meta:{},requiredMeta:{},wordLimit:{},pageSize:{},lang:{},locale:{},commentSorting:{},dark:{type:[String,Boolean]},login:{},noCopyright:{type:Boolean},recaptchaV3Key:{},turnstileKey:{},reaction:{type:[Array,Boolean]},emoji:{},search:{},highlighter:{type:Function},imageUploader:{type:Function},texRenderer:{type:Function}},setup(e){const t=e,n=Ar(),r=bo(),s=ae("loading"),i=ae(0),l=ae(1),o=ae(0),a=ve(()=>Go(t)),c=ae(a.value.commentSorting),u=ae([]),f=ae(null),d=ae(null),m=ve(()=>Zo(a.value.dark)),x=ve(()=>a.value.locale);Nu(m,{id:"waline-darkmode"});let b=null;const E=U=>{const{serverURL:Y,path:V,pageSize:F}=a.value,Q=new AbortController;s.value="loading",b==null||b(),zs({serverURL:Y,lang:a.value.lang,path:V,pageSize:F,sortBy:ii[c.value],page:U,signal:Q.signal,token:n.value.token}).then(ne=>{s.value="success",i.value=ne.count,u.value.push(...ne.data),l.value=U,o.value=ne.totalPages}).catch(ne=>{ne.name!=="AbortError"&&(console.error(ne.message),s.value="error")}),b=Q.abort.bind(Q)},w=()=>{E(l.value+1)},$=()=>{i.value=0,u.value=[],E(1)},H=U=>{c.value!==U&&(c.value=U,$())},I=U=>{f.value=U},P=U=>{d.value=U},W=U=>{if(d.value)d.value.comment=U.comment,d.value.orig=U.orig;else if("rid"in U){const Y=u.value.find(({objectId:V})=>V===U.rid);if(!Y)return;Array.isArray(Y.children)||(Y.children=[]),Y.children.push(U)}else u.value.unshift(U),i.value+=1},Z=async({comment:U,status:Y})=>{if(U.status===Y)return;const{serverURL:V,lang:F}=a.value;await tn({serverURL:V,lang:F,token:n.value.token,objectId:U.objectId,comment:{status:Y}}),U.status=Y},N=async U=>{if("rid"in U)return;const{serverURL:Y,lang:V}=a.value;await tn({serverURL:Y,lang:V,token:n.value.token,objectId:U.objectId,comment:{sticky:U.sticky?0:1}}),U.sticky=!U.sticky},ke=async({objectId:U})=>{if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:Y,lang:V}=a.value;await Ds({serverURL:Y,lang:V,token:n.value.token,objectId:U}),u.value.some((F,Q)=>F.objectId===U?(u.value=u.value.filter((ne,Je)=>Je!==Q),!0):F.children.some((ne,Je)=>ne.objectId===U?(u.value[Q].children=F.children.filter((at,Qt)=>Qt!==Je),!0):!1))},me=async U=>{const{serverURL:Y,lang:V}=a.value,{objectId:F}=U,Q=r.value.includes(F);await tn({serverURL:Y,lang:V,objectId:F,token:n.value.token,comment:{like:!Q}}),Q?r.value=r.value.filter(ne=>ne!==F):(r.value=[...r.value,F],r.value.length>50&&(r.value=r.value.slice(-50))),U.like=Math.max(0,(U.like||0)+(Q?-1:1))};return fc(Dn,a),yn(()=>{Jt(()=>[t.serverURL,t.path],()=>{$()})}),es(()=>{b==null||b()}),(U,Y)=>(L(),M("div",Mp,[ue(kh),!f.value&&!d.value?(L(),nt(Co,{key:0,onLog:$,onSubmit:W})):X("v-if",!0),z("div",Pp,[z("div",Op,[i.value?(L(),M("span",{key:0,class:"wl-num",textContent:ee(i.value)},null,8,jp)):X("v-if",!0),rt(" "+ee(x.value.comment),1)]),z("ul",zp,[(L(!0),M(pe,null,De(G(qo),V=>(L(),M("li",{key:V,class:be([V===c.value?"active":""]),onClick:F=>H(V)},ee(x.value[V]),11,Fp))),128))])]),z("div",Dp,[(L(!0),M(pe,null,De(u.value,V=>(L(),nt(Lp,{key:V.objectId,"root-id":V.objectId,comment:V,reply:f.value,edit:d.value,onLog:$,onReply:I,onEdit:P,onSubmit:W,onStatus:Z,onDelete:ke,onSticky:N,onLike:me},null,8,["root-id","comment","reply","edit"]))),128))]),s.value==="error"?(L(),M("div",Hp,[z("button",{type:"button",class:"wl-btn",onClick:$,textContent:ee(x.value.refresh)},null,8,Up)])):s.value==="loading"?(L(),M("div",Np,[ue(G(In),{size:30})])):u.value.length?l.value{t.forEach((n,r)=>{const s=e[r].time;typeof s=="number"&&(n.innerText=s.toString())})},Ao=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-pageview-count",update:r=!0,lang:s=navigator.language})=>{const i=new AbortController,l=Array.from(document.querySelectorAll(n)),o=c=>{const u=As(c);return u!==null&&t!==u},a=c=>Ns({serverURL:Hn(e),paths:c.map(u=>As(u)??t),lang:s,signal:i.signal}).then(u=>Ro(u,c)).catch(Vl);if(r){const c=l.filter(f=>!o(f)),u=l.filter(o);Vs({serverURL:Hn(e),path:t,lang:s}).then(f=>Ro(f,c)),u.length&&a(u)}else a(l);return i.abort.bind(i)},Gp=({el:e="#waline",path:t=window.location.pathname,comment:n=!1,pageview:r=!1,...s})=>{const i=e?vs(e):null;if(e&&!i)throw new Error("Option 'el' do not match any domElement!");if(!s.serverURL)throw new Error("Option 'serverURL' is missing!");const l=pn({...s}),o=pn({comment:n,pageview:r,path:t}),a=()=>{o.comment&&mo({serverURL:l.serverURL,path:o.path,...zt(o.comment)?{selector:o.comment}:{}})},c=()=>{o.pageview&&Ao({serverURL:l.serverURL,path:o.path,...zt(o.pageview)?{selector:o.pageview}:{}})};let u=null;i&&(u=yu(()=>ie(Kp,{path:o.path,...l})),u.mount(i));const f=sl(a),d=sl(c);return{el:i,update:({comment:m,pageview:x,path:b=window.location.pathname,...E}={})=>{Object.entries(E).forEach(([w,$])=>{l[w]=$}),o.path=b,m!==void 0&&(o.comment=m),x!==void 0&&(o.pageview=x)},destroy:()=>{u==null||u.unmount(),f(),d()}}},Zp=({el:e,serverURL:t,count:n,lang:r=navigator.language})=>{const s=Ar(),i=vs(e),l=new AbortController;return Bs({serverURL:t,count:n,lang:r,signal:l.signal,token:s.value.token}).then(o=>i&&o.length?(i.innerHTML=`
    `,{comments:o,destroy:()=>{l.abort(),i.innerHTML=""}}):{comments:o,destroy:()=>l.abort()})},Jp=({el:e,serverURL:t,count:n,locale:r,lang:s=navigator.language,mode:i="list"})=>{const l=vs(e),o=new AbortController;return Ws({serverURL:t,pageSize:n,lang:s,signal:o.signal}).then(a=>!l||!a.length?{users:a,destroy:()=>o.abort()}:(r={...ri(s),...typeof r=="object"?r:{}},l.innerHTML=``,{users:a,destroy:()=>{o.abort(),l.innerHTML=""}}))};export{Zp as RecentComments,Jp as UserList,Fs as addComment,mo as commentCount,Fn as defaultLocales,Ds as deleteComment,Hs as fetchCommentCount,Tr as getArticleCounter,zs as getComment,Ns as getPageview,Bs as getRecentComment,Ws as getUserList,Gp as init,Us as login,Ao as pageviewCount,zn as updateArticleCounter,tn as updateComment,Vs as updatePageview,So as version}; -//# sourceMappingURL=waline.js.map diff --git a/pluginsSrc/abcjs/dist/abcjs-basic-min.js b/pluginsSrc/abcjs/dist/abcjs-basic-min.js deleted file mode 100644 index 328ef6de..00000000 --- a/pluginsSrc/abcjs/dist/abcjs-basic-min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! abcjs_basic v6.5.2 Copyright © 2009-2024 Paul Rosen and Gregory Dyke (https://abcjs.net) */ -/*! For license information please see abcjs_basic.LICENSE */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={1045:function(e,t,r){var n=r(1185),a=r(6306),i=r(1592),s=r(1028),o=r(5633),c={};c.signature="abcjs-basic v"+n,Object.keys(a).forEach((function(e){c[e]=a[e]})),Object.keys(i).forEach((function(e){c[e]=i[e]})),c.renderAbc=r(6859),c.tuneMetrics=r(9989),c.TimingCallbacks=r(5681);var l=r(6020);c.setGlyph=l.setSymbol,c.strTranspose=o;var h=r(5594),u=r(8471),d=r(522),f=r(2029),p=r(6313),m=r(5281),g=r(8702),v=r(5049),b=r(4718),y=r(3450),x=r(562),k=r(9991);c.synth={CreateSynth:h,instrumentIndexToName:u,pitchToNoteName:d,SynthController:y,SynthSequence:f,CreateSynthControl:p,registerAudioContext:m,activeAudioContext:g,supportsAudio:v,playEvent:b,getMidiFile:x,sequence:s,midiRenderer:k},c.Editor=r(5294),c.EditArea=r(2945),e.exports=c},6306:function(e,t,r){var n=r(5681),a={};!function(){"use strict";var e,t;a.startAnimation=function(r,a,i){function s(e){for(var t=0;tr.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds=r.lastMoment)if(r.eventCallback){var s=r.eventCallback(null);r.shouldStop(s).then((function(e){e&&r.stop()}))}else r.stop()}},r.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},r.doBeatCallback=function(e){if(r.beatCallback){for(var t,n,a=r.currentEvent;a=0&&null===r.noteTimings[a].left;)a--;n=r.noteTimings[a]}var i={},s={};if(n){i.top=n.top,i.height=n.height;var o=Math.max(0,e-r.startTime-n.milliseconds),c=t-n.milliseconds,l=n.endX-n.left,h=c?o*l/c:0;i.left=n.left+h,0===r.currentEvent&&n.milliseconds>e-r.startTime&&(i.left=void 0),s={timestamp:e,startTime:r.startTime,ev:n,endMs:t,offMs:o,offPx:h,gapMs:c,gapPx:l}}else s={timestamp:e,startTime:r.startTime};var u=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,i,s),u!==r.startTime)return e-r.startTime;r.currentBeat++}return null},r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,60))},r.start=function(e,t){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,void 0===e&&(r.justUnpaused=!0)),e)r.setProgress(e,t);else if(0===e)r.reset();else if(null!==r.pausedPercent){var n=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=n-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,60)},r.pause=function(){r.isPaused=!0;var e=performance.now();r.pausedPercent=(e-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(e,t){var n;switch(t){case"seconds":r.currentTime=1e3*e,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=e*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;default:(n=e)<0&&(n=0),n>1&&(n=1),r.currentTime=r.lastMoment*n}r.isRunning||(r.pausedPercent=n);var a=performance.now();for(r.startTime=a-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation=0&&"event"===r.noteTimings[r.currentEvent].type&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,60)}}},1592:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=r(8905),i=r(9565),s=r(2426),o={};!function(){"use strict";o.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=o.TuneBook=function(e){var t=i(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t=0&&h0,v=0;v=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:i.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=o},6859:function(e,t,r){var n=r(1592),a=(r(6780),r(5253)),i=r(8905),s=r(1756),o={};function c(){var e=window.innerWidth;for(var t in o)if(o.hasOwnProperty(t)){var r=o[t];e-=2*r.offsetLeft,r.style.width=e+"px"}}try{window.addEventListener("resize",c),window.addEventListener("orientationChange",c)}catch(e){}function l(e,t,r,n,i){r.viewportHorizontal?(e.innerHTML='
    ',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",o[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='
    ',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var s=new a(e,r);s.engraveABC(t,n,i),t.engraver=s,(r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}e.exports=function(e,t,r,o,c){var h,u={};if(r){for(h in r)r.hasOwnProperty(h)&&(u[h]=r[h]);u.warnings_id&&u.tablature&&(u.tablature.warning_id=u.warnings_id)}if(o)for(h in o)o.hasOwnProperty(h)&&("listener"===h?o[h].highlight&&(u.clickListener=o[h].highlight):u[h]=o[h]);if(c)for(h in c)c.hasOwnProperty(h)&&(u[h]=c[h]);return n.renderEngine((function(e,t,r,n){var o=!1;return"*"===e&&(o=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),!o&&u.wrap&&u.staffwidth?(t=function(e,t,r,n,o){var c=new a(e,o).getMeasureWidths(t),h=s.calcLineWraps(t,c,o);if(h.reParse){var u=new i;u.parse(n,h.revisedParams),t=u.getTune();var d=u.getWarnings();d&&(t.warnings=d)}return o.afterParsing&&o.afterParsing(t,r,n),l(e,t,h.revisedParams,r,0),t.explanation=h.explanation,t}(e,t,r,n,u),t):(u.afterParsing&&u.afterParsing(t,r,n),l(e,t,u,r,0),o&&e.parentNode.removeChild(e),null)}),e,t,u)}},9989:function(e,t,r){var n=r(1592),a=r(5253);e.exports=function(e,t){return n.renderEngine((function(e,r,n,i){(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e);var s=new a(e,t).getMeasureWidths(r);return e.parentNode.removeChild(e),{sections:s}}),"*",e,t)}},9447:function(e,t,r){var n=r(4914).relativeMajor,a={acc:"sharp",note:"f"},i={acc:"sharp",note:"c"},s={acc:"sharp",note:"g"},o={acc:"sharp",note:"d"},c={acc:"sharp",note:"A"},l={acc:"sharp",note:"e"},h={acc:"flat",note:"B"},u={acc:"flat",note:"e"},d={acc:"flat",note:"A"},f={acc:"flat",note:"d"},p={acc:"flat",note:"G"},m={acc:"flat",note:"c"},g={"C#":[a,i,s,o,c,l,{acc:"sharp",note:"B"}],"F#":[a,i,s,o,c,l],B:[a,i,s,o,c],E:[a,i,s,o],A:[a,i,s],D:[a,i],G:[a],C:[],F:[h],Bb:[h,u],Eb:[h,u,d],Cm:[h,u,d],Ab:[h,u,d,f],Db:[h,u,d,f,p],Gb:[h,u,d,f,p,m],Cb:[h,u,d,f,p,m,{acc:"flat",note:"F"}],"A#":[h,u],"B#":[],"D#":[h,u,d],"E#":[h],"G#":[h,u,d,f],none:[]};e.exports=function(e){var t=g[n(e)];return t?JSON.parse(JSON.stringify(t)):null}},4914:function(e){var t={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=null;e.exports={relativeMajor:function(e){r||function(){r={};for(var e=Object.keys(t),n=0;n=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;ee)return c}}return null},this.addElementToEvents=function(e,t,r,a,i,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f0)for(var s=i.staffs[0],o=s.absoluteY,c=o-s.top*a.STEP,l=i.staffs[i.staffs.length-1],h=(o=l.absoluteY)-l.bottom*a.STEP-c,u=i.voices,d=0;d0&&o["event"+p]&&(w="event"+p),p=Math.round(1e3*f),"bar"===C.type){var S=C.abcelem.type,_="bar_right_repeat"===S||"bar_dbl_repeat"===S,E="1"===C.abcelem.startEnding,M="bar_left_repeat"===S||"bar_dbl_repeat"===S||"bar_right_repeat"===S;if(_){x>0&&(o[w].endX=C.x),-1===g&&(g=x);var A=0;y=-1;for(var N=m;N=0;i--){var s=e[i];"bar"===s.type?(s.top=n,s.nextTop=t,t=n,s.bottom=a,s.nextBottom=r,r=a):"event"===s.type&&(n=s.top,a=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(e,r){if(!(r.length<1)){for(var n=0;na.left&&(a.endX=Math.min(a.endX,s)):a.endX=s}}var o=r[r.length-1];o.endX=e[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:u}),this.addUsefulCallbackInfo(s,b*a),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),n=0;n0?e.duration[0]:r)/r}if(!t){t=180;var n=this.getMeterFraction();n&&3!==n.num&&n.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var r=this.metaText?this.metaText.tempo:null,n=this.getBpm(r),a=1;e?r&&(a=e/n):e=n;var i=this.getBeatLength(),s=e/60,o=this.getBarLength()/i*t/s;o&&(o-=this.getPickupLength()/i/s);var c=i*s;return this.noteTimings=this.setupEvents(o,c,e,a),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=i(this,e);return s(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return o(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(e,t)||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(e,t){return e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),e},this.setReadOnly=function(e){var t="abc_textarea_readonly",r=this.editarea.getElem();e?(r.setAttribute("readonly","yes"),this.addClassName(r,t)):(r.removeAttribute("readonly"),this.removeClassName(r,t))}};c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new a,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}},c.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=s(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("
    "):"No errors"),this.updateSelection(),this.bReentry=!1}},c.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},c.prototype.getTunes=function(){return this.tunes},c.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}},c.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},c.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(e){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(e){if(void 0!==this.indicate_changed){var t,r,a="abc_textarea_dirty",i=this.editarea.getElem();e?function(e,t){var r=e.className;return r.length>0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(t=i,r=a)||(t.className+=(t.className?" ":"")+r):function(e,t){e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," "))}(i,a)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(e,t,r,n,a,i){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,n,a,i)},c.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return this.synth&&this.synth.synthControl&&this.synth.synthControl.visualObj?this.synth.synthControl.visualObj.millisecondsPerMeasure():0},c.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},e.exports=c},3284:function(e,t,r){var n,a=r(9991);!function(){"use strict";function e(e,t,r){for(var n=Object.keys(t),a=0;ai){var c=(n[s]-i)*r;e.addRest(c),i=n[s]}for(var l=0;l128&&(s=s.substring(0,124)+"...");var o=t.getKeySignature(),c=t.getMeterFraction(),l=n.tempo,h=l/60;8==c.den&&(h=(l=6e4/(t.millisecondsPerMeasure()/c.num)/2)/60),i.setGlobalInfo(l,s,o,c);for(var u=0;uu&&(m=r.pan[u]),128===p.instrument?(i.setChannel(9,m),i.setInstrument(0)):(i.setChannel(p.channel,m),i.setInstrument(p.instrument));break;case"note":var g=p.gap*h,v=p.start,b=v+p.duration-g;d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:p.volume,cents:p.cents}),d[b]||(d[b]=[]),d[b].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}e(i,d,1920),i.endTrack()}return i.getData()}}(),e.exports=n},5008:function(e){var t={cloneArray:function(e){for(var t=[],r=0;r=0&&e.lastIndexOf(t)===r},last:function(e){return 0===e.length?null:e[e.length-1]}};e.exports=t},8905:function(e,t,r){var n=r(5008),a=r(8360),i=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),u="",d="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,metaTextInfo:t.metaTextInfo,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline,findSelectableElement:t.findSelectableElement,getSelectableArray:t.getSelectableArray};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e/g,">")},y=function(t,r,n){r||(r=" ");var a=r[n];" "!==a&&a||(a="SPACE");var i,s=b(r.substring(n-64,n))+''+a+""+b(r.substring(n+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(n+1)+": "+t+": "+s),i={message:t,line:r,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(i)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var x=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(o=o.replace(/\\([-_*|~])/g,"$1"),i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=!1,l=0;l0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":c||(o(l),a.push({skip:!0,to:"slur"}));break;case"*":c||(o(l),a.push({skip:!0,to:"next"}));break;case"|":c||(o(l),a.push({skip:!0,to:"bar"}));break;case"~":c||(s=!0)}c="\\"===r[l]}t.forEach((function(e){if(0!==a.length)if(a[0].skip){switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":o(c),a.push({skip:!0,to:"slur"});break;case"*":o(c),a.push({skip:!0,to:"next"});break;case"|":o(c),a.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==a.length)if(a[0].skip)switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},w=function(e){if(n.startsWith(e,"%%")){var t=a.addDirective(e.substring(2));t&&y(t,e,2)}else{var i=e.indexOf("%");if(i>=0&&(e=e.substring(0,i)),0!==(e=e.replace(/\s+$/,"")).length)if(u)x(r.getCurrentVoice(),e.substring(2));else if(d)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e[1]||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&x(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function C(e,t){e.push({el_type:"hint"});for(var r=0;r1){for(var b=1;b0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join(" ")}var C=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===n.last(C).length&&C.pop(),e=new o(C,v),m=new i(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&a.globalFormatting(h.format);for(var S=e.nextLine();S;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var _=v.is_in_header;w(S),_&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),S=e.nextLine()}u&&x(r.getCurrentVoice(),""),d&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var E=792,M=612;switch(v.papersize){case"legal":E=1008,M=612;break;case"A4":E=842.4,M=597.6}if(v.landscape){var A=E;E=M,M=A}t.formatting.pagewidth||(t.formatting.pagewidth=M),t.formatting.pageheight||(t.formatting.pageheight=E),h.hint_measures&&function(){for(var e=0;e1&&!n.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(e){n.startsWith(e,"%%")&&(t+=e+"\n")}));var c=t;return o.forEach((function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var a=e.pure.split("T:");a.length>1&&(a=a[1].split("\n"),e.title=n.strip(a[0]));var i=e.pure.substring(2,e.pure.indexOf("\n"));e.id=n.strip(i)})),{header:c,tunes:o}}},8360:function(e,t,r){var n=r(5008),a={};!function(){"use strict";var e,t,r,i,s;a.initialize=function(n,a,o,c,l){e=n,t=a,i=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,n,a,i){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[i]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",n,a),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",n,a),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",n,a)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",n,a):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",n,a):c=g.token:t("Expected font size in font definition.",n,a),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"finished":t('Extra characters found after "box" in font definition.',n,a)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",n,a),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",n,a),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],n,0,e),r.is_in_header&&(i.formatting[e]=r[e]),null)},h=function(e,t){var r="";t.forEach((function(e){r+=e.token}));var n=parseFloat(r);if(isNaN(n)||0===n)return'Directive "'+e+'" requires a number as a parameter.';i.formatting.scale=n},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,a,i){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=n[0].intt;return void 0!==a&&si?'Directive "'+t+'" requires a number less than or equal to '+i+" as a parameter.":(r[e]=s,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return r[e]="true"===n[0].token,null;var a=d(e,t,n,0,1);return null!==a?a:(r[e]=1===r[e],null)},p=function(e,t,n,a){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+a.join(", ")+" ] as a parameter.";for(var i=n[0].token,s=!1,o=0;!s&&o1&&r.setfont){var n=[];""!==t[0]&&n.push({text:t[0]});for(var a=1;a=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}a.addDirective=function(o){var M=e.tokenize(o,0,o.length);if(0===M.length||"alpha"!==M[0].type)return null;var A=o.substring(o.indexOf(M[0].token)+M[0].token.length);A=e.stripComment(A);var N,B=M.shift().token.toLowerCase(),P="";switch(B){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=A;break;case"graceslurs":if(1!==M.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===M[0].token||"false"===M[0].token)i.formatting.graceSlurs=!1;else{if("1"!==M[0].token&&"true"!==M[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+M[0].token+")";i.formatting.graceSlurs=!0}break;case"lineThickness":var L=E(M);if(void 0!==L.value&&(i.formatting.lineThickness=L.value),L.error)return L.error;break;case"stretchlast":var O=E(M);if(void 0!==O.value&&(i.formatting.stretchlast=O.value),O.error)return O.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",B,M,_);case"dynamic":return p("dynamicPosition",B,M,_);case"gchord":return p("chordPosition",B,M,_);case"ornament":return p("ornamentPosition",B,M,_);case"volume":return p("volumePosition",B,M,_);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(i.formatting[t]=n.value,null)}(B,M);case"voicescale":if(1!==M.length||"number"!==M[0].type)return"voicescale requires one float as a parameter";var H=M.shift();return r.currentVoice&&(r.currentVoice.scale=H.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(1!==M.length)return"voicecolor requires one string as a parameter";var z=M.shift();return r.currentVoice&&(r.currentVoice.color=z.token,s.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var D=Math.round(function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:n.value}(B,M));return D.error?D.error:(s.addSpacing(D),null);case"scale":h(B,M);break;case"sep":if(0===M.length)s.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var F=e.getMeasurement(M);if(0===F.used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var j=F.value;if(0===(F=e.getMeasurement(M)).used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var I=F.value;if(0===(F=e.getMeasurement(M)).used||0!==M.length)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var V=F.value;s.addSeparator(j,I,V,{startChar:r.iChar,endChar:r.iChar+A.length})}break;case"barsperstaff":if(null!==(P=d("barsperstaff",B,M)))return P;break;case"staffnonote":if(1!==M.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===M[0].token)r.staffnonote=!0;else{if("1"!==M[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+M[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(P=f("printTempo",B,M)))return P;break;case"partsbox":if(null!==(P=f("partsBox",B,M)))return P;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(P=f("freegchord",B,M)))return P;break;case"measurenb":case"barnumbers":if(null!==(P=d("barNumbers",B,M)))return P;break;case"setbarnb":if(1!==M.length||"number"!==M[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(M[0].intt);break;case"keywarn":if(1!==M.length||"number"!==M[0].type||1!==M[0].intt&&0!==M[0].intt)return"Directive "+B+" requires 0 or 1 as a parameter.";r[B]=1===M[0].intt;break;case"begintext":var Y="";for(N=e.nextLine();N&&0!==N.indexOf("%%endtext");){if(n.startsWith(N,"%%")){var G=N.substring(2);Y+=G=G.trim()+"\n"}else Y+=N.trim()+"\n";N=e.nextLine()}s.addText(Y,{startChar:r.iChar,endChar:r.iChar+Y.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(N=e.nextLine();N&&0!==N.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":A.length>0&&r.ignoredDecorations.push(A.substring(0,A.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var q=e.translateString(A);s.addText(a.parseFontChangeLine(q),{startChar:r.iChar,endChar:r.iChar+A.length+7});break;case"center":var W=e.translateString(A);s.addCentered(a.parseFontChangeLine(W));break;case"font":break;case"setfont":var R=e.tokenize(A,0,A.length);if(R.length>=4&&"-"===R[0].token&&"number"===R[1].type){var X=parseInt(R[1].token);X>=1&&X<=9&&(r.setfont||(r.setfont=[]),R.shift(),R.shift(),r.setfont[X]=c(R,r.setfont[X],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(B,M,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(i.formatting[e]=c(t,i.formatting[e],r,0,e),null)}(B,M,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",M,o);case"staves":case"score":r.score_is_present=!0;for(var U,K=function(e,t,a,i,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=n.last(r.staves);void 0!==a&&void 0===o.bracket&&(o.bracket=a),void 0!==i&&void 0===o.brace&&(o.brace=i),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},$=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,re=!1,ne=function(){if(re=!0,U){var e="start";U.staffNum>0&&("start"!==r.staves[U.staffNum-1].connectBarLines&&"continue"!==r.staves[U.staffNum-1].connectBarLines||(e="continue")),r.staves[U.staffNum].connectBarLines=e}};M.length;){var ae=M.shift();switch(ae.token){case"(":$?t("Can't nest parenthesis in %%score",o,ae.start):($=!0,Z=!0);break;case")":!$||Z?t("Unexpected close parenthesis in %%score",o,ae.start):$=!1;break;case"[":Q?t("Can't nest brackets in %%score",o,ae.start):(Q=!0,ee=!0);break;case"]":!Q||ee?t("Unexpected close bracket in %%score",o,ae.start):(Q=!1,r.staves[U.staffNum].bracket="end");break;case"{":J?t("Can't nest braces in %%score",o,ae.start):(J=!0,te=!0);break;case"}":!J||te?t("Unexpected close brace in %%score",o,ae.start):(J=!1,r.staves[U.staffNum].brace="end");break;case"|":ne();break;default:for(var ie="";("alpha"===ae.type||"number"===ae.type)&&(ie+=ae.token,ae.continueId);)ae=M.shift();K(ie,!$||Z,ee?"start":Q?"continue":void 0,te?"start":J?"continue":void 0,re),Z=!1,ee=!1,te=!1,re=!1,U=r.voices[ie],"staves"===B&&ne()}}break;case"maxstaves":var se=e.getInt(A);0===se.digits?t("Expected number of staves in maxstaves"):se.value>0&&(i.formatting.maxStaves=se.value);break;case"newpage":var oe=e.getInt(A);s.addNewPage(0===oe.digits?-1:oe.value);break;case"abc":var ce=A.split(" ");switch(ce[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var le=ce.shift();s.addMetaText(B+le,ce.join(" "),{startChar:r.iChar,endChar:r.iChar+A.length+5});break;default:return"Unknown directive: "+B+ce[0]}break;case"header":case"footer":var he=e.getMeat(A,0,A.length);'"'===(he=A.substring(he.start,he.end))[0]&&'"'===he[he.length-1]&&(he=he.substring(1,he.length-1));var ue=he.split("\t"),de={};de=1===ue.length?{left:"",center:ue[0],right:""}:2===ue.length?{left:ue[0],center:ue[1],right:""}:{left:ue[0],center:ue[1],right:ue[2]},ue.length>3&&t("Too many tabs in "+B+": "+ue.length+" found.",A,0),s.addMetaTextObj(B,de,{startChar:r.iChar,endChar:r.iChar+o.length});break;case"midi":var fe=e.tokenize(A,0,A.length,!0);fe.length>0&&"="===fe[0].token&&fe.shift(),0===fe.length?t("Expected midi command",A,0):function(e,r,n){var a=e.shift().token,i=[];if(m.indexOf(a)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+a,n,0);else if(g.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):i.push(e[0].token);else if(v.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+a,n,0):i.push(e[0].intt);else if(b.indexOf(a)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+a,n,0):(i.push(e[0].intt),2===e.length&&i.push(e[1].intt));else if(y.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt));else if(w.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+a,n,0):(i.push(e[0].token),i.push(e[1].intt));else if("drummap"===a)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,i=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,i=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+a,n,0);else if(C.indexOf(a)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[2].intt));else if(x.indexOf(a)>=0)4!==e.length?t("Expected four parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt));else if(k.indexOf(a)>=0)5!==e.length?t("Expected five parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt),i.push(e[4].intt));else if(b.indexOf(a)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+a,n,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+a,n,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+a,n,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+a,n,0)):(i.push(e[0].intt),4===e.length&&i.push(e[3].intt));else if(T.indexOf(a)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else{var o=e.shift();for(i.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+a,n,0),i.push(o.intt)}else if(S.indexOf(a)>=0)if(1!==e.length&&2!==e.length)t("Expected one or two parameters in MIDI "+a,n,0);else if("number"!==e[0].type)t("Expected integer parameter in MIDI "+a,n,0);else if(2===e.length&&"alpha"!==e[1].type)t("Expected alpha parameter in MIDI "+a,n,0);else if(i.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?t("Expected octave value in MIDI"+a):(c<-1&&(t("Expected octave= in MIDI "+a+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(t("Expected octave= in MIDI "+a+" to be <= 3 (recv:"+c+")"),c=3),i.push(c))):t("Expected octave= in MIDI"+a)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:a,params:i}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[a]=i)}(fe,i,A);break;case"percmap":var pe=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],n=parseInt(t[1],10);if((isNaN(n)||n<35||n>81)&&t[1]&&(n=u.indexOf(t[1].toLowerCase())+35),isNaN(n)||n<35||n>81)return{error:'Expected drum name, received "'+t[1]+'"'};var a={sound:n};return 3===t.length&&(a.noteHead=t[2]),{key:r,value:a}}(A);pe.error?t(pe.error,o,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[pe.key]=pe.value);break;case"visualtranspose":var me=e.getInt(A);0===me.digits?t("Expected number of half steps in visualTranspose"):r.globalTranspose=me.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[B]=A;break;default:return"Unknown directive: "+B}return null},a.globalFormatting=function(n){for(var a in n)if(n.hasOwnProperty(a)){var s,o=""+n[a],c=e.tokenize(o,0,o.length);switch(a){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(a,c,o);break;case"scale":h(a,c);break;case"partsbox":null!==(s=f("partsBox",a,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",a,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var u=E(c);if(void 0!==u.value&&(i.formatting.stretchlast=u.value),u.error)return u.error;break;default:t("Formatting directive unrecognized: ",a,0)}}}}(),e.exports=a},9928:function(e,t,r){var n=r(5008),a=r(8360),i=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,n){i.initialize(e,t,r,n,o),a.initialize(e,t,r,n,o)},this.reset(e,t,r,s),this.setTitle=function(e,t){r.hasMainTitle?o.addSubtitle(e,{startChar:r.iChar,endChar:r.iChar+t+2}):(o.addMetaText("title",e,{startChar:r.iChar,endChar:r.iChar+t+2}),r.hasMainTitle=!0)},this.setMeter=function(n){if("C"===(n=e.stripComment(n)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===n.length||"none"===n.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var a=e.tokenize(n,0,n.length);try{var i=function(){var e=function(){var e={value:0,num:""},t=a.shift();for("("===t.token&&(t=a.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===a.length||"/"===a[0].token)return e;if(")"===(t=a.shift()).token){if(0===a.length||"/"===a[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===a.length)throw"Expected top number of meter";t=a.shift()}return e}();if(0===a.length)return e;var t=a.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=a.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===a.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=i();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===a.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,n,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var n=0;n0&&(r.default_length=i/s,r.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(n,a,i,s){try{var o=e.tokenize(n,a,i);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:s+a-2,endChar:s+i},h=!0,u=o.shift();if("quote"===u.type&&(l.preString=u.token,u=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===u.type&&"C"===u.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(u=o.shift()).type&&"="===u.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(u.token)}else{if("number"!==u.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(u.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(u=o.shift()).type||"="!==u.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(u.token)}}else{if("number"!==u.type)throw"Unknown value in Q: field";var d=parseInt(u.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=d;else{if(h=!1,"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(u.token);for(l.duration=[d/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";if(d=parseInt(u.token),"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(u.token),l.duration.push(d/f)}if("punct"!==(u=o.shift()).type&&"="!==u.token)throw"Expected = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(u.token)}}if(0!==o.length&&("quote"===(u=o.shift()).type&&(l.postString=u.token,u=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(l.suppress=!0),{type:h?"delaySet":"immediate",tempo:l}}catch(e){return t(e,n,a),{type:"none"}}},this.letter_to_inline_header=function(n,c,l){var h=!1,u=e.eatWhiteSpace(n,c);if(c+=u,n.length>=c+5&&"["===n[c]&&":"===n[c+2]){var d=n.indexOf("]",c),f=r.iChar+c,p=r.iChar+d+1;switch(n.substring(c,c+3)){case"[I:":var m=a.addDirective(n.substring(c+3,d));return m&&t(m,n,c),[d-c+1+u];case"[M:":var g=this.setMeter(n.substring(c+3,d));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):r.meter=g,[d-c+1+u];case"[K:":var v=i.parseKey(n.substring(c+3,d),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,r.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,i.fixKey(r.clef,r.key)),[d-c+1+u];case"[P:":var b=a.parseFontChangeLine(n.substring(c+3,d));return l||s.lines.length<=s.lineNum?r.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[d-c+1+u];case"[L:":return this.setDefaultLength(n,c+3,d),[d-c+1+u];case"[Q:":if(d>0){var y=this.setTempo(n,c+3,d,r.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):r.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):r.tempoForNextLine=["tempo",f,p,y.tempo]),[d-c+1+u,n[c+1],n.substring(c+3,d)]}break;case"[V:":if(d>0)return h=i.parseVoice(n,c+3,d),[d-c+1+u,n[c+1],n.substring(c+3,d),h];break;case"[r:":return[d-c+1+u]}}return[0]},this.letter_to_body_header=function(e,s){var c=!1;if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var l=a.addDirective(e.substring(s+2));return l&&t(l,e,s),[e.length];case"M:":var h=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&h&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,h),[e.length];case"K:":var u=i.parseKey(e.substring(s+2),o.hasBeginMusic());return u.foundClef&&o.hasBeginMusic()&&!1!==r.keywarn&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),u.foundKey&&o.hasBeginMusic()&&!1!==r.keywarn&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,i.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var d=e.indexOf("",s+2);-1===d&&(d=e.length);var f=this.setTempo(e,s+2,d,r.iChar);return"delaySet"===f.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,f.tempo),[d,e[s],n.strip(e.substring(s+2))];case"V:":return c=i.parseVoice(e,s+2,e.length),[e.length,e[s],n.strip(e.substring(s+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(n){var c=l[n[0]],h=n.length-2,u=e.translateString(e.stripComment(n.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else if(void 0!==c)o.addMetaText(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else{var d=r.iChar,f=d+n.length;switch(n[0]){case"H":for(o.addMetaTextArray("history",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();n&&":"!==n[1];)e.nextLine(),o.addMetaTextArray("history",a.parseFontChangeLine(e.translateString(e.stripComment(n))),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();break;case"K":this.resolveTempo();var p=i.parseKey(n.substring(2),!1);!r.is_in_header&&o.hasBeginMusic()&&!1!==r.keywarn&&(p.foundClef&&o.appendStartingElement("clef",d,f,r.clef),p.foundKey&&o.appendStartingElement("key",d,f,i.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(n,2,n.length);break;case"M":r.origMeter=r.meter=this.setMeter(n.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}):r.partForNextLine={title:u,startChar:d,endChar:f};break;case"Q":var m=this.setTempo(n,2,n.length,r.iChar);"delaySet"===m.type?r.tempo=m.tempo:"immediate"===m.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",d,f,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":r.titlecaps&&(u=u.toUpperCase()),this.setTitle(a.parseFontChangeLine(e.theReverser(u)),h);break;case"U":this.addUserDefinition(n,2,n.length);break;case"V":if(i.parseVoice(n,2,n.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",n,0);break;default:return{regular:!0}}}return{}}}},9708:function(e,t,r){var n=r(8360),a=r(2821),i={};!function(){var e,t,r,s;i.initialize=function(n,a,i,o,c){e=n,t=a,r=i,s=c},i.standardKey=function(e,t,n,i){return a.keySignature(r,e,t,n,i)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var r=o[e];return(r?r.mid:0)+t};i.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},i.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};i.addPosToKey=function(e,t){var r=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),r<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},i.fixKey=function(e,t){var r=Object.assign({},t);return i.addPosToKey(e,r),r};var h=function(e){var t=0,r=e[t++];"^"!==r&&"_"!==r||(r=e[t++]);var n=l[r];for(void 0===n&&(n=6);t0){l.foundKey=!0;var u="",d="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=h.token;if(o.length>0){var p=e.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,u=p.token),o.length>0){var m=e.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,d=m.token)}if(void 0===i.standardKey(f,h.token,u,0))return t("Unsupported key signature: "+f,a,0),l}var g,v=i.deepCopyKey(r.key),b=!s&&r.globalTranspose?-r.globalTranspose:0;if(s&&(g=r.globalTransposeOrigKeySig),r.key=i.deepCopyKey(i.standardKey(f,h.token,u,b)),s&&(r.globalTransposeOrigKeySig=g),r.key.mode=d,v&&!1!==r.keywarn){for(var y,x=0;x0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return t("Expected = after middle",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after middle",a,k.start);break}if(0===o.length)return t("Expected parameter after middle=",a,0),l;var E=e.getPitchFromTokens(o);E.warn&&t(E.warn,a,0),E.position&&(r.clef.verticalPos=E.position-6);break;case"transpose":if(o.shift(),0===o.length)return t("Expected = after transpose",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after transpose",a,k.start);break}if(0===o.length)return t("Expected parameter after transpose=",a,0),l;if("number"!==o[0].type){t("Expected number after transpose",a,o[0].start);break}r.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return t("Expected = after stafflines",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after stafflines",a,k.start);break}if(0===o.length)return t("Expected parameter after stafflines=",a,0),l;if("number"!==o[0].type){t("Expected number after stafflines",a,o[0].start);break}r.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return t("Expected = after staffscale",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after staffscale",a,k.start);break}if(0===o.length)return t("Expected parameter after staffscale=",a,0),l;if("number"!==o[0].type){t("Expected number after staffscale",a,o[0].start);break}r.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return t("Expected = after octave",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after octave",a,k.start);break}if(0===o.length)return t("Expected parameter after octave=",a,0),l;if("number"!==o[0].type){t("Expected number after octave",a,o[0].start);break}r.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return t("Expected = after style",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after style",a,k.start);break}if(0===o.length)return t("Expected parameter after style=",a,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=o[0].token,o.shift();break;default:t("error parsing style element: "+o[0].token,a,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return t("Expected = after clef",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after clef",a,k.start);break}if(0===o.length)return t("Expected parameter after clef=",a,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=o.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":M.token="alto";break;case"F":case"f":M.token="bass";break;case"G":case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,a,M.start)}o.length>0&&"number"===o[0].type&&(M.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(M.token+=o[0].token+o[1].token,o.shift(),o.shift()),r.clef={type:M.token,verticalPos:c(M.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),l.foundClef=!0;break;default:t("Unknown parameter: "+o[0].token,a,o[0].start),o.shift()}return l},i.parseVoice=function(n,a,i){var o=e.getMeat(n,a,i),l=o.start,u=o.end,d=e.getToken(n,l,u);if(0!==d.length){var f=!1;void 0===r.voices[d]&&(r.voices[d]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",n,l)),l+=d.length,l+=e.eatWhiteSpace(n,l);for(var p={startStaff:f},m=function(r){var a=e.getVoiceToken(n,l,u);void 0!==a.warn?t("Expected value for "+r+" in voice: "+a.warn,n,l):void 0!==a.err?t("Expected value for "+r+" in voice: "+a.err,n,l):0===a.token.length&&'"'!==n[l]?t("Expected value for "+r+" in voice",n,l):p[r]=a.token,l+=a.len},g=function(a,i,s){var o=e.getVoiceToken(n,l,u);void 0!==o.warn?t("Expected value for "+i+" in voice: "+o.warn,n,l):void 0!==o.err?t("Expected value for "+i+" in voice: "+o.err,n,l):0===o.token.length&&'"'!==n[l]?t("Expected value for "+i+" in voice",n,l):("number"===s&&(o.token=parseFloat(o.token)),r.voices[a][i]=o.token),l+=o.len},v=function(r,a){var i=e.getVoiceToken(n,l,u);if(void 0!==i.warn)t("Expected value for "+r+" in voice: "+i.warn,n,l);else if(void 0!==i.err)t("Expected value for "+r+" in voice: "+i.err,n,l);else{if(0!==i.token.length||'"'===n[l])return"number"===a&&(i.token=parseFloat(i.token)),i.token;t("Expected value for "+r+" in voice",n,l)}l+=i.len},b=function(a,i){var s=e.getVoiceToken(n,l,u);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+i+" in voice: "+s.warn,n,l);else if(0===s.token.length&&'"'!==n[l])t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[a][i]=o:t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l)}l+=s.len};l0&&(t+=u[0],"V"===u[1]&&this.startNewLine());for(var d=0;t0)t+=p[0],"V"===p[1]&&(l=!0);else{var m;for((!o.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((m=n.eatWhiteSpace(e,t))>0&&(t+=m),t>0&&""===e[t-1]&&(m=c.letter_to_body_header(e,t))[0]>0&&("V"===m[1]&&this.startNewLine(),t=m[0],i.start_new_line=!1),(m=P(e,t))[0]>0&&(t+=m[0]),(m=E(e,t))[0]>0){S.chord||(S.chord=[]);var g=n.translateString(m[1]);g=g.replace(/;/g,"\n");for(var y=!1,x=0;x0&&(S.force_end_beam_last=!0),t+=k}else if((m=-1===v.indexOf(e[t])?B(e,t):[0])[0]>0)null===m[1]?t+10&&(0===m[1].indexOf("style=")?S.style=m[1].substr(6):(void 0===S.decoration&&(S.decoration=[]),"beambr1"===m[1]?S.beambr=1:"beambr2"===m[1]?S.beambr=2:S.decoration.push(m[1]))),t+=m[0];else{if(!((m=M(e,t))[0]>0))break;S.gracenotes=m[1],t+=m[0]}if((m=L(e,t))[0]>0){d=0,void 0!==S.gracenotes&&(S.rest={type:"spacer"},S.duration=.125,i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+t,r+t+m[0],S),i.measureNotEmpty=!0,S={});var w={type:m[1]};0===w.type.length?a("Unknown bar type",e,t):(i.inEnding&&"bar_thin"!==w.type&&(w.endEnding=!0,i.inEnding=!1),m[2]&&(w.startEnding=m[2],i.inEnding&&(w.endEnding=!0),i.inEnding=!0,"bar_right_repeat"===m[1]?i.restoreStartEndingHoldOvers():i.duplicateStartEndingHoldOvers()),void 0!==S.decoration&&(w.decoration=S.decoration),void 0!==S.chord&&(w.chord=S.chord),w.startEnding&&void 0===i.barFirstEndingNum?i.barFirstEndingNum=i.currBarNumber:w.startEnding&&w.endEnding&&i.barFirstEndingNum?i.currBarNumber=i.barFirstEndingNum:w.endEnding&&(i.barFirstEndingNum=void 0),"bar_invisible"!==w.type&&i.measureNotEmpty&&F()&&(i.currBarNumber++,i.barNumbers&&i.currBarNumber%i.barNumbers==0&&(w.barNumber=i.currBarNumber)),i.addFormattingOptions(S,s.formatting,"bar"),o.appendElement("bar",r+f,r+t+m[0],w),i.measureNotEmpty=!1,S={}),t+=m[0]}else if("&"===e[t])(m=A(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,d++);else{if((m=O(e,t)).consumed>0&&(void 0!==m.startSlur&&(S.startSlur=m.startSlur),m.dottedSlur&&(S.dottedSlur=!0),void 0!==m.triplet&&(h>0?a("Can't nest triplets",e,t):(S.startTriplet=m.triplet,S.tripletMultiplier=m.tripletQ/m.triplet,S.tripletR=m.num_notes,h=void 0===m.num_notes?m.triplet:m.num_notes)),t+=m.consumed),"["===e[t]){t++;for(var C=null,j=!1,I=!1;!I;){var V=B(e,t);V[0]>0&&(t+=V[0]);var Y=z(e,t,{},!1);if(null!==Y&&void 0!==Y.pitch)V[0]>0&&0!==V[1].indexOf("style=")&&(void 0===S.decoration&&(S.decoration=[]),S.decoration.push(V[1])),Y.end_beam&&(S.end_beam=!0,delete Y.end_beam),void 0===S.pitches?(S.duration=Y.duration,S.pitches=[Y]):S.pitches.push(Y),delete Y.duration,V[0]>0&&0===V[1].indexOf("style=")&&(S.pitches[S.pitches.length-1].style=V[1].substr(6)),i.inTieChord[S.pitches.length]&&(Y.endTie=!0,i.inTieChord[S.pitches.length]=void 0),Y.startTie&&(i.inTieChord[S.pitches.length]=!0),t=Y.endChar,delete Y.endChar;else if(" "===e[t])a("Spaces are not allowed in chords",e,t),t++;else{if(t0&&(!S.rest||"spacer"!==S.rest.type)&&0==--h&&(S.endTriplet=!0);for(var G=!1;t":case"<":var q=D(e,t);t+=q[0]-1,i.next_note_duration=q[2],C?C*=q[1]:C=q[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var W=n.getFraction(e,t);C=W.value;var R=e[t=W.index];" "===R&&(j=!0),"-"===R||")"===R||" "===R||"<"===R||">"===R?t--:G=!0;break;case"0":C=0;break;default:G=!0}G||t++}}else a("Expected ']' to end the chords",e,t);void 0!==S.pitches&&(null!==C&&(S.duration=S.duration*C,j&&H(S)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S),i.measureNotEmpty=!0,S={}),I=!0}}}else{var X={},U=z(e,t,X,!0);void 0!==X.endTie&&_(i,d,!0),null!==U&&(void 0!==U.pitch?(S.pitches=[{}],void 0!==U.accidental&&(S.pitches[0].accidental=U.accidental),S.pitches[0].pitch=U.pitch,S.pitches[0].name=U.name,(U.midipitch||0===U.midipitch)&&(S.pitches[0].midipitch=U.midipitch),void 0!==U.endSlur&&(S.pitches[0].endSlur=U.endSlur),void 0!==U.endTie&&(S.pitches[0].endTie=U.endTie),void 0!==U.startSlur&&(S.pitches[0].startSlur=U.startSlur),void 0!==S.startSlur&&(S.pitches[0].startSlur=S.startSlur),void 0!==S.dottedSlur&&(S.pitches[0].dottedSlur=!0),void 0!==U.startTie&&(S.pitches[0].startTie=U.startTie),void 0!==S.startTie&&(S.pitches[0].startTie=S.startTie)):(S.rest=U.rest,"multimeasure"===U.rest.type&&F()&&(i.currBarNumber+=U.rest.text-1),void 0!==U.endSlur&&(S.endSlur=U.endSlur),void 0!==U.endTie&&(S.rest.endTie=U.endTie),void 0!==U.startSlur&&(S.startSlur=U.startSlur),void 0!==U.startTie&&(S.rest.startTie=U.startTie),void 0!==S.startTie&&(S.rest.startTie=S.startTie)),void 0!==U.chord&&(S.chord=U.chord),void 0!==U.duration&&(S.duration=U.duration),void 0!==U.decoration&&(S.decoration=U.decoration),void 0!==U.graceNotes&&(S.graceNotes=U.graceNotes),delete S.startSlur,delete S.dottedSlur,T(i,d,S)&&(void 0!==S.pitches?S.pitches[0].endTie=!0:"spacer"!==S.rest.type&&(S.rest.endTie=!0),_(i,d,!1)),(U.startTie||S.startTie)&&_(i,d,!0),t=U.endChar,h>0&&(!U.rest||"spacer"!==U.rest.type)&&0==--h&&(S.endTriplet=!0),U.end_beam&&H(S),S.rest&&"rest"===S.rest.type&&1===S.duration&&N(i)<=1&&(S.rest.type="whole",S.duration=N(i)),S.duration<1&&-1===b.indexOf(S.duration)&&0!==S.duration&&(S.rest&&"spacer"===S.rest.type||a("Duration not representable: "+e.substring(f,t),e,t)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S)||(this.startNewLine(),o.appendElement("note",r+f,r+t,S)),i.measureNotEmpty=!0,S={})}t===f&&(" "!==e[t]&&"`"!==e[t]&&a("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||u[0]>0,this.lineContinuation||(S={})}};var _=function(e,t,r){var n=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][n]=r},E=function(e,t){if('"'===e[t]){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||a("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1][0])r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1][0])r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1][0])r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1][0])r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1][0]){r[1]=r[1].substring(1);var s=n.getFloat(r[1]);if(0===s.digits)return a("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;if(r[1]=r[1].substring(s.digits),","!==r[1][0])return a("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(1);var o=n.getFloat(r[1]);if(0===o.digits)return a("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(o.digits);var c=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==i.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=h.chordName(i,r[1]);return r}return[0,""]},M=function(e,t){if("{"===e[t]){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||a("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o0&&(s[s.length-1].endBeam=!0):a("Unknown character '"+r[1][o]+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function A(e,t){if("&"===e[t]){for(var r=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-r,e.substring(r+1,t)]}return[0]}function N(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var B=function(e,t){var r=i.macros[e[t]];if(void 0!==r)return"!"!==r[0]&&"+"!==r[0]||(r=r.substring(1)),"!"!==r[r.length-1]&&"+"!==r[r.length-1]||(r=r.substring(0,r.length-1)),d.includes(r)?[1,r]:f.includes(r)?("hidden"===i.volumePosition&&(r=""),[1,r]):p.includes(r)?("hidden"===i.dynamicPosition&&(r=""),[1,r]):(i.ignoredDecorations.includes(r)||a("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=n.getBrackettedSubstring(e,t,5);if(s[1].length>1&&("^"===s[1][0]||"_"===s[1][0])&&(s[1]=s[1].substring(1)),d.includes(s[1]))return s;if(f.includes(s[1]))return"hidden"===i.volumePosition&&(s[1]=""),s;if(p.includes(s[1]))return"hidden"===i.dynamicPosition&&(s[1]=""),s;var o=m.findIndex((function(e){return s[1]===e[0]}));return o>=0?(s[1]=m[o][1],s):(o=g.findIndex((function(e){return s[1]===e[0]})))>=0?(s[1]=g[o][1],"hidden"===i.dynamicPosition&&(s[1]=""),s):"!"!==e[t]||1!==s[0]&&"!"===e[t+s[0]-1]?(a("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},P=function(e,t){for(var r=t;n.isWhiteSpace(e[t]);)t++;return[t-r]},L=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return a(r.warn,e,t),[r.len,""];for(var i=0;i="2"&&e[t+1]<="9"?(void 0!==r.triplet?a("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=w[r.triplet],r.num_notes=r.triplet,t+2="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):a("expected number after the two colons after the triplet to mark the duration",e,t):t+3="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):a("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r};C.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};i.partForNextLine.title&&(e.part=i.partForNextLine),e.clef=i.currentVoice&&void 0!==i.staves[i.currentVoice.staffNum].clef?Object.assign({},i.staves[i.currentVoice.staffNum].clef):Object.assign({},i.clef);var t=i.currentVoice?i.currentVoice.scoreTranspose:0;if(e.key=l.standardKey(i.key.root+i.key.acc+i.key.mode,i.key.root,i.key.acc,t),e.key.mode=i.key.mode,i.key.impliedNaturals&&(e.key.impliedNaturals=i.key.impliedNaturals),i.key.explicitAccidentals)for(var r=0;r=0?(r.duration=s.getBarLength(),r.rest.text=1,u="Zduration"):(a&&0!==i.next_note_duration?(r.duration=i.default_length*i.next_note_duration,i.next_note_duration=0,d=!0):r.duration=i.default_length,u="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===u||"duration"===u){var p=n.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index"!==e[t])return r;t--,u="broken_rhythm";break;case">":case"<":if(!l(u))return null;if(!a)return r.endChar=t,r;var g=D(e,t);t+=g[0]-1,i.next_note_duration=g[2],r.duration=g[1]*r.duration,u="end_slur";break;default:return l(u)?(r.endChar=t,r):null}if(++t===e.length)return l(u)?(r.endChar=t,r):null}return null},D=function(e,t){switch(e[t]){case">":return t"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],e.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],e.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",e.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],e.exports.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},e.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},e.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},e.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}},1881:function(e,t,r){var n=r(5008),a=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=e.substring(n,n+3).toLowerCase();switch((a.length>1&&" "===a[1]||"^"===a[1]||"_"===a[1]||"="===a[1])&&(a=a[0]),a){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""}}return{len:0}},this.getClef=function(e,t){var a=e,i=this.skipWhiteSpace(e);if(r(e,i))return{len:0};var s=!1,o=e.substring(i);if(n.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),i+=5),0===o.length&&s)return{len:i+5,warn:"No clef specified: "+a};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(i+=c,o=o.substring(c));var l=null;if(n.startsWith(o,"treble"))l="treble";else if(n.startsWith(o,"bass3"))l="bass3";else if(n.startsWith(o,"bass"))l="bass";else if(n.startsWith(o,"tenor"))l="tenor";else if(n.startsWith(o,"alto2"))l="alto2";else if(n.startsWith(o,"alto1"))l="alto1";else if(n.startsWith(o,"alto"))l="alto";else if(!t&&s&&n.startsWith(o,"none"))l="none";else if(n.startsWith(o,"perc"))l="perc";else if(!t&&s&&n.startsWith(o,"C"))l="tenor";else if(!t&&s&&n.startsWith(o,"F"))l="bass";else{if(t||!s||!n.startsWith(o,"G"))return{len:i+5,warn:"Unknown clef specified: "+a};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:i+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e[t+r];)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=null;switch(e[n]){case"^":case"_":case"=":a=e[n];break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};case"^":case"_":case"/":if(a+=e[n],n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var n=e.indexOf("%",t);for(n>=0&&n="A"&&e<="Z"||e>="a"&&e<="z"},i=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,n){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t=r?{len:1,err:"Missing close quote"}:{len:a-t+1,token:this.translateString(e.substring(n+1,a))}}for(var i=n;i=0?n.strip(e.substring(0,t)):n.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var n=e.shift();if("."===n.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(n=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};n=e.shift()}switch(n.token){case"pt":case"px":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(n),{used:t,value:parseFloat(r)}}};var u=function(e){return e=(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,r,n){for(var a=n||e[t],i=t+1,s=!1;ie.length-1&&(i=e.length-1),[i-t+1,u(e.substring(t+1,i)),!1])}};a.prototype.peekLine=function(){return this.lines[this.lineIndex]},a.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex11&&(f%=12);var p="m"===t[0]?l[f]:c[f],m=p+t,g=i(m);0!==g.length&&"flat"!==g[0].acc||(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==h[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==h[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),d?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:n}},s.chordName=function(e,t){return a(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var h=["c","d","e","f","g","a","b"],u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};s.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var a=t.accidental?t.name.substring(1):t.name,i=t.accidental?t.name[0]:"",s=n.pitchIndex(a);t.name=i+n.noteName(s+e.localTransposeVerticalMovement)}if(t.accidental){var o=function(e,t,r,n,a){for(var i=h[(e+49)%7],s=0,o=0;o2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=o[0],t.accidental=d[o[1]],t.name&&(t.name=f[o[1]]+t.name.replace(/[_^=]/g,""))}}},e.exports=s},867:function(e){var t={},r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];t.pitchIndex=function(e){return r.indexOf(e)},t.noteName=function(e){return r[e]},e.exports=t},4208:function(e){var t=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],a=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];e.exports=function(e,i,s,o){if(!i||i%12==0)return e;for(;i<0;)i+=12;i>11&&(i%=12);var c=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return e;var l=c[1],h=c[2],u=c[3],d=c[4];if((f=t.indexOf(l))<0&&(f=r.indexOf(l)),f<0&&(f=n.indexOf(l)),f<0&&(f=a.indexOf(l)),f<0)return e;f+=i,f%=12,e=s?o?a[f]:r[f]:o?n[f]:t[f];var f,p=h&&(h.indexOf("dim")>=0||h.indexOf("°")>=0);return p&&"A#"===e&&(e="Bb"),p&&"D#"===e&&(e="Eb"),p&&"A♯"===e&&(e="B♭"),p&&"D♯"===e&&(e="E♭"),h&&(e+=h),u&&((f=t.indexOf(u))<0&&(f=r.indexOf(u)),f<0&&(f=n.indexOf(u)),f<0&&(f=a.indexOf(u)),e+="/",f>=0?(f+=i,f%=12,e+=s?o?a[f]:r[f]:o?n[f]:t[f]):e+=u),d&&(e+=d),e}},575:function(e,t,r){var n=r(9708);function a(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t0&&c[l].voice.push({el_type:"note",duration:u,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),c[l].voice.push(g)),u=0):"note"===g.el_type?d?c[l].voice.push(g):(u+=g.duration,r[n]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type&&"color"!==g.el_type||c[l].voice.push(g);else{t=!0,d=!0,p=m,c[l].hasOverlay=!0,0===f&&(f=r[n]);for(var v=0;v=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:r[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}c[l].hasOverlay&&0===c[l].snip.length&&c[l].snip.push({start:p,len:h.length-p})}for(l=0;l=0;y--){var x=b.snip[y];o.voices[l].splice(x.start,x.len),o.voices[l].splice(x.start+1,0,{el_type:"stem",direction:"auto"});var k=s(o.voices[l],x.start);o.voices[l].splice(k,0,{el_type:"stem",direction:"up"})}for(y=0;y0&&"bar"!==e[r].el_type;r--);return r}function o(e,t,r,n){var a;n[t]||(n[t]=[]),n[t][r]||(n[t][r]=[]);for(var i=function(e,i,s){if(void 0===n[t][r][s]){for(a=0;a=t&&ct;){if(e[t].staff)return e[t];t++}return null}function h(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function u(e){for(var t=0;t0){if(void 0!==n.voices[0]){for(var a=!1,i=0;i0&&x[x.length-1].barNumber){var w=l(e.lines,b);w&&(w.staff[0].barNumber=x[x.length-1].barNumber),delete x[x.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,s},this.addTieToLastNote=function(t){var r=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var n=t[r];if("note"===n.el_type)return n}return null}(e);return!!(r&&r.pitches&&r.pitches.length>0)&&(r.pitches[0].startTie={},t&&(r.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(n,a,i,o){var c;return o.el_type=n,null!==a&&(o.startChar=a),null!==i&&(o.endChar=i),"note"===n?((c=o).duration?c.duration:0)>=.25||o.force_end_beam_last&&void 0!==e.potentialStartBeam?p(e):o.end_beam&&void 0!==e.potentialStartBeam?void 0===o.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(o,e):p(e):void 0===o.rest&&(void 0===e.potentialStartBeam?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o):p(e),delete o.end_beam,delete o.force_end_beam_last,o.rest&&"invisible"===o.rest.type&&delete o.decoration,!(e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum||(function(e,t,r,n,a){var i=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==r.pitches){var s=i.workingClef.verticalPos;r.pitches.forEach((function(e){e.verticalPos=e.pitch-s}))}if(void 0!==r.gracenotes){var o=i.workingClef.verticalPos;r.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}i.voices.length<=t.voiceNum&&(n[a]||(n[a]={}),g(e,t,n[a])),i.voices[t.voiceNum].push(r)}(t,e,o,r,s),0))},this.appendStartingElement=function(t,r,n,a){var i;h(e),"key"===t&&(i=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var s=Object.assign({},a);if(e.lines[e.lineNum]){var o=e.lines[e.lineNum].staff;if(o){o.length<=e.staffNum&&(o[e.staffNum]={},o[e.staffNum].clef=Object.assign({},o[0].clef),o[e.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[e.staffNum].meter=Object.assign({},o[0].meter)),o[e.staffNum].workingClef=Object.assign({},o[0].workingClef),o[e.staffNum].voices=[[]]),"clef"===t&&(o[e.staffNum].workingClef=s);for(var c=o[e.staffNum].voices[e.voiceNum],l=0;l0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=function(e,t){if(e.length<=t)return null;for(;t>=0;){if(e[t].staff)return e[t];t--}return null}(e.lines,e.lineNum);if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r,n){e.staffNum=t,e.voiceNum=r,s=n;for(var a=0;a0?(r.push(i-1),n.push(Math.round(a-s)),a=s):is&&ds?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(n-t[c]),i.push(a-f),a=f):s=p}i.push(a)}function a(e,t,r,a){for(var i=Math.ceil(e.total/t),s=Math.floor(e.total/i),o=[],c=0;ct&&(s=!0),o%r==r-1&&(o!==e.length-1&&n.push(o),a.push(Math.round(i)),i=0);return{failed:s,totals:a,lineBreaks:n}}e.exports={wrapLines:function(e,t,r){if(t&&0!==e.lines.length){var n=e.deline({lineBreaks:!1}),a=function(e,t){for(var r=[],n=0,a=0,i=0,s=0;s0&&(n[c.line].staff[c.staff].barNumber=s);for(var h=Object.keys(l),u=0;u=0;p--)if("key"===f[p].el_type){a[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){i[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==r&&0===c.staff&&0===c.voice)for(p=0;p0&&p.measureWidths.length<25&&(k=a(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}u.push(y),d.push(b)}var w=function(e,t,r){var n={lineBreaks:e,staffwidth:t};for(var a in r)r.hasOwnProperty(a)&&"wrap"!==a&&"staffwidth"!==a&&(n[a]=r[a]);return{revisedParams:n}}(u,n.staffwidth,n);return w.explanation=d,w.reParse=!0,w}}},5633:function(e,t,r){function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,s=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw s}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2?n+=7:-12===r&&(n-=7):r>0&&n<0?n+=7:r<0&&n>0&&(n-=7),r>12?n+=7:r<-12&&(n-=7),n}function o(e,t,n,i,s,o){for(var c=[],l=a(s,n,o),h={},d={},f=0;f1?a[1]:"",accidentals:i}}function m(e,t,r,n){for(var a=e.pitch,i=d.indexOf(e.name),s=(d.indexOf(t.root)+a)%7,o=i+r,c=e.oct;o>6;)c++,o-=7;for(;o<0;)c--,o+=7;for(var l=d[s],h="",u=e.adj,f="=",p=0;p4&&(l=l.toLowerCase()),{acc:h,name:l,upper:l.toUpperCase()}}var g=/([_^=]*)([A-Ga-g])([,']*)/,v=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,b=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,y=/(\s*)$/;function x(e,t,r,n){var a="none"===t?0:d.indexOf(t),i=e.match(g),s=i[2].toUpperCase(),o=d.indexOf(s)-a;o<0&&(o+=7);var c=f.indexOf(i[3]);s===i[2]&&c--;var l=n[s]||r[s]||"=";return{acc:i[1],name:s,pitch:o,oct:c,adj:T(i[1],r[s],n[s]),courtesy:i[1]===l}}function k(e,t,r,a,i){var s=e.substring(t,r),o=s.match(new RegExp(v.source+y.source));if(o){var c=o[1].length,l=o[2].length+o[3].length+o[4].length;t+=r-t-c-l,r-=l}else{var h=new RegExp(/([^\[]*)/.source+/\[/.source+"(?:"+b.source+"\\s*){1,8}"+/\-?](\d*\/*\d*)?([\>\<\-\)]*)/.source+y.source);if(o=s.match(h)){var u,d=o[1].length+1,f=s.slice(o[1].length+1,s.lastIndexOf("]")),p=[],m=new RegExp(b.source+"\\s*","g"),g=n(f.matchAll(m));try{for(g.s();!(u=g.n()).done;){var x=u.value,k=x[0].trim();""!==k&&p.push({text:k,index:x.index})}}catch(e){g.e(e)}finally{g.f()}if(i>=p.length)throw new Error("Chord index out of range for chord: "+s);var w=p[i],C=w.text.match(/^(.+?)(\d+\/?\d*)?(-)?$/);C?C[1]:w.text,a=a+(C&&C[2]?C[2]:"")+(C&&C[3]?C[3]:""),r=(t+=d+w.index)+w.text.length}}return{start:t,end:r,note:a}}function w(e,t,r,n,a){var i=/(\/*)/,s=e.substring(t,r).match(new RegExp(/([^\{]*)/.source+/\{/.source+i.source+b.source+i.source+b.source+i.source+b.source+i.source+b.source+i.source+b.source+i.source+b.source+i.source+b.source+i.source+b.source+/\}/.source));if(s){for(var o=1+s[1].length,c=0;c=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function O(e){return e/1e6}function H(e){return Math.round(e*k*1e6)/1e6}function z(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function D(e,t,r){if(t)return 0;var n,a,i,s=S,o=_,c=E;if(void 0!==r&&M.length>=r+1&&(s=M[r][0],o=M[r][1],c=M[r][2]),void 0!==g)n=g,g=void 0;else if(T)if(P>e)n=c;else{var l=(a=m,i=z(w),(e-a)/i);n=0===l?s:parseInt(l,10)===l?o:c}else n=o;return v&&(n+=v,v=void 0),n<0&&(n=0),n>127&&(n=127),t?0:n}function F(e,t){var r=t.start,n=t.duration,a=H(1/32);switch(e){case"trill":for(var i=2;n>0;)u.push({cmd:"note",pitch:t.pitch+i,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),i=2===i?0:2,n-=a,r+=a;break;case"trillh":for(i=1;n>0;)u.push({cmd:"note",pitch:t.pitch+i,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),i=1===i?0:1,n-=a,r+=a;break;case"pralltriller":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"mordent":case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch-2,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"turn":a=t.duration/4,u.push({cmd:"note",pitch:t.pitch+2,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r+2*a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+3*a,duration:a,gap:0,instrument:h,style:"decoration"});break;case"roll":for(;n>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=2*a,r+=2*a}}function j(e,t){var r,n=D(O(e.time),t);if(p.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,n=0,a=[],s=0;sv&&(b=D(O(e.time),t,v));var y=g[v];if(y){y.startSlur&&(N+=y.startSlur.length),y.endSlur&&(N-=y.endSlur.length);var k=y.actualPitch?y.actualPitch:V(y);if(h===C&&x){var w=i(y);w&&x[w]&&(k=x[w].sound)}var T={cmd:"note",pitch:k,volume:b,start:O(e.time),duration:H(y.duration),instrument:h,startChar:e.elem.startChar,endChar:e.elem.endChar};if(T=G(T),e.gracenotes&&(T.duration=T.duration/2,T.start=T.start+T.duration),e.elem&&e.elem.midiPitches.push(T),m.noteModification)F(m.noteModification,T);else{switch(N>0?T.endType="tenuto":d&&(T.endType=d),T.endType){case"tenuto":T.gap=-.001;break;case"staccato":var S=.4*T.duration;T.gap=o/60*S;break;default:T.gap=0}u.push(T)}}}u.length}var _=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);f=Math.max(f,O(e.time)+H(_))}n=function(n,i,C,H){i||(i={}),H||(H={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=i.qpm,c=void 0,k=1,l=void 0,h=void 0,u=void 0,d=void 0,f=0,x=C,w={num:4,den:4},T=!0,S=105,_=95,E=85,M=[],A=.25,g=void 0,v=void 0,N=0,b=[],B={},y=1,n.length>0&&n[0].length>0&&(P=n[0][0].pickupLength),void 0===i.bassprog||H.bassprog||(H.bassprog=[i.bassprog]),void 0===i.bassvol||H.bassvol||(H.bassvol=[i.bassvol]),void 0===i.chordprog||H.chordprog||(H.chordprog=[i.chordprog]),void 0===i.chordvol||H.chordvol||(H.chordvol=[i.chordvol]),void 0===i.gchord||H.gchord||(H.gchord=[i.gchord]),p=new a(n.length,i.chordsOff,H,w),function(e,t){for(var r=0;r=0)&&(I=!0);for(var V=0;V0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=G.program;else{var q;for(q=u.length-1;q>=0&&"program"!==u[q].cmd;q--);(q<0||u[q].instrument!==G.program)&&u.push({cmd:"program",channel:0,instrument:G.program})}break;case"channel":L(G.channel);break;case"drum":B=W(G.params),R();break;case"gchordOn":p.gChordOn(G);break;case"beat":S=G.beats[0],_=G.beats[1],E=G.beats[2],M=G.volumesPerNotePitch?G.volumesPerNotePitch:[];break;case"vol":g=G.volume;break;case"volinc":v=G.volume;break;case"beataccents":T=G.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(G);break;default:console.log("MIDI creation. Unknown el_type: "+G.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=l||0),d&&u.unshift(d),s.push(u),p.finish(),b.length}return i.detuneOctave&&function(e,t){for(var r={},n=0;n1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(a=0;!h&&a0&&s.push(b),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var I=[0,2,4,5,7,9,11];function V(n){if(void 0!==n.midipitch)return n.midipitch;var a=n.pitch;if(n.accidental)switch(n.accidental){case"sharp":e[a]=1;break;case"flat":e[a]=-1;break;case"natural":e[a]=0;break;case"dblsharp":e[a]=2;break;case"dblflat":e[a]=-2;break;case"quartersharp":e[a]=.25;break;case"quarterflat":e[a]=-.25}var i=12*function(e){return Math.floor(e/7)}(a)+I[q(a)]+60;return void 0!==e[a]?i+=e[a]:i+=t[q(a)],i+=r}function Y(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function q(e){return(e%=7)<0&&(e+=7),e}function W(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],n="",a=0,i=0;it&&(r=r.substring(0,t)),function(e){for(var t="",r=0;r>=7;for(var n=r.length-1;n>=0;n--){t<<=8;var a=r[n];0!==n&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",r=0,n=256,a=0;a=0)return n;return n}function i(e,t,r){for(var n=Math.min(e.length,t+3),a=t;a=0)return e[a].decoration[i];return null}function s(e){for(var t=0;t=0&&"bar"!==r[n].el_type;)r[n].noChordVoice=!0,n--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var n=60;return e.bpm&&(n=e.bpm),r*n/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}n=function(n,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;n.visualTranspose&&(g-=n.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",x=h.drumBars||1,k=h.drumIntro||0,w=""!==y,C=!!h.drumOff,T=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),x=parseInt(x,10),k=parseInt(k,10);var S=n.formatting.bagpipes;S&&(m=71);var _=[];if(n.formatting.midi){var E=n.formatting.midi;E.program&&E.program.length>0&&(m=E.program[0],E.program.length>1&&(m=E.program[1],v=E.program[0]),b=!0),E.transpose&&(g=E.transpose[0]),E.channel&&(v=E.channel[0],b=!0),E.drum&&(y=E.drum),E.drumbars&&(x=E.drumbars[0]),E.drumon&&(w=!0),10===v&&(m=t),E.beat&&_.push({el_type:"beat",beats:E.beat}),E.nobeataccents&&_.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):n.metaText.tempo?c(n.metaText.tempo,n.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var M=[];S&&M.push({el_type:"bagpipes"}),M.push({el_type:"instrument",program:m}),v&&M.push({el_type:"channel",channel:v}),g&&M.push({el_type:"transpose",transpose:g}),M.push({el_type:"tempo",qpm:p});for(var A=0;A<_.length;A++)M.push(_[A]);var N,B=[],P=[],L=[],O=[],H=[0],z={};z[0]={el_type:"tempo",qpm:p,timing:0};for(var D=[],F=[],j=!1,I=n.lines,V=0;V=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t){var a=[N=n[t].slice(0)];Array.isArray(e.decoration)&&(a=[],e.decoration.forEach((function(e){e in n&&a.push(n[e].slice(0))}))),B[W].push({el_type:"beat",beats:N.slice(0),volumesPerNotePitch:a}),L[U]=!1,O[U]=!1}if(e.decoration.indexOf("crescendo(")>=0){var s=r(K,re,"crescendo)"),o=Math.min(127,N[0]+50),c=i(K,re+s+1,Object.keys(n));c&&(o=n[c][0]),L[U]=s>0&&Math.floor((o-N[0])/s),O[U]=!1}else if(e.decoration.indexOf("crescendo)")>=0)L[U]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var l=r(K,re,"diminuendo)"),h=Math.max(15,N[0]-50),u=i(K,re+l+1,Object.keys(n));u&&(h=n[u][0]),L[U]=!1,O[U]=l>0&&Math.floor((h-N[0])/l)}else e.decoration.indexOf("diminuendo)")>=0&&(O[U]=!1)}},q=Y.staff,W=0,R=0;R=0?(B[W].push({el_type:"transpose",transpose:-12}),P[W]=!0):X.clef.type.indexOf("+8")>=0?(B[W].push({el_type:"transpose",transpose:12}),P[W]=!0):P[W]&&(B[W].push({el_type:"transpose",transpose:0}),P[W]=!1)),n.formatting.midi&&n.formatting.midi.drumoff&&(B[W].push({el_type:"bar"}),B[W].push({el_type:"drum",params:{pattern:"",on:!1}}));var J=0,Z=0,ee=0,te=0;N=[105,95,85,1];for(var re=0;re=0?B[W].push({el_type:"transpose",transpose:-12}):ne.type.indexOf("+8")>=0&&B[W].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(ne,n.getBeatLength()),B[W].push({el_type:"tempo",qpm:p,timing:H[W]}),z[""+H[W]]={el_type:"tempo",qpm:p,timing:H[W]};break;case"bar":J>0&&B[W].push({el_type:"bar"}),G(ne),J=0;var oe="bar_right_repeat"===ne.type||"bar_dbl_repeat"===ne.type,ce="1"===ne.startEnding,le="bar_left_repeat"===ne.type||"bar_dbl_repeat"===ne.type||"bar_right_repeat"===ne.type;if(oe){var he=D[W];he||(he=0);var ue=F[W];ue||(ue=B[W].length);for(var de=he;de=0&&i!==t[""+o.timing].qpm&&(i=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[n].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(B,z),k)for(var me=n.getPickupLength(),ge=0;geve;)ve++;if(B[ge].length>ve){for(se=0;se0&&B[0].length>0&&(B[0][0].pickupLength=n.getPickupLength()),B}}(),e.exports=n},8702:function(e,t,r){var n=r(5281);e.exports=function(){return window.abcjsAudioContext||n(),window.abcjsAudioContext}},2710:function(e){e.exports=function(e){return Math.pow(2,e/1200)}},7207:function(e){var t=function(e,t,r,n){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=n,this.tempoChangeFactor=1,this.bassInstrument=r.bassprog&&r.bassprog.length>=1?r.bassprog[0]:0,this.chordInstrument=r.chordprog&&r.chordprog.length>=1?r.chordprog[0]:0,this.bassOctaveShift=r.bassprog&&2===r.bassprog.length?r.bassprog[1]:0,this.chordOctaveShift=r.chordprog&&2===r.chordprog.length?r.chordprog[1]:0,this.boomVolume=r.bassvol&&1===r.bassvol.length?r.bassvol[0]:64,this.chickVolume=r.chordvol&&1===r.chordvol.length?r.chordvol[0]:48,r.gchord&&r.gchord.length>0?this.overridePattern=a(r.gchord[0]):this.overridePattern=void 0};function r(e,t,r,a){var i=[];if(!e)return i;t.indexOf("boom")>=0?i.push(r?e.boom:e.boom2):a&&i.push(e.boom);var s=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,i(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},t.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},t.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=a(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},t.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},t.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},t.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t=0)return"break"}return null},t.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-1)).length)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var n=this.transpose;n<-8;)n+=12;for(;n>8;)n-=12;(r+=n)<33?r+=12:r>44&&(r-=12);var a,i=r,s=(r+=12*this.bassOctaveShift)-5;1===e.length&&(a=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(i--,r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(i++,r++,s++,o=o.substring(1));var l=o.split("/");if((a=this.chordNotes(i,l[0])).length>=3&&(s=s+(a[2]-a[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=this.basses[l[1].substring(0,1)]+h+n,s=r+=12*this.bassOctaveShift}return{boom:r,boom2:s,chick:a}}}},t.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var n=[],a=0;a0&&c[u-1]&&c[u]&&c[u-1].boom!==c[u].boom&&(d=!0);var p=l[u],m=p.indexOf("boom")>=0,g=!m&&0!==u&&l[0].indexOf("boom")>=0&&(!c[u-1]||c[u-1].boom!==c[u].boom),v=r(c[u],p,d,g);m&&(d=!1);for(var b=0;b0){var s=e.gap?e.gap:0,o=e.duration;s=Math.min(s,2*o/3);var c={pitch:e.pitch,instrument:i,start:Math.round(1e6*e.start)/1e6,end:Math.round(1e6*(e.start+o-s))/1e6,volume:e.volume};e.startChar&&(c.startChar=e.startChar),e.endChar&&(c.endChar=e.endChar),e.style&&(c.style=e.style),e.cents&&(c.cents=e.cents),t[r].push(c)}break;case"program":a=n[e.instrument];break;case"text":break;default:console.log("Unhandled midi event",e)}}))})),t}},6313:function(e,t,r){var n=r(5049),a=r(5281),i=r(8702),s=r(1225),o=r(9733),c=r(5075),l=r(5343),h=r(6987);function u(e,t,r,s,o){var c=!0;if(i()?c="suspended"===i().state:a(),!n())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&r&&r.classList.add("abcjs-loading"),c?i().resume().then((function(){s?s().then((function(n){d(e,t,r,o)})):d(e,t,r,o)})):d(e,t,r,o)}function d(e,t,r,n){n?e(t).then((function(){r&&r.classList.remove("abcjs-loading")})):(e(t),r&&r.classList.remove("abcjs-loading"))}e.exports=function(e,t){var r=this;if("string"==typeof e){var n=e;if(!(e=document.querySelector(n)))throw new Error('Cannot find element "'+n+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=Object.assign({},t)),r.options.ac&&a(r.options.ac),function(e,t){var r=!!t.loopHandler,n=!!t.restartHandler,a=!!t.playHandler||!!t.playPromiseHandler,i=!!t.progressHandler,u=!!t.warpHandler,d=!1!==t.hasClock,f='
    \n';if(r){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='\n"}if(n){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='\n"}if(a){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='\n"}if(i){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='\n'}if(d&&(f+='\n'),u){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+=' ( '+(t.bpm?t.bpm:"BPM")+")\n"}f+='
    CSS required: load abcjs-audio.css
    ',f+="
    \n",e.innerHTML=f}(r.parent,r.options),function(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,n=!!e.options.playHandler||!!e.options.playPromiseHandler,a=!!e.options.progressHandler,i=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){u(e.options.loopHandler,t,s,e.options.afterResume)})),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){u(e.options.restartHandler,t,s,e.options.afterResume)})),n&&s.addEventListener("click",(function(t){u(e.options.playPromiseHandler||e.options.playHandler,t,s,e.options.afterResume,!!e.options.playPromiseHandler)})),a&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){u(e.options.progressHandler,t,s,e.options.afterResume)})),i&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){u(e.options.warpHandler,t,s,e.options.afterResume)}))}(r),r.disable=function(e){var t=r.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},r.setWarp=function(e,t){r.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),r.setTempo(e)},r.setTempo=function(e){var t=r.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},r.resetAll=function(){for(var e=r.parent.querySelectorAll(".abcjs-pushed"),t=0;t0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(l)),i?i*=2:i=50,i<9e4)return new Promise((function(t,n){setTimeout((function(){var s=[];for(u=0;u0?e.audioBuffers[0].duration:0;return{status:s().state,duration:t}},o=s().currentTime,c=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*c,e.duration<=0)return e.audioBuffers=[],r({status:"empty",seconds:0});e.duration+=t;var l=Math.floor(s().sampleRate*e.duration);e.stop();var h=a(e.flattened);e.options.swing&&function(e,t,r,n){if(!(4!=r.den&&8!=r.den||(t=parseFloat(t),isNaN(t)||t<=50))){t>75&&(t=75),t=t/50-1;var a=0,i=.25;8===r.den&&(i/=2);for(var s=i/2,o=s*t,c=0;c=l[h].start+s)){var d=u.start;u.start+=o,u.volume*=1+a,h>0&&l[h-1].end==d&&(l[h-1].end=u.start,l[h-1].volume*=1-a)}}}}(h,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(h,e.callbackContext);var d=function(e,t){if(null==t)return null;var r=[];if(t.length){for(var n=0;n1&&(a=1),r.push(a)}else r.push(0);return r}var i=parseFloat(t);if(i*(e-1)>2)return null;for(var s=e%2==0,o=s?0-i/2:0,c=o+i,l=0;lr?d[r]:0;t.forEach((function(t){var r=t.instrument+":"+t.pitch+":"+t.volume+":"+Math.round(1e3*(t.end-t.start))/1e3+":"+n+":"+c+":"+(t.cents?t.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+r),f[r]||(f[r]=[]),f[r].push(t.start)}))}));for(var p=[],m=s().createBuffer(2,l,s().sampleRate),g=0;g';t.preTextDownload&&(i+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&(o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o)?t.downloadLabel(e,n):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),i+=''+s+"",t.postTextDownload&&(i+=t.postTextDownload),i+""};e.exports=function(e,t){var r={};if(t)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);function o(e,t,n){var s=a(t,r);switch(r.midiOutputType){case"encoded":return s;case"binary":var o=s.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),h=0;h4)for(a=a.toLowerCase(),t-=5;t>0;)a+="'",t--;else for(;t<4;)a+=",",t++;return a}}},522:function(e){e.exports={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},4586:function(e,t,r){var n=r(4771),a=r(522),i=r(2710),s=function(e,t,r){for(var n=0;n<2;n++)for(var a=t.getChannelData(n),i=e.getChannelData(n),s=0;s=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(r=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new i(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:r}),e.cursorControl&&e.cursorControl.onReady&&"function"==typeof e.cursorControl.onReady&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:t})}))},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)},e.runWhenReady=function(t,r){return e.visualObj?e.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return e.isLoading?e.runWhenReady(t,r):t(r)})):e.isLoaded?t(r):e.go().then((function(){return t(r)})):Promise.resolve({status:"loading"});var n},e._play=function(){return s().resume().then((function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&"function"==typeof e.cursorControl.onStart&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})}))},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(t){return e.runWhenReady(e._randomAccess,t)},e._randomAccess=function(t){var r=t.target.classList.contains("abcjs-midi-progress-indicator")?t.target.parentNode:t.target,n=(t.x-r.getBoundingClientRect().left)/r.offsetWidth;return n<0&&(n=0),n>1&&(n=1),e.seek(n),Promise.resolve({status:"ok"})},e.seek=function(t,r){e.timer&&e.midiBuffer&&(e.timer.setProgress(t,r),e.midiBuffer.seek(t,r))},e.setWarp=function(t){if(parseInt(t,10)>0){e.warp=parseInt(t,10);var r=e.isStarted,n=e.percent;return e.destroy(),e.isStarted=!1,e.go().then((function(){return e.setProgress(n,1e3*e.midiBuffer.duration),e.control&&e.control.setWarp(e.currentTempo,e.warp),r?e.play().then((function(){return e.seek(n),Promise.resolve()})):(e.seek(n),Promise.resolve())}))}return Promise.resolve()},e.onWarp=function(t){var r=t.target.value;return e.setWarp(r)},e.setProgress=function(t,r){e.percent=t,e.control&&e.control.setProgress(t,r)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&"function"==typeof e.cursorControl.onFinished&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(t,r,n,a){var i=t/r;e.setProgress(i,n),e.cursorControl&&e.cursorControl.onBeat&&"function"==typeof e.cursorControl.onBeat&&e.cursorControl.onBeat(t,r,n,a)},e.eventCallback=function(t){if(!t)return e.finished();e.cursorControl&&e.cursorControl.onEvent&&"function"==typeof e.cursorControl.onEvent&&e.cursorControl.onEvent(t)},e.lineEndCallback=function(t,r){e.cursorControl&&e.cursorControl.onLineEnd&&"function"==typeof e.cursorControl.onLineEnd&&e.cursorControl.onLineEnd(t,r)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(t){var r=e.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=r,n.download=t||"output.wav",n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)}}},2029:function(e){e.exports=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,n,a,i){var s={cmd:"note",duration:n,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:a};i&&(s.cents=i),e.tracks[t].push(s),e.starts[t]+=n,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}},2426:function(e,t,r){var n=r(6074),a={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},i={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new n),this.inited=!0);var i=null;if(r.tablature){var s=r.tablature;i=[];for(var o=0;o0)for(var a=r.length,i=0;i1&&r&&r.length>0)for(a=r.length,i=0;i=0;n--)if(t.pitch+t.pitchAltered>=e.stringPitches[n]){var a=t.pitch+t.pitchAltered-e.stringPitches[n];return"^"===t.quarter?a-=.5:"v"===t.quarter&&(a+=.5),{num:Math.round(a),str:e.stringPitches.length-1-n,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function l(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}function h(e){var t=e.tuning,r=e.capo,s=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var o=0;o0&&(this.capoTuning=function(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var n=0;n0&&(r=e.capoTuning);for(var n=r.length-1,a=0;a1?(o=s(this,e)).error&&(i=o.error):e[0].endTie||((r=new a(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(n=c(this,r))?o.push(n):(l(o,r),i=o.error))),i)return o;var h=null;if(t){h=[];for(var u=0;u0&&(r+=" capo:"+e.capo),t=t.replace("%T",r)),t}return""},h.prototype.suppress=function(e){return!!e.params.suppress},e.exports=h},8918:function(e){function t(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}t.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},t.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var n=this.bar.pitch2/2;if("dots.dot"==e.name)return r?(t.pitch=n,!1):(t.pitch=n+this.lineSpace,!0)}return r},e.exports=t},6776:function(e,t,r){var n=r(2842),a=n.noteToMidi,i=n.midiToNote;function s(e,t){var r=a(e);t&&(r+=t);var n,s=i(r),o=!1,c=!1,l=null,h=null,u=!1,d=0;e.startsWith("_")?(o=!0,d=-1,"/"==e[1]?(o=!1,h="v",d=0):"_"==e[1]&&(u=!0,d-=1)):e.startsWith("^")?(c=!0,d=1,"/"==e[1]?(c=!1,h="^",d=0):"^"==e[1]&&(u=!0,d+=1)):e.startsWith("=")&&(l=!0,d=0),((n=o||c||null!=h)||l)&&(s=null!=h||u?e.slice(2):e.slice(1));var f=(s.match(/,/g)||[]).length,p=(s.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=s,this.acc=d,this.isSharp=c,this.isKeySharp=!1,this.isDouble=u,this.isAltered=n,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=h,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}s.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},s.prototype.isLowerThan=function(e){return e.pitch>this.pitch},s.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var r=this.name,n=0;n=0){if(r===t)return e.extra[n].x+e.extra[n].w/2;r++}return-1}function f(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function p(e,t,r){var n=e.semantics.notesToNumber(t,r);if(n.error)return e.setError(n.error),n;if(n.graces&&n.notes){var a=n.notes.length-1;n.notes[a].graces=n.graces}return n}function m(e,t,r,n,a){for(var i=0;i=0&&(e.semantics.clefTranspose=-12),k.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),k.type){case"staff-extra key-signature":this.accidentals=k.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var T=!1;x===g.children.length-1&&(T=!0);var S=o(k,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var _=0;_0&&(y.abselem=M,r.push(y),v.children.push(M))}}},e.exports=h},4785:function(e,t,r){var n=r(3197),a=r(4240),i=r(4331);function s(e,t,r){var n=e.semantics,a=t.controller.getTextSize,i=n.tabInfos(e),s=!0;if(n.suppress(e)&&(s=!1),s){var o=a.calc(i,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:o.height,width:o.width},name:i},o.height}return 0}function o(e,t){return!(!t[e].isTabStaff||e!==t.length-1&&t[e+1].isTabStaff)}function c(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function l(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}e.exports=function(e,t,r,h){var u=new a,d={clef:{type:"TAB"}},f=e.linePitch*e.nbLines,p=r.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void e.setError("No tablatures when stafflines=0");p.splice(p.length,0,d)}var g=r.staffGroup,v=g.voices,b=function(e){for(var t=0,r=0;rt&&(t=n.specialY.lyricHeightBelow)}return t}(v[0]),y=h,x=g.staffs[y],k=f+3-x.bottom-b;x.isTabStaff&&(k=x.top);var w={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:k},C=function(e,t){for(var r=0,n=0,a=0;;){if(!t[r])return-1;if(t[r].isTabStaff||(a=t[r].voices.length),t[r].isTabStaff){if(n++,o(r,t)&&n=e){if(r+1==t.length)return r+1;if(!t[r+1].isTabStaff)return r+1}if(++r>t.length)return-1}}(h,g.staffs);if(-1!==C){w.parentIndex=C-1,g.staffs.splice(C,0,w),g.height+=f+3;var T=function(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}(g.staffs,C),S=1;(function(e,t){return 1===function(e){for(var t=0,r=0;r1})(g.staffs,T)&&(S=T.voices.length),d.voices=[];for(var _=0;_0&&(E.duplicate=!0);var M=s(e,t,E)/i.STEP;M=Math.max(M,1),g.staffs[h].top+=1,g.height+=M,E.staff=w;var A=v.length;v.splice(v.length,0,E);var N=l(v,_+h);d.voices[_]=[],u.build(e,v,d.voices[_],_,h,N,A)}!function(e){for(var t=0;t0&&(i[0].invisible=!0);break;case"meter":i[0]=l(a,this.tuneNumber),this.startlimitelem=i[0],r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"clef":if(i[0]=s(a,this.tuneNumber),!i[0])return null;r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"key":var h=o(a,this.tuneNumber);h&&(i[0]=h,this.startlimitelem=i[0]),r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"stem":this.stemdir="auto"===a.direction?void 0:a.direction;break;case"part":var u=new n(a,0,0,"part",this.tuneNumber),d=this.getTextSize.calc(a.title,"partsfont","part");u.addFixedX(new f(a.title,0,0,void 0,{type:"part",height:d.height/p.STEP})),i[0]=u;break;case"tempo":var m=new n(a,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(a,this.tuneNumber,c)),i[0]=m;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":T=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;case"color":this.voiceColor=a.color,r.color=this.voiceColor;break;default:var v=new n(a,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+a.el_type,0,0,void 0,{type:"debug"})),i[0]=v}return i},_.prototype.createBeam=function(e,t,r){var n=[],i=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);T&&i.setHint();for(var s=0;se.pitches[r+1].pitch){t=!1;var n=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=n}}while(!t)},N=function(e,t,r,n,a,i,s,o,c){for(var l=r;l>11;l--)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=0;l1&&(p=new a(i,"grace",s),T&&p.setHint(),p.mainNote=r);var m=[];for(u=e.gracenotes.length-1;u>=0;u--)o+=10,m[u]=o,e.gracenotes[u].accidental&&(o+=7);for(u=0;u=6?"down":"up";for(n&&(_=n),(a=t.style?t.style:a)&&"normal"!==a||(a="note"),(m=i?S[a].nostem:S[a][-s])||console.log("noteSymbol:",a,s,i),g="down"===_?t.pitches.length-2:1;"down"===_?g>=0:g11||M.verticalPos<1)&&x.push(M.verticalPos-M.verticalPos%2),"down"===_?b=d.getSymbolWidth(m)+2:v=d.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=z.accidentalshiftx,y=Math.max(y,z.dotshiftx)}if(H){var D=Math.round(70*this.voiceScale)/10,F="down"===_?t.minpitch-D:t.minpitch+1/3;F>6&&!n&&(F=6);var j="down"===_?t.maxpitch-1/3:t.maxpitch+D;j<6&&!n&&(j=6);var I="down"===_||0===e.heads.length?0:e.heads[0].w,V="down"===_?1:-1;h&&"noteheads.slash.quarter"===h.c&&("down"===_?j-=1:F+=1),h&&"noteheads.triangle.quarter"===h.c&&("down"===_?j-=.7:F-=1.2),e.addRight(new f(null,I,0,F,{type:"stem",pitch2:j,linewidth:V,bottom:F-1})),u=Math.min(F,j)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:u,additionalLedgers:x,dir:_,symbolWidth:T}},_.prototype.addLyric=function(e,t){var r="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var n=this.getTextSize.calc(r,"vocalfont","lyric"),a=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,n.width,void 0,{type:"lyric",position:a,height:n.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},_.prototype.createNote=function(e,t,r,a){var i,s=null,o=0,l=0,h=0,u=[],p=C(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y1,this.stemdir,r,g,this.voiceScale);s=M.noteHead,o=M.roomTaken,l=M.roomTakenRight}else{var A=this.addNoteToAbcElement(E,e,v,this.stemdir,this.style,m,g,t,a);void 0!==A.min&&(this.minY=Math.min(A.min,this.minY)),s=A.noteHead,o=A.roomTaken,l=A.roomTakenRight,u=A.additionalLedgers,i=A.dir,h=A.symbolWidth}if(void 0!==e.lyric&&this.addLyric(E,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,a,E,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration){var B=t&&"up"!==i?Math.min(-3,E.bottom-6):E.bottom;this.decoration.createDecoration(a,e.decoration,E.top,s?s.w:0,E,o,i,B,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&E.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),N(E,e.minpitch,e.maxpitch,e.rest,h,u,i,-2,1),void 0!==e.chord){var P=x(this.getTextSize,E,e,o,l,h,this.jazzchords,this.germanAlphabet);o=P.roomTaken,l=P.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),E},_.prototype.addSlursAndTies=function(e,t,r,n,a,i){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o10&&"treble"===t.abcelem.type?13.5:11;t.addFixed(new f(e,n,r.width,a+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},_.prototype.createBarLine=function(e,t,r){var a=new n(t,0,10,"bar",this.tuneNumber),i=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,a);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,d="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||d){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(a);this.startlimitelem=a}if(o&&(a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(i=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),"bar_invisible"===t.type&&(i=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),a.addRight(i)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,a,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),l&&(i=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),a.addRight(i),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=i,this.partstartelem=null),h&&(i=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),d&&(s+=3,a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r&&0===e.voicenumber){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;a.minspacing+=m+10,this.partstartelem=new u(t.startEnding,i,null),e.addOther(this.partstartelem)}return a.extraw-=5,void 0!==t.chord&&x(this.getTextSize,a,t,0,0,0,!1,this.germanAlphabet),a},e.exports=_},2652:function(e,t,r){var n=r(6658),a=r(4331),i=r(5810);function s(e,t,r,s,o,c,l,h,u,d,f,p,m,g,v){for(var b=e.split("\n"),y=b.length-1;y>=0;y--){var x,k=b[y],w=0;s||(k=i(k,g,v));var C=h.calc(k,o,c),T=C.width,S=C.height/a.STEP;switch(t){case"left":w=-(f+=T+7),x=d.averagepitch,u.addExtra(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"left"}));break;case"right":w=p+=4,x=d.averagepitch,u.addRight(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"right"}));break;case"below":u.addRight(new n(k,0,0,void 0,{type:"text",position:"below",height:S,dim:l,realWidth:T}));break;case"above":u.addRight(new n(k,0,0,void 0,{type:"text",position:"above",height:S,dim:l,realWidth:T}));break;default:if(r){var _=r.y+3*a.STEP;u.addRight(new n(k,w+r.x,0,d.minpitch+_/a.STEP,{position:"relative",type:"text",height:S,dim:l}))}else{var E="above";d.positioning&&d.positioning.chordPosition&&(E=d.positioning.chordPosition),"hidden"!==E&&u.addCentered(new n(k,m/2,T,void 0,{type:"chord",position:E,height:S,dim:l,realWidth:T}))}}}return{roomTaken:f,roomTakenRight:p}}e.exports=function(e,t,r,n,a,i,o,c){for(var l=0;l0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(d=3,u=0),o.addRight(new i("8",5+u,a.getSymbolWidth("8")*h,d,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},3923:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){if(e.el_type="keySignature",!e.accidentals||0===e.accidentals.length)return null;var r=new n(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var s=0;return e.accidentals.forEach((function(e){var t,n=0;switch(e.acc){case"sharp":t="accidentals.sharp",n=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",n=-1.2;break;case"quartersharp":t="accidentals.halfsharp",n=-2.5;break;case"quarterflat":t="accidentals.halfflat",n=-1.2;break;default:t="accidentals.flat"}r.addRight(new i(t,s,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t),top:e.verticalPos+a.symbolHeightInPitches(t)+n,bottom:e.verticalPos+n})),s+=a.getSymbolWidth(t)+2}),this),r}},2143:function(e,t,r){var n=r(6020),a=r(6658);e.exports=function(e,t,r,i){i||(i={});var s,o=void 0!==i.dir?i.dir:null,c=void 0!==i.headx?i.headx:0,l=void 0!==i.extrax?i.extrax:0,h=void 0!==i.flag?i.flag:null,u=void 0!==i.dot?i.dot:0,d=void 0!==i.dotshiftx?i.dotshiftx:0,f=void 0!==i.scale?i.scale:1,p=void 0!==i.accidentalSlot?i.accidentalSlot:[],m=void 0!==i.shouldExtendStem&&i.shouldExtendStem,g=void 0===i.printAccidentals||i.printAccidentals,v=r.verticalPos,b=0,y=0,x=0;if(void 0===t)e.addFixed(new a("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new a(null,0,0,v);else{var k=c;if(r.printer_shift){var w="same"===r.printer_shift?1:0;k="down"===o?-n.getSymbolWidth(t)*f+w:n.getSymbolWidth(t)*f-w}var C={scalex:f,scaley:f,thickness:n.symbolHeightInPitches(t)*f,name:r.name};if((s=new a(t,k,n.getSymbolWidth(t)*f,v,C)).stemDir=o,h){var T=v+("down"===o?-7:7)*f;m&&("down"===o&&T>6&&(T=6),"up"===o&&T<6&&(T=6));var S="down"===o?c:c+s.w-.6;e.addRight(new a(h,S,n.getSymbolWidth(h)*f,T,{scalex:f,scaley:f}))}for(y=s.w+d-2+5*u;u>0;u--){var _=1-Math.abs(v)%2;e.addRight(new a("dots.dot",s.w+d-2+5*u,n.getSymbolWidth("dots.dot"),v+_))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var E;switch(r.accidental){case"quartersharp":E="accidentals.halfsharp";break;case"dblsharp":E="accidentals.dblsharp";break;case"sharp":E="accidentals.sharp";break;case"quarterflat":E="accidentals.halfflat";break;case"flat":E="accidentals.flat";break;case"dblflat":E="accidentals.dblflat";break;case"natural":E="accidentals.nat"}for(var M=!1,A=l,N=0;N=6){p[N][0]=v,A=p[N][1],M=!0;break}!1===M&&(A-=n.getSymbolWidth(E)*f+2,p.push([v,A]),b=n.getSymbolWidth(E)*f+2);var B=n.symbolHeightInPitches(E);e.addExtra(new a(E,A,n.getSymbolWidth(E),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),x=n.getSymbolWidth(E)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:x}}},2525:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){e.el_type="timeSignature";var r=new n(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o",n)),o&&e.addOther(new a(o.start,o.stop,"<",n)),c&&e.addOther(new i(c.start,c.stop))},l.prototype.createDecoration=function(e,t,r,a,i,l,u,d,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,a){for(var i=0;i9&&d++;var m=n/2;"center"!==s.getSymbolAlign(p)&&(m-=s.getSymbolWidth(p)/2),a.addFixedX(new o(p,m,s.getSymbolWidth(p),d))}if("slide"===t[f]&&a.heads[0]){var g=a.heads[0].pitch,v=new o("",-i-15,0,(g-=2)-1),b=new o("",-i-5,0,g+1);a.addFixedX(v),a.addFixedX(b),e.addOther(new c({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===d&&(d=r),{above:d,below:a.bottom}}(e,t,r,a,i,l,u,d,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,d),function(e,t,r,n,a,i,c,l){function h(e,t){"above"===e?n.above+=t:n.below-=t}function u(e){var t;return"above"===e?(t=n.above)c&&(t=c),t}function d(e,n,a){var i=u(n);r.addFixedX(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3,anchor:a})),h(n,5)}function f(e,n){var a=t/2;"center"!==s.getSymbolAlign(e)&&(a-=s.getSymbolWidth(e)/2);var i=s.symbolHeightInPitches(e)+1,c=u(n);c="above"===n?c+i/2:c-i/2,r.addFixedX(new o(e,a,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e),position:n})),h(n,i)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=0;mthis.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(e){this._addChild(e)},i.prototype.addCentered=function(e){var t=e.w/2;-tthis.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},i.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},i.prototype._addChild=function(e){var t=!0;"clef"==this.abcelem.el_type&&"barNumber"==e.type&&(t=!1),e.parent=this,this.children[this.children.length]=e,t&&this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;tthis.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setStemDirection=function(){this.average=r(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},t.prototype.calcDir=function(){this.average=r(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",t=0;t0&&this.unalignedWords(e.unalignedWords,n,a,i,s),this.extraText(e,n,a,i,s),e.footer&&r&&this.footer(e.footer,t,n,s)}function s(e,t,r,n,i,s,o){r&&(t&&(r="string"==typeof r?t+r:[{text:t}].concat(r)),a(e,r,"historyfont",i=s?"abcjs-extra-text "+i:"","description",n,{absElemType:"extraText",anchor:"start"},o))}function o(e,t,r,i,s,o,c,l,h,u,d,f){if(r){l=d?"abcjs-extra-text "+l:"";var p=f.calc("A",s,l);if("string"==typeof r)t&&(r=t+"\n"+r),n(e,{marginLeft:i,text:r,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle",klass:l},f);else{e.push({startGroup:c,klass:l,name:h}),e.push({move:u.info}),t&&(n(e,{marginLeft:i,text:t,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle"},f),e.push({move:3*p.height/4}));for(var m=0;m0&&this.startVoice.staff.voices[0]===e)},e.exports=t},6891:function(e){e.exports=function(e,t,r,n){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===n?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},3185:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},8256:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},3736:function(e){e.exports=function(e,t,r,n,a,i){var s,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o){this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:n,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"});var l=o.replace(/^[ \t]*\n/gm,"X\n");s=i.calc(l,"textfont","defined-text"),this.rows.push({move:s.height})}else if(o){for(var h=0,u=n,d="textfont",f=0;fthis.top&&(this.top=this.pitch2),this.bottom=n,void 0!==this.pitch2&&this.pitch20?this.top+=a.stemHeight:this.bottom+=a.stemHeight),a.dim&&(this.dim=a.dim),a.position&&(this.position=a.position),this.height=a.height?a.height:4,a.top&&(this.top=a.top),a.bottom&&(this.bottom=a.bottom),a.name?this.name=a.name:this.c?this.name=this.c:this.name=this.type,a.realWidth?this.realWidth=a.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":a.position&&"below"===a.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},6994:function(e,t,r){var n=r(1716);e.exports=function(e,t,r,a,i,s,o,c){var l=c.calc("i",r,a);if(""===t)e.push({move:l.height});else{if("string"==typeof t)return void n(e,{marginLeft:s,text:t,font:r,klass:a,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:i},c);o.marginTop&&e.push({move:o.marginTop});var h=0,u={left:s,anchor:o.anchor,phrases:[]};a&&(u.klass=a),e.push(u);for(var d=0;d0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;te&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},t.prototype.getYBounds=function(){var e,t;return this.isTie?(this.calcTieDirection(),this.calcX(10,1e3),this.calcTieY()):(this.calcSlurDirection(),this.calcX(10,1e3),this.calcSlurY()),this.above?e=(t=Math.min(this.startY,this.endY))+3:t=(e=Math.min(this.startY,this.endY))-3,[e,t]},e.exports=t},1134:function(e,t,r){var n=r(1716),a=r(6994);e.exports=function(e,t,r,i,s,o,c,l,h,u){if(this.rows=[],e.header&&o){var d=u.calc("X","headerfont","abcjs-header abcjs-meta-top").height;n(this.rows,{marginLeft:c,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:t.header,name:"header"},u)}o&&this.rows.push({move:l.top});var f=r.titleleft?"start":"middle",p=r.titleleft?c:c+s/2;if(e.title){var m=h?"abcjs-title":"";a(this.rows,e.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:t.title},u)}if(i.length)for(var g=0;g0){var v=!(!e.composer&&!e.origin);m=h?"abcjs-rhythm":"",n(this.rows,{marginLeft:c,text:e.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:t.rhythm,name:"rhythm"},u)}e.composer&&e.composer,e.origin&&e.origin;var b=e.composer?e.composer:"";e.origin&&("string"==typeof b&&"string"==typeof e.origin?b+=" ("+e.origin+")":"string"==typeof b&&"string"!=typeof e.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(e.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(e.origin)).push({text:")"}))),b&&(m=h?"abcjs-composer":"",a(this.rows,b,"composerfont",m,"composer",c+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},u))}e.author&&e.author.length>0&&(m=h?"abcjs-author":"",a(this.rows,e.author,"composerfont",m,"author",c+s,{anchor:"end",absElemType:"author",info:t.author},u)),e.partOrder&&e.partOrder.length>0&&(m=h?"abcjs-part-order":"",a(this.rows,e.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},u))}},2096:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},e.exports=t},3197:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u=0&&f.setAttribute("class","abcjs-notehead")}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m0?g.classList[0]+" ":"";g.setAttribute("class",v+t.overrideClasses)}if(h)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,c.add(t,g,!1,l);else{t.elemset.push(g);var b=!1;"note"!==t.type&&"tabNumber"!==t.type||(b=!0),c.add(t,g,b,l)}}else t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l);if(t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var y=0;yr.formatting.maxStaves)break;t.shouldAddClasses&&(g.klass="abcjs-staff-wrapper abcjs-l"+t.lineNumber),e.paper.openGroup(g),x.vskip&&e.moveY(x.vskip),v.length>=1&&l(e,e.spacing.staffSeparation,v[v.length-1],x.staffGroup);var k=c(e,x.staffGroup,m,y);k.line=p+y,v.push(k),e.paper.closeGroup()}else x.nonMusic&&(t.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),i(e,x.nonMusic,m),e.paper.closeGroup())}return t.reset(),r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),i(e,r.bottomText,m),e.paper.closeGroup()),a(e,s,u,h),{staffgroups:v,selectables:m.getElements()}}},9879:function(e,t,r){var n=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var a=n(e,t.anchor.x,t.pitch,t.dec,{scalex:1,scaley:1,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},a),[a]}},5947:function(e,t,r){var n=r(6764),a=r(5759),i=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=n("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=n("M %f %f L %f %f ",o,l,o,s(l+20))),h+=n("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending"),fill:e.foregroundColor,"data-name":"ending"}),i(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&a(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},9045:function(e,t,r){var n=r(6764),a=r(6454),i=r(7199);function s(e,t,r){return i(e+r*t)}var o=[[3.5,-4.8]],c=[[1.5,-1],[.3,-.3],[-3.5,3.8]],l=[[-1.5,2]],h=[[3,4],[3,-4]],u=[[-3,4],[-3,-4]];function d(e,t){for(var r="",n=0;n1&&s.indexOf(".")<0){var p=i.isInGroup()?"":o.klass;e.paper.openGroup({"data-name":o.name,klass:p});for(var m=0,g=0;g0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=a(e,t.x,u,o,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=i(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness)}return 1!==t.scalex&&t.graphelem&&function(e,t,r,n,a,i){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+n+");transform-origin:"+a+"px "+i+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var n=r(5741),a=r(5829);function i(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}i.prototype.getElements=function(){return this.elements},i.prototype.add=function(e,t,r,n){if(this.canSelect(e)){var a;a=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,a);var i={absEl:e,svgEl:t,isDraggable:r};void 0!==n&&(i.staffPos=n),this.elements.push(i)}},i.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},i.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:n,unhighlight:a};this.add(r,t,!1)},e.exports=i},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),n=(e.controller.width-t)/2,a=n+t,i="M "+n+" "+r+" L "+a+" "+r+" L "+a+" "+(r+1)+" L "+n+" "+(r+1)+" L "+n+" "+r+" z";e.paper.pathToBack({path:i,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,n){var a=(t+e.padding.left+e.padding.right)*r,i=(e.y+e.padding.bottom)*r;if(e.isPrint&&(i=Math.max(i,1056)),""!==e.ariaLabel){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===n?e.paper.setResponsiveWidth(a,i):(c.width="",c.height=i+"px",r<1?(c.width=a+"px",e.paper.setSize(a/r,i/r)):e.paper.setSize(a,i)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(){for(var e,r,n,a,i,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,a=r[3]?"0"==r[3]?"0":r[3][1]:" ",i=r[5]-String(e).length,n=r[5]?str_repeat(a,i):"",c.push(r[4]?e+n:n+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var n=r(4331),a=r(129),i=r(3145),s=r(7641),o=r(1547),c=r(3624),l=r(5668);function h(e,t,r,i,s){if(r)for(var o=0;o=0&&v.voices&&u(e,t.voices,v.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:m,y2:m,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(v.originalTop),width:e.controller.width,height:e.calcY(v.originalBottom)-e.calcY(v.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),d=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),e.moveY(n.STEP,-v.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var b=2,y=0,x=0;x6&&(d=0)}}_>1&&(f=t.staffs[0].topLine,p=t.staffs[_-1].bottomLine,c(e,t.startx,.6,f,p,null)),e.y=m}},7865:function(e,t,r){var n=r(6637);e.exports=function(e,t,r,a,i,s,o){var c=e.calcY(a);return n(e,t,r,c,i,s,o)}},7641:function(e,t,r){var n=r(7865);e.exports=function(e,t,r,a,i,s){var o="abcjs-top-line",c=2;i&&(c=i),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var l=0,h=0;if(1===a)n(e,t,r,6,o,null,s+e.lineThickness),l=e.calcY(10),h=e.calcY(2);else for(var u=a-1;u>=0;u--){var d=(u+1)*c;h=e.calcY(d),0===l&&(l=h),n(e,t,r,d,o,null,s+e.lineThickness),o=void 0}return e.paper.closeGroup(),[l,h]}},3987:function(e,t,r){var n=r(2435),a=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var i,s=e.calcY(t.pitch)+2;if(t.tempo.preString){i=a(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",i).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new i(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",void 0!==t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};function x(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=0;r0)for(var o=s.staffGroup.voices[0],c=!1,l=0,h=0;hthis.width+1&&(e.topText=new l(e.metaText,e.metaTextInfo,e.formatting,e.lines,i,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o0)for(var h=c.nonMusic.rows.length,f=0;f0&&c.text[0].center)&&(p.left=i/2+this.renderer.padding.left)}}e.tablatures&&v.layoutTablatures(this.renderer,e);var m=g(this.renderer,this.classes,e,this.width,i,this.responsive,a,this.selectTypes,t,r);if(this.staffgroups=m.staffgroups,this.selectables=m.selectables,this.oneSvgPerLine){var b=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,r,n,a){r||(r="Untitled");var i=t.querySelector("svg");"resize"===n&&(t.style.paddingBottom="");for(var s=i.querySelector("style"),o="resize"===n?i.viewBox.baseVal.width:i.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,h=[],u=0;u0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},1328:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var n=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*n,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},9799:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t,r,n){var a;a="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var i=this.svg.getTextSize(e,a.attr,n);return a.font.box?{height:i.height+4*a.font.padding,width:i.width+4*a.font.padding}:i},t.prototype.baselineToCenter=function(e,t,r,n,a){return.5*this.calc(e,t,r).height+(a-n-2)*this.attr(t,r).font.size},e.exports=t},2187:function(e){e.exports=function(e,t,r,n){if(e)for(var a=0;a0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),i.setAttribute("class",o)}}},4331:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},8123:function(e){function t(e,t,r,n){if(0===e.indexOf(t)){var a=e.replace(t,""),i=parseInt(a,10);""+i===a&&(r[n]=i)}}e.exports=function(e,r){var n=[];if(e.absEl.elemset){for(var a={},i=0;i=0&&r=0?(a=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[i].svgEl.getBBox(),t,e.scale),r=a[0],n=a[1]):(a=function(e){var t,r,n=1,a=1,i=e.target.closest("svg"),s=0;return i&&i.viewBox&&i.viewBox.baseVal&&(0!==i.viewBox.baseVal.width&&(n=i.viewBox.baseVal.width/i.clientWidth),0!==i.viewBox.baseVal.height&&(a=i.viewBox.baseVal.height/i.clientHeight),s=i.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,r=e.offsetY):(t=e.layerX,r=e.layerY),[t*=n,(r*=a)+s]}(t),i=function(e,t,r){for(var n=9999999,a=-1,i=0;i0;i++){var s=e.selectables[i];if(e.getDim(s),s.dim.leftt&&s.dim.topr)a=i,n=0;else if(s.dim.topr){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));ot){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));cMath.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),u=Math.sqrt(l*l+h*h);u=0&&n<=12?a:-1}(e,r=a[0],n=a[1])),{x:r,y:n,clickedOn:i}}function l(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,n=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=n,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function h(e){var t=e;"touchstart"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0]));var r=c(this,t);r.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=v(e.svg);r[t]=!0,b(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function u(e){var t=e;if("touchmove"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=c(this,t),a=Math.round((r.y-this.dragMouseStart.y)/n.STEP);a!==this.dragYStep&&(this.dragYStep=a,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+a*n.STEP+")"))}}function d(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),p.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=v(e.svg);delete r[t],b(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function f(e){e>=0&&eo&&ei&&(a=i),a<-i&&(a=-i),a}(x,k,v,w),N=M+Math.floor(A/2),B=M+Math.floor(-A/2),S||(y&&M<6||!y&&M>6)&&(N=6,B=6),[N,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,r,n,a){for(var o=[],l=[],h=0;h0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var x=l.length-1;x>=0;x--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-x-4){var k=f,w=p+m*(x+1);l[x].single&&(k=0===h?f+5:f-5,w=i(r.startX,r.startY,r.endX,r.endY,k)+m*(x+1));var C={startX:l[x].x,endX:k,startY:l[x].y,endY:w,dy:a};if(void 0!==l[x].split){var T=l[x].split;C.endX<=T[T.length-1]&&(T[T.length-1]-=u.w),T.push(C.endX),C.split=l[x].split}o.push(C),l=l.slice(0,x)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m0?((a=(r-(n-i*a))/i)*s>50&&(a=50/s),a):null}e.exports=function(e,t,r,i,s,l){var h,u,d=r;for(h=0;hMath.round(d)&&(d=f,s&&(h=-1)))}for(h=0;h=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),i(c,l,"lyricHeightAbove"),i(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+a,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+a,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(i(c,l,"dynamicHeightAbove"),i(c,l,"volumeHeightAbove")),i(c,l,"partHeightAbove"),i(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/n.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+a),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+a}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+a):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+a):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+a),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u0&&(c.top+=f)}c.top+=e.spacing.staffTopMargin/n.STEP,r=2-c.bottom}}},735:function(e,t,r){var n=r(937);function a(e){for(var t=0;t0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d,f,p=0;for(r&&console.log("init layout",e),c=0;c1e-7?v.push(s.voices[c]):g.push(s.voices[c]);m=0;var b=0;for(c=0;cu&&(u=n.getNextX(g[c]),m=n.getSpacingUnits(g[c]),b=g[c].spacingduration);l+=m,h=Math.min(h,m),r&&console.log("currentduration: ",p,l,h);var y=void 0;for(c=0;c0){u=w;for(var T=0;Tu&&(u=n.getNextX(s.voices[c]),m=n.getSpacingUnits(s.voices[c]));return function(e){for(var t=0,r=0;r0){var a=n.children.length-1,i=n.children[a];if("bar"===i.abcelem.el_type){var s=i.children[0].x;s>t?t=s:i.children[0].x=t}}}}(s.voices),l+=m,s.setWidth(u),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var n=r(3721);function a(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=a(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var a=e+(t-e)/2;return n(r.startX,r.startY,r.endX,r.endY,a)}(r,e.anchor2.x,t),e.yTextPos+=a(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,a(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var i=0,s=0;se.startNote||i>e.endNote)&&(e.startNote=i,e.endNote=i),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},937:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,n,a){var i=r.children[r.i];if(!i)return 0;var s=e-r.minx,o=r.durationindex+i.duration>0?n:0;if("note"===i.abcelem.el_type&&!i.abcelem.rest&&0!==r.voicenumber&&a){var c=a.children[a.i],l=c&&(i.abcelem.maxpitch<=c.abcelem.maxpitch+1&&i.abcelem.maxpitch>=c.abcelem.minpitch-1||i.abcelem.minpitch<=c.abcelem.maxpitch+1&&i.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&i.abcelem.minpitch===c.abcelem.minpitch&&i.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&i.heads&&i.heads.length>0&&c.heads[0].c===i.heads[0].c&&(l=!1),l){var h=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;i.adjustedWidth||(i.adjustedWidth=h+i.w),i.w=i.adjustedWidth;for(var u=0;u0&&t.putChordInLane(n),void(e[n]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r=0;r--)(n=e[t].children[r]).chordHeightBelow&&o(i,n)}return(a.length>1||i.length>1)&&function(e,t,r){for(var n=0;n=0};i.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},i.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},i.prototype.setLineThickness=function(e){this.lineThickness=e},i.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},i.prototype.setPadding=function(e){function t(t,r,n,a,i){void 0!==e.formatting[n]?t.padding[r]=e.formatting[n]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=a:t.padding[r]=i}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},i.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},i.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},i.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},i.prototype.calcY=function(e){return this.y-e*n.STEP},i.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},i.prototype.absolutemoveY=function(e){this.y=e},e.exports=i},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function n(e,t,r){var n=r-e;return"M "+e+" "+t+" l "+n+" 0 l 0 1 l "+-n+" 0 z "}function a(e,t,r){var n=r-t;return"M "+e+" "+t+" l 0 "+n+" l 1 0 l 0 "+-n+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var n=t/e*100;this.svg.parentNode.style["padding-bottom"]=n+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,i=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(n(r,i,s)),t.push(n(r,o,s)),t.push(a(s,i,o)),t.push(a(r,o,i)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,n){var a=document.createElementNS(t,"text");for(var i in a.setAttribute("stroke","none"),r)r.hasOwnProperty(i)&&a.setAttribute(i,r[i]);for(var s="free-text"==r["data-name"],o=(""+e).split("\n"),c=0;c0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),n&&(i[n]=a),a},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e["data-name"]&&r.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(r):this.append(r),this.currentGroup.unshift(r),r},r.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):void 0!==e[n]&&r.setAttributeNS(null,n,e[n]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):r.setAttributeNS(null,n,e[n]));return this.prepend(r),r},r.prototype.lineToBack=function(e){for(var r=document.createElementNS(t,"line"),n=Object.keys(e),a=0;a0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},1185:function(e){e.exports="6.5.2"}},t={},r=function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(1045),r;var e,t,r})); \ No newline at end of file diff --git a/pluginsSrc/algoliasearch/dist/lite/builds/browser.umd.js b/pluginsSrc/algoliasearch/dist/lite/builds/browser.umd.js deleted file mode 100644 index c68fc85e..00000000 --- a/pluginsSrc/algoliasearch/dist/lite/builds/browser.umd.js +++ /dev/null @@ -1,12 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["algoliasearch/lite"] = {})); -})(this, (function (exports) { 'use strict'; - - function F(){function r(e){return new Promise(o=>{let t=new XMLHttpRequest;t.open(e.method,e.url,true),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let s=(a,n)=>setTimeout(()=>{t.abort(),o({status:0,content:n,isTimedOut:true});},a),m=s(e.connectTimeout,"Connection timeout"),i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&i===void 0&&(clearTimeout(m),i=s(e.responseTimeout,"Socket timeout"));},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(i),o({content:t.responseText||"Network request failed",status:t.status,isTimedOut:false}));},t.onload=()=>{clearTimeout(m),clearTimeout(i),o({content:t.responseText,status:t.status,isTimedOut:false});},t.send(e.data);})}return {send:r}}function U(r){let e,o=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function s(){return JSON.parse(t().getItem(o)||"{}")}function m(a){t().setItem(o,JSON.stringify(a));}function i(){let a=r.timeToLive?r.timeToLive*1e3:null,n=s(),p=Object.fromEntries(Object.entries(n).filter(([,h])=>h.timestamp!==void 0));if(m(p),!a)return;let f=Object.fromEntries(Object.entries(p).filter(([,h])=>{let P=new Date().getTime();return !(h.timestamp+aPromise.resolve()}){return Promise.resolve().then(()=>(i(),s()[JSON.stringify(a)])).then(f=>Promise.all([f?f.value:n(),f!==void 0])).then(([f,h])=>Promise.all([f,h||p.miss(f)])).then(([f])=>f)},set(a,n){return Promise.resolve().then(()=>{let p=s();return p[JSON.stringify(a)]={timestamp:new Date().getTime(),value:n},t().setItem(o,JSON.stringify(p)),n})},delete(a){return Promise.resolve().then(()=>{let n=s();delete n[JSON.stringify(a)],t().setItem(o,JSON.stringify(n));})},clear(){return Promise.resolve().then(()=>{t().removeItem(o);})}}}function K(){return {get(r,e,o={miss:()=>Promise.resolve()}){return e().then(s=>Promise.all([s,o.miss(s)])).then(([s])=>s)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function v(r){let e=[...r.caches],o=e.shift();return o===void 0?K():{get(t,s,m={miss:()=>Promise.resolve()}){return o.get(t,s,m).catch(()=>v({caches:e}).get(t,s,m))},set(t,s){return o.set(t,s).catch(()=>v({caches:e}).set(t,s))},delete(t){return o.delete(t).catch(()=>v({caches:e}).delete(t))},clear(){return o.clear().catch(()=>v({caches:e}).clear())}}}function A(r={serializable:true}){let e={};return {get(o,t,s={miss:()=>Promise.resolve()}){let m=JSON.stringify(o);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let i=t();return i.then(a=>s.miss(a)).then(()=>i)},set(o,t){return e[JSON.stringify(o)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(o){return delete e[JSON.stringify(o)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}function Y(r){let e={value:`Algolia for JavaScript (${r})`,add(o){let t=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function W(r,e,o="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return {headers(){return o==="WithinHeaders"?t:{}},queryParameters(){return o==="WithinQueryParameters"?t:{}}}}function M({algoliaAgents:r,client:e,version:o}){let t=Y(o).add({segment:e,version:o});return r.forEach(s=>t.add(s)),t}function j(){return {debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var k=120*1e3;function H(r,e="up"){let o=Date.now();function t(){return e==="up"||Date.now()-o>k}function s(){return e==="timed out"&&Date.now()-o<=k}return {...r,status:e,lastUpdate:o,isUp:t,isTimedOut:s}}var J=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e);}};var z=class extends J{stackTrace;constructor(r,e,o){super(r,o),this.stackTrace=e;}},Z=class extends z{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",r,"RetryError");}},C=class extends z{status;constructor(r,e,o,t="ApiError"){super(r,o,t),this.status=e;}},ee=class extends J{response;constructor(r,e){super(r,"DeserializationError"),this.response=e;}},re=class extends C{error;constructor(r,e,o,t){super(r,e,t,"DetailedApiError"),this.error=o;}};function G(r){let e=r;for(let o=r.length-1;o>0;o--){let t=Math.floor(Math.random()*(o+1)),s=r[o];e[o]=r[t],e[t]=s;}return e}function te(r,e,o){let t=oe(o),s=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(s+=`?${t}`),s}function oe(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replace(/\+/g,"%20")}`).join("&")}function ae(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let o=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(o)}function se(r,e,o){let t={Accept:"application/json",...r,...e,...o},s={};return Object.keys(t).forEach(m=>{let i=t[m];s[m.toLowerCase()]=i;}),s}function ne(r){try{return JSON.parse(r.content)}catch(e){throw new ee(e.message,r)}}function ie({content:r,status:e},o){try{let t=JSON.parse(r);return "error"in t?new re(t.message,e,t.error,o):new C(t.message,e,o)}catch{}return new C(r,e,o)}function ce({isTimedOut:r,status:e}){return !r&&~~e===0}function me({isTimedOut:r,status:e}){return r||ce({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function ue({status:r}){return ~~(r/100)===2}function le(r){return r.map(e=>Q(e))}function Q(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function B({hosts:r,hostsCache:e,baseHeaders:o,logger:t,baseQueryParameters:s,algoliaAgent:m,timeouts:i,requester:a,requestsCache:n,responsesCache:p}){async function f(u){let c=await Promise.all(u.map(l=>e.get(l,()=>Promise.resolve(H(l))))),x=c.filter(l=>l.isUp()),g=c.filter(l=>l.isTimedOut()),R=[...x,...g];return {hosts:R.length>0?R:u,getTimeout(l,T){return (g.length===0&&l===0?1:g.length+3+l)*T}}}async function h(u,c,x=true){let g=[],R=ae(u,c),y=se(o,u.headers,c.headers),l=u.method==="GET"?{...u.data,...c.data}:{},T={...s,...u.queryParameters,...l};if(m.value&&(T["x-algolia-agent"]=m.value),c&&c.queryParameters)for(let d of Object.keys(c.queryParameters))!c.queryParameters[d]||Object.prototype.toString.call(c.queryParameters[d])==="[object Object]"?T[d]=c.queryParameters[d]:T[d]=c.queryParameters[d].toString();let S=0,L=async(d,b)=>{let w=d.pop();if(w===void 0)throw new Z(le(g));let q={...i,...c.timeouts},I={data:R,headers:y,method:u.method,url:te(w,u.path,T),connectTimeout:b(S,q.connect),responseTimeout:b(S,x?q.read:q.write)},D=N=>{let $={request:I,response:N,host:w,triesLeft:d.length};return g.push($),$},E=await a.send(I);if(me(E)){let N=D(E);return E.isTimedOut&&S++,t.info("Retryable failure",Q(N)),await e.set(w,H(w,E.isTimedOut?"timed out":"down")),L(d,b)}if(ue(E))return ne(E);throw D(E),ie(E,g)},X=r.filter(d=>d.accept==="readWrite"||(x?d.accept==="read":d.accept==="write")),_=await f(X);return L([..._.hosts].reverse(),_.getTimeout)}function P(u,c={}){let x=u.useReadTransporter||u.method==="GET";if(!x)return h(u,c,x);let g=()=>h(u,c);if((c.cacheable||u.cacheable)!==true)return g();let y={request:u,requestOptions:c,transporter:{queryParameters:s,headers:o}};return p.get(y,()=>n.get(y,()=>n.set(y,g()).then(l=>Promise.all([n.delete(y),l]),l=>Promise.all([n.delete(y),Promise.reject(l)])).then(([l,T])=>T)),{miss:l=>p.set(y,l)})}return {hostsCache:e,requester:a,timeouts:i,logger:t,algoliaAgent:m,baseHeaders:o,baseQueryParameters:s,hosts:r,request:P,requestsCache:n,responsesCache:p}}var O="5.39.0";function pe(r){return [{url:`${r}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${r}.algolia.net`,accept:"write",protocol:"https"}].concat(G([{url:`${r}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function V({appId:r,apiKey:e,authMode:o,algoliaAgents:t,...s}){let m=W(r,e,o),i=B({hosts:pe(r),...s,algoliaAgent:M({algoliaAgents:t,client:"Lite",version:O}),baseHeaders:{"content-type":"text/plain",...m.headers(),...s.baseHeaders},baseQueryParameters:{...m.queryParameters(),...s.baseQueryParameters}});return {transporter:i,appId:r,apiKey:e,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(a,n){i.algoliaAgent.add({segment:a,version:n});},setClientApiKey({apiKey:a}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=a:i.baseQueryParameters["x-algolia-api-key"]=a;},searchForHits(a,n){return this.search(a,n)},searchForFacets(a,n){return this.search(a,n)},customPost({path:a,parameters:n,body:p},f){if(!a)throw new Error("Parameter `path` is required when calling `customPost`.");let c={method:"POST",path:"/{path}".replace("{path}",a),queryParameters:n||{},headers:{},data:p||{}};return i.request(c,f)},getRecommendations(a,n){if(a&&Array.isArray(a)&&(a={requests:a}),!a)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!a.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");let P={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:a,useReadTransporter:true,cacheable:true};return i.request(P,n)},search(a,n){if(a&&Array.isArray(a)&&(a={requests:a.map(({params:c,...x})=>x.type==="facet"?{...x,...c,type:"facet"}:{...x,...c,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!a)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!a.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");let P={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:a,useReadTransporter:true,cacheable:true};return i.request(P,n)}}}function jt(r,e,o){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return V({appId:r,apiKey:e,timeouts:{connect:1e3,read:2e3,write:3e4},logger:j(),requester:F(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:A(),requestsCache:A({serializable:false}),hostsCache:v({caches:[U({key:`${O}-${r}`}),A()]}),...o})} - - exports.apiClientVersion = O; - exports.liteClient = jt; - -})); diff --git a/pluginsSrc/aplayer/dist/APlayer.min.css b/pluginsSrc/aplayer/dist/APlayer.min.css deleted file mode 100644 index 12b55839..00000000 --- a/pluginsSrc/aplayer/dist/APlayer.min.css +++ /dev/null @@ -1,3 +0,0 @@ -.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;position:relative}.aplayer *{box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-withlist .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer.aplayer-withlist .aplayer-list{display:block}.aplayer.aplayer-withlist .aplayer-icon-order,.aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu{display:inline}.aplayer.aplayer-withlrc .aplayer-pic{height:90px;width:90px}.aplayer.aplayer-withlrc .aplayer-info{margin-left:90px;height:90px;padding:10px 7px 0}.aplayer.aplayer-withlrc .aplayer-lrc{display:block}.aplayer.aplayer-narrow{width:66px}.aplayer.aplayer-narrow .aplayer-info,.aplayer.aplayer-narrow .aplayer-list{display:none}.aplayer.aplayer-narrow .aplayer-body,.aplayer.aplayer-narrow .aplayer-pic{height:66px;width:66px}.aplayer.aplayer-fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;overflow:visible;max-width:400px;box-shadow:none}.aplayer.aplayer-fixed .aplayer-list{margin-bottom:65px;border:1px solid #eee;border-bottom:none}.aplayer.aplayer-fixed .aplayer-body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;background:#fff;padding-right:18px;transition:all .3s ease;max-width:400px}.aplayer.aplayer-fixed .aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before{display:none}.aplayer.aplayer-fixed .aplayer-info{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid #e9e9e9}.aplayer.aplayer-fixed .aplayer-info .aplayer-music{width:calc(100% - 105px)}.aplayer.aplayer-fixed .aplayer-miniswitcher{display:block}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info{display:block;-webkit-transform:scaleX(0);transform:scaleX(0)}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{width:66px!important}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon{-webkit-transform:rotateY(0);transform:rotateY(0)}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-lrc,.aplayer.aplayer-fixed .aplayer-icon-play{display:inline-block}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-menu,.aplayer.aplayer-fixed .aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.aplayer.aplayer-fixed .aplayer-icon-back{right:75px}.aplayer.aplayer-fixed .aplayer-icon-play{right:50px}.aplayer.aplayer-fixed .aplayer-icon-forward{right:25px}.aplayer.aplayer-fixed .aplayer-icon-menu{right:0}.aplayer.aplayer-arrow .aplayer-icon-loop,.aplayer.aplayer-arrow .aplayer-icon-order,.aplayer.aplayer-mobile .aplayer-icon-volume-down{display:none}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon{display:block}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-body{position:relative}.aplayer .aplayer-icon{width:15px;height:15px;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:12px;margin:0;display:inline-block}.aplayer .aplayer-icon path{transition:all .2s ease-in-out}.aplayer .aplayer-icon-back,.aplayer .aplayer-icon-forward,.aplayer .aplayer-icon-lrc,.aplayer .aplayer-icon-order,.aplayer .aplayer-icon-play{display:none}.aplayer .aplayer-icon-lrc-inactivity svg{opacity:.4}.aplayer .aplayer-icon-forward{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-size:cover;background-position:50%;transition:all .3s ease;cursor:pointer}.aplayer .aplayer-pic:hover .aplayer-button{opacity:1}.aplayer .aplayer-pic .aplayer-button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);background:rgba(0,0,0,.2);transition:all .1s ease}.aplayer .aplayer-pic .aplayer-button path{fill:#fff}.aplayer .aplayer-pic .aplayer-hide{display:none}.aplayer .aplayer-pic .aplayer-play{width:26px;height:26px;border:2px solid #fff;bottom:50%;right:50%;margin:0 -15px -15px 0}.aplayer .aplayer-pic .aplayer-play svg{position:absolute;top:3px;left:4px;height:20px;width:20px}.aplayer .aplayer-pic .aplayer-pause{width:16px;height:16px;border:2px solid #fff;bottom:4px;right:4px}.aplayer .aplayer-pic .aplayer-pause svg{position:absolute;top:2px;left:2px;height:12px;width:12px}.aplayer .aplayer-info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.aplayer .aplayer-info .aplayer-music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.aplayer .aplayer-info .aplayer-music .aplayer-title{font-size:14px}.aplayer .aplayer-info .aplayer-music .aplayer-author{font-size:12px;color:#666}.aplayer .aplayer-info .aplayer-controller{position:relative;display:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar{position:relative;height:2px;width:100%;background:#cdcdcd}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:#aaa;height:2px;transition:all .5s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played{position:absolute;left:0;top:0;bottom:0;height:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:10px;width:10px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.aplayer .aplayer-info .aplayer-controller .aplayer-time{position:relative;right:0;bottom:4px;height:17px;color:#999;font-size:11px;padding-left:7px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner{vertical-align:middle}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon{cursor:pointer;transition:all .2s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#666}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop{margin-right:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path{fill:#000}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all .2s ease-in-out}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar{position:absolute;bottom:0;right:10px;width:5px;height:35px;background:#aaa;border-radius:2.5px;overflow:hidden}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume{position:absolute;bottom:0;right:0;width:5px;transition:all .1s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg{position:absolute;-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.aplayer .aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.aplayer .aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,#fff 0,hsla(0,0%,100%,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.aplayer .aplayer-lrc:after,.aplayer .aplayer-lrc:before{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" "}.aplayer .aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.8));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.aplayer .aplayer-lrc p{font-size:12px;color:#666;line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.aplayer .aplayer-lrc.aplayer-lrc-hide{display:none}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default}.aplayer .aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.aplayer .aplayer-list.aplayer-list-hide{max-height:0!important}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.aplayer .aplayer-list ol::-webkit-scrollbar{width:5px}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:#ccc}.aplayer .aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid #e9e9e9;cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0}.aplayer .aplayer-list ol li:first-child{border-top:none}.aplayer .aplayer-list ol li:hover{background:#efefef}.aplayer .aplayer-list ol li.aplayer-list-light{background:#e9e9e9}.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur{display:inline-block}.aplayer .aplayer-list ol li .aplayer-list-cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-index{color:#666;margin-right:12px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-author{color:#666;float:right;cursor:pointer}.aplayer .aplayer-notice{opacity:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none;background-color:#f4f4f5;color:#909399}.aplayer .aplayer-miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:#e6e6e6;width:18px;border-radius:0 2px 2px 0}.aplayer .aplayer-miniswitcher .aplayer-icon{height:100%;width:100%;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);transition:all .3s ease}.aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#666}.aplayer .aplayer-miniswitcher .aplayer-icon:hover path{fill:#000}@-webkit-keyframes aplayer-roll{0%{left:0}to{left:-100%}}@keyframes aplayer-roll{0%{left:0}to{left:-100%}}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} - -/*# sourceMappingURL=APlayer.min.css.map*/ \ No newline at end of file diff --git a/pluginsSrc/aplayer/dist/APlayer.min.js b/pluginsSrc/aplayer/dist/APlayer.min.js deleted file mode 100644 index 6ba17e35..00000000 --- a/pluginsSrc/aplayer/dist/APlayer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("APlayer",[],t):"object"==typeof exports?exports.APlayer=t():e.APlayer=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=41)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=/mobile/i.test(window.navigator.userAgent),a={secondToTime:function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),i=Math.floor(e-3600*t-60*n);return(t>0?[t,n,i]:[n,i]).map(function(e){return e<10?"0"+e:""+e}).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,i=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==e;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-i},getElementViewTop:function(e,t){for(var n,i=e.offsetTop,a=e.offsetParent;null!==a;)i+=a.offsetTop,a=a.offsetParent;return n=document.body.scrollTop+document.documentElement.scrollTop,t?i:i-n},isMobile:i,storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},nameMap:{dragStart:i?"touchstart":"mousedown",dragMove:i?"touchmove":"mousemove",dragEnd:i?"touchend":"mouseup"},randomOrder:function(e){return function(e){for(var t=e.length-1;t>=0;t--){var n=Math.floor(Math.random()*(t+1)),i=e[n];e[n]=e[t],e[t]=i}return e}([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t\n ',t+=r(n+s),t+='\n ',t+=r(e.name),t+='\n ',t+=r(e.artist),t+="\n\n"}),t}},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=g(n(33)),a=g(n(32)),r=g(n(31)),o=g(n(30)),s=g(n(29)),l=g(n(28)),u=g(n(27)),c=g(n(26)),p=g(n(25)),d=g(n(24)),h=g(n(23)),y=g(n(22)),f=g(n(21)),v=g(n(20)),m=g(n(19));function g(e){return e&&e.__esModule?e:{default:e}}var w={play:i.default,pause:a.default,volumeUp:r.default,volumeDown:o.default,volumeOff:s.default,orderRandom:l.default,orderList:u.default,menu:c.default,loopAll:p.default,loopOne:d.default,loopNone:h.default,loading:y.default,right:f.default,skip:v.default,lrc:m.default};t.default=w},function(e,t,n){"use strict";var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){"use strict";var i,a,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};void 0===(a="function"==typeof(i=function(){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==document.querySelectorAll&&void 0!==window.pageYOffset&&void 0!==history.pushState){var e=function(e,t,n,i){return n>i?t:e+(t-e)*((a=n/i)<.5?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1);var a},t=function(t,n,i,a){n=n||500;var r=(a=a||window).scrollTop||window.pageYOffset;if("number"==typeof t)var o=parseInt(t);else var o=function(e,t){return"HTML"===e.nodeName?-t:e.getBoundingClientRect().top+t}(t,r);var s=Date.now(),l=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,15)};!function u(){var c=Date.now()-s;a!==window?a.scrollTop=e(r,o,c,n):window.scroll(0,e(r,o,c,n)),c>n?"function"==typeof i&&i(t):l(u)}()},n=function(e){if(!e.defaultPrevented){e.preventDefault(),location.hash!==this.hash&&window.history.pushState(null,null,this.hash);var n=document.getElementById(this.hash.substring(1));if(!n)return;t(n,500,function(e){location.replace("#"+e.id)})}};return document.addEventListener("DOMContentLoaded",function(){for(var e,t=document.querySelectorAll('a[href^="#"]:not([href="#"])'),i=t.length;e=t[--i];)e.addEventListener("click",n,!1)}),t}})?i.call(t,n,t,e):i)||(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1),n=0===this.audios.length;this.player.template.listOl.innerHTML+=(0,a.default)({theme:this.player.options.theme,audio:e,index:this.audios.length+1}),this.audios=this.audios.concat(e),t&&this.audios.length>1&&this.player.container.classList.add("aplayer-withlist"),this.player.randomOrder=r.default.randomOrder(this.audios.length),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur"),this.player.template.listCurs[this.audios.length-1].style.backgroundColor=e.theme||this.player.options.theme,n&&("random"===this.player.options.order?this.switch(this.player.randomOrder[0]):this.switch(0))}},{key:"remove",value:function(e){if(this.player.events.trigger("listremove",{index:e}),this.audios[e])if(this.audios.length>1){var t=this.player.container.querySelectorAll(".aplayer-list li");t[e].remove(),this.audios.splice(e,1),this.player.lrc&&this.player.lrc.remove(e),e===this.index&&(this.audios[e]?this.switch(e):this.switch(e-1)),this.index>e&&this.index--;for(var n=e;nt&&!e.player.audio.paused&&(e.player.container.classList.remove("aplayer-loading"),i=!1),t=n)},100)}},{key:"enable",value:function(e){this["enable"+e+"Checker"]=!0,"fps"===e&&this.initfpsChecker()}},{key:"disable",value:function(e){this["enable"+e+"Checker"]=!1}},{key:"destroy",value:function(){var e=this;this.types.forEach(function(t){e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"])})}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1?"one"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop?(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll):"all"===e.player.options.loop&&(e.player.options.loop="one",e.player.template.loop.innerHTML=r.default.loopOne):"one"===e.player.options.loop||"all"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop&&(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll)})}},{key:"initMenuButton",value:function(){var e=this;this.player.template.menu.addEventListener("click",function(){e.player.list.toggle()})}},{key:"initMiniSwitcher",value:function(){var e=this;this.player.template.miniSwitcher.addEventListener("click",function(){e.player.setMode("mini"===e.player.mode?"normal":"mini")})}},{key:"initSkipButton",value:function(){var e=this;this.player.template.skipBackButton.addEventListener("click",function(){e.player.skipBack()}),this.player.template.skipForwardButton.addEventListener("click",function(){e.player.skipForward()}),this.player.template.skipPlayButton.addEventListener("click",function(){e.player.toggle()})}},{key:"initLrcButton",value:function(){var e=this;this.player.template.lrcButton.addEventListener("click",function(){e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity")?(e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.show()):(e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.hide())})}}]),e}();t.default=s},function(e,t,n){var i=n(2);e.exports=function(e){"use strict";e=e||{};var t="",n=i.$each,a=e.lyrics,r=(e.$value,e.$index,i.$escape);return n(a,function(e,n){t+="\n \n"}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||e=this.current[this.index+1][0])for(var t=0;t=this.current[t][0]&&(!this.current[t+1]||e=200&&n.status<300||304===n.status?t.parsed[e]=t.parse(n.responseText):(t.player.notice("LRC file request fails: status "+n.status),t.parsed[e]=[["00:00","Not available"]]),t.container.innerHTML=(0,o.default)({lyrics:t.parsed[e]}),t.update(0),t.current=t.parsed[e])};var i=this.player.list.audios[e].lrc;n.open("get",i,!0),n.send(null)}else this.player.list.audios[e].lrc?this.parsed[e]=this.parse(this.player.list.audios[e].lrc):this.parsed[e]=[["00:00","Not available"]];this.container.innerHTML=(0,o.default)({lyrics:this.parsed[e]}),this.update(0),this.current=this.parsed[e]}},{key:"parse",value:function(e){if(e){for(var t=(e=e.replace(/([^\]^\n])\[/g,function(e,t){return t+"\n["})).split("\n"),n=[],i=t.length,a=0;a/g,"").replace(/^\s+|\s+$/g,"");if(r)for(var s=r.length,l=0;l]/;a.$escape=function(e){return function(e){var t=""+e,n=r.exec(t);if(!n)return e;var i="",a=void 0,o=void 0,s=void 0;for(a=n.index,o=0;a\n \n
    ',t+=s.play,t+='
    \n \n \n
    \n
    \n\n
    \n
    \n
    \n'):(t+='\n
    \n
    \n
    ',t+=s.play,t+='
    \n
    \n
    \n
    \n No audio\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n ',t+=s.loading,t+='\n \n
    \n
    \n
    \n
    \n \n 00:00 / 00:00\n \n \n ',t+=s.skip,t+='\n \n \n ',t+=s.play,t+='\n \n \n ',t+=s.skip,t+='\n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n '},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,n){"use strict";var i,a,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var u,c=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):d=-1,c.length&&y())}function y(){if(!p){var e=l(h);p=!0;for(var t=c.length;t;){for(u=c,c=[];++d1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(35),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=setTimeout;function a(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void l(t.promise,e)}s(t.promise,i)}else(1===e._state?s:l)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":n(t))||"function"==typeof t)){var i=t.then;if(t instanceof r)return e._state=3,e._value=t,void u(e);if("function"==typeof i)return void c((a=i,o=t,function(){a.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var a,o}function l(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t1&&this.container.classList.add("aplayer-withlist"),r.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.container=this.options.container,2===this.options.lrcType||!0===this.options.lrcType)for(var n=this.container.getElementsByClassName("aplayer-lrc-content"),i=0;i1?(e.notice("An audio error has occurred, player will skip forward in 2 seconds."),t=setTimeout(function(){e.skipForward(),e.paused||e.play()},2e3)):1===e.list.audios.length&&e.notice("An audio error has occurred.")}),this.events.on("listswitch",function(){t&&clearTimeout(t)}),this.on("ended",function(){"none"===e.options.loop?"list"===e.options.order?e.list.index0&&void 0!==arguments[0]?arguments[0]:this.list.audios[this.list.index].theme||this.options.theme,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.list.index;(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&this.list.audios[t]&&(this.list.audios[t].theme=e),this.template.listCurs[t]&&(this.template.listCurs[t].style.backgroundColor=e),t===this.list.index&&(this.template.pic.style.backgroundColor=e,this.template.played.style.background=e,this.template.thumb.style.background=e,this.template.volume.style.background=e)}},{key:"seek",value:function(e){e=Math.max(e,0),e=Math.min(e,this.duration),this.audio.currentTime=e,this.bar.set("played",e/this.duration,"width"),this.template.ptime.innerHTML=r.default.secondToTime(e)}},{key:"setUIPlaying",value:function(){var e=this;if(this.paused&&(this.paused=!1,this.template.button.classList.remove("aplayer-play"),this.template.button.classList.add("aplayer-pause"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.pause},100),this.template.skipPlayButton.innerHTML=o.default.pause),this.timer.enable("loading"),this.options.mutex)for(var t=0;t=.95?this.template.volumeButton.innerHTML=o.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=o.default.volumeDown:this.template.volumeButton.innerHTML=o.default.volumeOff}},{key:"volume",value:function(e,t){return e=parseFloat(e),isNaN(e)||(e=Math.max(e,0),e=Math.min(e,1),this.bar.set("volume",e,"height"),t||this.storage.set("volume",e),this.audio.volume=e,this.audio.muted&&(this.audio.muted=!1),this.switchVolumeIcon()),this.audio.muted?0:this.audio.volume}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"toggle",value:function(){this.template.button.classList.contains("aplayer-play")?this.play():this.template.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"switchAudio",value:function(e){this.list.switch(e)}},{key:"addAudio",value:function(e){this.list.add(e)}},{key:"removeAudio",value:function(e){this.list.remove(e)}},{key:"destroy",value:function(){m.splice(m.indexOf(this),1),this.pause(),this.container.innerHTML="",this.audio.src="",this.timer.destroy(),this.events.trigger("destroy")}},{key:"setMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";this.mode=e,"mini"===e?this.container.classList.add("aplayer-narrow"):"normal"===e&&this.container.classList.remove("aplayer-narrow")}},{key:"notice",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("noticeshow",{text:e}),n&&(this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("noticehide")},n))}},{key:"prevIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return this.list.index-1<0?this.list.audios.length-1:this.list.index-1;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return 0===e?this.randomOrder[this.randomOrder.length-1]:this.randomOrder[e-1]}}},{key:"nextIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return(this.list.index+1)%this.list.audios.length;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return e===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[e+1]}}},{key:"skipBack",value:function(){this.list.switch(this.prevIndex())}},{key:"skipForward",value:function(){this.list.switch(this.nextIndex())}},{key:"duration",get:function(){return isNaN(this.audio.duration)?0:this.audio.duration}}],[{key:"version",get:function(){return"1.10.1"}}]),e}();t.default=g},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(40);var i,a=n(38),r=(i=a)&&i.__esModule?i:{default:i};console.log("\n %c APlayer v1.10.1 af84efb %c http://aplayer.js.org \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=r.default}]).default}); -//# sourceMappingURL=APlayer.min.js.map \ No newline at end of file diff --git a/pluginsSrc/artalk/dist/Artalk.css b/pluginsSrc/artalk/dist/Artalk.css deleted file mode 100644 index fe67e3ee..00000000 --- a/pluginsSrc/artalk/dist/Artalk.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.artalk,.atk-layer-wrap{--at-color-font: #2a2e2e;--at-color-deep: #2a2e2e;--at-color-sub: #757575;--at-color-grey: #747474;--at-color-meta: #697182;--at-color-border: #eceff2;--at-color-light: #4285f4;--at-color-bg: #fff;--at-color-bg-transl: rgba(255, 255, 255, .94);--at-color-bg-grey: #f3f4f5;--at-color-bg-grey-transl: rgba(244, 244, 244, .75);--at-color-bg-light: rgba(29, 161, 242, .1);--at-color-main: #0083ff;--at-color-red: #ff5652;--at-color-pink: #fa5a57;--at-color-yellow: #ff7c37;--at-color-green: #4caf50;--at-color-gradient: linear-gradient(180deg, transparent, rgba(255, 255, 255))}.artalk.atk-dark-mode,.atk-layer-wrap.atk-dark-mode{--at-color-font: #fff;--at-color-deep: #e7e7e7;--at-color-sub: #e7e7e7;--at-color-grey: #fff;--at-color-meta: #fff;--at-color-border: #2d3235;--at-color-light: #687a86;--at-color-bg: #1e2224;--at-color-bg-transl: rgba(30, 34, 36, .95);--at-color-bg-grey: #46494e;--at-color-bg-grey-transl: rgba(8, 8, 8, .95);--at-color-bg-light: rgba(29, 161, 242, .1);--at-color-main: #0083ff;--at-color-red: #ff5652;--at-color-pink: #fa5a57;--at-color-yellow: #ff7c37;--at-color-green: #4caf50;--at-color-gradient: linear-gradient(180deg, transparent, rgba(30, 34, 36, 1))}.atk-comment-wrap{overflow:hidden;position:relative;border-bottom:1px solid transparent}.atk-comment-wrap.atk-flash-once{animation:atkFlashOnce 1s ease-in-out 0s}@keyframes atkFlashOnce{0%{background:#0083ff33}to{background:transparent}}.atk-comment-wrap.atk-unread:before{content:" ";position:absolute;left:0;top:10%;width:3px;height:80%;background:var(--at-color-main)}.atk-comment-wrap.atk-openable{cursor:pointer}.atk-comment-wrap.atk-openable:hover{background:var(--at-color-bg-grey)}.atk-comment-wrap.atk-openable .atk-height-limit:after{background:transparent!important}.atk-comment-wrap:last-child{border-bottom:none}.atk-comment{display:block;padding:10px}.atk-comment>.atk-avatar{display:block;padding:2px 0;float:left}.atk-comment>.atk-avatar img{width:50px;height:50px;border-radius:3px}.atk-comment>.atk-main{display:block;margin-left:63px}.atk-comment>.atk-main>.atk-header{line-height:1.5;font-size:13px;margin-bottom:.5em;overflow:hidden;position:relative;display:flex;flex-wrap:wrap;align-items:center}.atk-comment>.atk-main>.atk-header .atk-item{display:flex;align-items:center;margin-top:2px;margin-bottom:2px;color:var(--at-color-meta)}.atk-comment>.atk-main>.atk-header .atk-item:not(:last-child){margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-item.atk-nick,.atk-comment>.atk-main>.atk-header .atk-item.atk-nick a{font-size:14px;color:var(--at-color-main);text-decoration:none}.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at{margin-left:2px}.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at>.atk-arrow:before{content:"";vertical-align:middle;transform:rotate(90deg);border-bottom:4px solid var(--at-color-grey);border-left:3px solid transparent;border-right:3px solid transparent;display:inline-block;margin-top:-1px}.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at>.atk-nick{color:var(--at-color-main);cursor:pointer;margin-left:6px}.atk-comment>.atk-main>.atk-header .badge,.atk-comment>.atk-main>.atk-header .atk-ua,.atk-comment>.atk-main>.atk-header .atk-pinned-badge,.atk-comment>.atk-main>.atk-header .atk-region-badge,.atk-comment>.atk-main>.atk-header .atk-badge{display:inline-block;color:var(--at-color-meta);background:var(--at-color-bg-grey);padding:0 6px;line-height:17px;border-radius:3px}.atk-comment>.atk-main>.atk-header .badge:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-ua:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-pinned-badge:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-region-badge:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-badge:not(:last-child){margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-badge-wrap>*:last-child{margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-badge{color:#fff}.atk-comment>.atk-main>.atk-header .atk-pinned-badge{color:#fff;background:#f44336}.atk-comment>.atk-main>.atk-header .atk-verified-icon{height:1.4em;width:1.4em;background-repeat:no-repeat;background-position:center;background-size:contain;display:block;background-image:url('data:image/svg+xml,')}@media only screen and (max-width: 768px){.atk-comment>.atk-main>.atk-header .atk-ua-wrap{display:block}}.atk-comment>.atk-main>.atk-body{display:block;overflow:hidden;position:relative}.atk-comment>.atk-main>.atk-body img{max-width:100%}.atk-comment>.atk-main>.atk-body>.atk-content{word-break:break-word}.atk-comment>.atk-main>.atk-body>.atk-content.atk-type-collapsed{border:3px solid var(--at-color-bg-grey);border-bottom:0;padding:5px 10px;border-radius:6px 6px 0 0;margin-bottom:-5px}.atk-comment>.atk-main>.atk-body>.atk-content>*:first-child{margin-top:0}.atk-comment>.atk-main>.atk-body>.atk-content>*:last-child{margin-bottom:0}.atk-comment>.atk-main>.atk-body>.atk-content .atk-height-limit-btn{bottom:5px}.atk-comment>.atk-main>.atk-body>.atk-pending{color:var(--at-color-meta);margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:var(--at-color-bg-grey);border-left:4px solid #f44336}.atk-comment>.atk-main>.atk-body>.atk-reply-to{padding:5px 15px;border-left:3px solid var(--at-color-border);margin-bottom:10px;position:relative;margin-top:10px}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta{font-size:15px}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta .atk-nick{color:var(--at-color-main)}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-content{margin-top:5px}.atk-comment>.atk-main>.atk-body>.atk-collapsed{margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:var(--at-color-bg-grey);border-radius:6px}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-text{color:var(--at-color-meta)}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn{color:var(--at-color-main);cursor:pointer;-webkit-user-select:none;user-select:none;margin-left:3px}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn:hover{color:var(--at-color-main)}.atk-comment>.atk-main>.atk-footer{margin-top:5px}.atk-comment>.atk-main>.atk-footer .atk-actions{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap}.atk-comment>.atk-main>.atk-footer .atk-actions>span{color:var(--at-color-meta);font-size:13px;line-height:25px;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none}.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error,.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error:hover{color:var(--at-color-red)}.atk-comment>.atk-main>.atk-footer .atk-actions>span:not(:last-child):not(.atk-hide){margin-right:16px}.atk-comment>.atk-main>.atk-footer .atk-actions>span:hover{color:var(--at-color-deep)}.atk-comment .atk-height-limit:after{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" ";bottom:0;height:80px;background:var(--at-color-gradient)}.atk-comment .atk-height-limit-btn{z-index:2;position:absolute;left:50%;bottom:10px;transform:translate(-50%);cursor:pointer;border:1px solid var(--at-color-border);border-radius:6px;background:var(--at-color-bg);padding:1px 20px;font-size:15px;color:var(--at-color-meta);-webkit-user-select:none;user-select:none}.atk-comment .atk-height-limit-btn:hover{background:var(--at-color-bg-grey)}.atk-comment .atk-height-limit .atk-height-limit .atk-height-limit-btn{display:none}.atk-comment .atk-height-limit-scroll{margin-top:10px;overflow-y:auto;background:linear-gradient(var(--at-color-bg) 1px,transparent 1px calc(100% - 1px)) center top,linear-gradient(transparent calc(100% - 1px),var(--at-color-bg) calc(100% - 1px) 1px) center bottom,linear-gradient(var(--at-color-border) 1px,transparent 1px calc(100% - 1px)) center top,linear-gradient(transparent calc(100% - 1px),var(--at-color-border) calc(100% - 1px) 1px) center bottom;background-repeat:no-repeat;background-color:transparent;background-size:100% 1px,100% 1px,100% 1px,100% 1px;background-attachment:local,local,scroll,scroll}.atk-comment-children>.atk-comment-wrap{margin-top:10px;border-left:1px dashed transparent;border-bottom-color:transparent}.atk-comment-children>.atk-comment-wrap:not(:last-child){margin-bottom:10px}.atk-comment-children>.atk-comment-wrap>.atk-comment{padding:0}.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-avatar img{width:36px;height:36px}.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-main{margin-left:47px}.artalk>.atk-list{position:relative}.artalk>.atk-list>.atk-list-header{display:flex;flex-direction:row;padding:10px 17px}.artalk>.atk-list>.atk-list-header .atk-text{display:inline-block}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap{position:relative;cursor:pointer}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-arrow-down-icon{cursor:pointer;vertical-align:middle;border-top:5px solid var(--at-color-grey);border-left:3px solid transparent;border-right:3px solid transparent;margin-top:-1px;margin-left:.8rem;display:inline-block}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap:hover .atk-dropdown{display:block}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown{z-index:3;display:none;height:auto!important;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;width:100%;background-color:var(--at-color-bg);padding:.6rem 0;border:1px solid var(--at-color-border);text-align:center;border-radius:6px;white-space:nowrap;margin:0;list-style:none}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item span,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a{display:block;line-height:2rem;position:relative;border-bottom:none;font-weight:400;padding:0 1.5rem}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item span:hover,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a:hover{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item.active span,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-comment-count{font-size:15px}.artalk>.atk-list>.atk-list-header .atk-comment-count .atk-comment-count-num{font-size:22px;margin-right:4px}.artalk>.atk-list>.atk-list-header .atk-right-action{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:flex-end}.artalk>.atk-list>.atk-list-header .atk-right-action>span{font-size:14px;color:var(--at-color-meta);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on,.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on *{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-right-action>span:not(:last-child):not(.atk-hide){margin-right:10px;padding-right:10px}.artalk>.atk-list>.atk-list-header .atk-right-action>span .atk-unread-badge{position:absolute;top:-5px;left:-6px;color:#fff;background:var(--at-color-pink);text-align:center;min-width:16px;height:16px;padding:0 3px;border-radius:8px;line-height:16px;font-size:12px}.artalk>.atk-list>.atk-list-body{min-height:150px}.artalk>.atk-list>.atk-list-footer{text-align:right}@media only screen and (max-width: 768px){.artalk>.atk-list>.atk-list-footer{float:initial;text-align:center}}.artalk>.atk-list>.atk-list-footer .atk-copyright{display:block;font-size:12px;color:var(--at-color-meta);padding-right:15px}.artalk>.atk-list>.atk-list-footer .atk-copyright a{color:var(--at-color-main);text-decoration:none}.atk-list-no-comment{height:150px;display:flex;font-size:19px;justify-content:center;align-items:center;word-break:break-word;text-align:center}.atk-list-read-more{border-top:1px dashed var(--at-color-border);margin-top:28px;padding-bottom:25px}@media only screen and (max-width: 768px){.atk-list-read-more{padding-bottom:10px}}.atk-list-read-more.atk-err .atk-text{color:var(--at-color-red)!important}.atk-list-read-more .atk-list-read-more-inner{cursor:pointer;-webkit-user-select:none;user-select:none;padding:0 15px;font-size:14px;border-radius:6px;border:1px solid transparent;display:flex;height:30px;flex-direction:row;place-content:center;align-items:center;width:120px;margin:-15px auto 0;background:var(--at-color-bg);border-color:var(--at-color-border)}.atk-list-read-more .atk-list-read-more-inner>.atk-loading-icon{height:15px;width:15px}.atk-list-read-more .atk-list-read-more-inner>.atk-text{color:var(--at-color-meta)}.atk-list-read-more .atk-list-read-more-inner:hover{background:var(--at-color-bg-grey)}.atk-pagination{display:flex;flex-direction:row;justify-content:center;padding:10px 0;position:relative}.atk-pagination>.atk-btn,.atk-pagination>.atk-input{height:30px;border:1px solid var(--at-color-border);border-radius:3px;padding:0 5px;text-align:center;background:var(--at-color-bg)}.atk-pagination>.atk-btn{-webkit-user-select:none;user-select:none;width:60px;cursor:pointer;display:flex;justify-content:center;align-items:center}.atk-pagination>.atk-btn:hover{background:var(--at-color-bg-grey)}.atk-pagination>.atk-btn.atk-disabled{color:var(--at-color-sub)}.atk-pagination>.atk-btn.atk-disabled:hover{cursor:default;background:initial}.atk-pagination>.atk-input{background:transparent;color:var(--at-color-font);font-size:18px;width:60px;outline:none}.atk-pagination>.atk-input:focus{border-color:var(--at-color-main)}.atk-pagination>*:not(:last-child){margin-right:10px}.atk-main-editor{position:relative;overflow:hidden;background:var(--at-color-bg);border:1px solid var(--at-color-border);border-radius:6px;margin-bottom:10px}@media only screen and (max-width: 768px){.atk-main-editor{margin-bottom:7px}}.atk-main-editor.editor-traveling{margin-top:5px;margin-bottom:10px}.atk-main-editor>.atk-header{display:flex;flex-direction:row;padding:10px 14px 0}.atk-main-editor>.atk-header input{flex:1;width:100%;font-size:14px;background:transparent;border:2px solid transparent;border-radius:3px;padding:6px 5px;resize:none;outline:none}.atk-main-editor>.atk-header input:not(:last-child){margin-right:2px}.atk-main-editor>.atk-textarea-wrap{position:relative}.atk-main-editor>.atk-textarea-wrap>.atk-textarea{display:block;overflow:hidden;color:var(--at-color-font);font-size:15px;background-color:var(--at-color-bg);border:2px solid transparent;border-radius:3px;width:100%;min-height:120px;margin-top:2px;padding:10px 20px;resize:none;word-wrap:break-word;outline:none}.atk-main-editor>.atk-textarea-wrap>.atk-comment-closed{pointer-events:none;color:var(--at-color-meta);font-size:12px;background-color:var(--at-color-bg);border-top:1px solid var(--at-color-border);padding:5px 15px;margin-top:10px}.atk-main-editor>.atk-plug-panel-wrap{position:relative;height:180px;width:100%;overflow:hidden;border-top:1px solid var(--at-color-border);animation:.3s both atkFadeIn;transition:.2s height ease-in-out}.atk-main-editor>.atk-bottom{display:flex;flex-direction:row;row-gap:5px;justify-content:space-between;padding:5px;flex-wrap:wrap}.atk-main-editor>.atk-bottom>.atk-item{display:flex;flex-direction:row;align-items:center}.atk-main-editor>.atk-bottom>.atk-bottom-left>.atk-state-wrap{margin-right:5px}.atk-main-editor>.atk-bottom>.atk-bottom-left>.atk-plug-btn-wrap{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;row-gap:5px}.atk-main-editor>.atk-bottom .atk-plug-btn{display:flex;justify-content:center;place-items:center;padding:0 10px;line-height:30px;height:30px;cursor:pointer;color:var(--at-color-grey);font-size:14px;-webkit-user-select:none;user-select:none;border-radius:3px;word-break:keep-all}.atk-main-editor>.atk-bottom .atk-plug-btn:not(:last-child){margin-right:5px}.atk-main-editor>.atk-bottom .atk-plug-btn:hover{background:var(--at-color-bg-grey)}.atk-main-editor>.atk-bottom .atk-plug-btn.active{color:var(--at-color-main)}.atk-main-editor>.atk-bottom .atk-plug-btn.active svg.markdown path{fill:var(--at-color-main)}.atk-main-editor>.atk-bottom .atk-plug-btn i{display:flex;justify-content:center;place-items:center;color:var(--at-color-grey)}.atk-main-editor>.atk-bottom .atk-plug-btn i:not(:first-child){margin-left:4px}.atk-main-editor>.atk-bottom .atk-state-btn{z-index:2;height:30px;padding:0 0 0 10px;font-size:14px;position:relative;display:flex;flex-direction:row;justify-content:center;place-items:center;background:var(--at-color-bg-grey-transl);cursor:pointer;overflow:hidden;border-radius:3px}.atk-main-editor>.atk-bottom .atk-state-btn:hover .atk-cancel{background:#0000000a}@media only screen and (max-width: 768px){.atk-main-editor>.atk-bottom .atk-state-btn{padding:0}.atk-main-editor>.atk-bottom .atk-state-btn .atk-text-wrap{display:none}}.atk-main-editor>.atk-bottom .atk-state-btn .atk-text-wrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px 0 2px;max-width:8em}.atk-main-editor>.atk-bottom .atk-state-btn .atk-cancel{display:flex;justify-content:center;place-items:center;padding:0 10px;font-weight:700;height:100%;background:#00000005}.atk-main-editor>.atk-bottom .atk-send-btn{background:var(--at-color-main);color:#fff;font-size:14px;border:none;margin:0;height:30px;min-width:7.3em;cursor:pointer;transition:opacity .3s ease-in-out;outline:none;border-radius:3px}@media only screen and (max-width: 768px){.atk-main-editor>.atk-bottom .atk-send-btn{min-width:6em}}.atk-main-editor>.atk-bottom .atk-send-btn:active{opacity:.9}.atk-main-editor>.atk-notify-wrap{z-index:3;position:absolute;right:-2px;bottom:40px;width:225px;opacity:.83}.atk-sidebar-layer{position:fixed;z-index:99999;top:0;right:0;width:430px;height:100%;background:var(--at-color-bg);transition:transform .45s cubic-bezier(.23,1,.32,1) 0ms;transform:translate(430px)}@media only screen and (max-width: 430px){.atk-sidebar-layer{width:100%}}.atk-sidebar-layer .atk-sidebar-inner{position:relative;height:100%}.atk-sidebar-layer .atk-sidebar-header{position:absolute;top:0;right:0;display:flex;flex-direction:row;align-items:center;z-index:99999}.atk-sidebar-layer .atk-sidebar-header .atk-sidebar-close{display:flex;flex-direction:column;width:60px;height:60px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;margin-left:10px;font-size:22px}.atk-sidebar-layer .atk-sidebar-header .atk-sidebar-close:hover :after{background-color:#e81123e6}.atk-sidebar-layer .atk-sidebar-iframe-wrap{height:100%;position:relative}.atk-sidebar-layer .atk-sidebar-iframe-wrap iframe{border:0;width:100%;height:100%}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert{z-index:9999;top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;background:var(--at-color-bg);padding:40px 30px;width:80%;text-align:center;border-radius:4px}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-title{font-size:1.4em;margin-bottom:20px;color:var(--at-color-font)}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-text{color:var(--at-color-font)}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-text span{cursor:pointer;color:var(--at-color-main)}.artalk{position:relative;width:100%;min-height:200px}.artalk,.atk-layer-wrap{color:var(--at-color-font);word-wrap:break-word;word-break:break-word}.artalk *,.atk-layer-wrap *{box-sizing:border-box}.artalk input,.artalk textarea,.artalk button,.artalk optgroup,.artalk select,.atk-layer-wrap input,.atk-layer-wrap textarea,.atk-layer-wrap button,.atk-layer-wrap optgroup,.atk-layer-wrap select{font-family:inherit;color:inherit;font-size:inherit}.artalk code,.atk-layer-wrap code{font-family:source code pro,Consolas,Monaco,Menlo,sans-serif;margin:0 .05em;padding:0 .4em;display:inline-block;vertical-align:middle;font-size:.9em;background-color:var(--at-color-bg-grey);color:var(--at-color-font);border-radius:2px}.artalk pre,.atk-layer-wrap pre{margin:10px 0 0;padding:0;line-height:0}.artalk pre code,.atk-layer-wrap pre code{line-height:1.6em;display:block;padding:10px 15px;white-space:pre-wrap!important;background-color:var(--at-color-bg-grey);color:var(--at-color-font);margin:0}.artalk pre code *,.atk-layer-wrap pre code *{font-family:source code pro,Consolas,Monaco,Menlo,sans-serif}.artalk a,.atk-layer-wrap a{color:var(--at-color-main);text-decoration:none}.artalk blockquote,.atk-layer-wrap blockquote{position:static;margin:10px 0;padding:10px 20px;background:var(--at-color-bg-grey);border-left:4px solid #687a86;color:var(--at-color-font)}.artalk p:first-child,.atk-layer-wrap p:first-child{margin-top:0}.artalk p:last-child,.atk-layer-wrap p:last-child{margin-bottom:0}.artalk img,.atk-layer-wrap img{max-width:100%}.artalk table,.atk-layer-wrap table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:1.5em;font-size:.96em}.artalk td,.artalk th,.atk-layer-wrap td,.atk-layer-wrap th{text-align:left;padding:4px 8px 4px 10px;border:1px solid var(--at-color-border)}.artalk td,.atk-layer-wrap td{vertical-align:top}.artalk tr:nth-child(2n),.atk-layer-wrap tr:nth-child(2n){background-color:var(--at-color-bg-grey)}.artalk ul,.atk-layer-wrap ul{list-style:disc}.artalk ol,.atk-layer-wrap ol{list-style:decimal}.artalk li+li,.atk-layer-wrap li+li{margin-top:8px}.artalk li>ol,.artalk li>ul,.atk-layer-wrap li>ol,.atk-layer-wrap li>ul{margin:8px 0 0}.atk-hide{display:none!important}.atk-full-layer,.atk-layer-dialog-wrap,.atk-error-layer,.atk-loading{width:100%;height:100%;position:absolute;top:0;left:0;background:var(--at-color-bg);z-index:4;align-items:center;justify-content:center;flex-flow:column;display:flex}.atk-loading-spinner{position:relative;width:50px;height:50px}.atk-loading-spinner svg{animation:atkRotate 2s linear infinite;transform-origin:center center;width:100%;height:100%;position:absolute;top:0;left:0}.atk-loading-spinner svg circle{stroke-dasharray:1,200;stroke-dashoffset:0;animation:atkDash 1.5s ease-in-out infinite,atkColor 6s ease-in-out infinite;stroke-linecap:round}@keyframes atkRotate{to{transform:rotate(360deg)}}@keyframes atkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes atkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@keyframes atkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.atk-loading-icon{width:18px;height:18px;box-sizing:border-box;border:solid 1px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;animation:atkLoadingIconRotate .4s linear infinite}.atk-fade-in{animation:atkFadeIn both .3s}.atk-fade-out{animation:atkFadeOut both .2s}.atk-rotate{animation:atkRotate 2s linear infinite}@keyframes atkFadeIn{0%{opacity:0}to{opacity:1}}@keyframes atkFadeOut{to{opacity:0}}@keyframes atkRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.atk-icon:after{display:block;content:"";width:1em;height:1em;background-color:var(--at-color-deep);background-size:contain;background-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.atk-icon-sync:after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-del:after{background-color:var(--at-color-red)!important;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-edit:after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E")}.atk-icon-yes:after,.atk-icon-check:after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E")}.atk-icon-plus:after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-close-slim:after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E")}.atk-icon-arrow-left:after{-webkit-mask-image:url('data:image/svg+xml,');mask-image:url('data:image/svg+xml,')}.atk-icon-no:after,.atk-icon-close:after{-webkit-mask-image:url('data:image/svg+xml,');mask-image:url('data:image/svg+xml,')}.atk-error-layer{background-color:var(--at-color-bg-transl)}.atk-error-layer .atk-error-title{color:var(--at-color-red)}.atk-error-layer .atk-warn-title{color:var(--at-color-yellow)}.atk-error-layer .atk-error-title,.atk-error-layer .atk-warn-title{display:inline-block;padding:0 15px;margin-bottom:20px;font-size:20px;letter-spacing:-.5px}.atk-error-layer .atk-error-text{text-align:center;padding:0 20px}.atk-error-layer .atk-error-text *{color:var(--at-color-deep)}.atk-error-layer .atk-error-text a{color:var(--at-color-meta)}.atk-version-check-notice{background:var(--at-color-bg-grey);border-radius:6px;padding:10px 20px;margin-bottom:10px;font-size:14px}.atk-version-check-notice .atk-info{color:var(--at-color-meta)}.atk-version-check-notice .atk-ignore-btn{cursor:pointer;float:right}.atk-version-check-notice .atk-ignore-btn:hover{opacity:.8}.atk-layer-dialog-wrap{background-color:var(--at-color-bg-transl)}.atk-layer-dialog-wrap>.atk-layer-dialog{width:25%}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content .atk-captcha-img{cursor:pointer;width:170px;height:auto;margin-right:10px;padding-right:10px;border-right:1px solid var(--at-color-border);vertical-align:bottom}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content input{width:100%;line-height:34px;background-color:var(--at-color-bg);border:1px solid var(--at-color-border);border-radius:3px;outline:none;padding:0 6px;display:block;margin-top:10px;margin-bottom:5px;text-align:center}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions{display:flex;flex-direction:row}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button{flex:1;display:block;cursor:pointer;border:1px solid var(--at-color-main);background:transparent;color:var(--at-color-main);border-radius:3px;padding:0 15px;line-height:30px;outline:none}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:active{color:#fff;background:var(--at-color-main)}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:not(:last-child){margin-right:5px}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button.error{color:#fff;background:#ff5652;border-color:#ff5652}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap{position:fixed;z-index:999998;left:0;top:0;height:100vh;width:100vw}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap>iframe{width:100%;height:100%;border:0}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap .atk-close-btn{z-index:999999;position:fixed;top:20px;right:20px;display:flex;flex-direction:column;width:50px;height:50px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;margin-left:10px}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap .atk-close-btn:hover .atk-icon-close:after{background-color:#e81123e6}@media only screen and (max-width: 768px){.atk-layer-dialog-wrap>.atk-layer-dialog{width:90%!important}}.atk-notify{display:block;overflow:hidden;background-color:#2c2c2c;color:#fff;border-radius:3px;cursor:pointer;font-size:14px;padding:5px 15px}.atk-notify:not(:last-child){margin-bottom:3px}.atk-notify .atk-notify-content{color:#fff}.atk-layer-wrap .atk-layer-mask{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998;background:#0000004d}.atk-layer-wrap .atk-layer-item{position:fixed;z-index:99999;top:0;right:0;width:100%;height:100%}.atk-common-action-btn.atk-btn-confirm,.atk-common-action-btn.atk-btn-warn{color:var(--at-color-yellow)!important}.atk-common-action-btn.atk-btn-error{color:var(--at-color-red)!important}.atk-common-action-btn.atk-btn-success{color:var(--at-color-green)!important}img[atk-emoticon]{max-height:60px;display:initial}.atk-slim-scrollbar::-webkit-scrollbar,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-slim-scrollbar::-webkit-scrollbar-thumb,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb,.atk-slim-scrollbar::-webkit-scrollbar-thumb:window-inactive{background:#5656564d}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:hover,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:hover{background:#414a52c4}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:active,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:active{background:#292f35c4}.atk-editor-plug-emoticons{height:100%;width:100%}.atk-editor-plug-emoticons>.atk-grp-wrap{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp{display:flex;flex-wrap:wrap;flex-direction:row;padding:5px 10px 35px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp[data-type=image]>.atk-item{height:63px;width:63px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item{display:flex;align-items:center;justify-content:center;padding:5px;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:3px;font-size:15px;min-width:35px;margin:2px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item>img{max-height:100%;width:auto}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item:hover{background:var(--at-color-bg-grey)}.atk-editor-plug-emoticons>.atk-grp-switcher{position:absolute;bottom:0;left:0;width:100%;background:var(--at-color-bg-transl);height:30px;border-top:1px solid var(--at-color-border);border-bottom:1px solid var(--at-color-border)}.atk-editor-plug-emoticons>.atk-grp-switcher>span{-webkit-user-select:none;user-select:none;padding:0 10px;line-height:30px;float:left;display:block;cursor:pointer;font-size:14px}.atk-editor-plug-emoticons>.atk-grp-switcher>span:hover,.atk-editor-plug-emoticons>.atk-grp-switcher>span.active{background:var(--at-color-bg-grey)}.atk-slim-scrollbar::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-slim-scrollbar::-webkit-scrollbar-thumb,.atk-slim-scrollbar::-webkit-scrollbar-thumb:window-inactive{background:#5656564d}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:hover{background:#414a52c4}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:active{background:#292f35c4}.atk-editor-plug-preview{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%;padding:10px 15px} diff --git a/pluginsSrc/artalk/dist/Artalk.js b/pluginsSrc/artalk/dist/Artalk.js deleted file mode 100644 index d45685d2..00000000 --- a/pluginsSrc/artalk/dist/Artalk.js +++ /dev/null @@ -1,11 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Artalk={})}(this,(function(e){"use strict";var t=Object.defineProperty,n=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(e,n,s)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,l=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))o.call(t,n)&&a(e,n,t[n]);return e},c=(e,t)=>n(e,s(t)),d=(e,t,n)=>a(e,"symbol"!=typeof t?t+"":t,n),h=(e,t,n)=>new Promise(((s,i)=>{var r=e=>{try{a(n.next(e))}catch(t){i(t)}},o=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=e=>e.done?s(e.value):Promise.resolve(e.value).then(r,o);a((n=n.apply(e,t)).next())}));class u{constructor(e={}){d(this,"baseUrl","/api/v2"),d(this,"securityData",null),d(this,"securityWorker"),d(this,"abortControllers",new Map),d(this,"customFetch",((...e)=>fetch(...e))),d(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"}),d(this,"setSecurityData",(e=>{this.securityData=e})),d(this,"contentFormatters",{"application/json":e=>null===e||"object"!=typeof e&&"string"!=typeof e?e:JSON.stringify(e),"text/plain":e=>null!==e&&"string"!=typeof e?JSON.stringify(e):e,"multipart/form-data":e=>Object.keys(e||{}).reduce(((t,n)=>{const s=e[n];return t.append(n,s instanceof Blob?s:"object"==typeof s&&null!==s?JSON.stringify(s):`${s}`),t}),new FormData),"application/x-www-form-urlencoded":e=>this.toQueryString(e)}),d(this,"createAbortSignal",(e=>{if(this.abortControllers.has(e)){const t=this.abortControllers.get(e);return t?t.signal:void 0}const t=new AbortController;return this.abortControllers.set(e,t),t.signal})),d(this,"abortRequest",(e=>{const t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))})),d(this,"request",(e=>h(this,null,(function*(){var t=e,{body:n,secure:s,path:a,type:d,query:u,format:p,baseUrl:g,cancelToken:m}=t,f=((e,t)=>{var n={};for(var s in e)r.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&i)for(var s of i(e))t.indexOf(s)<0&&o.call(e,s)&&(n[s]=e[s]);return n})(t,["body","secure","path","type","query","format","baseUrl","cancelToken"]);const k=("boolean"==typeof s?s:this.baseApiParams.secure)&&this.securityWorker&&(yield this.securityWorker(this.securityData))||{},y=this.mergeRequestParams(f,k),$=u&&this.toQueryString(u),v=this.contentFormatters[d||"application/json"],w=p||y.format;return this.customFetch(`${g||this.baseUrl||""}${a}${$?`?${$}`:""}`,c(l({},y),{headers:l(l({},y.headers||{}),d&&"multipart/form-data"!==d?{"Content-Type":d}:{}),signal:(m?this.createAbortSignal(m):y.signal)||null,body:null==n?null:v(n)})).then((e=>h(this,null,(function*(){const t=e.clone();t.data=null,t.error=null;const n=w?yield e[w]().then((e=>(t.ok?t.data=e:t.error=e,t))).catch((e=>(t.error=e,t))):t;if(m&&this.abortControllers.delete(m),!e.ok)throw n;return n}))))})))),Object.assign(this,e)}encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent("number"==typeof t?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map((e=>this.encodeQueryParam(t,e))).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter((e=>void 0!==t[e])).map((e=>Array.isArray(t[e])?this.addArrayQueryParam(t,e):this.addQueryParam(t,e))).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}mergeRequestParams(e,t){return c(l(l(l({},this.baseApiParams),e),t||{}),{headers:l(l(l({},this.baseApiParams.headers||{}),e.headers||{}),t&&t.headers||{})})}} -/** - * @title Artalk API - * @version 2.0 - * @license MIT (https://github.com/ArtalkJS/Artalk/blob/master/LICENSE) - * @baseUrl /api/v2 - * @contact API Support (https://artalk.js.org) - * - * Artalk is a modern comment system based on Golang. - */let p=class extends u{constructor(){super(...arguments),d(this,"auth",{loginByEmail:(e,t={})=>this.request(l({path:"/auth/email/login",method:"POST",body:e,type:"application/json",format:"json"},t)),registerByEmail:(e,t={})=>this.request(l({path:"/auth/email/register",method:"POST",body:e,type:"application/json",format:"json"},t)),sendVerifyEmail:(e,t={})=>this.request(l({path:"/auth/email/send",method:"POST",body:e,type:"application/json",format:"json"},t)),checkDataMerge:(e={})=>this.request(l({path:"/auth/merge",method:"GET",secure:!0,format:"json"},e)),applyDataMerge:(e,t={})=>this.request(l({path:"/auth/merge",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t))}),d(this,"cache",{flushCache:(e={})=>this.request(l({path:"/cache/flush",method:"POST",secure:!0,format:"json"},e)),warmUpCache:(e={})=>this.request(l({path:"/cache/warm_up",method:"POST",secure:!0,format:"json"},e))}),d(this,"captcha",{getCaptcha:(e={})=>this.request(l({path:"/captcha",method:"GET",format:"json"},e)),getCaptchaStatus:(e={})=>this.request(l({path:"/captcha/status",method:"GET",format:"json"},e)),verifyCaptcha:(e,t={})=>this.request(l({path:"/captcha/verify",method:"POST",body:e,type:"application/json",format:"json"},t))}),d(this,"comments",{getComments:(e,t={})=>this.request(l({path:"/comments",method:"GET",query:e,secure:!0,type:"application/json",format:"json"},t)),createComment:(e,t={})=>this.request(l({path:"/comments",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t)),getComment:(e,t={})=>this.request(l({path:`/comments/${e}`,method:"GET",type:"application/json",format:"json"},t)),updateComment:(e,t,n={})=>this.request(l({path:`/comments/${e}`,method:"PUT",body:t,secure:!0,type:"application/json",format:"json"},n)),deleteComment:(e,t={})=>this.request(l({path:`/comments/${e}`,method:"DELETE",secure:!0,format:"json"},t))}),d(this,"conf",{conf:(e={})=>this.request(l({path:"/conf",method:"GET",format:"json"},e)),getSocialLoginProviders:(e={})=>this.request(l({path:"/conf/auth/providers",method:"GET",format:"json"},e)),getDomain:(e,t={})=>this.request(l({path:"/conf/domain",method:"GET",query:e,format:"json"},t))}),d(this,"notifies",{getNotifies:(e,t={})=>this.request(l({path:"/notifies",method:"GET",query:e,type:"application/json",format:"json"},t)),markAllNotifyRead:(e,t={})=>this.request(l({path:"/notifies/read",method:"POST",body:e,type:"application/json",format:"json"},t)),markNotifyRead:(e,t,n={})=>this.request(l({path:`/notifies/${e}/${t}`,method:"POST",format:"json"},n))}),d(this,"pages",{getPages:(e,t={})=>this.request(l({path:"/pages",method:"GET",query:e,secure:!0,type:"application/json",format:"json"},t)),fetchAllPages:(e,t={})=>this.request(l({path:"/pages/fetch",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t)),getPageFetchStatus:(e={})=>this.request(l({path:"/pages/fetch/status",method:"GET",secure:!0,format:"json"},e)),logPv:(e,t={})=>this.request(l({path:"/pages/pv",method:"POST",body:e,type:"application/json",format:"json"},t)),updatePage:(e,t,n={})=>this.request(l({path:`/pages/${e}`,method:"PUT",body:t,secure:!0,type:"application/json",format:"json"},n)),deletePage:(e,t={})=>this.request(l({path:`/pages/${e}`,method:"DELETE",secure:!0,format:"json"},t)),fetchPage:(e,t={})=>this.request(l({path:`/pages/${e}/fetch`,method:"POST",secure:!0,type:"application/json",format:"json"},t))}),d(this,"sendEmail",{sendEmail:(e,t={})=>this.request(l({path:"/send_email",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t))}),d(this,"settings",{getSettings:(e={})=>this.request(l({path:"/settings",method:"GET",secure:!0,format:"json"},e)),applySettings:(e,t={})=>this.request(l({path:"/settings",method:"PUT",body:e,secure:!0,type:"application/json",format:"json"},t)),getSettingsTemplate:(e,t={})=>this.request(l({path:`/settings/template/${e}`,method:"GET",secure:!0,format:"json"},t))}),d(this,"sites",{getSites:(e={})=>this.request(l({path:"/sites",method:"GET",secure:!0,format:"json"},e)),createSite:(e,t={})=>this.request(l({path:"/sites",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t)),updateSite:(e,t,n={})=>this.request(l({path:`/sites/${e}`,method:"PUT",body:t,secure:!0,type:"application/json",format:"json"},n)),deleteSite:(e,t={})=>this.request(l({path:`/sites/${e}`,method:"DELETE",secure:!0,format:"json"},t))}),d(this,"stats",{getStats:(e,t,n={})=>this.request(l({path:`/stats/${e}`,method:"GET",query:t,type:"application/json",format:"json"},n))}),d(this,"transfer",{exportArtrans:(e={})=>this.request(l({path:"/transfer/export",method:"GET",secure:!0,format:"json"},e)),importArtrans:(e,t={})=>this.request(l({path:"/transfer/import",method:"POST",body:e,secure:!0,type:"application/json"},t)),uploadArtrans:(e,t={})=>this.request(l({path:"/transfer/upload",method:"POST",body:e,secure:!0,type:"multipart/form-data",format:"json"},t))}),d(this,"upload",{upload:(e,t={})=>this.request(l({path:"/upload",method:"POST",body:e,secure:!0,type:"multipart/form-data",format:"json"},t))}),d(this,"user",{getUser:(e,t={})=>this.request(l({path:"/user",method:"GET",query:e,secure:!0,format:"json"},t)),updateProfile:(e,t={})=>this.request(l({path:"/user",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t)),login:(e,t={})=>this.request(l({path:"/user/access_token",method:"POST",body:e,type:"application/json",format:"json"},t)),getUserStatus:(e,t={})=>this.request(l({path:"/user/status",method:"GET",query:e,secure:!0,format:"json"},t))}),d(this,"users",{createUser:(e,t={})=>this.request(l({path:"/users",method:"POST",body:e,secure:!0,type:"application/json",format:"json"},t)),updateUser:(e,t,n={})=>this.request(l({path:`/users/${e}`,method:"PUT",body:t,secure:!0,type:"application/json",format:"json"},n)),deleteUser:(e,t={})=>this.request(l({path:`/users/${e}`,method:"DELETE",secure:!0,format:"json"},t)),getUsers:(e,t,n={})=>this.request(l({path:`/users/${e}`,method:"GET",query:t,secure:!0,type:"application/json",format:"json"},n))}),d(this,"version",{getVersion:(e={})=>this.request(l({path:"/version",method:"GET",format:"json"},e))}),d(this,"votes",{syncVotes:(e={})=>this.request(l({path:"/votes/sync",method:"POST",secure:!0,format:"json"},e)),vote:(e,t,n,s={})=>this.request(l({path:`/votes/${e}/${t}`,method:"POST",body:n,type:"application/json",format:"json"},s))})}};const g=(e,t,n)=>h(this,null,(function*(){const s=e.getApiToken&&e.getApiToken(),i=new Headers(l({Authorization:s?`Bearer ${s}`:""},null==n?void 0:n.headers));i.get("Authorization")||i.delete("Authorization");const r=yield fetch(t,c(l({},n),{headers:i}));if(!r.ok){const s=(yield r.json().catch((()=>{})))||{};let i=!1;if(e.handlers&&(yield e.handlers.get().reduce(((e,t)=>h(this,null,(function*(){yield e,!0===s[t.action]&&(yield t.handler(s),i=!0)}))),Promise.resolve())),i)return g(e,t,n);throw function(e,t){const n=new m;return n.message=t.msg||t.message||"fetch error",n.code=e,n.data=t,console.error(n),n}(r.status,s)}return r}));class m extends Error{constructor(){super(...arguments),d(this,"code",0),d(this,"message","fetch error"),d(this,"data")}}class f extends p{constructor(e){super({baseUrl:e.baseURL,customFetch:(t,n)=>g(e,t,n)}),d(this,"_opts"),this._opts=e}getUserFields(){const e=this._opts.userInfo;if((null==e?void 0:e.name)&&(null==e?void 0:e.email))return{name:e.name,email:e.email}}}function k(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let y={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function $(e){y=e}const v=/[&<>"']/,w=new RegExp(v.source,"g"),b=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,x=new RegExp(b.source,"g"),C={"&":"&","<":"<",">":">",'"':""","'":"'"},E=e=>C[e];function S(e,t){if(t){if(v.test(e))return e.replace(w,E)}else if(b.test(e))return e.replace(x,E);return e}const T=/(^|[^\[])\^/g;function A(e,t){let n="string"==typeof e?e:e.source;t=t||"";const s={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(T,"$1"),n=n.replace(e,i),s},getRegex:()=>new RegExp(n,t)};return s}function L(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(t){return null}return e}const M={exec:()=>null};function P(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let s=!1,i=t;for(;--i>=0&&"\\"===n[i];)s=!s;return s?"|":" |"})).split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:I(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const s=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=I(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:I(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=I(t[0],"\n").split("\n"),n="",s="";const i=[];for(;e.length>0;){let t=!1;const r=[];let o;for(o=0;o/.test(e[o]))r.push(e[o]),t=!0;else{if(t)break;r.push(e[o])}e=e.slice(o);const a=r.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n}\n${a}`:a,s=s?`${s}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===e.length)break;const d=i[i.length-1];if("code"===(null==d?void 0:d.type))break;if("blockquote"===(null==d?void 0:d.type)){const t=d,r=t.raw+"\n"+e.join("\n"),o=this.blockquote(r);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,s=s.substring(0,s.length-t.text.length)+o.text;break}if("list"!==(null==d?void 0:d.type));else{const t=d,r=t.raw+"\n"+e.join("\n"),o=this.list(r);i[i.length-1]=o,n=n.substring(0,n.length-d.raw.length)+o.raw,s=s.substring(0,s.length-t.raw.length)+o.raw,e=r.substring(i[i.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let n=!1,s="",a="";if(!(t=r.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],d=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):d?h=t[1].length+1:(h=t[2].search(/[^ ]/),h=h>4?1:h,a=l.slice(h),h+=t[1].length),d&&/^[ \t]*$/.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,h-1)}}#`),o=new RegExp(`^ {0,${Math.min(3,h-1)}}<[a-z].*>`,"i");for(;e;){const u=e.split("\n",1)[0];let p;if(c=u,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),i.test(c))break;if(r.test(c))break;if(o.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=h||!c.trim())a+="\n"+p.slice(h);else{if(d)break;if(l.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(i.test(l))break;if(r.test(l))break;if(n.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),s+=u+"\n",e=e.substring(u.length+1),l=p.slice(h)}}i.loose||(o?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(s)&&(o=!0));let u,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(a),p&&(u="[ ] "!==p[0],a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!p,checked:u,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=P(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const e of s)/^ *-+: *$/.test(e)?r.align.push("right"):/^ *:-+: *$/.test(e)?r.align.push("center"):/^ *:-+ *$/.test(e)?r.align.push("left"):r.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:r.align[t]}))));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:S(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=I(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),R(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return R(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s)return;if(s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let i,r,o=n,a=0;const l="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=l.exec(t));){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(r=[...i].length,s[3]||s[4]){o+=r;continue}if((s[5]||s[6])&&n%3&&!((n+r)%3)){a+=r;continue}if(o-=r,o>0)continue;r=Math.min(r,r+o+a);const t=[...s[0]][0].length,l=e.slice(0,n+s.index+t+r);if(Math.min(n,r)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return n&&s&&(e=e.substring(1,e.length-1)),e=S(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=S(t[1]),n="mailto:"+e):(e=S(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t,n;let s;if(s=this.rules.inline.url.exec(e)){let e,i;if("@"===s[2])e=S(s[0]),i="mailto:"+e;else{let r;do{r=s[0],s[0]=null!=(n=null==(t=this.rules.inline._backpedal.exec(s[0]))?void 0:t[0])?n:""}while(r!==s[0]);e=S(s[0]),i="www."===s[1]?"http://"+s[0]:s[0]}return{type:"link",raw:s[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:S(t[0]),{type:"text",raw:t[0],text:e}}}}const q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_=/(?:[*+-]|\d{1,9}[.)])/,O=A(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),D=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,B=/(?!\s*\])(?:\\.|[^\[\]\\])+/,j=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",B).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),F=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_).getRegex(),W="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/|$))/,N=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",W).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H=A(D).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",W).getRegex(),Q={blockquote:A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",H).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:j,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:q,html:N,lheading:O,list:F,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:H,table:M,text:/^[^\n]+/},V=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",W).getRegex(),G=c(l({},Q),{table:V,paragraph:A(D).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",V).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",W).getRegex()}),K=c(l({},Q),{html:A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z).replace(/tag/g,"(?!(?: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").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:M,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(D).replace("hr",q).replace("heading"," *#{1,6} *[^\n]").replace("lheading",O).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Z=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Y=/^( {2,}|\\)\n(?!\s*$)/,X="\\p{P}\\p{S}",J=A(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,X).getRegex(),ee=A(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,X).getRegex(),te=A("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,X).getRegex(),ne=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,X).getRegex(),se=A(/\\([punct])/,"gu").replace(/punct/g,X).getRegex(),ie=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),re=A(z).replace("(?:--\x3e|$)","--\x3e").getRegex(),oe=A("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",re).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ae=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le=A(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ae).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ce=A(/^!?\[(label)\]\[(ref)\]/).replace("label",ae).replace("ref",B).getRegex(),de=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",B).getRegex(),he={_backpedal:M,anyPunctuation:se,autolink:ie,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Y,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:M,emStrongLDelim:ee,emStrongRDelimAst:te,emStrongRDelimUnd:ne,escape:Z,link:le,nolink:de,punctuation:J,reflink:ce,reflinkSearch:A("reflink|nolink(?!\\()","g").replace("reflink",ce).replace("nolink",de).getRegex(),tag:oe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0)))))if(s=this.tokenizer.space(e))e=e.substring(s.raw.length),1===s.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(s);else if(s=this.tokenizer.code(e))e=e.substring(s.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?t.push(s):(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(s=this.tokenizer.fences(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.heading(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.hr(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.blockquote(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.list(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.html(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.def(e))e=e.substring(s.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title}):(i.raw+="\n"+s.raw,i.text+="\n"+s.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(s=this.tokenizer.table(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.lheading(e))e=e.substring(s.raw.length),t.push(s);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r)))i=t[t.length-1],n&&"paragraph"===(null==i?void 0:i.type)?(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length);else if(s=this.tokenizer.text(e))e=e.substring(s.raw.length),i=t[t.length-1],i&&"text"===i.type?(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,i,r,o,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,r.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((s=>!!(n=s.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),o=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class ye{constructor(e){d(this,"options"),d(this,"parser"),this.options=e||y}space(e){return""}code({text:e,lang:t,escaped:n}){var s;const i=null==(s=(t||"").match(/^\S*/))?void 0:s[0],r=e.replace(/\n$/,"")+"\n";return i?'
    '+(n?r:S(r,!0))+"
    \n":"
    "+(n?r:S(r,!0))+"
    \n"}blockquote({tokens:e}){return`
    \n${this.parser.parse(e)}
    \n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let s="";for(let r=0;r\n"+s+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let i=0;i${s}`),"\n\n"+t+"\n"+s+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),i=L(e);if(null===i)return s;let r='
    ",r}image({href:e,title:t,text:n}){const s=L(e);if(null===s)return n;let i=`${n}{const s=e[n].flat(1/0);i=i.concat(this.walkTokens(s,t))})):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n=l({},e);if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new ye(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,i=e.renderer[s],r=t[s];t[s]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=r.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new U(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,i=e.tokenizer[s],r=t[s];t[s]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new we;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,i=e.hooks[s],r=t[s];we.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>r.call(t,e)));const n=i.call(t,e);return r.call(t,n)}:t[s]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=r.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults=l(l({},this.defaults),n)})),this}setOptions(e){return this.defaults=l(l({},this.defaults),e),this}lexer(e,t){return ke.lex(e,null!=t?t:this.defaults)}parser(e,t){return ve.parse(e,null!=t?t:this.defaults)}parseMarkdown(e){return(t,n)=>{const s=l({},n),i=l(l({},this.defaults),s),r=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===s.async)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return r(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const o=i.hooks?i.hooks.provideLexer():e?ke.lex:ke.lexInline,a=i.hooks?i.hooks.provideParser():e?ve.parse:ve.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then((e=>o(e,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>a(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(r);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=a(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(c){return r(c)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+S(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const xe=new be;function Ce(e,t){return xe.parse(e,t)}Ce.options=Ce.setOptions=function(e){return xe.setOptions(e),Ce.defaults=xe.defaults,$(Ce.defaults),Ce},Ce.getDefaults=k,Ce.defaults=y,Ce.use=function(...e){return xe.use(...e),Ce.defaults=xe.defaults,$(Ce.defaults),Ce},Ce.walkTokens=function(e,t){return xe.walkTokens(e,t)},Ce.parseInline=xe.parseInline,Ce.Parser=ve,Ce.parser=ve.parse,Ce.Renderer=ye,Ce.TextRenderer=$e,Ce.Lexer=ke,Ce.lexer=ke.lex,Ce.Tokenizer=U,Ce.Hooks=we,Ce.parse=Ce,Ce.options,Ce.setOptions,Ce.use,Ce.walkTokens,Ce.parseInline,ve.parse,ke.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Se={"&":"&","<":"<",">":">",'"':""","'":"'"},Te={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ae=/(&|<|>|"|')/g,Le=/[&<>"']/g;function Me(e){return Se[e]}function Pe(e){return Te[e]}function Ie(e){return null==e?"":String(e).replace(Le,Me)}function Re(e){return null==e?"":String(e).replace(Ae,Pe)}Ie.options=Re.options={};var Ue={encode:Ie,escape:Ie,decode:Re,unescape:Re,version:"1.0.0-browser"};var qe=function e(t){for(var n,s,i=Array.prototype.slice.call(arguments,1);i.length;)for(s in n=i.shift())n.hasOwnProperty(s)&&("[object Object]"===Object.prototype.toString.call(t[s])?t[s]=e(t[s],n[s]):t[s]=n[s]);return t},_e=function(e){return"string"==typeof e?e.toLowerCase():e};function Oe(e,t){return e[t]=!0,e}var De=function(e){return e.reduce(Oe,{})},Be={uris:De(["background","base","cite","href","longdesc","src","usemap"])},je={voids:De(["area","br","col","hr","img","wbr","input","base","basefont","link","meta"])},Fe=Ue,We=_e,ze=je,Ne=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,He=/^<\s*\/\s*([\w:-]+)[^>]*>/,Qe=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,Ve=/^=0&&(t.comment&&t.comment(e.substring(4,s)),e=e.substring(s+3),n=!1):Ge.test(e)?o(He,l):Ve.test(e)&&o(Ne,a);var s;!function(){if(!n)return;var s,i=e.indexOf("<");i>=0?(s=e.substring(0,i),e=e.substring(i)):(s=e,e="");t.chars&&t.chars(s)}()}();var s=e===i;i=e,s&&(e="")}function o(t,s){var i=e.match(t);i&&(e=e.substring(i[0].length),i[0].replace(t,s),n=!1)}function a(e,n,i,r){var o={},a=We(n),l=ze.voids[a]||!!r;i.replace(Qe,(function(e,t,n,s,i){o[t]=void 0===n&&void 0===s&&void 0===i?void 0:Fe.decode(n||s||i||"")})),l||s.push(a),t.start&&t.start(a,o,l)}function l(e,n){var i,r=0,o=We(n);if(o)for(r=s.length-1;r>=0&&s[r]!==o;r--);if(r>=0){for(i=s.length-1;i>=r;i--)t.end&&t.end(s[i]);s.length=r}}l()},tt=function(e,t){var n,s=t||{};return a(),{start:function(e,t,o){var a=Ze(e);if(n.ignoring)return void r(a);if(-1===(s.allowedTags||[]).indexOf(a))return void r(a);if(s.filter&&!s.filter({tag:a,attrs:t}))return void r(a);i("<"),i(a),Object.keys(t).forEach((function(e){var n=t[e],r=(s.allowedClasses||{})[a]||[],o=(s.allowedAttributes||{})[a]||[],l=Ze(e);("class"===l&&-1===o.indexOf(l)?(n=n.split(" ").filter((function(e){return r&&-1!==r.indexOf(e)})).join(" ").trim()).length:-1!==o.indexOf(l)&&(!0!==Ye.uris[l]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var i=e.indexOf("?");if(-1!==i&&n>i)return!0;var r=e.indexOf("#");return-1!==r&&n>r||s.allowedSchemes.some(o);function o(t){return 0===e.indexOf(t+":")}}(n)))&&(i(" "),i(e),"string"==typeof n&&(i('="'),i(Ke.encode(n)),i('"')))})),i(o?"/>":">")},end:function(e){var t=Ze(e);-1!==(s.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(i("")):o(t)},chars:function(e){!1===n.ignoring&&i(s.transformText?s.transformText(e):e)}};function i(t){e.push(t)}function r(e){Xe.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function o(e){n.ignoring===e&&--n.depth<=0&&a()}function a(){n={ignoring:!1,depth:0}}},nt={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};function st(e,t,n){var s=[],i=!0===n?t:Je({},nt,t),r=tt(s,i);return et(e,r),s.join("")}st.defaults=nt;const it=Ee(st),rt={allowedClasses:{},allowedSchemes:["http","https","mailto","data"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],allowedAttributes:{"*":["title","accesskey"],a:["href","name","target","aria-label","rel"],img:["src","alt","title","atk-emoticon","aria-label","data-src","class","loading"],code:["class"],span:["class","style"]},filter:e=>([["code",/^hljs\W+language-(.*)$/],["span",/^(hljs-.*)$/],["img",/^lazyload$/]].forEach((([t,n])=>{e.tag===t&&e.attrs.class&&!n.test(e.attrs.class)&&delete e.attrs.class})),"span"===e.tag&&e.attrs.style&&!/^color:(\W+)?#[0-9a-f]{3,6};?$/i.test(e.attrs.style)&&delete e.attrs.style,!0)};function ot(e){return it(e,rt)}var at={exports:{}};at.exports=function(){function e(e,t){return e(t={exports:{}},t.exports),t.exports}var t=e((function(e){var t=e.exports=function(){return new RegExp("(?:"+t.line().source+")|(?:"+t.block().source+")","gm")};t.line=function(){return/(?:^|\s)\/\/(.+?)$/gm},t.block=function(){return/\/\*([\S\s]*?)\*\//gm}})),n=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"];function s(e){return''+e+""}return function(e,i){void 0===i&&(i={});var r=i.colors;void 0===r&&(r=n);var o=0,a={},l=new RegExp("("+/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source+"|"+/'+t+"";return o=++o%r.length,l}))}}();const lt=Ee(at.exports);function ct(e){return lt(e)}function dt(e){const t=new Ce.Renderer;return t.link=ht(t,t.link),t.code=ut(),t.image=pt(t,t.image,e),t}const ht=(e,t)=>n=>{const s=(e=>{try{return new URL(e).origin}catch(t){return""}})(n.href)===window.location.origin;return t.call(e,n).replace(/^
    ({lang:e,text:t})=>{const n=e||"plaintext";let s=t;return window.hljs?n&&window.hljs.getLanguage(n)&&(s=window.hljs.highlight(n,t).value):s=ct(t),`
    \n${s.replace(/&/g,"&")}\n
    `},pt=(e,t,{imgLazyLoad:n})=>s=>{const i=t.call(e,s);return n?"native"===n||!0===n?i.replace(/^${t}`)).replace(/\[(.*?)\]\((.*?)\)/g,((e,t,n)=>`
    ${t}`)).replace(/\n/g,"
    ")}(e));let s=ot(n);return mt.forEach((e=>{"function"==typeof e&&(s=e(s))})),s}function $t(...e){const t=e=>e&&"object"==typeof e&&e.constructor===Object;return e.reduce(((e,n)=>(Object.keys(null!=n?n:{}).forEach((s=>{if("__proto__"===s||"constructor"===s||"prototype"===s)return;const i=e[s],r=n[s];Array.isArray(i)&&Array.isArray(r)?e[s]=i.concat(...r):t(i)&&t(r)?e[s]=$t(i,r):e[s]=r})),e)),{})}class vt{constructor(e){d(this,"loading",!1),d(this,"listLastFetch"),d(this,"comments",[]),d(this,"notifies",[]),d(this,"page"),this.events=e}getLoading(){return this.loading}setLoading(e){this.loading=e}getListLastFetch(){return this.listLastFetch}setListLastFetch(e){this.listLastFetch=e}getComments(){return this.comments}fetchComments(e){this.events.trigger("list-fetch",e)}findComment(e){return this.comments.find((t=>t.id===e))}clearComments(){this.comments=[],this.events.trigger("list-loaded",this.comments)}loadComments(e){this.events.trigger("list-load",e),this.comments.push(...e),this.events.trigger("list-loaded",this.comments)}insertComment(e){this.comments.push(e),this.events.trigger("comment-inserted",e),this.events.trigger("list-loaded",this.comments)}updateComment(e){this.comments=this.comments.map((t=>t.id===e.id?e:t)),this.events.trigger("comment-updated",e),this.events.trigger("list-loaded",this.comments)}deleteComment(e){const t=this.comments.find((t=>t.id===e));if(!t)throw new Error(`Comment ${e} not found`);this.comments=this.comments.filter((t=>t.id!==e)),this.events.trigger("comment-deleted",t),this.events.trigger("list-loaded",this.comments)}getNotifies(){return this.notifies}updateNotifies(e){this.notifies=e,this.events.trigger("notifies-updated",this.notifies)}getPage(){return this.page}updatePage(e){this.page=e,this.events.trigger("page-loaded",e)}}function wt(e=""){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild||t}function bt(e){const t=document.createElement("div");t.innerText=e;return t.innerHTML}function xt(e){const t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g," "))}function Ct(e,t){const n=e=>{const t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+s,left:t.left+n}},s=n(e);if(!t)return s;const i=n(t);return{top:s.top-i.top,left:s.left-i.left}}function Et(e,t){let n=e.toString();for(;n.lengthe){try{const n=e.getTime(),s=(new Date).getTime()-n,i=Math.floor(s/864e5);if(0===i){const e=s%864e5,n=Math.floor(e/36e5);if(0===n){const n=e%36e5,s=Math.floor(n/6e4);if(0===s){const e=n%6e4,s=Math.round(e/1e3);return s<10?t("now"):`${s} ${t("seconds")}`}return`${s} ${t("minutes")}`}return`${n} ${t("hours")}`}return i<0?t("now"):i<8?`${i} ${t("days")}`:function(e){const t=Et(e.getDate(),2),n=Et(e.getMonth()+1,2);return`${Et(e.getFullYear(),2)}-${n}-${t}`}(e)}catch(n){return console.error(n)," - "}}function Tt(){return h(this,null,(function*(){const e=navigator.userAgent;if(!navigator.userAgentData||!navigator.userAgentData.getHighEntropyValues)return e;const t=navigator.userAgentData;let n=null;try{n=yield t.getHighEntropyValues(["platformVersion"])}catch(i){return console.error(i),e}const s=Number(n.platformVersion.split(".")[0]);return"Windows"===t.platform&&s>=13?e.replace(/Windows NT 10.0/,"Windows NT 11.0"):"macOS"===t.platform&&s>=11?e.replace(/(Mac OS X \d+_\d+_\d+|Mac OS X)/,`Mac OS X ${n.platformVersion.replace(/\./g,"_")}`):e}))}function At(e){let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol}function Lt(e){return t=e.base,n=e.path,`${t.replace(/\/$/,"")}/${n.replace(/^\//,"")}`;var t,n}const Mt={placeholder:"Leave a comment",noComment:"No Comment",send:"Send",signIn:"Sign in",signUp:"Sign up",save:"Save",nick:"Nickname",email:"Email",link:"Website",emoticon:"Emoji",preview:"Preview",uploadImage:"Upload Image",uploadFail:"Upload Failed",commentFail:"Failed to comment",restoredMsg:"Content has been restored",onlyAdminCanReply:"Only admin can reply",uploadLoginMsg:"Please fill in your name and email to upload",counter:"{count} Comments",sortLatest:"Latest",sortOldest:"Oldest",sortBest:"Best",sortAuthor:"Author",openComment:"Open Comment",closeComment:"Close Comment",listLoadFailMsg:"Failed to load comments",listRetry:"Retry",loadMore:"Load More",admin:"Admin",reply:"Reply",voteUp:"Up",voteDown:"Down",voteFail:"Vote Failed",readMore:"Read More",actionConfirm:"Confirm",collapse:"Collapse",collapsed:"Collapsed",collapsedMsg:"This comment has been collapsed",expand:"Expand",approved:"Approved",pending:"Pending",pendingMsg:"Pending, visible only to commenter.",edit:"Edit",editCancel:"Cancel Edit",delete:"Delete",deleteConfirm:"Confirm",pin:"Pin",unpin:"Unpin",seconds:"seconds ago",minutes:"minutes ago",hours:"hours ago",days:"days ago",now:"just now",adminCheck:"Enter admin password:",captchaCheck:"Enter the CAPTCHA to continue:",confirm:"Confirm",cancel:"Cancel",msgCenter:"Messages",ctrlCenter:"Dashboard",userProfile:"Profile",noAccountPrompt:"Don't have an account?",haveAccountPrompt:"Already have an account?",forgetPassword:"Forget Password",resetPassword:"Reset Password",changePassword:"Change Password",confirmPassword:"Confirm Password",passwordMismatch:"Passwords do not match",verificationCode:"Verification Code",verifySend:"Send Code",verifyResend:"Resend",waitSeconds:"Wait {seconds}s",emailVerified:"Email has been verified",password:"Password",username:"Username",nextStep:"Next Step",skipVerify:"Skip verification",logoutConfirm:"Are you sure to logout?",accountMergeNotice:"Your email has multiple accounts with different id.",accountMergeSelectOne:"Please select one you want to merge all the data into it.",accountMergeConfirm:"All data will be merged into one account, the id is {id}.",dismiss:"Dismiss",merge:"Merge",frontend:"Frontend",backend:"Backend",loading:"Loading",loadFail:"Load Failed",editing:"Editing",editFail:"Edit Failed",deleting:"Deleting",deleteFail:"Delete Failed",reqGot:"Request got",reqAborted:"Request timed out or terminated unexpectedly",updateMsg:"Please update Artalk {name} to get the best experience!",currentVersion:"Current Version",ignore:"Ignore",open:"Open",openName:"Open {name}"},Pt="ArtalkI18n",It={en:Mt,"en-US":Mt,"zh-CN":{placeholder:"键入内容...",noComment:"「此时无声胜有声」",send:"发送",signIn:"登录",signUp:"注册",save:"保存",nick:"昵称",email:"邮箱",link:"网址",emoticon:"表情",preview:"预览",uploadImage:"上传图片",uploadFail:"上传失败",commentFail:"评论失败",restoredMsg:"内容已自动恢复",onlyAdminCanReply:"仅管理员可评论",uploadLoginMsg:"填入你的名字邮箱才能上传哦",counter:"{count} 条评论",sortLatest:"最新",sortOldest:"最早",sortBest:"最热",sortAuthor:"作者",openComment:"打开评论",closeComment:"关闭评论",listLoadFailMsg:"无法获取评论列表数据",listRetry:"点击重新获取",loadMore:"加载更多",admin:"管理员",reply:"回复",voteUp:"赞同",voteDown:"反对",voteFail:"投票失败",readMore:"阅读更多",actionConfirm:"确认操作",collapse:"折叠",collapsed:"已折叠",collapsedMsg:"该评论已被系统或管理员折叠",expand:"展开",approved:"已审",pending:"待审",pendingMsg:"审核中,仅本人可见。",edit:"编辑",editCancel:"取消编辑",delete:"删除",deleteConfirm:"确认删除",pin:"置顶",unpin:"取消置顶",seconds:"秒前",minutes:"分钟前",hours:"小时前",days:"天前",now:"刚刚",adminCheck:"键入密码来验证管理员身份:",captchaCheck:"键入验证码继续:",confirm:"确认",cancel:"取消",msgCenter:"通知中心",ctrlCenter:"控制中心",userProfile:"个人资料",noAccountPrompt:"没有账号?",haveAccountPrompt:"已有账号?",forgetPassword:"忘记密码",resetPassword:"重置密码",changePassword:"修改密码",confirmPassword:"确认密码",passwordMismatch:"两次输入的密码不一致",verificationCode:"验证码",verifySend:"发送验证码",verifyResend:"重新发送",waitSeconds:"等待 {seconds}秒",emailVerified:"邮箱已验证",password:"密码",username:"用户名",nextStep:"下一步",skipVerify:"跳过验证",logoutConfirm:"确定要退出登录吗?",accountMergeNotice:"您的电子邮件下有多个不同 ID 的账户。",accountMergeSelectOne:"请选择将所有数据合并到其中的一个。",accountMergeConfirm:"所有数据将合并到 ID 为 {id} 的账户中。",dismiss:"忽略",merge:"合并",frontend:"前端",backend:"后端",loading:"加载中",loadFail:"加载失败",editing:"修改中",editFail:"修改失败",deleting:"删除中",deleteFail:"删除失败",reqGot:"请求响应",reqAborted:"请求超时或意外终止",updateMsg:"请更新 Artalk {name} 以获得更好的体验!",currentVersion:"当前版本",ignore:"忽略",open:"打开",openName:"打开{name}"}};function Rt(e){return e=e.replace(/^([a-zA-Z]+)(-[a-zA-Z]+)?$/,((e,t,n)=>t.toLowerCase()+(n||"").toUpperCase())),It[e]?It[e]:window[Pt]&&window[Pt][e]?window[Pt][e]:It.en}let Ut="en",qt=Rt(Ut);function _t(e){e!==Ut&&(Ut=e,qt="string"==typeof e?Rt(e):e)}function Ot(e,t={}){let n=(null==qt?void 0:qt[e])||e;return n=n.replace(/\{\s*(\w+?)\s*\}/g,((e,n)=>t[n]||"")),bt(n)}class Dt{constructor(){d(this,"events",[])}on(e,t,n={}){this.events.push(l({name:e,handler:t},n))}off(e,t){t&&(this.events=this.events.filter((n=>!(n.name===e&&n.handler===t))))}trigger(e,t){this.events.slice(0).filter((t=>t.name===e&&"function"==typeof t.handler)).forEach((n=>{n.once&&this.off(e,n.handler),n.handler(t)}))}}const Bt={el:"",pageKey:"",pageTitle:"",server:"",site:"",placeholder:"",noComment:"",sendBtn:"",darkMode:!1,editorTravel:!0,flatMode:"auto",nestMax:2,nestSort:"DATE_ASC",emoticons:"https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json",vote:!0,voteDown:!1,uaBadge:!0,listSort:!0,preview:!0,countEl:".artalk-comment-count",pvEl:".artalk-pv-count",statPageKeyAttr:"data-page-key",gravatar:{mirror:"https://www.gravatar.com/avatar/",params:"sha256=1&d=mp&s=240"},pagination:{pageSize:20,readMore:!0,autoLoad:!0},heightLimit:{content:300,children:400,scrollable:!1},imgUpload:!0,reqTimeout:15e3,versionCheck:!0,useBackendConf:!0,locale:"en"};function jt(e,t=!1){const n=t?$t(Bt,e):e;if(n.el&&"string"==typeof n.el)try{const e=document.querySelector(n.el);if(!e)throw Error(`Target element "${n.el}" was not found.`);n.el=e}catch(s){throw console.error(s),new Error("Please check your Artalk `el` config.")}return""===n.pageKey&&(n.pageKey=`${window.location.pathname}`),""===n.pageTitle&&(n.pageTitle=`${document.title}`),n.server&&(n.server=n.server.replace(/\/$/,"").replace(/\/api\/?$/,"")),"auto"===n.locale&&(n.locale=navigator.language),"auto"===n.flatMode&&(n.flatMode=window.matchMedia("(max-width: 768px)").matches),"number"==typeof n.nestMax&&Number(n.nestMax)<=1&&(n.flatMode=!0),n}function Ft(e,t){return{baseURL:`${e.server}/api/v2`,siteName:e.site||"",pageKey:e.pageKey||"",pageTitle:e.pageTitle||"",timeout:e.reqTimeout,getApiToken:()=>null==t?void 0:t.get("user").getData().token,userInfo:(null==t?void 0:t.get("user").checkHasBasicUserInfo())?{name:null==t?void 0:t.get("user").getData().name,email:null==t?void 0:t.get("user").getData().email}:void 0,handlers:null==t?void 0:t.getApiHandlers()}}function Wt(e,t,n){let s=null;const i=()=>{const i=(()=>{const n=e.getConf(),s={};return t.forEach((e=>{s[e]=n[e]})),s})();var r,o;(null==s||(r=s,o=i,!(JSON.stringify(r)===JSON.stringify(o))))&&(s=i,n(i))};e.on("mounted",i),e.on("updated",i)}class zt{constructor(e){d(this,"conf"),d(this,"data"),d(this,"$root"),d(this,"events",new Dt),d(this,"mounted",!1),d(this,"apiHandlers",null),d(this,"getCommentList",this.getCommentNodes),d(this,"getCommentDataList",this.getComments),this.conf=e,this.$root=e.el,this.$root.classList.add("artalk"),this.$root.innerHTML="",e.darkMode&&this.$root.classList.add("atk-dark-mode"),this.data=new vt(this.events),this.on("mounted",(()=>{this.mounted=!0}))}inject(e,t){this[e]=t}get(e){return this[e]}getApi(){return new f(Ft(this.conf,this))}getApiHandlers(){return this.apiHandlers||(this.apiHandlers=function(e){const t=function(){const e=[];return{add:(t,n)=>{e.push({action:t,handler:n})},remove:t=>{const n=e.findIndex((e=>e.action===t));-1!==n&&e.splice(n,1)},get:()=>e}}();return t.add("need_captcha",(t=>e.checkCaptcha(t))),t.add("need_login",(()=>e.checkAdmin({}))),t}(this)),this.apiHandlers}getData(){return this.data}replyComment(e,t){this.editor.setReply(e,t)}editComment(e,t){this.editor.setEditComment(e,t)}fetch(e){this.data.fetchComments(e)}reload(){this.data.fetchComments({offset:0})}listGotoFirst(){this.events.trigger("list-goto-first")}getCommentNodes(){return this.list.getCommentNodes()}getComments(){return this.data.getComments()}editorShowLoading(){this.editor.showLoading()}editorHideLoading(){this.editor.hideLoading()}editorShowNotify(e,t){this.editor.showNotify(e,t)}editorResetState(){this.editor.resetState()}showSidebar(e){this.sidebarLayer.show(e)}hideSidebar(){this.sidebarLayer.hide()}checkAdmin(e){return this.checkerLauncher.checkAdmin(e)}checkCaptcha(e){return this.checkerLauncher.checkCaptcha(e)}on(e,t){this.events.on(e,t)}off(e,t){this.events.off(e,t)}trigger(e,t){this.events.trigger(e,t)}$t(e,t={}){return Ot(e,t)}setDarkMode(e){this.updateConf({darkMode:e})}updateConf(e){this.conf=$t(this.conf,jt(e,!1)),this.mounted&&this.events.trigger("updated",this.conf)}getConf(){return this.conf}getEl(){return this.$root}getMarked(){return kt()}watchConf(e,t){Wt(this,e,t)}}function Nt(e,t){let n=e.querySelector(":scope > .atk-loading");n||(n=wt(''),(null==t?void 0:t.transparentBg)&&(n.style.background="transparent"),e.appendChild(n)),n.style.display="";const s=n.querySelector(".atk-loading-spinner");s&&(s.style.display="none",window.setTimeout((()=>{s.isConnected&&(s.style.display="")}),500))}function Ht(e){const t=e.querySelector(":scope > .atk-loading");t&&(t.style.display="none")}function Qt(e,t){e?Nt(t):Ht(t)}function Vt(e,t=!0,n){let s;if(n){const t=n.getBoundingClientRect();s=e.getBoundingClientRect().top-t.top+n.scrollTop-n.clientHeight/2+e.clientHeight/2}else{const t=e.getBoundingClientRect();s=t.top+window.scrollY-(window.innerHeight/2-t.height/2)}const i={top:s,left:0,behavior:"instant"};n?n.scroll(i):window.scroll(i)}function Gt(e,t){!function(e,t,n="in"){e.classList.add(`atk-fade-${n}`);const s=()=>{e.classList.remove(`atk-fade-${n}`),e.removeEventListener("animationend",s)};e.addEventListener("animationend",s)}(e,0,"in")}function Kt(e,t,n='Artalk Error'){let s=e.querySelector(".atk-error-layer");if(null===t)return void(null!==s&&s.remove());s||(s=wt(`
    ${n}
    `),e.appendChild(s));const i=s.querySelector(".atk-error-text");i.innerHTML="",null!==t&&(t instanceof HTMLElement?i.appendChild(t):i.innerText=t)}function Zt(e){const t=wt('
    '),n=wt('');n.style.display="none",Nt(t,{transparentBg:!0}),n.src=e.getOpts().getCaptchaIframeURL(),n.onload=()=>{n.style.display="",Ht(t)},t.append(n);const s=wt('
    ');t.append(s),e.hideInteractInput();let i=!1;return function t(){return h(this,null,(function*(){var n;if(yield(n=1e3,new Promise((e=>{window.setTimeout((()=>{e(null)}),n)}))),i)return;let s=!1;try{s=(yield e.getApi().captcha.getCaptchaStatus()).data.is_pass}catch(r){s=!1}s?e.triggerSuccess():t()}))}(),s.onclick=()=>{i=!0,e.cancel()},t}const Yt={request:(e,t)=>e.getApi().captcha.verifyCaptcha({value:t}),body:e=>e.get("iframe")?Zt(e):function(e){const t=wt(`${Ot("captchaCheck")}`);return t.querySelector(".atk-captcha-img").onclick=()=>{const n=t.querySelector(".atk-captcha-img");e.getApi().captcha.getCaptcha().then((e=>{n.setAttribute("src",e.data.img_data)})).catch((e=>{console.error("Failed to get captcha image ",e)}))},t}(e),onSuccess(e,t,n,s){e.set("val",n)},onError(e,t,n,s){s.querySelector(".atk-captcha-img").click(),s.querySelector('input[type="text"]').value=""}},Xt={inputType:"password",request(e,t){return h(this,null,(function*(){return(yield e.getApi().user.login({name:e.getUser().getData().name,email:e.getUser().getData().email,password:t})).data}))},body:e=>wt(`${Ot("adminCheck")}`),onSuccess(e,t,n,s){e.getUser().update({is_admin:!0,token:t.token}),e.getOpts().onReload()},onError(e,t,n,s){}};class Jt{constructor(e){d(this,"$el"),d(this,"$content"),d(this,"$actions"),this.$el=wt('
    \n
    \n
    \n
    \n
    \n
    '),this.$actions=this.$el.querySelector(".atk-layer-dialog-actions"),this.$content=this.$el.querySelector(".atk-layer-dialog-content"),this.$content.appendChild(e)}setYes(e){const t=wt(``);return t.onclick=this.onBtnClick(e),this.$actions.appendChild(t),this}setNo(e){const t=wt(``);return t.onclick=this.onBtnClick(e),this.$actions.appendChild(t),this}onBtnClick(e){return t=>{const n=e(t.currentTarget,this);void 0!==n&&!0!==n||this.$el.remove()}}}function en(e){return t=>new Promise(((n,s)=>{const i=t.onCancel;t.onCancel=()=>{i&&i(),s(new Error("user canceled the checker"))};const r=t.onSuccess;t.onSuccess=()=>{r&&r(),n()},e(t)}))}class tn{constructor(e){d(this,"checkCaptcha",en((e=>{this.fire(Yt,e,(t=>{t.set("img_data",e.img_data),t.set("iframe",e.iframe)}))}))),d(this,"checkAdmin",en((e=>{this.fire(Xt,e)}))),this.opts=e}fire(e,t,n){const s=this.opts.getCtx().get("layerManager").create(`checker-${(new Date).getTime()}`);s.show();const i=()=>{s.destroy()},r={};let o=!1;const a={set:(e,t)=>{r[e]=t},get:e=>r[e],getOpts:()=>this.opts,getUser:()=>this.opts.getCtx().get("user"),getApi:()=>this.opts.getApi(),hideInteractInput:()=>{o=!0},triggerSuccess:()=>{i(),e.onSuccess&&e.onSuccess(a,"","",l),t.onSuccess&&t.onSuccess()},cancel:()=>{i(),t.onCancel&&t.onCancel()}};n&&n(a);const l=wt();l.appendChild(e.body(a));const c=wt(``);let d;l.appendChild(c),setTimeout((()=>c.focus()),80),c.onkeyup=e=>{"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),s.getEl().querySelector('button[data-action="confirm"]').click())};const h=new Jt(l);h.setYes((n=>{const s=c.value.trim();d||(d=n.innerText);const r=()=>{n.innerText=d||"",n.classList.remove("error")};return n.innerText=`${Ot("loading")}...`,e.request(a,s).then((n=>{i(),e.onSuccess&&e.onSuccess(a,n,s,l),t.onSuccess&&t.onSuccess()})).catch((t=>{var i;i=String(t.message||String(t)),n.innerText=i,n.classList.add("error"),e.onError&&e.onError(a,t,s,l);const o=setTimeout((()=>r()),3e3);c.onfocus=()=>{r(),clearTimeout(o)}})),!1})),h.setNo((()=>(i(),t.onCancel&&t.onCancel(),!1))),o&&(c.style.display="none",h.$el.querySelector(".atk-layer-dialog-actions").style.display="none"),s.getEl().append(h.$el),t.onMount&&t.onMount(h.$el)}}class nn{constructor(e){d(this,"$el"),this.ctx=e}get conf(){return this.ctx.conf}getEl(){return this.$el}}const sn={$header:".atk-header",$name:'.atk-header [name="name"]',$email:'.atk-header [name="email"]',$link:'.atk-header [name="link"]',$textareaWrap:".atk-textarea-wrap",$textarea:".atk-textarea",$bottom:".atk-bottom",$submitBtn:".atk-send-btn",$notifyWrap:".atk-notify-wrap",$bottomLeft:".atk-bottom-left",$stateWrap:".atk-state-wrap",$plugBtnWrap:".atk-plug-btn-wrap",$plugPanelWrap:".atk-plug-panel-wrap"};class rn{constructor(e){d(this,"$btn"),d(this,"$panel"),d(this,"editorStateEffectWhen"),this.kit=e}useBtn(e="
    "){return this.$btn=wt(`${e}`),this.$btn}usePanel(e="
    "){return this.$panel=wt(e),this.$panel}useContentTransformer(e){this.contentTransformer=e}usePanelShow(e){this.kit.useEvents().on("panel-show",(t=>{t===this&&e()}))}usePanelHide(e){this.kit.useEvents().on("panel-hide",(t=>{t===this&&e()}))}useEditorStateEffect(e,t){this.editorStateEffectWhen=e,this.editorStateEffect=t}}class on extends rn{constructor(){super(...arguments),d(this,"isMoved",!1)}move(e){if(this.isMoved)return;this.isMoved=!0;const t=this.kit.useUI().$el;t.after(wt('
    '));const n=wt("
    ");e.after(n),n.replaceWith(t),t.classList.add("atk-fade-in"),t.classList.add("editor-traveling")}back(){var e;this.isMoved&&(this.isMoved=!1,null==(e=this.kit.useGlobalCtx().$root.querySelector(".atk-editor-travel-placeholder"))||e.replaceWith(this.kit.useUI().$el),this.kit.useUI().$el.classList.remove("editor-traveling"))}}class an{constructor(e){d(this,"stateCurt","normal"),d(this,"stateUnmountFn",null),this.editor=e}get(){return this.stateCurt}switch(e,t){var n,s,i,r,o;if(this.stateUnmountFn&&(this.stateUnmountFn(),this.stateUnmountFn=null,null==(s=null==(n=this.editor.getPlugs())?void 0:n.get(on))||s.back()),"normal"!==e&&t){let n=t.$comment;this.editor.conf.flatMode||(n=n.querySelector(".atk-footer")),null==(r=null==(i=this.editor.getPlugs())?void 0:i.get(on))||r.move(n);const s=this.editor.ctx.conf.scrollRelativeTo&&this.editor.ctx.conf.scrollRelativeTo();Vt(this.editor.getUI().$el,!0,s);const a=null==(o=this.editor.getPlugs())?void 0:o.getPlugs().find((t=>t.editorStateEffectWhen===e));a&&a.editorStateEffect&&(this.stateUnmountFn=a.editorStateEffect(t.comment))}this.stateCurt=e}}class ln extends nn{constructor(e){super(e),d(this,"ui"),d(this,"state"),this.ui=function(){const e=wt('
    \n
    \n \n \n \n
    \n
    \n \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n'),t={$el:e};return Object.entries(sn).forEach((([n,s])=>{t[n]=e.querySelector(s)})),t}(),this.$el=this.ui.$el,this.state=new an(this)}getUI(){return this.ui}getPlugs(){return this.ctx.get("editorPlugs")}getState(){return this.state.get()}getHeaderInputEls(){return{name:this.ui.$name,email:this.ui.$email,link:this.ui.$link}}getContentFinal(){let e=this.getContentRaw();const t=this.getPlugs();return t&&(e=t.getTransformedContent(e)),e}getContentRaw(){return this.ui.$textarea.value||""}getContentMarked(){return yt(this.getContentFinal())}setContent(e){var t;this.ui.$textarea.value=e,null==(t=this.getPlugs())||t.getEvents().trigger("content-updated",e)}insertContent(e){if(document.selection)this.ui.$textarea.focus(),document.selection.createRange().text=e,this.ui.$textarea.focus();else if(this.ui.$textarea.selectionStart||0===this.ui.$textarea.selectionStart){const t=this.ui.$textarea.selectionStart,n=this.ui.$textarea.selectionEnd,s=this.ui.$textarea.scrollTop;this.setContent(this.ui.$textarea.value.substring(0,t)+e+this.ui.$textarea.value.substring(n,this.ui.$textarea.value.length)),this.ui.$textarea.focus(),this.ui.$textarea.selectionStart=t+e.length,this.ui.$textarea.selectionEnd=t+e.length,this.ui.$textarea.scrollTop=s}else this.ui.$textarea.focus(),this.ui.$textarea.value+=e}focus(){this.ui.$textarea.focus()}reset(){this.setContent(""),this.resetState()}resetState(){this.state.switch("normal")}setReply(e,t){this.state.switch("reply",{comment:e,$comment:t})}setEditComment(e,t){this.state.switch("edit",{comment:e,$comment:t})}showNotify(e,t){!function(e,t,n){const s=wt(`
    `);s.querySelector(".atk-notify-content").innerHTML=bt(t).replace("\n","
    "),e.appendChild(s);const i=()=>{s.classList.add("atk-fade-out"),setTimeout((()=>{s.remove()}),200)};let r;r=window.setTimeout((()=>{i()}),3e3),s.addEventListener("click",(()=>{i(),window.clearTimeout(r)}))}(this.ui.$notifyWrap,e,t)}showLoading(){Nt(this.ui.$el)}hideLoading(){Ht(this.ui.$el)}submit(){const e=()=>this.ctx.trigger("editor-submit");this.ctx.conf.beforeSubmit?this.ctx.conf.beforeSubmit(this,e):e()}}class cn extends nn{constructor(e){super(e),d(this,"layer"),d(this,"$header"),d(this,"$closeBtn"),d(this,"$iframeWrap"),d(this,"$iframe"),d(this,"refreshWhenShow",!0),d(this,"animTimer"),this.$el=wt('
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n'),this.$header=this.$el.querySelector(".atk-sidebar-header"),this.$closeBtn=this.$header.querySelector(".atk-sidebar-close"),this.$iframeWrap=this.$el.querySelector(".atk-sidebar-iframe-wrap"),this.$closeBtn.onclick=()=>{this.hide()},this.ctx.on("user-changed",(()=>{this.refreshWhenShow=!0}))}show(){return h(this,arguments,(function*(e={}){if(this.$el.style.transform="",this.initLayer(),this.layer.show(),this.refreshWhenShow)this.refreshWhenShow=!1,this.$iframeWrap.innerHTML="",this.$iframe=this.createIframe(e.view),this.$iframeWrap.append(this.$iframe);else{const e=this.$iframe,t=e.src;this.getDarkMode()!==t.includes("&darkMode=1")&&this.iframeLoad(e,t.replace(/&darkMode=\d/,`&darkMode=${Number(this.getDarkMode())}`))}this.authCheck({onSuccess:()=>this.show(e)}),this.animTimer=setTimeout((()=>{this.animTimer=void 0,this.$el.style.transform="translate(0, 0)",setTimeout((()=>{this.ctx.getData().updateNotifies([])}),0),this.ctx.trigger("sidebar-show")}),100)}))}hide(){var e;null==(e=this.layer)||e.hide()}authCheck(e){return h(this,null,(function*(){const t=(yield this.ctx.getApi().user.getUserStatus(l({},this.ctx.getApi().getUserFields()))).data;t.is_admin&&!t.is_login&&(this.refreshWhenShow=!0,this.ctx.checkAdmin({onSuccess:()=>{setTimeout((()=>{e.onSuccess()}),500)},onCancel:()=>{this.hide()}}),this.hide())}))}initLayer(){this.layer||(this.layer=this.ctx.get("layerManager").create("sidebar",this.$el),this.layer.setOnAfterHide((()=>{this.ctx.editorResetState(),this.animTimer&&clearTimeout(this.animTimer),this.$el.style.transform="",this.ctx.trigger("sidebar-hide")})))}createIframe(e){const t=wt(''),n=Lt({base:this.ctx.conf.server,path:"/sidebar/"}),s={pageKey:this.conf.pageKey,site:this.conf.site||"",user:JSON.stringify(this.ctx.get("user").getData()),time:+new Date};e&&(s.view=e),s.darkMode=this.getDarkMode()?"1":"0";const i=new URLSearchParams(s);return this.iframeLoad(t,`${n}?${i.toString()}`),t}getDarkMode(){return"auto"===this.conf.darkMode?window.matchMedia("(prefers-color-scheme: dark)").matches:this.conf.darkMode}iframeLoad(e,t){e.src=t,Nt(this.$iframeWrap),e.onload=()=>{Ht(this.$iframeWrap)}}}const dn=e=>({import:t=>{(function(e,t="DATE_DESC",n=2){const s=[];e.filter((e=>0===e.rid)).forEach((t=>{const i={id:t.id,comment:t,children:[],level:1};i.parent=i,s.push(i),function t(s){const i=e.filter((e=>e.rid===s.id));0!==i.length&&(s.level>=n&&(s=s.parent),i.forEach((e=>{const n={id:e.id,comment:e,children:[],parent:s,level:s.level+1};s.children.push(n),t(n)})))}(i)}));const i=(n,s)=>{let i=n.id-s.id;return"DATE_ASC"===t?i=+new Date(n.comment.date)-+new Date(s.comment.date):"DATE_DESC"===t?i=+new Date(s.comment.date)-+new Date(n.comment.date):"SRC_INDEX"===t?i=e.indexOf(n.comment)-e.indexOf(s.comment):"VOTE_UP_DESC"===t&&(i=s.comment.vote_up-n.comment.vote_up),i};return function e(t){t.forEach((t=>{t.children=t.children.sort(i),e(t.children)}))}(s),s})(t,e.nestSortBy,e.nestMax).forEach((n=>{var s;const i=e.createCommentNode(n.comment);null==(s=e.$commentsWrap)||s.appendChild(i.getEl()),i.getRender().playFadeAnim();const r=(n,s)=>{s.children.forEach((s=>{const i=t.find((e=>e.id===s.comment.rid)),o=s.comment,a=e.createCommentNode(o,i);n.putChild(a),r(a,s)}))};r(i,n),i.getRender().checkHeightLimit()}))},insert:(t,n)=>{var s;const i=e.createCommentNode(t,n);if(0===t.rid)null==(s=e.$commentsWrap)||s.prepend(i.getEl());else{const n=e.findCommentNode(t.rid);n&&(n.putChild(i,"DATE_ASC"===e.nestSortBy?"append":"prepend"),i.getParents().forEach((e=>{e.getRender().heightLimitRemoveForChildren()})))}i.getRender().checkHeightLimit(),i.scrollIntoView(),i.getRender().playFadeAnim()}});function hn(e,t,n,s){n.is_collapsed&&(n.is_allow_reply=!1);const i=e.createCommentNode(n,s);if(n.visible){const n=i.getEl(),s=e.$commentsWrap;"append"===t&&(null==s||s.append(n)),"prepend"===t&&(null==s||s.prepend(n)),i.getRender().playFadeAnim()}return i.getRender().checkHeightLimit(),i}class un{constructor(e){this.options=e}getStrategy(){return this.options.flatMode?(e=this.options,{import:t=>{t.forEach((n=>{const s=0===n.rid?void 0:t.find((e=>e.id===n.rid));hn(e,"append",n,s)}))},insert:(t,n)=>{hn(e,"prepend",t,n).scrollIntoView()}}):dn(this.options);var e}import(e){this.getStrategy().import(e)}insert(e,t){this.getStrategy().insert(e,t)}}function pn(e,t){t.forEach((({el:t,max:n,imgCheck:s})=>{if(!t)return;s&&(t.style.maxHeight=`${n+1}px`);let i=!1;const r=()=>{if(i)return;if(function(e){return parseFloat(getComputedStyle(e,null).height.replace("px",""))||0}(t)<=n)return;e.scrollable?function(e){if(!e.el)return;if(e.el.classList.contains(fn))return;e.el.classList.add(fn),e.el.style.height=`${e.max}px`}({el:t,max:n}):function(e){if(!e.el)return;if(!e.max)return;if(e.el.classList.contains(gn))return;e.el.classList.add(gn),e.el.style.height=`${e.max}px`,e.el.style.overflow="hidden";const t=wt(`
    ${Ot("readMore")}`);t.onclick=t=>{t.stopPropagation(),mn(e.el),e.afterExpandBtnClick&&e.afterExpandBtnClick(t)},e.el.append(t)}({el:t,max:n,afterExpandBtnClick:()=>{var t;i=!0,null==(t=e.afterExpandBtnClick)||t.call(e)}})};if(r(),s){const e=t.querySelectorAll(".atk-content img");0===e.length&&(t.style.maxHeight=""),e.forEach((e=>{e.onload=()=>r()}))}}))}const gn="atk-height-limit";function mn(e){e&&e.classList.contains(gn)&&(e.classList.remove(gn),Array.from(e.children).forEach((e=>{e.classList.contains("atk-height-limit-btn")&&e.remove()})),e.style.height="",e.style.maxHeight="",e.style.overflow="")}const fn="atk-height-limit-scroll";function kn(e){if(e.$headerNick=e.$el.querySelector(".atk-nick"),e.data.link){const t=wt('');t.innerText=e.data.nick,t.href=At(e.data.link)?e.data.link:`https://${e.data.link}`,e.$headerNick.append(t)}else e.$headerNick.innerText=e.data.nick}function yn(e){e.$headerBadgeWrap=e.$el.querySelector(".atk-badge-wrap"),e.$headerBadgeWrap.innerHTML="";const t=e.data.badge_name,n=e.data.badge_color;if(t){const s=wt('');s.innerText=t.replace("管理员",Ot("admin")),s.style.backgroundColor=n||"",e.$headerBadgeWrap.append(s)}else if(e.data.is_verified){const t=wt(``);e.$headerBadgeWrap.append(t)}if(e.data.is_pinned){const t=wt(`${Ot("pin")}`);e.$headerBadgeWrap.append(t)}}function $n(e){const t=e.$el.querySelector(".atk-date");t.innerText=e.comment.getDateFormatted(),t.setAttribute("data-atk-comment-date",String(+new Date(e.data.date)))}function vn(e){if(!e.opts.uaBadge&&!e.data.ip_region)return;let t=e.$header.querySelector("atk-ua-wrap");if(t||(t=wt(''),e.$header.append(t)),t.innerHTML="",e.data.ip_region){const n=wt('');n.innerText=e.data.ip_region,t.append(n)}if(e.opts.uaBadge){const{browser:n,os:s}=e.comment.getUserUA();if(String(n).trim()){const e=wt('');e.innerText=n,t.append(e)}if(String(s).trim()){const e=wt('');e.innerText=s,t.append(e)}}}class wn{constructor(e){d(this,"opts"),d(this,"$el"),d(this,"isLoading",!1),d(this,"msgRecTimer"),d(this,"msgRecTimerFunc"),d(this,"isConfirming",!1),d(this,"confirmRecTimer"),this.$el=wt(''),this.opts="object"!=typeof e?{text:e}:e,this.$el.innerText=this.getText(),this.opts.adminOnly&&this.$el.setAttribute("atk-only-admin-show","")}get isMessaging(){return!!this.msgRecTimer}appendTo(e){return e.append(this.$el),this}getText(){return"string"==typeof this.opts.text?this.opts.text:this.opts.text()}setClick(e){this.$el.onclick=t=>{if(t.stopPropagation(),!this.isLoading){if(this.opts.confirm&&!this.isMessaging){const e=()=>{this.isConfirming=!1,this.$el.classList.remove("atk-btn-confirm"),this.$el.innerText=this.getText()};if(!this.isConfirming)return this.isConfirming=!0,this.$el.classList.add("atk-btn-confirm"),this.$el.innerText=this.opts.confirmText||Ot("actionConfirm"),void(this.confirmRecTimer=window.setTimeout((()=>e()),5e3));this.confirmRecTimer&&window.clearTimeout(this.confirmRecTimer),e()}if(this.msgRecTimer)return this.fireMsgRecTimer(),void this.clearMsgRecTimer();e()}}}updateText(e){e&&(this.opts.text=e),this.setLoading(!1),this.$el.innerText=this.getText()}setLoading(e,t){this.isLoading!==e&&(this.isLoading=e,e?(this.$el.classList.add("atk-btn-loading"),this.$el.innerText=t||`${Ot("loading")}...`):(this.$el.classList.remove("atk-btn-loading"),this.$el.innerText=this.getText()))}setError(e){this.setMsg(e,"atk-btn-error")}setWarn(e){this.setMsg(e,"atk-btn-warn")}setSuccess(e){this.setMsg(e,"atk-btn-success")}setMsg(e,t,n,s){this.setLoading(!1),t&&this.$el.classList.add(t),this.$el.innerText=e,this.setMsgRecTimer((()=>{this.$el.innerText=this.getText(),t&&this.$el.classList.remove(t),s&&s()}),n||2500)}setMsgRecTimer(e,t){this.fireMsgRecTimer(),this.clearMsgRecTimer(),this.msgRecTimerFunc=e,this.msgRecTimer=window.setTimeout((()=>{e(),this.clearMsgRecTimer()}),t)}fireMsgRecTimer(){this.msgRecTimerFunc&&this.msgRecTimerFunc()}clearMsgRecTimer(){this.msgRecTimer&&window.clearTimeout(this.msgRecTimer),this.msgRecTimer=void 0,this.msgRecTimerFunc=void 0}}function bn(e){e.opts.vote&&(e.voteBtnUp=new wn((()=>`${Ot("voteUp")} (${e.data.vote_up||0})`)).appendTo(e.$actions),e.voteBtnUp.setClick((()=>{e.comment.getActions().vote("up")})),e.opts.voteDown&&(e.voteBtnDown=new wn((()=>`${Ot("voteDown")} (${e.data.vote_down||0})`)).appendTo(e.$actions),e.voteBtnDown.setClick((()=>{e.comment.getActions().vote("down")}))))}function xn(e){if(!e.data.is_allow_reply)return;const t=wt(`${Ot("reply")}`);e.$actions.append(t),t.addEventListener("click",(t=>{t.stopPropagation(),e.opts.replyComment(e.data,e.$el)}))}function Cn(e){const t=new wn({text:()=>e.data.is_collapsed?Ot("expand"):Ot("collapse"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminEdit("collapsed",t)}))}function En(e){const t=new wn({text:()=>e.data.is_pending?Ot("pending"):Ot("approved"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminEdit("pending",t)}))}function Sn(e){const t=new wn({text:()=>e.data.is_pinned?Ot("unpin"):Ot("pin"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminEdit("pinned",t)}))}function Tn(e){const t=new wn({text:Ot("edit"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.opts.editComment(e.data,e.$el)}))}function An(e){const t=new wn({text:Ot("delete"),confirm:!0,confirmText:Ot("deleteConfirm"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminDelete(t)}))}const Ln={Avatar:function(e){const t=e.$el.querySelector(".atk-avatar"),n=wt(""),s=e.opts.avatarURLBuilder;if(n.src=s?s(e.data):e.comment.getGravatarURL(),e.data.link){const s=wt('');s.href=At(e.data.link)?e.data.link:`https://${e.data.link}`,s.append(n),t.append(s)}else t.append(n)},Header:function(e){Object.entries({renderNick:kn,renderVerifyBadge:yn,renderDate:$n,renderUABadge:vn}).forEach((([t,n])=>{n(e)}))},Content:function(e){if(!e.data.is_collapsed)return e.$content.innerHTML=e.comment.getContentMarked(),void e.$content.classList.remove("atk-hide","atk-collapsed");e.$content.classList.add("atk-hide","atk-type-collapsed");const t=wt(`\n
    \n ${Ot("collapsedMsg")}\n ${Ot("expand")}\n
    `);e.$body.insertAdjacentElement("beforeend",t);const n=t.querySelector(".atk-show-btn");n.addEventListener("click",(t=>{t.stopPropagation(),e.$content.classList.contains("atk-hide")?(e.$content.innerHTML=e.comment.getContentMarked(),e.$content.classList.remove("atk-hide"),Gt(e.$content),n.innerText=Ot("collapse")):(e.$content.innerHTML="",e.$content.classList.add("atk-hide"),n.innerText=Ot("expand"))}))},ReplyAt:function(e){e.opts.flatMode||0===e.data.rid||e.opts.replyTo&&(e.$replyAt=wt(''),e.$replyAt.querySelector(".atk-nick").innerText=`${e.opts.replyTo.nick}`,e.$replyAt.onclick=()=>{e.comment.getActions().goToReplyComment()},e.$headerBadgeWrap.insertAdjacentElement("afterend",e.$replyAt))},ReplyTo:function(e){if(!e.opts.flatMode)return;if(!e.opts.replyTo)return;e.$replyTo=wt(`\n
    \n
    ${Ot("reply")} :
    \n
    \n
    `);const t=e.$replyTo.querySelector(".atk-nick");t.innerText=`@${e.opts.replyTo.nick}`,t.onclick=()=>{e.comment.getActions().goToReplyComment()};let n=yt(e.opts.replyTo.content);e.opts.replyTo.is_collapsed&&(n=`[${Ot("collapsed")}]`),e.$replyTo.querySelector(".atk-content").innerHTML=n,e.$body.prepend(e.$replyTo)},Pending:function(e){if(!e.data.is_pending)return;const t=wt(`
    ${Ot("pendingMsg")}
    `);e.$body.prepend(t)},Actions:function(e){Object.entries({renderVote:bn,renderReply:xn,renderCollapse:Cn,renderModerator:En,renderPin:Sn,renderEdit:Tn,renderDel:An}).forEach((([t,n])=>{n(e)}))}};class Mn{constructor(e){d(this,"comment"),d(this,"$el"),d(this,"$main"),d(this,"$header"),d(this,"$headerNick"),d(this,"$headerBadgeWrap"),d(this,"$body"),d(this,"$content"),d(this,"$childrenWrap"),d(this,"$actions"),d(this,"voteBtnUp"),d(this,"voteBtnDown"),d(this,"$replyTo"),d(this,"$replyAt"),this.comment=e}get data(){return this.comment.getData()}get opts(){return this.comment.getOpts()}render(){var e;return this.$el=wt('
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n'),this.$main=this.$el.querySelector(".atk-main"),this.$header=this.$el.querySelector(".atk-header"),this.$body=this.$el.querySelector(".atk-body"),this.$content=this.$body.querySelector(".atk-content"),this.$actions=this.$el.querySelector(".atk-actions"),this.$el.setAttribute("id",`atk-comment-${this.data.id}`),e=this,Object.entries(Ln).forEach((([t,n])=>{n(e)})),this.$childrenWrap&&this.$main.append(this.$childrenWrap),this.$el}checkHeightLimit(){const e=this.opts.heightLimit;if(!e||!e.content||!e.children)return;const t=e.content,n=e.children;pn({afterExpandBtnClick:()=>{const e=this.comment.getChildren();1===e.length&&mn(e[0].getRender().$content)},scrollable:e.scrollable},[{el:this.$content,max:t,imgCheck:!0},{el:this.$replyTo,max:t,imgCheck:!0},{el:this.$childrenWrap,max:n,imgCheck:!1}])}heightLimitRemoveForChildren(){this.$childrenWrap&&mn(this.$childrenWrap)}playFadeAnim(){Gt(this.comment.getRender().$el)}playFadeAnimForBody(){Gt(this.comment.getRender().$body)}playFlashAnim(){this.$el.classList.remove("atk-flash-once"),window.setTimeout((()=>{this.$el.classList.add("atk-flash-once")}),150)}getChildrenWrap(){return this.$childrenWrap||(this.$childrenWrap=wt('
    '),this.$main.append(this.$childrenWrap)),this.$childrenWrap}setUnread(e){e?this.$el.classList.add("atk-unread"):this.$el.classList.remove("atk-unread")}setOpenable(e){e?this.$el.classList.add("atk-openable"):this.$el.classList.remove("atk-openable")}setOpenURL(e){this.setOpenable(!0),this.$el.onclick=t=>{t.stopPropagation(),window.open(e)}}setOpenAction(e){this.setOpenable(!0),this.$el.onclick=t=>{t.stopPropagation(),e()}}}class Pn{constructor(e){d(this,"comment"),this.comment=e}get data(){return this.comment.getData()}get opts(){return this.comment.getOpts()}getApi(){return this.comment.getOpts().getApi()}vote(e){const t="up"===e?this.comment.getRender().voteBtnUp:this.comment.getRender().voteBtnDown;this.getApi().votes.vote(`comment_${e}`,this.data.id,l({},this.getApi().getUserFields())).then((e=>{var t,n;this.data.vote_up=e.data.up,this.data.vote_down=e.data.down,null==(t=this.comment.getRender().voteBtnUp)||t.updateText(),null==(n=this.comment.getRender().voteBtnDown)||n.updateText()})).catch((e=>{null==t||t.setError(Ot("voteFail")),console.error(e)}))}adminEdit(e,t){if(t.isLoading)return;t.setLoading(!0,`${Ot("editing")}...`);const n=l({},this.data);"collapsed"===e?n.is_collapsed=!n.is_collapsed:"pending"===e?n.is_pending=!n.is_pending:"pinned"===e&&(n.is_pinned=!n.is_pinned),this.getApi().comments.updateComment(this.data.id,l({},n)).then((e=>{t.setLoading(!1),this.comment.setData(e.data)})).catch((e=>{console.error(e),t.setError(Ot("editFail"))}))}adminDelete(e){e.isLoading||(e.setLoading(!0,`${Ot("deleting")}...`),this.getApi().comments.deleteComment(this.data.id).then((()=>{e.setLoading(!1),this.opts.onDelete&&this.opts.onDelete(this.comment)})).catch((t=>{console.error(t),e.setError(Ot("deleteFail"))})))}goToReplyComment(){const e=window.location.hash,t=`#atk-comment-${this.data.rid}`;window.location.hash=t,t===e&&window.dispatchEvent(new Event("hashchange"))}}class In{constructor(e,t){d(this,"$el"),d(this,"renderInstance"),d(this,"actionInstance"),d(this,"data"),d(this,"opts"),d(this,"parent"),d(this,"children",[]),d(this,"nestCurt"),this.opts=t,this.data=l({},e),this.data.date=this.data.date.replace(/-/g,"/"),this.parent=null,this.nestCurt=1,this.actionInstance=new Pn(this),this.renderInstance=new Mn(this)}render(){const e=this.renderInstance.render();this.$el&&this.$el.replaceWith(e),this.$el=e,this.opts.onAfterRender&&this.opts.onAfterRender()}getActions(){return this.actionInstance}getRender(){return this.renderInstance}getData(){return this.data}setData(e){this.data=e,this.render(),this.getRender().playFadeAnimForBody()}getParent(){return this.parent}getChildren(){return this.children}getNestCurt(){return this.nestCurt}getIsRoot(){return 0===this.data.rid}getID(){return this.data.id}putChild(e,t="append"){e.parent=this,e.nestCurt=this.nestCurt+1,this.children.push(e);const n=this.getChildrenWrapEl(),s=e.getEl();"append"===t?n.append(s):"prepend"===t&&n.prepend(s),e.getRender().playFadeAnim(),e.getRender().checkHeightLimit()}getChildrenWrapEl(){return this.nestCurt>=this.opts.nestMax?this.parent.getChildrenWrapEl():this.getRender().getChildrenWrap()}getParents(){const e=[];let t=this.parent;for(;t;)e.push(t),t=t.getParent();return e}getEl(){if(!this.$el)throw new Error("comment element not initialized before `getEl()`");return this.$el}focus(){if(!this.$el)throw new Error("comment element not initialized before `focus()`");this.getParents().forEach((e=>{e.getRender().heightLimitRemoveForChildren()})),this.scrollIntoView(),this.getRender().playFlashAnim()}scrollIntoView(){this.$el&&Vt(this.$el,!1,this.opts.scrollRelativeTo&&this.opts.scrollRelativeTo())}remove(){var e;null==(e=this.$el)||e.remove()}getGravatarURL(){return`${(e={mirror:this.opts.gravatar.mirror,params:this.opts.gravatar.params,emailHash:this.data.email_encrypted}).mirror.replace(/\/$/,"")}/${e.emailHash}?${e.params.replace(/^\?/,"")}`;var e}getContentMarked(){return yt(this.data.content)}getDateFormatted(){var e,t;const n=new Date(this.data.date);return(null==(t=(e=this.opts).dateFormatter)?void 0:t.call(e,n))||St(n,Ot)}getUserUA(){const e=function(e){const t=window||{},n=navigator||{},s=String(e||n.userAgent),i={os:"",osVersion:"",engine:"",browser:"",device:"",language:"",version:""},r={Trident:s.includes("Trident")||s.includes("NET CLR"),Presto:s.includes("Presto"),WebKit:s.includes("AppleWebKit"),Gecko:s.includes("Gecko/")},o={Safari:s.includes("Safari"),Chrome:s.includes("Chrome")||s.includes("CriOS"),IE:s.includes("MSIE")||s.includes("Trident"),Edge:s.includes("Edge")||s.includes("Edg"),Firefox:s.includes("Firefox")||s.includes("FxiOS"),"Firefox Focus":s.includes("Focus"),Chromium:s.includes("Chromium"),Opera:s.includes("Opera")||s.includes("OPR"),Vivaldi:s.includes("Vivaldi"),Yandex:s.includes("YaBrowser"),Kindle:s.includes("Kindle")||s.includes("Silk/"),360:s.includes("360EE")||s.includes("360SE"),UC:s.includes("UC")||s.includes(" UBrowser"),QQBrowser:s.includes("QQBrowser"),QQ:s.includes("QQ/"),Baidu:s.includes("Baidu")||s.includes("BIDUBrowser"),Maxthon:s.includes("Maxthon"),Sogou:s.includes("MetaSr")||s.includes("Sogou"),LBBROWSER:s.includes("LBBROWSER"),"2345Explorer":s.includes("2345Explorer"),TheWorld:s.includes("TheWorld"),MIUI:s.includes("MiuiBrowser"),Quark:s.includes("Quark"),Qiyu:s.includes("Qiyu"),Wechat:s.includes("MicroMessenger"),Taobao:s.includes("AliApp(TB"),Alipay:s.includes("AliApp(AP"),Weibo:s.includes("Weibo"),Douban:s.includes("com.douban.frodo"),Suning:s.includes("SNEBUY-APP"),iQiYi:s.includes("IqiyiApp")},a={Windows:s.includes("Windows"),Linux:s.includes("Linux")||s.includes("X11"),macOS:s.includes("Macintosh"),Android:s.includes("Android")||s.includes("Adr"),Ubuntu:s.includes("Ubuntu"),FreeBSD:s.includes("FreeBSD"),Debian:s.includes("Debian"),"Windows Phone":s.includes("IEMobile")||s.includes("Windows Phone"),BlackBerry:s.includes("BlackBerry")||s.includes("RIM"),MeeGo:s.includes("MeeGo"),Symbian:s.includes("Symbian"),iOS:s.includes("like Mac OS X"),"Chrome OS":s.includes("CrOS"),WebOS:s.includes("hpwOS")},l={Mobile:s.includes("Mobi")||s.includes("iPh")||s.includes("480"),Tablet:s.includes("Tablet")||s.includes("Pad")||s.includes("Nexus 7")};l.Mobile?l.Mobile=!s.includes("iPad"):o.Chrome&&s.includes("Edg")?(o.Chrome=!1,o.Edge=!0):t.showModalDialog&&t.chrome&&(o.Chrome=!1,o[360]=!0),i.device="PC",i.language=(()=>{const e=(n.browserLanguage||n.language).split("-");return e[1]&&(e[1]=e[1].toUpperCase()),e.join("_")})();const c={engine:r,browser:o,os:a,device:l};Object.entries(c).forEach((([e,t])=>{Object.entries(t).forEach((([t,n])=>{!0===n&&(i[e]=t)}))}));const d={Windows:()=>{const e=s.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000","10.0":"10","11.0":"11"}[e]||e},Android:()=>s.replace(/^.*Android ([\d.]+);.*$/,"$1"),iOS:()=>s.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,"."),Debian:()=>s.replace(/^.*Debian\/([\d.]+).*$/,"$1"),"Windows Phone":()=>s.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2"),macOS:()=>s.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,"."),WebOS:()=>s.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")};i.osVersion="",d[i.os]&&(i.osVersion=d[i.os](),i.osVersion===s&&(i.osVersion=""));const h={Safari:()=>s.replace(/^.*Version\/([\d.]+).*$/,"$1"),Chrome:()=>s.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1"),IE:()=>s.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1"),Edge:()=>s.replace(/^.*(Edge|Edg|Edg[A-Z]{1})\/([\d.]+).*$/,"$2"),Firefox:()=>s.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1"),"Firefox Focus":()=>s.replace(/^.*Focus\/([\d.]+).*$/,"$1"),Chromium:()=>s.replace(/^.*Chromium\/([\d.]+).*$/,"$1"),Opera:()=>s.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1"),Vivaldi:()=>s.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1"),Yandex:()=>s.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1"),Kindle:()=>s.replace(/^.*Version\/([\d.]+).*$/,"$1"),Maxthon:()=>s.replace(/^.*Maxthon\/([\d.]+).*$/,"$1"),QQBrowser:()=>s.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1"),QQ:()=>s.replace(/^.*QQ\/([\d.]+).*$/,"$1"),Baidu:()=>s.replace(/^.*BIDUBrowser[\s/]([\d.]+).*$/,"$1"),UC:()=>s.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1"),Sogou:()=>s.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1"),"2345Explorer":()=>s.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1"),TheWorld:()=>s.replace(/^.*TheWorld ([\d.]+).*$/,"$1"),MIUI:()=>s.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1"),Quark:()=>s.replace(/^.*Quark\/([\d.]+).*$/,"$1"),Qiyu:()=>s.replace(/^.*Qiyu\/([\d.]+).*$/,"$1"),Wechat:()=>s.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1"),Taobao:()=>s.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1"),Alipay:()=>s.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1"),Weibo:()=>s.replace(/^.*weibo__([\d.]+).*$/,"$1"),Douban:()=>s.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1"),Suning:()=>s.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1"),iQiYi:()=>s.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")};return i.version="",h[i.browser]&&(i.version=h[i.browser](),i.version===s&&(i.version="")),i.version.indexOf(".")&&(i.version=i.version.substring(0,i.version.indexOf("."))),"iOS"===i.os&&s.includes("iPad")?i.os="iPadOS":"Edge"!==i.browser||s.includes("Edg")?"MIUI"===i.browser?i.os="Android":"Chrome"===i.browser&&Number(i.version)>27||"Opera"===i.browser&&Number(i.version)>12||"Yandex"===i.browser?i.engine="Blink":void 0===i.browser&&(i.browser="Unknow App"):i.engine="EdgeHTML",i}(this.data.ua);return{browser:`${e.browser} ${e.version}`,os:`${e.os} ${e.osVersion}`}}getOpts(){return this.opts}}class Rn{constructor(e){d(this,"opts"),d(this,"$el"),d(this,"$loading"),d(this,"$text"),d(this,"offset",0),d(this,"total",0),d(this,"origText","Load More"),this.opts=e,this.origText=this.opts.text||this.origText,this.$el=wt(``),this.$loading=this.$el.querySelector(".atk-loading-icon"),this.$text=this.$el.querySelector(".atk-text"),this.$el.onclick=()=>{this.click()}}get hasMore(){return this.total>this.offset+this.opts.pageSize}click(){this.hasMore&&this.opts.onClick(this.offset+this.opts.pageSize),this.checkDisabled()}show(){this.$el.style.display=""}hide(){this.$el.style.display="none"}setLoading(e){this.$loading.style.display=e?"":"none",this.$text.style.display=e?"none":""}showErr(e){this.setLoading(!1),this.$text.innerText=e,this.$el.classList.add("atk-err"),window.setTimeout((()=>{this.$text.innerText=this.origText,this.$el.classList.remove("atk-err")}),2e3)}update(e,t){this.offset=e,this.total=t,this.checkDisabled()}checkDisabled(){this.hasMore?this.show():this.hide()}}class Un{constructor(){d(this,"instance"),d(this,"onReachedBottom",null),d(this,"opt")}create(e){return this.opt=e,this.instance=new Rn({pageSize:e.pageSize,onClick:t=>h(this,null,(function*(){e.ctx.fetch({offset:t})})),text:Ot("loadMore")}),e.readMoreAutoLoad&&(this.onReachedBottom=()=>{this.instance.hasMore&&!this.opt.ctx.getData().getLoading()&&this.instance.click()},this.opt.ctx.on("list-reach-bottom",this.onReachedBottom)),this.instance.$el}setLoading(e){this.instance.setLoading(e)}update(e,t){this.instance.update(e,t)}showErr(e){this.instance.showErr(e)}next(){this.instance.click()}getHasMore(){return this.instance.hasMore}getIsClearComments(e){return 0===e.offset}dispose(){this.onReachedBottom&&this.opt.ctx.off("list-reach-bottom",this.onReachedBottom),this.instance.$el.remove()}}class qn{constructor(e,t){d(this,"opts"),d(this,"total"),d(this,"$el"),d(this,"$input"),d(this,"inputTimer"),d(this,"$prevBtn"),d(this,"$nextBtn"),d(this,"page",1),this.total=e,this.opts=t,this.$el=wt('
    \n
    \n
    \n \n
    \n \n
    \n \n
    \n
    \n
    '),this.$input=this.$el.querySelector(".atk-input"),this.$input.value=`${this.page}`,this.$input.oninput=()=>this.input(),this.$input.onkeydown=e=>this.keydown(e),this.$prevBtn=this.$el.querySelector(".atk-btn-prev"),this.$nextBtn=this.$el.querySelector(".atk-btn-next"),this.$prevBtn.onclick=()=>this.prev(),this.$nextBtn.onclick=()=>this.next(),this.checkDisabled()}get pageSize(){return this.opts.pageSize}get offset(){return this.pageSize*(this.page-1)}get maxPage(){return Math.ceil(this.total/this.pageSize)}update(e,t){this.page=Math.ceil(e/this.pageSize)+1,this.total=t,this.setInput(this.page),this.checkDisabled()}setInput(e){this.$input.value=`${e}`}input(e=!1){window.clearTimeout(this.inputTimer);const t=this.$input.value.trim(),n=()=>{if(""===t)return void this.setInput(this.page);let e=Number(t);Number.isNaN(e)||e<1?this.setInput(this.page):(e>this.maxPage&&(this.setInput(this.maxPage),e=this.maxPage),this.change(e))};e?n():this.inputTimer=window.setTimeout((()=>n()),800)}prev(){const e=this.page-1;e<1||this.change(e)}next(){const e=this.page+1;e>this.maxPage||this.change(e)}getHasMore(){return this.page+1<=this.maxPage}change(e){this.page=e,this.opts.onChange(this.offset),this.setInput(e),this.checkDisabled()}checkDisabled(){this.page+1>this.maxPage?this.$nextBtn.classList.add("atk-disabled"):this.$nextBtn.classList.remove("atk-disabled"),this.page-1<1?this.$prevBtn.classList.add("atk-disabled"):this.$prevBtn.classList.remove("atk-disabled")}keydown(e){const t=e.keyCode||e.which;if(38===t){const e=Number(this.$input.value)+1;if(e>this.maxPage)return;this.setInput(e),this.input()}else if(40===t){const e=Number(this.$input.value)-1;if(e<1)return;this.setInput(e),this.input()}else 13===t&&this.input(!0)}setLoading(e){e?Nt(this.$el):Ht(this.$el)}}class _n{constructor(){d(this,"instance")}create(e){return this.instance=new qn(e.total,{pageSize:e.pageSize,onChange:t=>h(this,null,(function*(){e.ctx.editorResetState(),e.ctx.fetch({offset:t,onSuccess:()=>{e.ctx.listGotoFirst()}})}))}),this.instance.$el}setLoading(e){this.instance.setLoading(e)}update(e,t){this.instance.update(e,t)}next(){this.instance.next()}getHasMore(){return this.instance.getHasMore()}getIsClearComments(){return!0}dispose(){this.instance.$el.remove()}}function On(e){const t=e.getData().getListLastFetch(),n={offset:0,total:0};return t?(n.offset=t.params.offset,t.data&&(n.total=t.params.flatMode?t.data.count:t.data.roots_count),n):n}const Dn=e=>{let t=null;e.watchConf(["pagination","locale"],(n=>{const s=e.get("list");t&&t.dispose(),t=function(e){return e.pagination.readMore?new Un:new _n}(n);const{offset:i,total:r}=On(e),o=t.create({ctx:e,pageSize:n.pagination.pageSize,total:r,readMoreAutoLoad:n.pagination.autoLoad});s.$commentsWrap.after(o),null==t||t.update(i,r)})),e.on("list-loaded",(n=>{const{offset:s,total:i}=On(e);null==t||t.update(s,i)})),e.on("list-fetch",(n=>{e.getData().getComments().length>0&&(null==t?void 0:t.getIsClearComments(n))&&e.getData().clearComments()})),e.on("list-failed",(()=>{var e;null==(e=null==t?void 0:t.showErr)||e.call(t,Ot("loadFail"))})),e.on("list-fetch",(e=>{null==t||t.setLoading(!0)})),e.on("list-fetched",(({params:e})=>{null==t||t.setLoading(!1)}))};class Bn extends nn{constructor(e){super(e),d(this,"$commentsWrap"),d(this,"commentNodes",[]),this.$el=wt('
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n'),this.$commentsWrap=this.$el.querySelector(".atk-list-comments-wrap"),Dn(e),this.initCrudEvents()}getCommentsWrapEl(){return this.$commentsWrap}getCommentNodes(){return this.commentNodes}getListLayout({forceFlatMode:e}={}){return new un({$commentsWrap:this.$commentsWrap,nestSortBy:this.ctx.conf.nestSort,nestMax:this.ctx.conf.nestMax,flatMode:"boolean"==typeof e?e:this.ctx.conf.flatMode,createCommentNode:(t,n)=>{const s=function(e,t,n,s){const i=new In(t,{onAfterRender:()=>{e.trigger("comment-rendered",i)},onDelete:t=>{e.getData().deleteComment(t.getID())},replyTo:n,flatMode:"boolean"==typeof(null==s?void 0:s.forceFlatMode)?null==s?void 0:s.forceFlatMode:e.conf.flatMode,gravatar:e.conf.gravatar,nestMax:e.conf.nestMax,heightLimit:e.conf.heightLimit,avatarURLBuilder:e.conf.avatarURLBuilder,scrollRelativeTo:e.conf.scrollRelativeTo,vote:e.conf.vote,voteDown:e.conf.voteDown,uaBadge:e.conf.uaBadge,dateFormatter:e.conf.dateFormatter,getApi:()=>e.getApi(),replyComment:(t,n)=>e.replyComment(t,n),editComment:(t,n)=>e.editComment(t,n)});return i.render(),i}(this.ctx,t,n,{forceFlatMode:e});return this.commentNodes.push(s),s},findCommentNode:e=>this.commentNodes.find((t=>t.getID()===e))})}initCrudEvents(){this.ctx.on("list-load",(e=>{this.getListLayout().import(e)})),this.ctx.on("list-loaded",(e=>{0===e.length&&(this.commentNodes=[],this.$commentsWrap.innerHTML="")})),this.ctx.on("comment-inserted",(e=>{var t;const n=e.rid?null==(t=this.commentNodes.find((t=>t.getID()===e.rid)))?void 0:t.getData():void 0;this.getListLayout().insert(e,n)})),this.ctx.on("comment-deleted",(e=>{const t=this.commentNodes.find((t=>t.getID()===e.id));t?(t.remove(),this.commentNodes=this.commentNodes.filter((t=>t.getID()!==e.id))):console.error(`comment node id=${e.id} not found`)})),this.ctx.on("comment-updated",(e=>{const t=this.commentNodes.find((t=>t.getID()===e.id));t&&t.setData(e)}))}}let jn,Fn;function Wn(){return{init(){jn=document.body.style.overflow,Fn=document.body.style.paddingRight},unlock(){document.body.style.overflow=jn,document.body.style.paddingRight=Fn},lock(){document.body.style.overflow="hidden";const e=parseInt(window.getComputedStyle(document.body,null).getPropertyValue("padding-right"),10);document.body.style.paddingRight=`${function(){const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let s=e.offsetWidth;return n===s&&(s=t.clientWidth),document.body.removeChild(t),n-s}()+e||0}px`}}}class zn{constructor(e,t){d(this,"allowMaskClose",!0),d(this,"onAfterHide"),this.$el=e,this.opts=t}setOnAfterHide(e){this.onAfterHide=e}setAllowMaskClose(e){this.allowMaskClose=e}getAllowMaskClose(){return this.allowMaskClose}getEl(){return this.$el}show(){this.opts.onShow(),this.$el.style.display=""}hide(){this.opts.onHide(),this.$el.style.display="none",this.onAfterHide&&this.onAfterHide()}destroy(){this.opts.onHide(),this.$el.remove(),this.onAfterHide&&this.onAfterHide()}}class Nn{constructor(){d(this,"$wrap"),d(this,"$mask"),d(this,"items",[]),this.$wrap=wt(''),this.$mask=this.$wrap.querySelector(".atk-layer-mask")}createItem(e,t){(t=t||this.createItemElement(e)).setAttribute("data-layer-name",e),this.$wrap.appendChild(t);const n=new zn(t,{onHide:()=>this.hideWrap(t),onShow:()=>this.showWrap()});return this.getMask().addEventListener("click",(()=>{n.getAllowMaskClose()&&n.hide()})),this.items.push(n),n}createItemElement(e){const t=document.createElement("div");return t.classList.add("atk-layer-item"),t.style.display="none",this.$wrap.appendChild(t),t}getWrap(){return this.$wrap}getMask(){return this.$mask}showWrap(){this.$wrap.style.display="block",this.$mask.style.display="block",this.$mask.classList.add("atk-fade-in"),Wn().lock()}hideWrap(e){this.items.map((e=>e.getEl())).filter((t=>t!==e&&t.isConnected&&"none"!==t.style.display)).length>0||(this.$wrap.style.display="none",Wn().unlock())}}class Hn{constructor(e){d(this,"wrap"),this.wrap=new Nn,document.body.appendChild(this.wrap.getWrap()),e.on("unmounted",(()=>{this.wrap.getWrap().remove()})),Wn().init()}getEl(){return this.wrap.getWrap()}create(e,t){return this.wrap.createItem(e,t)}}const Qn="ArtalkUser";class Vn{constructor(e){d(this,"data"),this.opts=e;const t=JSON.parse(window.localStorage.getItem(Qn)||"{}");this.data={name:t.name||t.nick||"",email:t.email||"",link:t.link||"",token:t.token||"",is_admin:t.is_admin||t.isAdmin||!1}}getData(){return this.data}update(e={}){Object.entries(e).forEach((([e,t])=>{this.data[e]=t})),window.localStorage.setItem(Qn,JSON.stringify(this.data)),this.opts.onUserChanged&&this.opts.onUserChanged(this.data)}logout(){this.update({token:"",is_admin:!1})}checkHasBasicUserInfo(){return!!this.data.name&&!!this.data.email}}const Gn={i18n(e){_t(e.conf.locale),e.watchConf(["locale"],(e=>{_t(e.locale)}))},user:e=>new Vn({onUserChanged:t=>{e.trigger("user-changed",t)}}),layerManager:e=>new Hn(e),checkerLauncher:e=>new tn({getCtx:()=>e,getApi:()=>e.getApi(),onReload:()=>e.reload(),getCaptchaIframeURL:()=>`${e.conf.server}/api/v2/captcha/?t=${+new Date}`}),editor(e){const t=new ln(e);return e.$root.appendChild(t.$el),t},list(e){const t=new Bn(e);return e.$root.appendChild(t.$el),t},sidebarLayer:e=>new cn(e),editorPlugs(){}};function Kn(e){return h(this,null,(function*(){yield function(e){return h(this,null,(function*(){yield Zn({opt:e,query:"page_comment",containers:[e.countEl,"#ArtalkCount"]})}))}(e);const t=yield function(e){return h(this,null,(function*(){if(!e.pvAdd||!e.pageKey)return;const t=(yield e.getApi().pages.logPv({page_key:e.pageKey,page_title:e.pageTitle,site_name:e.siteName})).data.pv;return{[e.pageKey]:t}}))}(e);yield function(e,t){return h(this,null,(function*(){yield Zn({opt:e,query:"page_pv",containers:[e.pvEl,"#ArtalkPV"],cache:t})}))}(e,t)}))}function Zn(e){return h(this,null,(function*(){const{opt:t}=e;let n=e.cache||{};const s=function(e){const t=new Set;return new Set(e).forEach((e=>{document.querySelectorAll(e).forEach((e=>t.add(e)))})),t}(e.containers),i=function(e,t,n,s){const i=Array.from(e).map((e=>e.getAttribute(t)||n)).filter((e=>e&&"number"!=typeof s[e]));return[...new Set(i)]}(s,t.pageKeyAttr,t.pageKey,n);if(i.length>0){const s=(yield t.getApi().stats.getStats(e.query,{page_keys:i.join(","),site_name:t.siteName})).data.data;n=l(l({},n),s)}!function(e,t,n){e.forEach((e=>{const s=e.getAttribute("data-page-key"),i=s&&t[s]||n&&t[n]||0;e.innerText=`${Number(i)}`}))}(s,n,t.pageKey)}))}const Yn="ArtalkContent";class Xn{constructor(e){this.kit=e}reqAdd(){return h(this,null,(function*(){return(yield this.kit.useApi().comments.createComment(l({},yield this.getSubmitAddParams()))).data}))}getSubmitAddParams(){return h(this,null,(function*(){const{name:e,email:t,link:n}=this.kit.useUser().getData(),s=this.kit.useConf();return{content:this.kit.useEditor().getContentFinal(),name:e,email:t,link:n,rid:0,page_key:s.pageKey,page_title:s.pageTitle,site_name:s.site,ua:yield Tt()}}))}postSubmitAdd(e){this.kit.useGlobalCtx().getData().insertComment(e)}}class Jn extends rn{constructor(e){super(e),d(this,"customs",[]),d(this,"defaultPreset"),this.defaultPreset=new Xn(this.kit);const t=()=>this.do();this.kit.useMounted((()=>{this.kit.useGlobalCtx().on("editor-submit",t)})),this.kit.useUnmounted((()=>{this.kit.useGlobalCtx().off("editor-submit",t)}))}registerCustom(e){this.customs.push(e)}do(){return h(this,null,(function*(){if(""===this.kit.useEditor().getContentFinal().trim())return void this.kit.useEditor().focus();const e=this.customs.find((e=>e.activeCond()));this.kit.useEditor().showLoading();try{let t;(null==e?void 0:e.pre)&&e.pre(),t=(null==e?void 0:e.req)?yield e.req():yield this.defaultPreset.reqAdd(),(null==e?void 0:e.post)?e.post(t):this.defaultPreset.postSubmitAdd(t)}catch(t){return console.error(t),void this.kit.useEditor().showNotify(`${Ot("commentFail")}: ${t.message||String(t)}`,"e")}finally{this.kit.useEditor().hideLoading()}this.kit.useEditor().reset(),this.kit.useGlobalCtx().trigger("editor-submitted")}))}}class es extends rn{constructor(e){super(e),d(this,"emoticons",[]),d(this,"loadingTask",null),d(this,"$grpWrap"),d(this,"$grpSwitcher"),d(this,"isListLoaded",!1),d(this,"isImgLoaded",!1),this.kit.useMounted((()=>{this.usePanel('
    '),this.useBtn(``)})),this.kit.useUnmounted((()=>{})),this.useContentTransformer((e=>this.transEmoticonImageText(e))),this.usePanelShow((()=>{(()=>{h(this,null,(function*(){yield this.loadEmoticonsData(),this.isImgLoaded||(this.initEmoticonsList(),this.isImgLoaded=!0),setTimeout((()=>{this.changeListHeight()}),30)}))})()})),this.usePanelHide((()=>{this.$panel.parentElement.style.height=""})),window.setTimeout((()=>{this.loadEmoticonsData()}),1e3)}loadEmoticonsData(){return h(this,null,(function*(){this.isListLoaded||(null===this.loadingTask?(this.loadingTask=(()=>h(this,null,(function*(){Nt(this.$panel),this.emoticons=yield this.handleData(this.kit.useConf().emoticons),Ht(this.$panel),this.loadingTask=null,this.isListLoaded=!0})))(),yield this.loadingTask):yield this.loadingTask)}))}handleData(e){return h(this,null,(function*(){if(!Array.isArray(e)&&["object","string"].includes(typeof e)&&(e=[e]),!Array.isArray(e))return Kt(this.$panel,`[${Ot("emoticon")}] Data must be of Array/Object/String type`),Ht(this.$panel),[];const t=t=>{"object"==typeof t&&(t.name&&e.find((e=>e.name===t.name))||e.push(t))},n=e=>h(this,null,(function*(){yield Promise.all(e.map(((e,s)=>h(this,null,(function*(){if("object"!=typeof e||Array.isArray(e)){if(Array.isArray(e))yield n(e);else if("string"==typeof e){const s=yield this.remoteLoad(e);Array.isArray(s)?yield n(s):"object"==typeof s&&t(s)}}else t(e)})))))}));return yield n(e),e.forEach((e=>{if(this.isOwOFormat(e)){this.convertOwO(e).forEach((e=>{t(e)}))}else Array.isArray(e)&&e.forEach((e=>{t(e)}))})),e=e.filter((e=>"object"==typeof e&&!Array.isArray(e)&&!!e&&!!e.name)),this.solveNullKey(e),this.solveSameKey(e),e}))}remoteLoad(e){return h(this,null,(function*(){if(!e)return[];try{const t=yield fetch(e);return yield t.json()}catch(t){return Ht(this.$panel),console.error("[Emoticons] Load Failed:",t),Kt(this.$panel,`[${Ot("emoticon")}] ${Ot("loadFail")}: ${String(t)}`),[]}}))}solveNullKey(e){e.forEach((e=>{e.items.forEach(((t,n)=>{t.key||(t.key=`${e.name} ${n+1}`)}))}))}solveSameKey(e){const t={};e.forEach((e=>{e.items.forEach((e=>{e.key&&""!==String(e.key).trim()&&(t[e.key]?t[e.key]++:t[e.key]=1,t[e.key]>1&&(e.key=`${e.key} ${t[e.key]}`))}))}))}isOwOFormat(e){try{return"object"==typeof e&&!!Object.values(e).length&&Array.isArray(Object.keys(Object.values(e)[0].container))&&Object.keys(Object.values(e)[0].container[0]).includes("icon")}catch(t){return!1}}convertOwO(e){const t=[];return Object.entries(e).forEach((([e,n])=>{const s={name:e,type:n.type,items:[]};n.container.forEach(((t,n)=>{const i=t.icon;if(/<(img|IMG)/.test(i)){const e=/src=["'](.*?)["']/.exec(i);e&&e.length>1&&(t.icon=e[1])}s.items.push({key:t.text||`${e} ${n+1}`,val:t.icon})})),t.push(s)})),t}initEmoticonsList(){this.$grpWrap=wt('
    '),this.$panel.append(this.$grpWrap),this.emoticons.forEach(((e,t)=>{const n=wt('');this.$grpWrap.append(n),n.setAttribute("data-index",String(t)),n.setAttribute("data-grp-name",e.name),n.setAttribute("data-type",e.type),e.items.forEach((t=>{const s=wt('');if(n.append(s),t.key&&!new RegExp(`^(${e.name})?\\s?[0-9]+$`).test(t.key)&&s.setAttribute("title",t.key),"image"===e.type){const e=document.createElement("img");e.src=t.val,e.alt=t.key,s.append(e)}else s.innerText=t.val;s.onclick=()=>{"image"===e.type?this.kit.useEditor().insertContent(`:[${t.key}]`):this.kit.useEditor().insertContent(t.val||"")}}))})),this.emoticons.length>1&&(this.$grpSwitcher=wt('
    '),this.$panel.append(this.$grpSwitcher),this.emoticons.forEach(((e,t)=>{const n=wt("");n.innerText=e.name,n.setAttribute("data-index",String(t)),n.onclick=()=>this.openGrp(t),this.$grpSwitcher.append(n)}))),this.emoticons.length>0&&this.openGrp(0)}openGrp(e){var t,n,s;Array.from(this.$grpWrap.children).forEach((t=>{const n=t;n.getAttribute("data-index")!==String(e)?n.style.display="none":n.style.display=""})),null==(t=this.$grpSwitcher)||t.querySelectorAll("span.active").forEach((e=>e.classList.remove("active"))),null==(s=null==(n=this.$grpSwitcher)?void 0:n.querySelector(`span[data-index="${e}"]`))||s.classList.add("active"),this.changeListHeight()}changeListHeight(){}transEmoticonImageText(e){return this.emoticons&&Array.isArray(this.emoticons)?(this.emoticons.forEach((t=>{"image"===t.type&&Object.entries(t.items).forEach((([t,n])=>{e=e.split(`:[${n.key}]`).join(``)}))})),e):e}}const ts=["png","jpg","jpeg","gif","bmp","svg","webp"];class ns extends rn{constructor(e){super(e),d(this,"$imgUploadInput"),this.kit.useMounted((()=>this.init())),this.initDragImg()}init(){this.$imgUploadInput=document.createElement("input"),this.$imgUploadInput.type="file",this.$imgUploadInput.style.display="none",this.$imgUploadInput.accept=ts.map((e=>`.${e}`)).join(",");const e=this.useBtn(``);e.after(this.$imgUploadInput),e.onclick=()=>{const e=this.$imgUploadInput;e.onchange=()=>{(()=>{h(this,null,(function*(){if(!e.files||0===e.files.length)return;const t=e.files[0];this.uploadImg(t)}))})()},e.click()},this.kit.useConf().imgUpload||this.$btn.setAttribute("atk-only-admin-show","")}initDragImg(){const e=e=>{if(e)for(let t=0;t{e.stopPropagation(),e.preventDefault()},n=t=>{var n;const s=null==(n=t.dataTransfer)?void 0:n.files;(null==s?void 0:s.length)&&(t.preventDefault(),e(s))},s=t=>{var n;const s=null==(n=t.clipboardData)?void 0:n.files;(null==s?void 0:s.length)&&(t.preventDefault(),e(s))};this.kit.useMounted((()=>{this.kit.useUI().$textarea.addEventListener("dragover",t),this.kit.useUI().$textarea.addEventListener("drop",n),this.kit.useUI().$textarea.addEventListener("paste",s)})),this.kit.useUnmounted((()=>{this.kit.useUI().$textarea.removeEventListener("dragover",t),this.kit.useUI().$textarea.removeEventListener("drop",n),this.kit.useUI().$textarea.removeEventListener("paste",s)}))}uploadImg(e){return h(this,null,(function*(){const t=/[^.]+$/.exec(e.name);if(!t||!ts.includes(String(t[0]).toLowerCase()))return;if(!this.kit.useUser().checkHasBasicUserInfo())return void this.kit.useEditor().showNotify(Ot("uploadLoginMsg"),"w");let n="\n";""===this.kit.useUI().$textarea.value.trim()&&(n="");const s=`${n}![](Uploading ${e.name}...)`;let i;this.kit.useEditor().insertContent(s);try{const t=this.kit.useConf().imgUploader;i=t?{public_url:yield t(e)}:(yield this.kit.useApi().upload.upload({file:e})).data}catch(r){console.error(r),this.kit.useEditor().showNotify(`${Ot("uploadFail")}: ${r.message}`,"e")}if(i&&i.public_url){let e=i.public_url;At(e)||(e=Lt({base:this.kit.useConf().server,path:e})),this.kit.useEditor().setContent(this.kit.useUI().$textarea.value.replace(s,`${n}![](${e})`))}else this.kit.useEditor().setContent(this.kit.useUI().$textarea.value.replace(s,""))}))}}class ss extends rn{constructor(e){super(e),d(this,"isPlugPanelShow",!1),this.kit.useMounted((()=>{this.usePanel('
    '),this.useBtn(``)})),this.kit.useUnmounted((()=>{})),this.kit.useEvents().on("content-updated",(e=>{this.isPlugPanelShow&&this.updateContent()})),this.usePanelShow((()=>{this.isPlugPanelShow=!0,this.updateContent()})),this.usePanelHide((()=>{this.isPlugPanelShow=!1}))}updateContent(){this.$panel.innerHTML=this.kit.useEditor().getContentMarked()}}const is=[class extends rn{constructor(e){super(e);const t=()=>{this.save()};this.kit.useMounted((()=>{const e=window.localStorage.getItem(Yn)||"";""!==e.trim()&&(this.kit.useEditor().showNotify(Ot("restoredMsg"),"i"),this.kit.useEditor().setContent(e)),this.kit.useEvents().on("content-updated",t)})),this.kit.useUnmounted((()=>{this.kit.useEvents().off("content-updated",t)}))}save(){window.localStorage.setItem(Yn,this.kit.useEditor().getContentRaw().trim())}},class extends rn{get $inputs(){return this.kit.useEditor().getHeaderInputEls()}constructor(e){super(e);const t={},n={},s=(e,t,n)=>()=>{this.kit.useEvents().trigger(e,{field:n,$input:t})};this.kit.useMounted((()=>{Object.entries(this.$inputs).forEach((([e,i])=>{i.addEventListener("input",t[e]=s("header-input",i,e)),i.addEventListener("change",n[e]=s("header-change",i,e))}))})),this.kit.useUnmounted((()=>{Object.entries(this.$inputs).forEach((([e,s])=>{s.removeEventListener("input",t[e]),s.removeEventListener("change",n[e])}))}))}},class extends rn{constructor(e){super(e),d(this,"query",{timer:null,abortFn:null});const t=({$input:e,field:t})=>{"edit"!==this.kit.useEditor().getState()&&(this.kit.useUser().update({[t]:e.value.trim()}),"name"!==t&&"email"!==t||this.fetchUserInfo())},n={name:Ot("nick"),email:Ot("email"),link:Ot("link")};this.kit.useMounted((()=>{Object.entries(this.kit.useEditor().getHeaderInputEls()).forEach((([e,t])=>{t.placeholder=n[e],t.value=this.kit.useUser().getData()[e]||""})),this.kit.useEvents().on("header-input",t)})),this.kit.useUnmounted((()=>{this.kit.useEvents().off("header-input",t)}))}fetchUserInfo(){this.kit.useUser().logout(),this.query.timer&&window.clearTimeout(this.query.timer),this.query.abortFn&&this.query.abortFn(),this.query.timer=window.setTimeout((()=>{this.query.timer=null;const e=this.kit.useApi(),t="getUserCancelToken";this.query.abortFn=()=>e.abortRequest(t),e.user.getUser(l({},e.getUserFields()),{cancelToken:t}).then((e=>this.onUserInfoFetched(e.data))).catch((e=>{})).finally((()=>{this.query.abortFn=null}))}),400)}onUserInfoFetched(e){var t;e.is_login||this.kit.useUser().logout(),this.kit.useGlobalCtx().getData().updateNotifies(e.notifies),this.kit.useUser().checkHasBasicUserInfo()&&!e.is_login&&(null==(t=e.user)?void 0:t.is_admin)&&this.kit.useGlobalCtx().checkAdmin({onSuccess:()=>{}}),e.user&&e.user.link&&(this.kit.useUI().$link.value=e.user.link,this.kit.useUser().update({link:e.user.link}))}},class extends rn{constructor(e){super(e);const t=({field:e})=>{"link"===e&&this.onLinkInputChange()};this.kit.useMounted((()=>{this.kit.useEvents().on("header-change",t)})),this.kit.useUnmounted((()=>{this.kit.useEvents().off("header-change",t)}))}onLinkInputChange(){const e=this.kit.useUI().$link.value.trim();e&&!/^(http|https):\/\//.test(e)&&(this.kit.useUI().$link.value=`https://${e}`,this.kit.useUser().update({link:this.kit.useUI().$link.value}))}},class extends rn{constructor(e){super(e);const t=e=>this.onKeydown(e),n=()=>this.onInput();this.kit.useMounted((()=>{this.kit.useUI().$textarea.placeholder=this.kit.useConf().placeholder||Ot("placeholder"),this.kit.useUI().$textarea.addEventListener("keydown",t),this.kit.useUI().$textarea.addEventListener("input",n)})),this.kit.useUnmounted((()=>{this.kit.useUI().$textarea.removeEventListener("keydown",t),this.kit.useUI().$textarea.removeEventListener("input",n)})),this.kit.useEvents().on("content-updated",(()=>{window.setTimeout((()=>{this.adaptiveHeightByContent()}),80)}))}onKeydown(e){9===(e.keyCode||e.which)&&(e.preventDefault(),this.kit.useEditor().insertContent("\t"))}onInput(){this.kit.useEvents().trigger("content-updated",this.kit.useEditor().getContentRaw())}adaptiveHeightByContent(){const e=this.kit.useUI().$textarea.offsetHeight-this.kit.useUI().$textarea.clientHeight;this.kit.useUI().$textarea.style.height="0px",this.kit.useUI().$textarea.style.height=`${this.kit.useUI().$textarea.scrollHeight+e}px`}},Jn,class extends rn{constructor(e){super(e);const t=()=>{this.kit.useEditor().submit()};this.kit.useMounted((()=>{this.kit.useUI().$submitBtn.innerText=this.kit.useConf().sendBtn||Ot("send"),this.kit.useUI().$submitBtn.addEventListener("click",t)})),this.kit.useUnmounted((()=>{this.kit.useUI().$submitBtn.removeEventListener("click",t)}))}},on,class extends rn{constructor(e){super(e),d(this,"comment"),this.useEditorStateEffect("reply",(e=>(this.setReply(e),()=>{this.cancelReply()}))),this.kit.useEvents().on("mounted",(()=>{const e=this.kit.useDeps(Jn);if(!e)throw Error("SubmitPlug not initialized");const t=new Xn(this.kit);e.registerCustom({activeCond:()=>!!this.comment,req:()=>h(this,null,(function*(){if(!this.comment)throw new Error("reply comment cannot be empty");return(yield this.kit.useApi().comments.createComment(c(l({},yield t.getSubmitAddParams()),{rid:this.comment.id,page_key:this.comment.page_key,page_title:void 0,site_name:this.comment.site_name}))).data})),post:e=>{const n=this.kit.useConf();e.page_key!==n.pageKey&&window.open(`${e.page_url}#atk-comment-${e.id}`),t.postSubmitAdd(e)}})}))}setReply(e){const t=this.kit.useUI();if(!t.$sendReplyBtn){const n=wt(`${Ot("reply")} `);n.querySelector(".atk-text").innerText=`@${e.nick}`,n.addEventListener("click",(()=>{this.kit.useEditor().resetState()})),t.$stateWrap.append(n),t.$sendReplyBtn=n}this.comment=e,t.$textarea.focus()}cancelReply(){if(!this.comment)return;const e=this.kit.useUI();e.$sendReplyBtn&&(e.$sendReplyBtn.remove(),e.$sendReplyBtn=void 0),this.comment=void 0}},class extends rn{constructor(e){super(e),d(this,"comment"),d(this,"originalSubmitBtnText","Send"),this.useEditorStateEffect("edit",(e=>(this.edit(e),()=>{this.cancelEdit()}))),this.kit.useMounted((()=>{const e=this.kit.useDeps(Jn);if(!e)throw Error("SubmitPlug not initialized");e.registerCustom({activeCond:()=>!!this.comment,req:()=>h(this,null,(function*(){const e={content:this.kit.useEditor().getContentFinal(),nick:this.kit.useUI().$name.value,email:this.kit.useUI().$email.value,link:this.kit.useUI().$link.value},t=this.comment;return(yield this.kit.useApi().comments.updateComment(t.id,l(l({},t),e))).data})),post:e=>{this.kit.useGlobalCtx().getData().updateComment(e)}})}))}edit(e){const t=this.kit.useUI();if(!t.$editCancelBtn){const e=wt(`${Ot("editCancel")}`);e.onclick=()=>{this.kit.useEditor().resetState()},t.$stateWrap.append(e),t.$editCancelBtn=e}this.comment=e,t.$header.style.display="none",t.$name.value=e.nick||"",t.$email.value=e.email||"",t.$link.value=e.link||"",this.kit.useEditor().setContent(e.content),t.$textarea.focus(),this.updateSubmitBtnText(Ot("save"))}cancelEdit(){if(!this.comment)return;const e=this.kit.useUI();e.$editCancelBtn&&(e.$editCancelBtn.remove(),e.$editCancelBtn=void 0),this.comment=void 0;const{name:t,email:n,link:s}=this.kit.useUser().getData();e.$name.value=t,e.$email.value=n,e.$link.value=s,this.kit.useEditor().setContent(""),this.restoreSubmitBtnText(),e.$header.style.display=""}updateSubmitBtnText(e){this.originalSubmitBtnText=this.kit.useUI().$submitBtn.innerText,this.kit.useUI().$submitBtn.innerText=e}restoreSubmitBtnText(){this.kit.useUI().$submitBtn.innerText=this.originalSubmitBtnText}},class extends rn{constructor(e){super(e);const t=()=>this.open(),n=()=>this.close();this.kit.useMounted((()=>{this.kit.useEvents().on("editor-open",t),this.kit.useEvents().on("editor-close",n)})),this.kit.useUnmounted((()=>{this.kit.useEvents().off("editor-open",t),this.kit.useEvents().off("editor-close",n)}))}open(){var e;null==(e=this.kit.useUI().$textareaWrap.querySelector(".atk-comment-closed"))||e.remove(),this.kit.useUI().$textarea.style.display="",this.kit.useUI().$bottom.style.display=""}close(){this.kit.useUI().$textareaWrap.querySelector(".atk-comment-closed")||this.kit.useUI().$textareaWrap.prepend(wt(`
    ${Ot("onlyAdminCanReply")}
    `)),this.kit.useUser().getData().is_admin?(this.kit.useUI().$textarea.style.display="",this.kit.useUI().$bottom.style.display=""):(this.kit.useUI().$textarea.style.display="none",this.kit.useEvents().trigger("panel-close"),this.kit.useUI().$bottom.style.display="none")}},es,ns,ss];class rs{constructor(e){this.plugs=e}useEditor(){return this.plugs.editor}useGlobalCtx(){return this.plugs.editor.ctx}useConf(){return this.plugs.editor.ctx.conf}useApi(){return this.plugs.editor.ctx.getApi()}useUser(){return this.plugs.editor.ctx.get("user")}useUI(){return this.plugs.editor.getUI()}useEvents(){return this.plugs.getEvents()}useMounted(e){this.useEvents().on("mounted",e)}useUnmounted(e){this.useEvents().on("unmounted",e)}useDeps(e){return this.plugs.get(e)}}class os{constructor(e){d(this,"plugs",[]),d(this,"openedPlug",null),d(this,"events",new Dt),this.editor=e;let t=!1;this.editor.ctx.watchConf(["imgUpload","emoticons","preview","editorTravel","locale"],(e=>{t&&this.getEvents().trigger("unmounted"),this.clear(),function(e){const t=new Map;return t.set(ns,e.imgUpload),t.set(es,e.emoticons),t.set(ss,e.preview),t.set(on,e.editorTravel),is.filter((e=>!t.has(e)||!!t.get(e)))}(e).forEach((e=>{const t=new rs(this);this.plugs.push(new e(t))})),this.getEvents().trigger("mounted"),t=!0,this.loadPluginUI()})),this.events.on("panel-close",(()=>this.closePlugPanel()))}getPlugs(){return this.plugs}getEvents(){return this.events}clear(){this.plugs=[],this.events=new Dt,this.openedPlug&&this.closePlugPanel()}loadPluginUI(){this.editor.getUI().$plugPanelWrap.innerHTML="",this.editor.getUI().$plugPanelWrap.style.display="none",this.editor.getUI().$plugBtnWrap.innerHTML="",this.plugs.forEach((e=>this.loadPluginItem(e)))}loadPluginItem(e){const t=e.$btn;if(!t)return;this.editor.getUI().$plugBtnWrap.appendChild(t),!t.onclick&&(t.onclick=()=>{this.editor.getUI().$plugBtnWrap.querySelectorAll(".active").forEach((e=>e.classList.remove("active"))),e!==this.openedPlug?(this.openPlugPanel(e),t.classList.add("active")):this.closePlugPanel()});const n=e.$panel;n&&(n.style.display="none",this.editor.getUI().$plugPanelWrap.appendChild(n))}get(e){return this.plugs.find((t=>t instanceof e))}openPlugPanel(e){this.plugs.forEach((t=>{const n=t.$panel;n&&(t===e?(n.style.display="",this.events.trigger("panel-show",e)):(n.style.display="none",this.events.trigger("panel-hide",e)))})),this.editor.getUI().$plugPanelWrap.style.display="",this.openedPlug=e}closePlugPanel(){this.openedPlug&&(this.editor.getUI().$plugPanelWrap.style.display="none",this.events.trigger("panel-hide",this.openedPlug),this.openedPlug=null)}getTransformedContent(e){let t=e;return this.plugs.forEach((e=>{e.contentTransformer&&(t=e.contentTransformer(t))})),t}}const as="2.9.1";function ls(e){const t=wt('

    ');if(t.querySelector(".error-message").innerText=`${Ot("listLoadFailMsg")}\n${e.errMsg}`,e.retryFn){const n=wt(`${Ot("listRetry")}`);n.onclick=()=>e.retryFn&&e.retryFn(),t.appendChild(n)}if(e.onOpenSidebar){const n=wt(` | ${Ot("openName",{name:Ot("ctrlCenter")})}`);t.appendChild(n),n.onclick=()=>e.onOpenSidebar&&e.onOpenSidebar()}Kt(e.$err,t)}let cs=!1;let ds;function hs(e,t){const n="atk-dark-mode";e.forEach((e=>{t?e.classList.add(n):e.classList.remove(n)}))}const us=[e=>{e.watchConf(["imgLazyLoad","markedOptions"],(t=>{!function(e){try{if(!be.name)return}catch(n){return}const t=new be;t.setOptions(l(l({renderer:dt({imgLazyLoad:e.imgLazyLoad})},ft),e.markedOptions)),gt=t}({markedOptions:e.getConf().markedOptions,imgLazyLoad:e.getConf().imgLazyLoad})})),e.watchConf(["markedReplacers"],(e=>{var t;e.markedReplacers&&(t=e.markedReplacers,mt=t)}))},e=>{const t=e.get("editor"),n=new os(t);e.inject("editorPlugs",n)},e=>{const t=()=>{var t;t=e.get("user").getData().is_admin,function(e){const t=[];e.$root.querySelectorAll("[atk-only-admin-show]").forEach((e=>t.push(e)));const n=document.querySelector(".atk-sidebar");return n&&n.querySelectorAll("[atk-only-admin-show]").forEach((e=>t.push(e))),t}({$root:e.$root}).forEach((e=>{t?e.classList.remove("atk-hide"):e.classList.add("atk-hide")}))};e.on("list-loaded",(()=>{t()})),e.on("user-changed",(e=>{t()}))},...[e=>{e.on("list-fetch",(t=>{if(e.getData().getLoading())return;e.getData().setLoading(!0);const n=l({offset:0,limit:e.conf.pagination.pageSize,flatMode:e.conf.flatMode,paramsModifier:e.conf.listFetchParamsModifier},t);e.getData().setListLastFetch({params:n});const s={limit:n.limit,offset:n.offset,flat_mode:n.flatMode,page_key:e.getConf().pageKey,site_name:e.getConf().site};n.paramsModifier&&n.paramsModifier(s),e.getApi().comments.getComments(l(l({},s),e.getApi().getUserFields())).then((({data:t})=>{e.getData().setListLastFetch({params:n,data:t}),e.getData().loadComments(t.comments),e.getData().updatePage(t.page),n.onSuccess&&n.onSuccess(t),e.trigger("list-fetched",{params:n,data:t})})).catch((t=>{const s={msg:t.msg||String(t),data:t.data};throw n.onError&&n.onError(s),e.trigger("list-failed",s),e.trigger("list-fetched",{params:n,error:s}),t})).finally((()=>{e.getData().setLoading(!1)}))}))},e=>{e.on("list-fetch",(t=>{const n=e.get("list");0===t.offset&&Qt(!0,n.$el)})),e.on("list-fetched",(()=>{Qt(!1,e.get("list").$el)}))},e=>{e.on("comment-rendered",(t=>{if(!0===e.conf.listUnreadHighlight){const n=e.getData().getNotifies(),s=n.find((e=>e.comment_id===t.getID()));s?(t.getRender().setUnread(!0),t.getRender().setOpenAction((()=>{window.open(s.read_link),e.getData().updateNotifies(n.filter((e=>e.comment_id!==t.getID())))}))):t.getRender().setUnread(!1)}})),e.on("list-goto",(t=>{const n=xt("atk_notify_key");n&&e.getApi().notifies.markNotifyRead(t,n).then((()=>{e.getData().updateNotifies(e.getData().getNotifies().filter((e=>e.comment_id!==t)))}))}))},e=>{let t;e.on("mounted",(()=>{const n=e.get("list");t=n.$el.querySelector('[data-action="admin-close-comment"]'),t.addEventListener("click",(()=>{const t=e.getData().getPage();if(!t)throw new Error("Page data not found");t.admin_only=!t.admin_only,function(e,t){e.editorShowLoading(),e.getApi().pages.updatePage(t.id,t).then((({data:t})=>{e.getData().updatePage(t)})).catch((t=>{e.editorShowNotify(`${Ot("editFail")}: ${t.message||String(t)}`,"e")})).finally((()=>{e.editorHideLoading()}))}(e,t)}))})),e.on("page-loaded",(n=>{var s,i;const r=e.get("editor");!0===(null==n?void 0:n.admin_only)?(null==(s=r.getPlugs())||s.getEvents().trigger("editor-close"),t&&(t.innerText=Ot("openComment"))):(null==(i=r.getPlugs())||i.getEvents().trigger("editor-open"),t&&(t.innerText=Ot("closeComment")))})),e.on("list-loaded",(t=>{e.editorResetState()}))},e=>{e.on("list-loaded",(()=>{(()=>{var t,n;const s=e.get("list").$el.querySelector(".atk-comment-count .atk-text");if(!s)return;const i=bt(Ot("counter",{count:`${Number(null==(n=null==(t=e.getData().getListLastFetch())?void 0:t.data)?void 0:n.count)||0}`}));s.innerHTML=i.replace(/(\d+)/,'$1')})()})),e.on("comment-inserted",(()=>{const t=e.getData().getListLastFetch();(null==t?void 0:t.data)&&(t.data.count+=1)})),e.on("comment-deleted",(()=>{const t=e.getData().getListLastFetch();(null==t?void 0:t.data)&&(t.data.count-=1)}))},e=>{let t=null;const n=()=>{if(!t)return;const n=e.get("user").getData();if(n.name&&n.email){t.classList.remove("atk-hide");const e=t.querySelector(".atk-text");e&&(e.innerText=n.is_admin?Ot("ctrlCenter"):Ot("msgCenter"))}else t.classList.add("atk-hide")};e.watchConf(["locale"],(s=>{const i=e.get("list");t=i.$el.querySelector('[data-action="open-sidebar"]'),t&&(t.onclick=()=>{e.showSidebar()},n())})),e.on("user-changed",(e=>{n()}))},e=>{let t=null;e.on("mounted",(()=>{const n=e.get("list");t=n.$el.querySelector(".atk-unread-badge")})),e.on("notifies-updated",(e=>{var n;n=e.length||0,t&&(n>0?(t.innerText=`${Number(n||0)}`,t.style.display="block"):t.style.display="none")}))},e=>{const t=t=>{e.conf.listFetchParamsModifier=t,e.reload()},n=e=>{!function(e){const{$dropdownWrap:t,dropdownList:n}=e;if(t.querySelector(".atk-dropdown"))return;t.classList.add("atk-dropdown-wrap"),t.append(wt(''));let s=0;const i=(e,t,n,i)=>{i(),s=e,r.querySelectorAll(".active").forEach((e=>{e.classList.remove("active")})),t.classList.add("active"),r.style.display="none",setTimeout((()=>{r.style.display=""}),80)},r=wt('
      ');n.forEach(((e,t)=>{const[n,o]=e,a=wt('
    • '),l=a.querySelector("span");l.innerText=n,l.onclick=()=>{i(t,a,n,o)},r.append(a),t===s&&a.classList.add("active")})),t.append(r)}({$dropdownWrap:e,dropdownList:[[Ot("sortLatest"),()=>{t((e=>{e.sort_by="date_desc"}))}],[Ot("sortBest"),()=>{t((e=>{e.sort_by="vote"}))}],[Ot("sortOldest"),()=>{t((e=>{e.sort_by="date_asc"}))}],[Ot("sortAuthor"),()=>{t((e=>{e.view_only_admin=!0}))}]]})};e.watchConf(["listSort","locale"],(t=>{const s=e.get("list").$el.querySelector(".atk-comment-count");s&&(t.listSort?n(s):function(e){var t,n;const{$dropdownWrap:s}=e;s.classList.remove("atk-dropdown-wrap"),null==(t=s.querySelector(".atk-arrow-down-icon"))||t.remove(),null==(n=s.querySelector(".atk-dropdown"))||n.remove()}({$dropdownWrap:s}))}))},e=>{let t=0;const n=({locker:n})=>{const s=function(){const e=window.location.hash.match(/#atk-comment-([0-9]+)/);let t=e&&e[1]&&!Number.isNaN(parseFloat(e[1]))?parseFloat(e[1]):null;t||(t=Number(xt("atk_comment")));return t||null}();s&&(n&&t===s||(t=s,e.trigger("list-goto",s)))},s=()=>n({locker:!1}),i=()=>n({locker:!0});e.on("mounted",(()=>{window.addEventListener("hashchange",s),e.on("list-loaded",i)})),e.on("unmounted",(()=>{window.removeEventListener("hashchange",s),e.off("list-loaded",i)}))},e=>{e.on("list-goto",(t=>h(this,null,(function*(){let n=e.getCommentNodes().find((e=>e.getID()===t));if(!n){const s=(yield e.getApi().comments.getComment(t)).data;e.get("list").getListLayout({forceFlatMode:!0}).insert(s.comment,s.reply_comment),n=e.getCommentNodes().find((e=>e.getID()===t))}n&&n.focus()}))))},e=>{e.on("list-loaded",(t=>{const n=e.get("list"),s=t.length<=0;let i=n.getCommentsWrapEl().querySelector(".atk-list-no-comment");s?i||(i=wt('
      '),i.innerHTML=ot(n.ctx.conf.noComment||n.ctx.$t("noComment")),n.getCommentsWrapEl().appendChild(i)):null==i||i.remove()}))},e=>{e.on("mounted",(()=>{const t=e.get("list").$el.querySelector(".atk-copyright");t&&(t.innerHTML=`Powered By Artalk`)}))},e=>{let t=null;e.on("mounted",(()=>{t=window.setInterval((()=>{e.get("list").$el.querySelectorAll("[data-atk-comment-date]").forEach((t=>{var n,s;const i=new Date(Number(t.getAttribute("data-atk-comment-date")));t.innerText=(null==(s=(n=e.getConf()).dateFormatter)?void 0:s.call(n,i))||St(i,e.$t)}))}),3e4)})),e.on("unmounted",(()=>{t&&window.clearInterval(t)}))},e=>{e.on("list-fetch",(()=>{Kt(e.get("list").$el,null)})),e.on("list-failed",(t=>{ls({$err:e.get("list").$el,errMsg:t.msg,errData:t.data,retryFn:()=>e.fetch({offset:0})})}))},e=>{let t=null;const n=()=>{null==t||t.disconnect(),t=null};e.on("list-loaded",(()=>{n();const s=e.get("list").getCommentsWrapEl().childNodes,i=s.length>2?s[s.length-2]:null;i&&("IntersectionObserver"in window?(s=>{const i=e.conf.scrollRelativeTo&&e.conf.scrollRelativeTo()||null;t=new IntersectionObserver((([t])=>{t.isIntersecting&&(n(),e.trigger("list-reach-bottom"))}),{threshold:.9,root:i}),t.observe(s)})(i):console.warn("IntersectionObserver api not supported"))})),e.on("unmounted",(()=>{n()}))},e=>{const t=()=>{const t=e.get("list"),n=e.conf.scrollRelativeTo&&e.conf.scrollRelativeTo();(n||window).scroll({top:Ct(t.$el,n).top,left:0})};e.on("mounted",(()=>{e.on("list-goto-first",t)})),e.on("unmounted",(()=>{e.off("list-goto-first",t)}))}],e=>{e.on("list-fetch",(t=>{if(0!==t.offset)return;const n=e.getApi().getUserFields();n&&e.getApi().notifies.getNotifies(n).then((t=>{e.getData().updateNotifies(t.data.notifies)}))}))},e=>{e.watchConf(["site","pageKey","pageTitle","countEl","pvEl","statPageKeyAttr"],(t=>{Kn({getApi:()=>e.getApi(),siteName:t.site,pageKey:t.pageKey,pageTitle:t.pageTitle,countEl:t.countEl,pvEl:t.pvEl,pageKeyAttr:t.statPageKeyAttr,pvAdd:"boolean"!=typeof e.conf.pvAdd||e.conf.pvAdd})}))},e=>{e.watchConf(["apiVersion","versionCheck"],(t=>{const n=e.get("list");t.apiVersion&&t.versionCheck&&!cs&&function(e,t,n){const s=function(e,t){const n=e.split("."),s=t.split(".");for(let i=0;i<3;i++){const e=Number(n[i]),t=Number(s[i]);if(e>t)return 1;if(t>e)return-1;if(!Number.isNaN(e)&&Number.isNaN(t))return 1;if(Number.isNaN(e)&&!Number.isNaN(t))return-1}return 0}(t,n);if(0===s)return;const i=wt(`
      ${Ot("updateMsg",{name:Ot(s<0?"frontend":"backend")})} ${Ot("currentVersion")}: ${Ot("frontend")} ${t} / ${Ot("backend")} ${n}
      `),r=wt(`${Ot("ignore")}`);r.onclick=()=>{i.remove(),cs=!0},i.append(r),e.$el.parentElement.prepend(i)}(n,as,t.apiVersion)}))},e=>{let t;const n=n=>{const s=[e.$root,e.get("layerManager").getEl()];ds||(ds=window.matchMedia("(prefers-color-scheme: dark)")),"auto"===n?(t||(t=e=>hs(s,e.matches),ds.addEventListener("change",t)),hs(s,ds.matches)):(t&&(ds.removeEventListener("change",t),t=void 0),hs(s,n))};e.watchConf(["darkMode"],(e=>n(e.darkMode))),e.on("created",(()=>n(e.conf.darkMode))),e.on("unmounted",(()=>{t&&(null==ds||ds.removeEventListener("change",t)),t=void 0}))}],ps=new Set([...us]),gs=new WeakMap;function ms(e){return h(this,null,(function*(){var t;const n=new Set,s=t=>{t.forEach((t=>{"function"!=typeof t||n.has(t)||(t(e,gs.get(t)),n.add(t))}))};s(ps);const{data:i}=yield e.getApi().conf.conf().catch((t=>{throw function(e,t){var n;let s="";if(null==(n=t.data)?void 0:n.err_no_site){const t={create_name:e.conf.site,create_urls:`${window.location.protocol}//${window.location.host}`};s=`sites|${JSON.stringify(t)}`}ls({$err:e.get("list").$el,errMsg:t.msg||String(t),errData:t.data,retryFn:()=>ms(e),onOpenSidebar:e.get("user").getData().is_admin?()=>e.showSidebar({view:s}):void 0})}(e,t),t}));let r={apiVersion:null==(t=i.version)?void 0:t.version};if(e.conf.useBackendConf){if(!i.frontend_conf)throw new Error("The remote backend does not respond to the frontend conf, but `useBackendConf` conf is enabled");r=l(l({},r),function(e){const t=["el","pageKey","pageTitle","server","site","pvEl","countEl","statPageKeyAttr"];return Object.keys(e).forEach((n=>{t.includes(n)&&delete e[n],"darkMode"===n&&"auto"!==e[n]&&delete e[n]})),e.emoticons&&"string"==typeof e.emoticons&&(e.emoticons=e.emoticons.trim(),e.emoticons.startsWith("[")||e.emoticons.startsWith("{")?e.emoticons=JSON.parse(e.emoticons):"false"===e.emoticons&&(e.emoticons=!1)),e}(i.frontend_conf))}e.conf.remoteConfModifier&&e.conf.remoteConfModifier(r),r.pluginURLs&&(yield function(e,t){return h(this,null,(function*(){const n=new Set;if(!e||!Array.isArray(e))return n;const s=[];return e.forEach((e=>{/^(http|https):\/\//.test(e)||(e=`${t.replace(/\/$/,"")}/${e.replace(/^\//,"")}`),s.push(new Promise((t=>{if(document.querySelector(`script[src="${e}"]`))return void t();const n=document.createElement("script");n.src=e,document.head.appendChild(n),n.onload=()=>t(),n.onerror=e=>{console.error("[artalk] Failed to load plugin",e),t()}})))})),yield Promise.all(s),Object.values(window.ArtalkPlugins||{}).forEach((e=>{"function"==typeof e&&n.add(e)})),n}))}(r.pluginURLs,e.conf.server).then((e=>{s(e)})).catch((e=>{console.error("Failed to load plugin",e)}))),e.trigger("created"),e.updateConf(r),e.trigger("mounted"),e.conf.remoteConfModifier||e.fetch({offset:0})}))}class fs{constructor(e){d(this,"ctx");const t=jt(e,!0);this.ctx=new zt(t),Object.entries(Gn).forEach((([e,t])=>{const n=t(this.ctx);n&&this.ctx.inject(e,n)})),ms(this.ctx)}getConf(){return this.ctx.getConf()}getEl(){return this.ctx.$root}update(e){return this.ctx.updateConf(e),this}reload(){this.ctx.reload()}destroy(){for(this.ctx.trigger("unmounted");this.ctx.$root.firstChild;)this.ctx.$root.removeChild(this.ctx.$root.firstChild)}on(e,t){this.ctx.on(e,t)}off(e,t){this.ctx.off(e,t)}trigger(e,t){this.ctx.trigger(e,t)}setDarkMode(e){this.ctx.setDarkMode(e)}static init(e){return new fs(e)}static use(e,t){ps.add(e),gs.set(e,t)}static loadCountWidget(e){const t=jt(e,!0);Kn({getApi:()=>new f(Ft(t)),siteName:t.site,countEl:t.countEl,pvEl:t.pvEl,pageKeyAttr:t.statPageKeyAttr,pvAdd:!1})}get $root(){return this.ctx.$root}get conf(){return this.ctx.getConf()}}const ks=fs.init,ys=fs.use,$s=fs.loadCountWidget;e.default=fs,e.init=ks,e.loadCountWidget=$s,e.use=ys,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); -//# sourceMappingURL=Artalk.js.map diff --git a/pluginsSrc/blueimp-md5/js/md5.min.js b/pluginsSrc/blueimp-md5/js/md5.min.js deleted file mode 100644 index f414e7c6..00000000 --- a/pluginsSrc/blueimp-md5/js/md5.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(n){"use strict";function d(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function f(n,t,r,e,o,u){return d((u=d(d(t,n),d(e,u)))<>>32-o,r)}function l(n,t,r,e,o,u,c){return f(t&r|~t&e,n,t,o,u,c)}function g(n,t,r,e,o,u,c){return f(t&e|r&~e,n,t,o,u,c)}function v(n,t,r,e,o,u,c){return f(t^r^e,n,t,o,u,c)}function m(n,t,r,e,o,u,c){return f(r^(t|~e),n,t,o,u,c)}function c(n,t){var r,e,o,u;n[t>>5]|=128<>>9<<4)]=t;for(var c=1732584193,f=-271733879,i=-1732584194,a=271733878,h=0;h>5]>>>e%32&255);return t}function a(n){var t=[];for(t[(n.length>>2)-1]=void 0,e=0;e>5]|=(255&n.charCodeAt(e/8))<>>4&15)+r.charAt(15&t);return e}function r(n){return unescape(encodeURIComponent(n))}function o(n){return i(c(a(n=r(n)),8*n.length))}function u(n,t){return function(n,t){var r,e=a(n),o=[],u=[];for(o[15]=u[15]=void 0,16{const t=document.createElement("canvas"),e=t.getContext("2d"),o=[];let n=0,i=!1;const r=()=>{t.width=window.innerWidth,t.height=window.innerHeight},a=(t,e)=>Math.random()*(e-t)+t,d=t=>{if(POWERMODE.colorful){const t=a(0,360);return`hsla(${a(t-10,t+10)}, 100%, ${a(50,80)}%, 1)`}return window.getComputedStyle(t).color},l=()=>{const t=document.activeElement;if("TEXTAREA"===t.tagName||"INPUT"===t.tagName&&["text","email"].includes(t.type)){const{left:e,top:o}=t.getBoundingClientRect(),n=((t,e)=>{const o=null!=window.mozInnerScreenX,n=document.createElement("div");n.id="input-textarea-caret-position-mirror-div",document.body.appendChild(n);const i=n.style,r=window.getComputedStyle?getComputedStyle(t):t.currentStyle;i.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(i.wordWrap="break-word"),i.position="absolute",i.visibility="hidden",["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"].forEach((t=>{i[t]=r[t]})),o?t.scrollHeight>parseInt(r.height)&&(i.overflowY="scroll"):i.overflow="hidden",n.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(n.textContent=n.textContent.replace(/\s/g," "));const a=document.createElement("span");a.textContent=t.value.substring(e)||".",n.appendChild(a);const d={top:a.offsetTop+parseInt(r.borderTopWidth),left:a.offsetLeft+parseInt(r.borderLeftWidth)};return document.body.removeChild(n),d})(t,t.selectionEnd);return{x:n.left+e,y:n.top+o,color:d(t),element:t}}const e=window.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),o=t.startContainer.nodeType===Node.TEXT_NODE?t.startContainer.parentNode:t.startContainer,{left:n,top:i}=t.getBoundingClientRect();return{x:n,y:i,color:d(o),element:o}}return{x:0,y:0,color:"transparent",element:null}},s=()=>{i=!0,e.clearRect(0,0,t.width,t.height);let n=!1;const r=t.getBoundingClientRect();o.forEach((t=>{t.alpha<=.1||(t.velocity.y+=.075,t.x+=t.velocity.x,t.y+=t.velocity.y,t.alpha*=.96,e.globalAlpha=t.alpha,e.fillStyle=t.color,e.fillRect(Math.round(t.x-1.5)-r.left,Math.round(t.y-1.5)-r.top,3,3),n=!0)})),n?requestAnimationFrame(s):i=!1},c={colorful:!1,shake:!0,mobile:!1,init:()=>{!c.mobile&&/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)||(t.width=window.innerWidth,t.height=window.innerHeight,t.style.cssText="position:fixed;top:0;left:0;pointer-events:none;z-index:999999",document.body.appendChild(t),window.addEventListener("resize",r))},explode:()=>{const t=l();(t=>{const e=5+Math.round(10*Math.random());for(let d=0;d{if(POWERMODE.shake){const e=1+2*Math.random(),o=e*(Math.random()>.5?-1:1),n=e*(Math.random()>.5?-1:1);if(document.body.style.marginLeft=`${o}px`,document.body.style.marginTop=`${n}px`,!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName)setTimeout((()=>{document.body.style.marginLeft="",document.body.style.marginTop=""}),75);else{const e=t.style.position,i=t.style.transition;t.style.position="relative",t.style.transition="none",t.style.transform=`translate(${o}px, ${n}px)`,setTimeout((()=>{t.style.position=e,t.style.transition=i,t.style.transform="",document.body.style.marginLeft="",document.body.style.marginTop=""}),75)}}})(t.element),i||requestAnimationFrame(s)}};return c})();POWERMODE.init(),document.body.addEventListener("input",POWERMODE.explode); \ No newline at end of file diff --git a/pluginsSrc/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js b/pluginsSrc/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js deleted file mode 100644 index f20615a7..00000000 --- a/pluginsSrc/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js +++ /dev/null @@ -1 +0,0 @@ -"object"==typeof window&&(window.Ribbons=(()=>{const t=(t,o)=>Math.random()*(o-t)+t,o=()=>({width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,scrollY:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}),e=(t,o)=>({x:t,y:o}),i=(o,i,n)=>{const l=[],a=Math.random()>.5?"right":"left",r="right"===a?-200:i+200,s="random"===o.verticalPosition?t(0,n):"top"===o.verticalPosition?200:"bottom"===o.verticalPosition?n-200:n/2;let c=e(r,s),d=e(r,s);for(let r=0;r<1e3;r++){const s=t(-.2,1)*o.horizontalSpeed,h=t(-.5,.5)*(.25*n),p=e(d.x+("right"===a?s:-s),d.y+h);if("right"===a&&d.x>=i+200||"left"===a&&d.x<=-200)break;l.push({point1:{...c},point2:{...d},point3:p,color:r*o.colorCycleSpeed,delay:4*r,dir:a,alpha:0,phase:0}),c={...d},d={...p}}return l},n=(t,o,e,i)=>{if(o.phase>=1&&o.alpha<=0)return!0;if(o.delay<=0){if(o.phase+=.02,o.alpha=Math.sin(o.phase),o.alpha=Math.max(0,Math.min(o.alpha,1)),e.animateSections){const t=.1*Math.sin(1+o.phase*Math.PI/2),e="right"===o.dir?t:-t;o.point1.x+=e,o.point2.x+=e,o.point3.x+=e,o.point1.y+=t,o.point2.y+=t,o.point3.y+=t}}else o.delay-=.5;const n=`hsla(${o.color}, ${e.colorSaturation}, ${e.colorBrightness}, ${o.alpha*e.colorAlpha})`;return t.save(),0!==e.parallaxAmount&&t.translate(0,i*e.parallaxAmount),t.beginPath(),t.moveTo(o.point1.x,o.point1.y),t.lineTo(o.point2.x,o.point2.y),t.lineTo(o.point3.x,o.point3.y),t.fillStyle=n,t.fill(),e.strokeSize>0&&(t.lineWidth=e.strokeSize,t.strokeStyle=n,t.lineCap="round",t.stroke()),t.restore(),!1};return(t={})=>{const e={colorSaturation:"80%",colorBrightness:"60%",colorAlpha:.65,colorCycleSpeed:6,verticalPosition:"center",horizontalSpeed:150,ribbonCount:3,strokeSize:0,parallaxAmount:-.5,animateSections:!0,...t};let l,a,r,s,c;const d=[],h=()=>{({width:r,height:s}=o()),l.width=r,l.height=s,a.globalAlpha=e.colorAlpha},p=()=>{({scrollY:c}=o())},m=()=>{a.clearRect(0,0,r,s),d.forEach(((t,o)=>{t=t.filter((t=>!n(a,t,e,c))),d[o]=t.length?t:null})),d.forEach(((t,o)=>{t||(d[o]=i(e,r,s))})),requestAnimationFrame(m)};(()=>{l=document.createElement("canvas"),a=l.getContext("2d"),l.style.cssText="display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:-1;",document.body.appendChild(l),h();for(let t=0;t{const t=document.getElementById("canvas_nest");if("false"===t.getAttribute("mobile")&&/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent))return;const e=(t,e,n)=>t.getAttribute(e)||n,n={zIndex:e(t,"zIndex",-1),opacity:e(t,"opacity",.5),color:e(t,"color","0,0,0"),count:e(t,"count",99)},o=(()=>{const t=document.createElement("canvas");return t.style.cssText=`position:fixed;top:0;left:0;z-index:${n.zIndex};opacity:${n.opacity}`,document.body.appendChild(t),t})(),i=o.getContext("2d");let c,a;const d=()=>{c=o.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=o.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},l=[],m={x:null,y:null,max:2e4},r=()=>{i.clearRect(0,0,c,a);const t=[m].concat(l);l.forEach((e=>{e.x+=e.xa,e.y+=e.ya,e.xa*=e.x>c||e.x<0?-1:1,e.ya*=e.y>a||e.y<0?-1:1,i.fillRect(e.x-.5,e.y-.5,1,1),t.forEach((t=>{if(e!==t&&null!==t.x&&null!==t.y){const o=e.x-t.x,c=e.y-t.y,a=o*o+c*c;if(a=t.max/2&&(e.x-=.03*o,e.y-=.03*c);const d=(t.max-a)/t.max;i.beginPath(),i.lineWidth=d/2,i.strokeStyle=`rgba(${n.color},${d+.2})`,i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke()}}})),t.splice(t.indexOf(e),1)})),requestAnimationFrame(r)};d(),window.onresize=d,window.onmousemove=t=>{m.x=t.clientX,m.y=t.clientY},window.onmouseout=()=>{m.x=null,m.y=null},(()=>{for(let t=0;t{const e=document.getElementById("ribbon"),t=/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent);if("false"===e.getAttribute("mobile")&&t)return;const i=(e,t,i)=>Number(e.getAttribute(t))||i,n={zIndex:i(e,"zIndex",-1),alpha:i(e,"alpha",.6),size:i(e,"size",90),clickToRedraw:"false"!==e.getAttribute("data-click")},o=document.createElement("canvas"),a=o.getContext("2d"),{devicePixelRatio:c=1}=window,{innerWidth:l,innerHeight:d}=window,r=n.size;o.width=l*c,o.height=d*c,a.scale(c,c),a.globalAlpha=n.alpha,o.style.cssText=`opacity: ${n.alpha}; position: fixed; top: 0; left: 0; z-index: ${n.zIndex}; width: 100%; height: 100%; pointer-events: none;`,document.body.appendChild(o);let h=[{x:0,y:.7*d+r},{x:0,y:.7*d-r}],s=0;const x=2*Math.PI,y=e=>{const t=e+(2*Math.random()-1.1)*r;return t>d||t<0?y(e):t},g=(e,t)=>{a.beginPath(),a.moveTo(e.x,e.y),a.lineTo(t.x,t.y);const i=t.x+(2*Math.random()-.25)*r,n=y(t.y);a.lineTo(i,n),a.closePath(),s-=x/-50,a.fillStyle="#"+(127*Math.cos(s)+128<<16|127*Math.cos(s+x/3)+128<<8|127*Math.cos(s+x/3*2)+128).toString(16),a.fill(),h[0]=h[1],h[1]={x:i,y:n}},u=()=>{for(a.clearRect(0,0,l,d),h=[{x:0,y:.7*d+r},{x:0,y:.7*d-r}];h[1].x{const e=document.getElementById("click-heart"),t=/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent);if("false"===e.getAttribute("mobile")&&t)return;const n=[],a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||(e=>setTimeout(e,1e3/60)),o=()=>{n.forEach(((e,t)=>{if(e.alpha<=0)return document.body.removeChild(e.el),void n.splice(t,1);e.y--,e.scale+=.004,e.alpha-=.013,e.el.style.cssText=`\n left: ${e.x}px;\n top: ${e.y}px;\n opacity: ${e.alpha};\n transform: scale(${e.scale}) rotate(45deg);\n background: ${e.color};\n `})),a(o)},i=e=>{const t=document.createElement("div");t.className="heart",n.push({el:t,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:r()}),document.body.appendChild(t)},r=()=>`rgb(${~~(255*Math.random())},${~~(255*Math.random())},${~~(255*Math.random())})`;(()=>{const e=document.createElement("style");e.textContent="\n .heart {\n width: 10px;\n height: 10px;\n position: fixed;\n background: #f00;\n z-index: 99999999;\n transform: rotate(45deg);\n }\n .heart:after, .heart:before {\n content: '';\n width: inherit;\n height: inherit;\n background: inherit;\n border-radius: 50%;\n position: absolute;\n }\n .heart:after { top: -5px; }\n .heart:before { left: -5px; }\n ",document.head.appendChild(e),window.addEventListener("click",i),o()})()})(); \ No newline at end of file diff --git a/pluginsSrc/butterfly-extsrc/dist/click-show-text.min.js b/pluginsSrc/butterfly-extsrc/dist/click-show-text.min.js deleted file mode 100644 index 495eec06..00000000 --- a/pluginsSrc/butterfly-extsrc/dist/click-show-text.min.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{const t=document.getElementById("click-show-text"),e={mobile:t.getAttribute("data-mobile")||t.getAttribute("mobile"),text:t.getAttribute("data-text")||GLOBAL_CONFIG.ClickShowText.text,fontSize:t.getAttribute("data-fontsize")||GLOBAL_CONFIG.ClickShowText.fontSize,random:t.getAttribute("data-random")||GLOBAL_CONFIG.ClickShowText.random};if("false"===e.mobile&&/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent))return;const n=e.text.split(",");let o=0;document.body.addEventListener("click",(t=>{const i=document.createElement("span");o="true"===e.random?Math.floor(Math.random()*n.length):(o+1)%n.length,i.textContent=n[o];const{pageX:a,pageY:r}=t,{clientWidth:l}=document.documentElement;i.style.position="absolute",i.style.visibility="hidden",document.body.appendChild(i);const d=i.offsetWidth,s=Math.min(Math.max(a-d/2,10),l-d-10);i.style.cssText=`\n z-index: 150;\n top: ${r-20}px;\n left: ${s}px;\n position: absolute;\n font-weight: bold;\n color: ${"#"+Array.from({length:6},(()=>"0123456789abcdef"[Math.floor(16*Math.random())])).join("")};\n cursor: default;\n font-size: ${e.fontSize||"inherit"};\n word-break: break-word;\n visibility: visible;\n `;const c=performance.now(),m=t=>{const e=t-c;if(e<600){const t=e/600;i.style.top=r-20-20*t+"px",i.style.opacity=1-t,requestAnimationFrame(m)}else i.remove()};requestAnimationFrame(m)}))})(); \ No newline at end of file diff --git a/pluginsSrc/butterfly-extsrc/dist/fireworks.min.js b/pluginsSrc/butterfly-extsrc/dist/fireworks.min.js deleted file mode 100644 index 06747e01..00000000 --- a/pluginsSrc/butterfly-extsrc/dist/fireworks.min.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{const n=document.querySelector(".fireworks");if(!n)return;const e="false"===n.getAttribute("mobile"),t=/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent);if(e&&t)return;(()=>{var n,e;n=this,e=function(){"use strict";var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},e={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},t=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],r={CSS:{},springs:{}};function a(n,e,t){return Math.min(Math.max(n,e),t)}function o(n,e){return-1{const{innerWidth:e,innerHeight:t}=window;n.width=e,n.height=t,n.style.width=`${e}px`,n.style.height=`${t}px`,r.scale(1,1)}),500),s=anime({duration:1/0,update:()=>{r.clearRect(0,0,n.width,n.height)}}),c="ontouchstart"in window||navigator.maxTouchPoints?"touchstart":"mousedown";document.addEventListener(c,(n=>{["sidebar","toggle-sidebar"].includes(n.target.id)||["A","IMG"].includes(n.target.nodeName)||(s.play(),l(n),h(o,i))}),!1),u(),window.addEventListener("resize",u,!1);const l=e=>{const t=n.getBoundingClientRect();o=(e.clientX||e.touches[0].clientX)-t.left,i=(e.clientY||e.touches[0].clientY)-t.top},d=n=>{const e=anime.random(0,360)*Math.PI/180,t=anime.random(50,180),r=[-1,1][anime.random(0,1)]*t;return{x:n.x+r*Math.cos(e),y:n.y+r*Math.sin(e)}},f=n=>{n.animatables.forEach((n=>n.target.draw()))},h=(n,e)=>{const t=((n,e)=>{const t={x:n,y:e,color:"#F00",radius:.1,alpha:.5,lineWidth:6,draw:()=>{r.globalAlpha=t.alpha,r.beginPath(),r.arc(t.x,t.y,t.radius,0,2*Math.PI,!0),r.lineWidth=t.lineWidth,r.strokeStyle=t.color,r.stroke(),r.globalAlpha=1}};return t})(n,e),o=Array.from({length:30},(()=>((n,e)=>{const t={x:n,y:e,color:a[anime.random(0,a.length-1)],radius:anime.random(16,32),endPos:d({x:n,y:e}),draw:()=>{r.beginPath(),r.arc(t.x,t.y,t.radius,0,2*Math.PI,!0),r.fillStyle=t.color,r.fill()}};return t})(n,e)));anime.timeline().add({targets:o,x:n=>n.endPos.x,y:n=>n.endPos.y,radius:.1,duration:anime.random(1200,1800),easing:"easeOutExpo",update:f}).add({targets:t,radius:anime.random(80,160),lineWidth:0,alpha:{value:0,easing:"linear",duration:anime.random(600,800)},duration:anime.random(1200,1800),easing:"easeOutExpo",update:f},0)}})(); \ No newline at end of file diff --git a/pluginsSrc/butterfly-extsrc/metingjs/dist/Meting.min.js b/pluginsSrc/butterfly-extsrc/metingjs/dist/Meting.min.js deleted file mode 100644 index b471e592..00000000 --- a/pluginsSrc/butterfly-extsrc/metingjs/dist/Meting.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";console.log("\n %c MetingJS v1.2.0 %c https://github.com/metowolf/MetingJS \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;");var aplayers=[],loadMeting=function(){function a(a,t){var e={container:a,audio:t,mini:null,fixed:null,autoplay:!1,mutex:!0,lrcType:3,listFolded:!1,preload:"auto",theme:"#2980b9",loop:"all",order:"list",volume:null,listMaxHeight:null,customAudioType:null,storageName:"metingjs"};if(t.length){t[0].lrc||(e.lrcType=0);var r={};for(var s in e){var n=s.toLowerCase();(a.dataset.hasOwnProperty(n)||a.dataset.hasOwnProperty(s)||null!==e[s])&&(r[s]=a.dataset[n]||a.dataset[s]||e[s],"true"!==r[s]&&"false"!==r[s]||(r[s]="true"==r[s]))}aplayers.push(new APlayer(r))}}var t="https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r";"undefined"!=typeof meting_api&&(t=meting_api);for(var e=0;e=200&&o.status<300||304===o.status)){var t=JSON.parse(o.responseText);a(e,t)}},o.open("get",n,!0),o.send(null)}else if(e.dataset.url){var l=[{name:e.dataset.name||e.dataset.title||"Audio name",artist:e.dataset.artist||e.dataset.author||"Audio artist",url:e.dataset.url,cover:e.dataset.cover||e.dataset.pic,lrc:e.dataset.lrc,type:e.dataset.type||"auto"}];a(e,l)}})()}};document.addEventListener("DOMContentLoaded",loadMeting,!1); diff --git a/pluginsSrc/butterfly-extsrc/sharejs/dist/css/share.min.css b/pluginsSrc/butterfly-extsrc/sharejs/dist/css/share.min.css deleted file mode 100644 index 13549a1f..00000000 --- a/pluginsSrc/butterfly-extsrc/sharejs/dist/css/share.min.css +++ /dev/null @@ -1,190 +0,0 @@ -@font-face { - font-family: "iconfont"; - src: url("../fonts/iconfont.woff2") format("woff2"), url("../fonts/iconfont.woff") format("woff"), url("../fonts/iconfont.ttf") format("truetype"); -} -.social-share { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; - -moz-osx-font-smoothing: grayscale; -} -.social-share * { - font-family: "iconfont" !important; -} -.social-share .icon-qq:before { - content: "\e882"; -} -.social-share .icon-weibo:before { - content: "\e884"; -} -.social-share .icon-wechat:before { - content: "\e604"; -} -.social-share .icon-heart:before { - content: "\e69d"; -} -.social-share .icon-like:before { - content: "\e602"; -} -.social-share .icon-qzone:before { - content: "\e603"; -} -.social-share .icon-linkedin:before { - content: "\e8d5"; -} -.social-share .icon-facebook:before { - content: "\e6a1"; -} -.social-share .icon-x:before { - content: "\e75c"; -} -.social-share .icon-twitter:before { - content: "\e883"; -} -.social-share a { - position: relative; - text-decoration: none; - margin: 4px; - display: inline-block; - outline: none; -} -.social-share .social-share-icon { - position: relative; - display: inline-block; - width: 32px; - height: 32px; - font-size: 20px; - border-radius: 50%; - line-height: 32px; - border: 1px solid #666; - color: #666; - text-align: center; - vertical-align: middle; - transition: background 0.6s ease-out 0s; -} -.social-share .social-share-icon:hover { - background: #666; - color: #fff; -} -.social-share .icon-weibo { - color: #ff763b; - border-color: #ff763b; -} -.social-share .icon-weibo:hover { - background: #ff763b; -} -.social-share .icon-qq { - color: #56b6e7; - border-color: #56b6e7; -} -.social-share .icon-qq:hover { - background: #56b6e7; -} -.social-share .icon-qzone { - color: #fdbe3d; - border-color: #fdbe3d; -} -.social-share .icon-qzone:hover { - background: #fdbe3d; -} -.social-share .icon-linkedin { - color: #0077b5; - border-color: #0077b5; -} -.social-share .icon-linkedin:hover { - background: #0077b5; -} -.social-share .icon-facebook { - color: #44619d; - border-color: #44619d; -} -.social-share .icon-facebook:hover { - background: #44619d; -} -.social-share .icon-x { - color: #000000; - border-color: #000000; -} -.social-share .icon-x:hover { - background: #000000; -} -.social-share .icon-twitter { - color: #1da1f2; - border-color: #1da1f2; -} -.social-share .icon-twitter:hover { - background: #1da1f2; -} -.social-share .icon-wechat { - position: relative; - color: #7bc549; - border-color: #7bc549; -} -.social-share .icon-wechat:hover { - background: #7bc549; -} -.social-share .icon-wechat .wechat-qrcode { - display: none; - border: 1px solid #eee; - position: absolute; - z-index: 9; - top: -205px; - left: -84px; - width: 200px; - height: 192px; - color: #666; - font-size: 12px; - text-align: center; - background-color: #fff; - box-shadow: 0 2px 10px #aaa; - transition: all 200ms; - -webkit-tansition: all 350ms; - -moz-transition: all 350ms; -} -.social-share .icon-wechat .wechat-qrcode.bottom { - top: 40px; - left: -84px; -} -.social-share .icon-wechat .wechat-qrcode.bottom:after { - display: none; -} -.social-share .icon-wechat .wechat-qrcode h4 { - font-weight: normal; - height: 26px; - line-height: 26px; - font-size: 12px; - background-color: #f3f3f3; - margin: 0; - padding: 0; - color: #777; -} -.social-share .icon-wechat .wechat-qrcode .qrcode { - width: 105px; - margin: 10px auto; -} -.social-share .icon-wechat .wechat-qrcode .qrcode table { - margin: 0 !important; -} -.social-share .icon-wechat .wechat-qrcode .help p { - font-weight: normal; - line-height: 16px; - padding: 0; - margin: 0; -} -.social-share .icon-wechat .wechat-qrcode:after { - content: ""; - position: absolute; - left: 50%; - margin-left: -6px; - bottom: -13px; - width: 0; - height: 0; - border-width: 8px 6px 6px 6px; - border-style: solid; - border-color: #fff transparent transparent transparent; -} -.social-share .icon-wechat:hover .wechat-qrcode { - display: block; -} \ No newline at end of file diff --git a/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.ttf b/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.ttf deleted file mode 100644 index 8eda6e9a..00000000 Binary files a/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.ttf and /dev/null differ diff --git a/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.woff b/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.woff deleted file mode 100644 index 91f0b59b..00000000 Binary files a/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.woff and /dev/null differ diff --git a/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.woff2 b/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.woff2 deleted file mode 100644 index 3a04d3f8..00000000 Binary files a/pluginsSrc/butterfly-extsrc/sharejs/dist/fonts/iconfont.woff2 and /dev/null differ diff --git a/pluginsSrc/butterfly-extsrc/sharejs/dist/js/social-share.min.js b/pluginsSrc/butterfly-extsrc/sharejs/dist/js/social-share.min.js deleted file mode 100644 index 4747136d..00000000 --- a/pluginsSrc/butterfly-extsrc/sharejs/dist/js/social-share.min.js +++ /dev/null @@ -1 +0,0 @@ -var QRCode;(()=>{function e(t){this.mode=o.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e>>18,i[1]=128|(258048&n)>>>12,i[2]=128|(4032&n)>>>6,i[3]=128|63&n):2048>>12,i[1]=128|(4032&n)>>>6,i[2]=128|63&n):128>>6,i[1]=128|63&n):i[0]=n,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function h(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}e.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=i}for(r=0;r<18;r++){i=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=i}},setupTypeInfo:function(t,e){for(var e=this.errorCorrectLevel<<3|e,r=m.getBCHTypeInfo(e),i=0;i<15;i++){var n=!t&&1==(r>>i&1);i<6?this.modules[i][8]=n:i<8?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(i=0;i<15;i++){n=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=n:i<9?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,i=this.moduleCount-1,n=7,o=0,a=this.moduleCount-1;0>>n&1)),h=m.getMask(e,i,a-l),this.modules[i][a-l]=s=h?!s:s,-1==--n)&&(o++,n=7);if((i+=r)<0||this.moduleCount<=i){i-=r,r=-r;break}}}},h.PAD0=236,h.PAD1=17,h.createData=function(t,e,r){for(var i=p.getRSBlocks(t,e),n=new w,o=0;o8*s)throw new Error("code length overflow. ("+n.getLengthInBits()+">"+8*s+")");for(n.getLengthInBits()+4<=8*s&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;;){if(n.getLengthInBits()>=8*s)break;if(n.put(h.PAD0,8),n.getLengthInBits()>=8*s)break;n.put(h.PAD1,8)}return h.createBytes(n,i)},h.createBytes=function(t,e){for(var r=0,i=0,n=0,o=new Array(e.length),a=new Array(e.length),s=0;s>>=1;return e},getPatternPosition:function(t){return m.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case i:return(e+r)%2==0;case n:return e%2==0;case a:return r%3==0;case s:return(e+r)%3==0;case u:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case c:return e*r%2+e*r%3==0;case d:return(e*r%2+e*r%3)%2==0;case f:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new v([1],0),r=0;r>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var _=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function C(){var t=!1,e=navigator.userAgent;return t=/android/i.test(e)&&(t=!0,e=e.toString().match(/android ([0-9]\.[0-9])/i))&&e[1]?parseFloat(e[1]):t}r.prototype.draw=function(t){var e=this._htOption,r=this._el,i=t.getModuleCount();Math.floor(e.width/i),Math.floor(e.height/i);function n(t,e){var r,i=document.createElementNS("http://www.w3.org/2000/svg",t);for(r in e)e.hasOwnProperty(r)&&i.setAttribute(r,e[r]);return i}this.clear();var o=n("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:e.colorLight});o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.appendChild(o),o.appendChild(n("rect",{fill:e.colorLight,width:"100%",height:"100%"})),o.appendChild(n("rect",{fill:e.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;a'],s=0;s");for(var h=0;h');a.push("")}a.push(""),r.innerHTML=a.join("");var r=r.childNodes[0],l=(e.width-r.offsetWidth)/2,u=(e.height-r.offsetHeight)/2;0{let h=Array.prototype.indexOf,l=Object.assign,u=/MicroMessenger/i.test(navigator.userAgent),c=o.documentElement.clientWidth<=768;var{image:t,site:e,title:r,description:i}={image:(o.images[0]||{}).src||"",site:m("site")||m("Site")||o.title,title:m("title")||m("Title")||o.title,description:m("description")||m("Description")||""};let d={url:location.href,origin:location.origin,source:e,title:r,description:i,image:t,imageSelector:s,weiboKey:"",wechatQrcodeTitle:"微信扫一扫:分享",wechatQrcodeHelper:"

      微信里点“发现”,扫一下

      二维码便可将本文分享至朋友圈。

      ",wechatQrcodeSize:100,sites:["weibo","qq","wechat","qzone","linkedin","facebook","x","twitter"],mobileSites:[],disabled:[],initialized:!1},f={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}&pics={{IMAGE}}",qq:'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"',weibo:"https://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}",x:"https://x.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}"};n.socialShare=function(t,a){_(t=(t="string"==typeof t?g(t):t).length===s?[t]:t,function(e){if(!e.initialized){var r=a,t=((r=function(){var t=arguments;if(l)return l.apply(null,t);let r={};return _(t,function(t){_(t,function(t,e){r[e]=t})}),t[0]=r}({},d,r||{},(t=>{if(t.dataset)return JSON.parse(JSON.stringify(t.dataset));let r={};return t.hasAttributes()?(_(t.attributes,function(t){let e=t.name;if(0!==e.indexOf("data-"))return!0;e=e.replace(/^data-/i,"").replace(/-(\w)/g,function(t,e){return e.toUpperCase()}),r[e]=t.value}),r):{}})(e))).imageSelector&&(r.image=g(r.imageSelector).map(function(t){return t.src}).join("||")),e),i="share-component social-share";if(i&&"string"==typeof i){i=(t.className+" "+i).split(/\s+/);let e=" ";_(i,function(t){e.indexOf(" "+t+" ")<0&&(e+=t+" ")}),t.className=e.slice(1,-1)}{var n=e,o=r;let t=(t=>{t.mobileSites.length||(t.mobileSites=t.sites);let e=(c?t.mobileSites:t.sites).slice(0),r=t.disabled;return"string"==typeof e&&(e=e.split(/\s*,\s*/)),"string"==typeof r&&(r=r.split(/\s*,\s*/)),u&&r.push("wechat"),r.length&&_(r,function(t){e.splice(((t,e,r)=>{var i;if(e){if(h)return h.call(e,t,r);for(i=e.length,r=r?r<0?Math.max(0,i+r):r:0;r(o.summary||(o.summary=o.description),f[n].replace(/\{\{(\w)(\w*)\}\}/g,function(t,e,r){var i=n+e+r.toLowerCase(),e=(e+r).toLowerCase();return encodeURIComponent((o[i]===s?o[e]:o[i])||"")})))(t,o),r=o.initialized?v(n,"icon-"+t):w('');if(!r.length)return!0;r[0].href=e,"wechat"===t?r[0].tabindex=-1:r[0].target="_blank",o.initialized||(i?n.insertBefore(r[0],n.firstChild):n.appendChild(r[0]))})}((t,e)=>{if(0===(t=v(t,"icon-wechat","a")).length)return;var r=w('

      '+e.wechatQrcodeTitle+'

      '+e.wechatQrcodeHelper+"
      "),i=v(r[0],"qrcode","div");new QRCode(i[0],{text:e.url,width:e.wechatQrcodeSize,height:e.wechatQrcodeSize}),t[0].appendChild(r[0])})(e,r),e.initialized=!0}})};{var a=function(){socialShare(".social-share, .share-component")};let r="addEventListener",i=o[r]?"":"on";~o.readyState.indexOf("m")?a():"load DOMContentLoaded readystatechange".replace(/\w+/g,function(t,e){(e?o:n)[i?"attachEvent":r](i+t,function(){a&&(e<6||~o.readyState.indexOf("m"))&&(a(),a=0)},!1)})}function g(t){return(o.querySelectorAll||n.jQuery||n.Zepto||p).call(o,t)}function p(e){const r=[];return _(e.split(/\s*,\s*/),function(t){var t=t.match(/([#.])(\w+)/);if(null===t)throw Error("Supports only simple single #ID or .CLASS selector.");t[1]&&(t=o.getElementById(t[2]))&&r.push(t),r=r.concat(v(e))}),r}function m(t){return(o.getElementsByName(t)[0]||0).content}function v(t,e,r){if(t.getElementsByClassName)return t.getElementsByClassName(e);let i=[];t=t.getElementsByTagName(r||"*");let n=" "+e+" ";return _(t,function(t){0<=(" "+(t.className||"")+" ").indexOf(n)&&i.push(t)}),i}function w(t){var e=o.createElement("div");return e.innerHTML=t,e.childNodes}function _(e,r){var i=e.length;if(i===s){for(var t in e)if(e.hasOwnProperty(t)&&!1===r.call(e[t],e[t],t))break}else for(let t=0;t{let t=0;return()=>t++})();function s(t){return null==t}function n(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function o(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function r(t,e){return a(t)?t:e}function l(t,e){return void 0===t?e:t}const h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,c=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function d(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function u(t,e,i,s){let a,r,l;if(n(t))if(r=t.length,s)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;at,x:t=>t.x,y:t=>t.y};function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function M(t,e){const i=y[e]||(y[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}const k=t=>void 0!==t,S=t=>"function"==typeof t,P=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function D(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const C=Math.PI,O=2*C,A=O+C,T=Number.POSITIVE_INFINITY,L=C/180,E=C/2,R=C/4,I=2*C/3,z=Math.log10,F=Math.sign;function V(t,e,i){return Math.abs(t-e)t-e)).pop(),e}function N(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function H(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function j(t,e,i){let s,n,o;for(s=0,n=t.length;sl&&h=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function et(t,e,i){i=i||(i=>t[i]1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const it=(t,e,i,s)=>et(t,i,s?s=>{const n=t[s][e];return nt[s][e]et(t,i,(s=>t[s][e]>=i));function nt(t,e,i){let s=0,n=t.length;for(;ss&&t[n-1]>i;)n--;return s>0||n{const i="_onData"+w(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function rt(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(ot.forEach((e=>{delete t[e]})),delete t._chartjs)}function lt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const ht="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function ct(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,ht.call(window,(()=>{s=!1,t.apply(e,i)})))}}function dt(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}const ut=t=>"start"===t?"left":"end"===t?"right":"center",ft=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,gt=(t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e;function pt(t,e,i){const n=e.length;let o=0,a=n;if(t._sorted){const{iScale:r,vScale:l,_parsed:h}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=r.axis,{min:u,max:f,minDefined:g,maxDefined:p}=r.getUserBounds();if(g){if(o=Math.min(it(h,d,u).lo,i?n:it(e,d,r.getPixelForValue(u)).lo),c){const t=h.slice(0,o+1).reverse().findIndex((t=>!s(t[l.axis])));o-=Math.max(0,t)}o=Z(o,0,n-1)}if(p){let t=Math.max(it(h,r.axis,f,!0).hi+1,i?0:it(e,d,r.getPixelForValue(f),!0).hi+1);if(c){const e=h.slice(t-1).findIndex((t=>!s(t[l.axis])));t+=Math.max(0,e)}a=Z(t,o,n)-o}else a=n-o}return{start:o,count:a}}function mt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}class xt{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],o=e.duration;n.forEach((s=>s({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=ht.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var bt=new xt; -/*! - * @kurkle/color v0.3.2 - * https://github.com/kurkle/color#readme - * (c) 2023 Jukka Kurkela - * Released under the MIT License - */function _t(t){return t+.5|0}const yt=(t,e,i)=>Math.max(Math.min(t,i),e);function vt(t){return yt(_t(2.55*t),0,255)}function Mt(t){return yt(_t(255*t),0,255)}function wt(t){return yt(_t(t/2.55)/100,0,1)}function kt(t){return yt(_t(100*t),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Pt=[..."0123456789ABCDEF"],Dt=t=>Pt[15&t],Ct=t=>Pt[(240&t)>>4]+Pt[15&t],Ot=t=>(240&t)>>4==(15&t);function At(t){var e=(t=>Ot(t.r)&&Ot(t.g)&&Ot(t.b)&&Ot(t.a))(t)?Dt:Ct;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Tt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Et(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Rt(t,e,i){const s=Lt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function It(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const $t=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Yt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Ut=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Xt(t,e,i){if(t){let s=It(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=Ft(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function qt(t,e){return t?Object.assign(e||{},t):t}function Kt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Mt(t[3]))):(e=qt(t,{r:0,g:0,b:0,a:1})).a=Mt(e.a),e}function Gt(t){return"r"===t.charAt(0)?function(t){const e=$t.exec(t);let i,s,n,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?vt(t):yt(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?vt(i):yt(i,0,255)),s=255&(e[4]?vt(s):yt(s,0,255)),n=255&(e[6]?vt(n):yt(n,0,255)),{r:i,g:s,b:n,a:o}}}(t):Bt(t)}class Jt{constructor(t){if(t instanceof Jt)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=Kt(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*St[s[1]],g:255&17*St[s[2]],b:255&17*St[s[3]],a:5===o?17*St[s[4]]:255}:7!==o&&9!==o||(n={r:St[s[1]]<<4|St[s[2]],g:St[s[3]]<<4|St[s[4]],b:St[s[5]]<<4|St[s[6]],a:9===o?St[s[7]]<<4|St[s[8]]:255})),i=n||jt(t)||Gt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=qt(this._rgb);return t&&(t.a=wt(t.a)),t}set rgb(t){this._rgb=Kt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${wt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?At(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=It(t),i=e[0],s=kt(e[1]),n=kt(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${wt(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,l=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-l,i.r=255&l*i.r+n*s.r+.5,i.g=255&l*i.g+n*s.g+.5,i.b=255&l*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=Ut(wt(t.r)),n=Ut(wt(t.g)),o=Ut(wt(t.b));return{r:Mt(Yt(s+i*(Ut(wt(e.r))-s))),g:Mt(Yt(n+i*(Ut(wt(e.g))-n))),b:Mt(Yt(o+i*(Ut(wt(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Jt(this.rgb)}alpha(t){return this._rgb.a=Mt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Xt(this._rgb,2,t),this}darken(t){return Xt(this._rgb,2,-t),this}saturate(t){return Xt(this._rgb,1,t),this}desaturate(t){return Xt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=It(t);i[0]=Vt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Zt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Qt(t){return Zt(t)?t:new Jt(t)}function te(t){return Zt(t)?t:new Jt(t).saturate(.5).darken(.1).hexString()}const ee=["x","y","borderWidth","radius","tension"],ie=["color","borderColor","backgroundColor"];const se=new Map;function ne(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=se.get(i);return s||(s=new Intl.NumberFormat(t,e),se.set(i,s)),s}(e,i).format(t)}const oe={values:t=>n(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=z(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ne(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=i[e].significand||t/Math.pow(10,Math.floor(z(t)));return[1,2,3,5,10,15].includes(s)||e>.8*i.length?oe.numeric.call(this,t,e,i):""}};var ae={formatters:oe};const re=Object.create(null),le=Object.create(null);function he(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>te(e.backgroundColor),this.hoverBorderColor=(t,e)=>te(e.borderColor),this.hoverColor=(t,e)=>te(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ce(this,t,e)}get(t){return he(this,t)}describe(t,e){return ce(le,t,e)}override(t,e){return ce(re,t,e)}route(t,e,i,s){const n=he(this,t),a=he(this,i),r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=a[s];return o(t)?Object.assign({},e,t):l(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ue=new de({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:ie},numbers:{type:"number",properties:ee}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ae.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function fe(){return"undefined"!=typeof window&&"undefined"!=typeof document}function ge(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function pe(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const me=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function xe(t,e){return me(t).getPropertyValue(e)}const be=["top","right","bottom","left"];function _e(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=be[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const ye=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function ve(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=me(i),o="border-box"===n.boxSizing,a=_e(n,"padding"),r=_e(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,l=!1;if(ye(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,l=!0}return{x:a,y:r,box:l}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:g}=e;return o&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/s),y:Math.round((h-u)/g*i.height/s)}}const Me=t=>Math.round(10*t)/10;function we(t,e,i,s){const n=me(t),o=_e(n,"margin"),a=pe(n.maxWidth,t,"clientWidth")||T,r=pe(n.maxHeight,t,"clientHeight")||T,l=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=t&&ge(t);if(o){const t=o.getBoundingClientRect(),a=me(o),r=_e(a,"border","width"),l=_e(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,s=pe(a.maxWidth,o,"clientWidth"),n=pe(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||T,maxHeight:n||T}}(t,e,i);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=_e(n,"border","width"),e=_e(n,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-o.width),c=Math.max(0,s?h/s:c-o.height),h=Me(Math.min(h,a,l.maxWidth)),c=Me(Math.min(c,r,l.maxHeight)),h&&!c&&(c=Me(h/2));return(void 0!==e||void 0!==i)&&s&&l.height&&c>l.height&&(c=l.height,h=Me(Math.floor(c*s))),{width:h,height:c}}function ke(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const Se=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};fe()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Pe(t,e){const i=xe(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function De(t){return!t||s(t.size)||s(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ce(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function Oe(t,e,i,s){let o=(s=s||{}).data=s.data||{},a=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(o=s.data={},a=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0;const l=i.length;let h,c,d,u,f;for(h=0;hi.length){for(h=0;h0&&t.stroke()}}function Re(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==r.strokeColor;let c,d;for(t.save(),t.font=a.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),s(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),c=0;ct[0])){const o=i||t;void 0===s&&(s=ti("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:n,override:i=>je([i,...t],e,o,s)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>qe(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=ti(Ue(o,t),i),void 0!==n)return Xe(t,n)?Ze(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ei(t).includes(e),ownKeys:t=>ei(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function $e(t,e,i,s){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ye(t,s),setContext:e=>$e(t,e,i,s),override:n=>$e(t.override(n),e,i,s)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>qe(t,e,(()=>function(t,e,i){const{_proxy:s,_context:a,_subProxy:r,_descriptors:l}=t;let h=s[e];S(h)&&l.isScriptable(e)&&(h=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(o,a||s);r.delete(t),Xe(t,l)&&(l=Ze(n._scopes,n,t,l));return l}(e,h,t,i));n(h)&&h.length&&(h=function(t,e,i,s){const{_proxy:n,_context:a,_subProxy:r,_descriptors:l}=i;if(void 0!==a.index&&s(t))return e[a.index%e.length];if(o(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const o of i){const i=Ze(s,n,t,o);e.push($e(i,a,r&&r[t],l))}}return e}(e,h,t,l.isIndexable));Xe(e,h)&&(h=$e(h,a,r&&r[e],l));return h}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function Ye(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:S(i)?i:()=>i,isIndexable:S(s)?s:()=>s}}const Ue=(t,e)=>t?t+w(e):e,Xe=(t,e)=>o(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function qe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function Ke(t,e,i){return S(t)?t(e,i):t}const Ge=(t,e)=>!0===t?e:"string"==typeof t?M(e,t):void 0;function Je(t,e,i,s,n){for(const o of e){const e=Ge(i,o);if(e){t.add(e);const o=Ke(e._fallback,i,n);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function Ze(t,e,i,s){const a=e._rootScopes,r=Ke(e._fallback,i,s),l=[...t,...a],h=new Set;h.add(s);let c=Qe(h,l,i,r||i,s);return null!==c&&((void 0===r||r===i||(c=Qe(h,l,r,c,s),null!==c))&&je(Array.from(h),[""],a,r,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const a=s[e];if(n(a)&&o(i))return i;return a||{}}(e,i,s))))}function Qe(t,e,i,s,n){for(;i;)i=Je(t,e,i,s,n);return i}function ti(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function ei(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function ii(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,l,h,c;for(r=0,l=s;re"x"===t?"y":"x";function ai(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=q(o,n),l=q(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=s*h,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function ri(t,e="x"){const i=oi(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,l,h=ni(t,0);for(a=0;a!t.skip))),"monotone"===e.cubicInterpolationMode)ri(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;o0===t||1===t,di=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*O/i),ui=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*O/i)+1,fi={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*E),easeOutSine:t=>Math.sin(t*E),easeInOutSine:t=>-.5*(Math.cos(C*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ci(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ci(t)?t:di(t,.075,.3),easeOutElastic:t=>ci(t)?t:ui(t,.075,.3),easeInOutElastic(t){const e=.1125;return ci(t)?t:t<.5?.5*di(2*t,e,.45):.5+.5*ui(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-fi.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*fi.easeInBounce(2*t):.5*fi.easeOutBounce(2*t-1)+.5};function gi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function pi(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function mi(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=gi(t,n,i),r=gi(n,o,i),l=gi(o,e,i),h=gi(a,r,i),c=gi(r,l,i);return gi(h,c,i)}const xi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,bi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function _i(t,e){const i=(""+t).match(xi);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const yi=t=>+t||0;function vi(t,e){const i={},s=o(e),n=s?Object.keys(e):e,a=o(t)?s?i=>l(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=yi(a(t));return i}function Mi(t){return vi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function wi(t){return vi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ki(t){const e=Mi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Si(t,e){t=t||{},e=e||ue.font;let i=l(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=l(t.style,e.style);s&&!(""+s).match(bi)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:l(t.family,e.family),lineHeight:_i(l(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:l(t.weight,e.weight),string:""};return n.string=De(n),n}function Pi(t,e,i,s){let o,a,r,l=!0;for(o=0,a=t.length;oi&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function Ci(t,e){return Object.assign(Object.create(t),e)}function Oi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ai(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Ti(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Li(t){return"angle"===t?{between:J,compare:K,normalize:G}:{between:tt,compare:(t,e)=>t-e,normalize:t=>t}}function Ei({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function Ri(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:l,normalize:h}=Li(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=Li(s),l=e.length;let h,c,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,h=0,c=l;hb||l(n,x,p)&&0!==r(n,x),v=()=>!b||0===r(o,p)||l(o,x,p);for(let t=c,i=c;t<=d;++t)m=e[t%a],m.skip||(p=h(m[s]),p!==x&&(b=l(p,n,o),null===_&&y()&&(_=0===r(p,n)?t:i),null!==_&&v()&&(g.push(Ei({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(Ei({start:_,end:d,loop:u,count:a,style:f})),g}function Ii(t,e){const i=[],s=t.segments;for(let n=0;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);if(!0===s)return Fi(t,[{start:a,end:r,loop:o}],i,e);return Fi(t,function(t,e,i,s){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r!s(t[e.axis])));n.lo-=Math.max(0,a);const r=i.slice(n.hi).findIndex((t=>!s(t[e.axis])));n.hi+=Math.max(0,r)}return n}if(o._sharedOptions){const t=a[0],s="function"==typeof t.getRange&&t.getRange(e);if(s){const t=r(a,e,i-s),n=r(a,e,i+s);return{lo:t.lo,hi:n.hi}}}}return{lo:0,hi:a.length-1}}function $i(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t{t[a]&&t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var Ki={evaluateInteractionItems:$i,modes:{index(t,e,i,s){const n=ve(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?Yi(t,n,o,s,a):Xi(t,n,o,!1,s,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=ve(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?Yi(t,n,o,s,a):Xi(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tYi(t,ve(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=ve(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return Xi(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>qi(t,ve(e,t),"x",i.intersect,s),y:(t,e,i,s)=>qi(t,ve(e,t),"y",i.intersect,s)}};const Gi=["left","top","right","bottom"];function Ji(t,e){return t.filter((t=>t.pos===e))}function Zi(t,e){return t.filter((t=>-1===Gi.indexOf(t.pos)&&t.box.axis===e))}function Qi(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function ts(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Gi.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function os(t,e,i,s){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;ot.box.fullSize)),!0),s=Qi(Ji(e,"left"),!0),n=Qi(Ji(e,"right")),o=Qi(Ji(e,"top"),!0),a=Qi(Ji(e,"bottom")),r=Zi(e,"x"),l=Zi(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Ji(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;u(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),f=Object.assign({},n);is(f,ki(s));const g=Object.assign({maxPadding:f,w:o,h:a,x:n.left,y:n.top},n),p=ts(l.concat(h),d);os(r.fullSize,g,d,p),os(l,g,d,p),os(h,g,d,p)&&os(l,g,d,p),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),rs(r.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,rs(r.rightAndBottom,g,d,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},u(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class hs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class cs extends hs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ds="$chartjs",us={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fs=t=>null===t||""===t;const gs=!!Se&&{passive:!0};function ps(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,gs)}function ms(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function xs(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||ms(i.addedNodes,s),e=e&&!ms(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function bs(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||ms(i.removedNodes,s),e=e&&!ms(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const _s=new Map;let ys=0;function vs(){const t=window.devicePixelRatio;t!==ys&&(ys=t,_s.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Ms(t,e,i){const s=t.canvas,n=s&&ge(s);if(!n)return;const o=ct(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){_s.size||window.addEventListener("resize",vs),_s.set(t,e)}(t,o),a}function ws(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){_s.delete(t),_s.size||window.removeEventListener("resize",vs)}(t)}function ks(t,e,i){const s=t.canvas,n=ct((e=>{null!==t.ctx&&i(function(t,e){const i=us[t.type]||t.type,{x:s,y:n}=ve(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,gs)}(s,e,n),n}class Ss extends hs{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[ds]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",fs(n)){const e=Pe(t,"width");void 0!==e&&(t.width=e)}if(fs(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Pe(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ds])return!1;const i=e[ds].initial;["height","width"].forEach((t=>{const n=i[t];s(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[ds],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:xs,detach:bs,resize:Ms}[e]||ks;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:ws,detach:ws,resize:ws}[e]||ps)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return we(t,e,i,s)}isAttached(t){const e=t&&ge(t);return!(!e||!e.isConnected)}}function Ps(t){return!fe()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?cs:Ss}var Ds=Object.freeze({__proto__:null,BasePlatform:hs,BasicPlatform:cs,DomPlatform:Ss,_detectPlatform:Ps});const Cs="transparent",Os={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Qt(t||Cs),n=s.valid&&Qt(e||Cs);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class As{constructor(t,e,i,s){const n=e[i];s=Pi([t.to,s,n,t.from]);const o=Pi([t.from,n,s]);this._active=!0,this._fn=t.fn||Os[t.type||typeof o],this._easing=fi[t.easing]||fi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Pi([t.to,e,s,t.from]),this._from=Pi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t{const a=t[s];if(!o(a))return;const r={};for(const t of e)r[t]=a[t];(n(a.properties)&&a.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new As(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(bt.add(this._chart,i),!0):void 0}}function Ls(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Es(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function Vs(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let t=0;ti[t].axis===e)).shift()}function Ws(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const Ns=t=>"reset"===t||"none"===t,Hs=(t,e)=>e?t:Object.assign({},t);class js{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Is(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ws(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=l(i.xAxisID,Bs(t,"x")),o=e.yAxisID=l(i.yAxisID,Bs(t,"y")),a=e.rAxisID=l(i.rAxisID,Bs(t,"r")),r=e.indexAxis,h=e.iAxisID=s(r,n,o,a),c=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&rt(this._data,this),t._stacked&&Ws(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(o(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:s}=e,n="x"===i.axis?"x":"y",o="x"===s.axis?"x":"y",a=Object.keys(t),r=new Array(a.length);let l,h,c;for(l=0,h=a.length;l0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,d=s;else{d=n(s[t])?this.parseArrayData(i,s,t,e):o(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const a=()=>null===c[l]||f&&c[l]t&&!e.hidden&&e._stacked&&{keys:Es(i,!0),values:null})(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let u,f;function g(){f=s[u];const e=f[r.axis];return!a(f[t.axis])||c>e||d=0;--u)if(!g()){this.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s=0&&tthis.getContext(i,s,e)),c);return f.$shared&&(f.$shared=r,n[o]=Object.freeze(Hs(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const l=new Ts(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ns(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){Ns(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Ns(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;a{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function Ys(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),o=Math.min(i.maxTicksLimit||n,n),a=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;io)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nn)return e}return Math.max(n,1)}(a,e,o);if(r>0){let t,i;const n=r>1?Math.round((h-l)/(r-1)):null;for(Us(e,c,d,s(n)?0:l-n,l),t=0,i=r-1;t"top"===e||"left"===e?t[e]+i:t[e]-i,qs=(t,e)=>Math.min(e||t,t);function Ks(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return h}function Js(t){return t.drawTicks?t.tickLength:0}function Zs(t,e){if(!t.display)return 0;const i=Si(t.font,e),s=ki(t.padding);return(n(t.text)?t.text.length:1)*i.lineHeight+s.height}function Qs(t,e,i){let s=ut(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class tn extends $s{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=r(t,Number.POSITIVE_INFINITY),e=r(e,Number.NEGATIVE_INFINITY),i=r(i,Number.POSITIVE_INFINITY),s=r(s,Number.NEGATIVE_INFINITY),{min:r(t,i),max:r(e,s),minDefined:a(t),maxDefined:a(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;rs?s:i,s=n&&i>s?i:s,{min:r(i,r(s,i)),max:r(s,r(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){d(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Di(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=Z(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-Js(t.grid)-e.padding-Zs(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=Y(Math.min(Math.asin(Z((h.highest.height+6)/o,-1,1)),Math.asin(Z(a/r,-1,1))-Math.asin(Z(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){d(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){d(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Zs(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=Js(n)+o):(t.height=this.maxHeight,t.width=Js(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,l=$(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){d(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:r[t]||0,height:l[t]||0});return{first:P(0),last:P(e-1),widest:P(k),highest:P(S),widths:r,heights:l}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Q(this._alignToPixels?Ae(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:a,border:r}=s,h=n.offset,c=this.isHorizontal(),d=this.ticks.length+(h?1:0),u=Js(n),f=[],g=r.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,x=function(t){return Ae(i,t,p)};let b,_,y,v,M,w,k,S,P,D,C,O;if("top"===a)b=x(this.bottom),w=this.bottom-u,S=b-m,D=x(t.top)+m,O=t.bottom;else if("bottom"===a)b=x(this.top),D=t.top,O=x(t.bottom)-m,w=b+m,S=this.top+u;else if("left"===a)b=x(this.right),M=this.right-u,k=b-m,P=x(t.left)+m,C=t.right;else if("right"===a)b=x(this.left),P=t.left,C=x(t.right)-m,M=b+m,k=this.left+u;else if("x"===e){if("center"===a)b=x((t.top+t.bottom)/2+.5);else if(o(a)){const t=Object.keys(a)[0],e=a[t];b=x(this.chart.scales[t].getPixelForValue(e))}D=t.top,O=t.bottom,w=b+m,S=w+u}else if("y"===e){if("center"===a)b=x((t.left+t.right)/2);else if(o(a)){const t=Object.keys(a)[0],e=a[t];b=x(this.chart.scales[t].getPixelForValue(e))}M=b-m,k=M-u,P=t.left,C=t.right}const A=l(s.ticks.maxTicksLimit,d),T=Math.max(1,Math.ceil(d/A));for(_=0;_0&&(o-=s/2)}d={left:o,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}x.push({label:v,font:P,textOffset:O,options:{rotation:m,color:i,strokeColor:o,strokeWidth:h,textAlign:f,textBaseline:A,translation:[M,w],backdrop:d}})}return x}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-$(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,o=t+n,a=this._getLabelSizes().widest.width;let r,l;return"left"===e?s?(l=this.right+n,"near"===i?r="left":"center"===i?(r="center",l+=a/2):(r="right",l+=a)):(l=this.right-o,"near"===i?r="right":"center"===i?(r="center",l-=a/2):(r="left",l=this.left)):"right"===e?s?(l=this.left+n,"near"===i?r="right":"center"===i?(r="center",l-=a/2):(r="left",l-=a)):(l=this.left+o,"near"===i?r="left":"center"===i?(r="center",l+=a/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");ue.route(o,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&ue.describe(e,t.descriptors)}(t,o,i),this.override&&ue.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ue[s]&&(delete ue[s][i],this.override&&delete re[i])}}class sn{constructor(){this.controllers=new en(js,"datasets",!0),this.elements=new en($s,"elements"),this.plugins=new en(Object,"plugins"),this.scales=new en(tn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):u(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=w(t);d(i["before"+s],[],i),e[t](i),d(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function an(t,e){return e||!1!==t?!0===t?{}:t:null}function rn(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ln(t,e){const i=ue.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function hn(t){if("x"===t||"y"===t||"r"===t)return t}function cn(t,...e){if(hn(t))return t;for(const s of e){const e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&hn(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function dn(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function un(t,e){const i=re[t.type]||{scales:{}},s=e.scales||{},n=ln(t.type,e),a=Object.create(null);return Object.keys(s).forEach((e=>{const r=s[e];if(!o(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=cn(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return dn(t,"x",i[0])||dn(t,"y",i[0])}return{}}(e,t),ue.scales[r.type]),h=function(t,e){return t===e?"_index_":"_value_"}(l,n),c=i.scales||{};a[e]=b(Object.create(null),[{axis:l},r,c[l],c[h]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,o=i.indexAxis||ln(n,e),r=(re[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),n=i[e+"AxisID"]||e;a[n]=a[n]||Object.create(null),b(a[n],[{axis:e},s[n],r[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];b(e,[ue.scales[e.type],ue.scale])})),a}function fn(t){const e=t.options||(t.options={});e.plugins=l(e.plugins,{}),e.scales=un(t,e)}function gn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const pn=new Map,mn=new Set;function xn(t,e){let i=pn.get(t);return i||(i=e(),pn.set(t,i),mn.add(i)),i}const bn=(t,e,i)=>{const s=M(e,i);void 0!==s&&t.add(s)};class _n{constructor(t){this._config=function(t){return(t=t||{}).data=gn(t.data),fn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=gn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),fn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return xn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return xn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return xn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return xn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>bn(r,t,e)))),e.forEach((t=>bn(r,s,t))),e.forEach((t=>bn(r,re[n]||{},t))),e.forEach((t=>bn(r,ue,t))),e.forEach((t=>bn(r,le,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),mn.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,re[e]||{},ue.datasets[e]||{},{type:e},ue,le]}resolveNamedOptions(t,e,i,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=yn(this._resolverCache,t,s);let l=a;if(function(t,e){const{isScriptable:i,isIndexable:s}=Ye(t);for(const o of e){const e=i(o),a=s(o),r=(a||e)&&t[o];if(e&&(S(r)||vn(r))||a&&n(r))return!0}return!1}(a,e)){o.$shared=!1;l=$e(a,i=S(i)?i():i,this.createResolver(t,i,r))}for(const t of e)o[t]=l[t];return o}createResolver(t,e,i=[""],s){const{resolver:n}=yn(this._resolverCache,t,i);return o(e)?$e(n,e,void 0,s):n}}function yn(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:je(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const vn=t=>o(t)&&Object.getOwnPropertyNames(t).some((e=>S(t[e])));const Mn=["top","bottom","left","right","chartArea"];function wn(t,e){return"top"===t||"bottom"===t||-1===Mn.indexOf(t)&&"x"===e}function kn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function Sn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),d(i&&i.onComplete,[t],e)}function Pn(t){const e=t.chart,i=e.options.animation;d(i&&i.onProgress,[t],e)}function Dn(t){return fe()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Cn={},On=t=>{const e=Dn(t);return Object.values(Cn).filter((t=>t.canvas===e)).pop()};function An(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}class Tn{static defaults=ue;static instances=Cn;static overrides=re;static registry=nn;static version="4.5.0";static getChart=On;static register(...t){nn.add(...t),Ln()}static unregister(...t){nn.remove(...t),Ln()}constructor(t,e){const s=this.config=new _n(e),n=Dn(t),o=On(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Ps(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,h=l&&l.height,c=l&&l.width;this.id=i(),this.ctx=r,this.canvas=l,this.width=c,this.height=h,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new on,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=dt((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],Cn[this.id]=this,r&&l?(bt.listen(this,"complete",Sn),bt.listen(this,"progress",Pn),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return s(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return nn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ke(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Te(this.canvas,this.ctx),this}stop(){return bt.stop(this),this}resize(t,e){bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ke(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),d(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){u(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=cn(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),u(n,(e=>{const n=e.options,o=n.id,a=cn(o,n),r=l(n.type,e.dtype);void 0!==n.position&&wn(n.position,a)===wn(e.dposition)||(n.position=e.dposition),s[o]=!0;let h=null;if(o in i&&i[o].type===r)h=i[o];else{h=new(nn.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(n,t)})),u(s,((t,e)=>{t||delete i[e]})),u(i,(t=>{ls.configure(this,t,t.options),ls.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(kn("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){u(this.scales,(t=>{ls.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);P(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){An(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;tt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ls.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],u(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=Ni(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(s&&Ie(e,s),t.controller.draw(),s&&ze(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Re(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Ki.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Ci(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);k(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),bt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};u(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){u(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},u(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!f(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=D(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,d(n.onHover,[t,a,this],this),r&&d(n.onClick,[t,a,this],this));const h=!f(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function Ln(){return u(Tn.instances,(t=>t._plugins.invalidate()))}function En(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Rn{static override(t){Object.assign(Rn.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return En()}parse(){return En()}format(){return En()}add(){return En()}diff(){return En()}startOf(){return En()}endOf(){return En()}}var In={_date:Rn};function zn(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;et-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const l=()=>{32767!==o&&-32768!==o&&(k(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function Vn(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;ht.x,i="left",s="right"):(e=t.base"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,a,r=t=>+i[t];if(o(i[t])){const{key:t="value"}=this._parsing;r=e=>+M(i[e],t)}for(n=t,a=t+e;nJ(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>J(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),p=f(0,h,d),m=f(E,c,u),x=g(C,h,d),b=g(C+E,c,u);s=(p-x)/2,n=(m-b)/2,o=-(p+x)/2,a=-(m+b)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),x=(i.width-o)/f,b=(i.height-o)/g,_=Math.max(Math.min(x,b)/2,0),y=c(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=m*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*l,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/O)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:g}=this._getSharedOptions(e,s);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?O*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ne(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:s,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ne(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return ii.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*C;let d,u=c;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?$(this.resolveDataElementOptions(t,e).angle||i):0}}var Un=Object.freeze({__proto__:null,BarController:class extends js{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return Vn(t,e,i,s)}parseArrayData(t,e,i,s){return Vn(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:n,vScale:o}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===n.axis?a:r,h="x"===o.axis?a:r,c=[];let d,u,f,g;for(d=i,u=i+s;dt.controller.options.grouped)),o=i.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),l=r&&r[i.axis],h=t=>{const e=t._parsed.find((t=>t[i.axis]===l)),n=e&&e[t.vScale.axis];if(s(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!h(i))&&((!1===o||-1===a.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&a.push(i.stack),i.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[l("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(u,e,r)*a,f===r&&(x-=u/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),o=Math.min(t,s),h=Math.max(t,s);x=Math.max(Math.min(x,h),o),d=x+u,i&&!c&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(d)-e.getValueForPixel(x))}if(x===e.getPixelForValue(r)){const t=F(u)*e.getLineWidthForValue(r)/2;x+=t,u-=t}return{size:u,base:x,head:d,center:d+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,a=l(n.maxBarThickness,1/0);let r,h;const c=this._getAxisCount();if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,d="flex"===n.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:n}=e,o=this.getParsed(t),a=s.getLabelForValue(o.x),r=n.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+a+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=a.axis;for(let d=e;d0&&this.getParsed(e-1);for(let i=0;i<_;++i){const g=t[i],_=x?g:{};if(i=b){_.skip=!0;continue}const v=this.getParsed(i),M=s(v[f]),w=_[u]=a.getPixelForValue(v[u],i),k=_[f]=o||M?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,v,l):v[f],i);_.skip=isNaN(w)||isNaN(k)||M,_.stop=i>0&&Math.abs(v[u]-y[u])>m,p&&(_.parsed=v,_.raw=h.data[i]),d&&(_.options=c||this.resolveDataElementOptions(i,g.active?"active":n)),x||this.updateElement(g,i,_,n),y=v}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends $n{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:Yn,RadarController:class extends js{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return ii.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a0&&this.getParsed(e-1);for(let c=e;c0&&Math.abs(i[f]-_[f])>x,m&&(p.parsed=i,p.raw=h.data[c]),u&&(p.options=d||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),_=i}this.updateSharedOptions(d,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}});function Xn(t,e,i,s){const n=vi(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return Z(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Z(n.innerStart,0,a),innerEnd:Z(n.innerEnd,0,a)}}function qn(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Kn(t,e,i,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let f=0;const g=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;f=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/C)/d)/2,m=l+p+f,x=n-p-f,{outerStart:b,outerEnd:_,innerStart:y,innerEnd:v}=Xn(e,u,d,x-m),M=d-b,w=d-_,k=m+b/M,S=x-_/w,P=u+y,D=u+v,O=m+y/P,A=x-v/D;if(t.beginPath(),o){const e=(k+S)/2;if(t.arc(a,r,d,k,e),t.arc(a,r,d,e,S),_>0){const e=qn(w,S,a,r);t.arc(e.x,e.y,_,S,x+E)}const i=qn(D,x,a,r);if(t.lineTo(i.x,i.y),v>0){const e=qn(D,A,a,r);t.arc(e.x,e.y,v,x+E,A+Math.PI)}const s=(x-v/u+(m+y/u))/2;if(t.arc(a,r,u,x-v/u,s,!0),t.arc(a,r,u,s,m+y/u,!0),y>0){const e=qn(P,O,a,r);t.arc(e.x,e.y,y,O+Math.PI,m-E)}const n=qn(M,m,a,r);if(t.lineTo(n.x,n.y),b>0){const e=qn(M,k,a,r);t.arc(e.x,e.y,b,m-E,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+a,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}function Gn(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r,options:l}=e,{borderWidth:h,borderJoinStyle:c,borderDash:d,borderDashOffset:u,borderRadius:f}=l,g="inner"===l.borderAlign;if(!h)return;t.setLineDash(d||[]),t.lineDashOffset=u,g?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let p=e.endAngle;if(o){Kn(t,e,i,s,p,n);for(let e=0;en?(h=n/l,t.arc(o,a,l,i+h,s-h,!0)):t.arc(o,a,n,i+E,s-E),t.closePath(),t.clip()}(t,e,p),l.selfJoin&&p-a>=C&&0===f&&"miter"!==c&&function(t,e,i){const{startAngle:s,x:n,y:o,outerRadius:a,innerRadius:r,options:l}=e,{borderWidth:h,borderJoinStyle:c}=l,d=Math.min(h/a,G(s-i));if(t.beginPath(),t.arc(n,o,a-h/2,s+d/2,i-d/2),r>0){const e=Math.min(h/r,G(s-i));t.arc(n,o,r+h/2,i-e/2,s+e/2,!0)}else{const e=Math.min(h/2,a*G(s-i));if("round"===c)t.arc(n,o,e,i-C/2,s+C/2,!0);else if("bevel"===c){const a=2*e*e,r=-a*Math.cos(i+C/2)+n,l=-a*Math.sin(i+C/2)+o,h=a*Math.cos(s+C/2)+n,c=a*Math.sin(s+C/2)+o;t.lineTo(r,l),t.lineTo(h,c)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,p),o||(Kn(t,e,i,s,p,n),t.stroke())}function Jn(t,e,i=e){t.lineCap=l(i.borderCapStyle,e.borderCapStyle),t.setLineDash(l(i.borderDash,e.borderDash)),t.lineDashOffset=l(i.borderDashOffset,e.borderDashOffset),t.lineJoin=l(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=l(i.borderWidth,e.borderWidth),t.strokeStyle=l(i.borderColor,e.borderColor)}function Zn(t,e,i){t.lineTo(i.x,i.y)}function Qn(t,e,i={}){const s=t.length,{start:n=0,end:o=s-1}=i,{start:a,end:r}=e,l=Math.max(n,a),h=Math.min(o,r),c=nr&&o>r;return{count:s,start:l,loop:e.loop,ilen:h(a+(h?r-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[b(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(ig&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=s,x=0,f=g=i),p=i}_()}function io(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?eo:to}const so="function"==typeof Path2D;function no(t,e,i,s){so&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Jn(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=io(e);for(const r of n)Jn(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class oo extends $s{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;hi(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=zi(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],n=this.points,o=Ii(this,{property:e,start:s,end:s});if(!o.length)return;const a=[],r=function(t){return t.stepped?pi:t.tension||"monotone"===t.cubicInterpolationMode?mi:gi}(i);let l,h;for(l=0,h=o.length;l"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=X(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:h,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,f=l(d,r-a),g=J(n,a,r)&&a!==r,p=f>=O||g,m=tt(o,h+u,c+u);return p&&m}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,h=(s+n)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/4,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>O?Math.floor(i/O):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);const r=s*(1-Math.sin(Math.min(C,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let l=e.endAngle;if(o){Kn(t,e,i,s,l,n);for(let e=0;e("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}function mo(t){const e=this.getLabels();return t>=0&&ts=e?s:t,a=t=>n=i?n:t;if(t){const t=F(s),e=F(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=0===n?1:Math.abs(.05*n);a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:o,min:a,max:r,precision:l,count:h,maxTicks:c,maxDigits:d,includeBounds:u}=t,f=o||1,g=c-1,{min:p,max:m}=e,x=!s(a),b=!s(r),_=!s(h),y=(m-p)/(d+1);let v,M,w,k,S=B((m-p)/g/f)*f;if(S<1e-14&&!x&&!b)return[{value:p},{value:m}];k=Math.ceil(m/S)-Math.floor(p/S),k>g&&(S=B(k*S/g/f)*f),s(l)||(v=Math.pow(10,l),S=Math.ceil(S*v)/v),"ticks"===n?(M=Math.floor(p/S)*S,w=Math.ceil(m/S)*S):(M=p,w=m),x&&b&&o&&H((r-a)/o,S/1e3)?(k=Math.round(Math.min((r-a)/S,c)),S=(r-a)/k,M=a,w=r):_?(M=x?a:M,w=b?r:w,k=h-1,S=(w-M)/k):(k=(w-M)/S,k=V(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const P=Math.max(U(S),U(M));v=Math.pow(10,s(l)?P:l),M=Math.round(M*v)/v,w=Math.round(w*v)/v;let D=0;for(x&&(u&&M!==a?(i.push({value:a}),Mr)break;i.push({value:t})}return b&&u&&w!==r?i.length&&V(i[i.length-1].value,r,xo(r,y,t))?i[i.length-1].value=r:i.push({value:r}):b&&w!==r||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&j(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ne(t,this.chart.options.locale,this.options.ticks.format)}}class _o extends bo{static id="linear";static defaults={ticks:{callback:ae.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=a(t)?t:0,this.max=a(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=$(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const yo=t=>Math.floor(z(t)),vo=(t,e)=>Math.pow(10,yo(t)+e);function Mo(t){return 1===t/Math.pow(10,yo(t))}function wo(t,e,i){const s=Math.pow(10,i),n=Math.floor(t/s);return Math.ceil(e/s)-n}function ko(t,{min:e,max:i}){e=r(t.min,e);const s=[],n=yo(e);let o=function(t,e){let i=yo(e-t);for(;wo(t,e,i)>10;)i++;for(;wo(t,e,i)<10;)i--;return Math.min(i,yo(t))}(e,i),a=o<0?Math.pow(10,Math.abs(o)):1;const l=Math.pow(10,o),h=n>o?Math.pow(10,n):0,c=Math.round((e-h)*a)/a,d=Math.floor((e-h)/l/10)*l*10;let u=Math.floor((c-d)/Math.pow(10,o)),f=r(t.min,Math.round((h+d+u*Math.pow(10,o))*a)/a);for(;f=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,a=o>=0?1:a),f=Math.round((h+d+u*Math.pow(10,o))*a)/a;const g=r(t.max,f);return s.push({value:g,major:Mo(g),significand:u}),s}class So extends tn{static id="logarithmic";static defaults={ticks:{callback:ae.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=bo.prototype.parse.apply(this,[t,e]);if(0!==i)return a(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=a(t)?Math.max(0,t):null,this.max=a(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!a(this._userMin)&&(this.min=t===vo(this.min,0)?vo(this.min,-1):vo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t;i===s&&(i<=0?(n(1),o(10)):(n(vo(i,-1)),o(vo(s,1)))),i<=0&&n(vo(s,-1)),s<=0&&o(vo(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=ko({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&j(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":ne(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=z(t),this._valueRange=z(this.max)-z(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(z(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Po(t){const e=t.ticks;if(e.display&&t.display){const t=ki(e.backdropPadding);return l(e.font&&e.font.size,ue.font.size)+t.height}return 0}function Do(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:tn?{start:e-i,end:e}:{start:e,end:e+i}}function Co(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],o=[],a=t._pointLabels.length,r=t.options.pointLabels,l=r.centerPointLabels?C/a:0;for(let u=0;ue.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.starte.b&&(l=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Ao(t,e,i){const s=t.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=i,l=t.getPointPosition(e,s+n+a,o),h=Math.round(Y(G(l.angle+E))),c=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,r.h,h),d=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(h),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,r.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:u,top:c,right:u+r.w,bottom:c+r.h}}function To(t,e){if(!e)return!0;const{left:i,top:s,right:n,bottom:o}=t;return!(Re({x:i,y:s},e)||Re({x:i,y:o},e)||Re({x:n,y:s},e)||Re({x:n,y:o},e))}function Lo(t,e,i){const{left:n,top:o,right:a,bottom:r}=i,{backdropColor:l}=e;if(!s(l)){const i=wi(e.borderRadius),s=ki(e.backdropPadding);t.fillStyle=l;const h=n-s.left,c=o-s.top,d=a-n+s.width,u=r-o+s.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),He(t,{x:h,y:c,w:d,h:u,radius:i}),t.fill()):t.fillRect(h,c,d,u)}}function Eo(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,O);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;ot,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ki(Po(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=a(t)&&!isNaN(t)?t:0,this.max=a(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Po(this.options))}generateTickLabels(t){bo.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=d(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Co(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return G(t*(O/(this._pointLabels.length||1))+$(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(s(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(s(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;n--){const e=t._pointLabelItems[n];if(!e.visible)continue;const o=s.setContext(t.getPointLabelContext(n));Lo(i,o,e);const a=Si(o.font),{x:r,y:l,textAlign:h}=e;Ne(i,t._pointLabels[n],r,l+a.lineHeight/2,a,{color:o.color,textAlign:h,textBaseline:"middle"})}}(this,o),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),a=s.setContext(i),l=n.setContext(i);!function(t,e,i,s,n){const o=t.ctx,a=e.circular,{color:r,lineWidth:l}=e;!a&&!s||!r||!l||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(n.dash||[]),o.lineDashOffset=n.dashOffset,o.beginPath(),Eo(t,i,a,s),o.closePath(),o.stroke(),o.restore())}(this,a,r,o,l)}})),i.display){for(t.save(),a=o-1;a>=0;a--){const s=i.setContext(this.getPointLabelContext(a)),{color:n,lineWidth:o}=s;o&&n&&(t.lineWidth=o,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(a,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=Si(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=ki(r.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}Ne(t,s.label,0,-n,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}const Io={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},zo=Object.keys(Io);function Fo(t,e){return t-e}function Vo(t,e){if(s(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:r}=t._parseOpts;let l=e;return"function"==typeof n&&(l=n(l)),a(l)||(l="string"==typeof n?i.parse(l,n):i.parse(l)),null===l?null:(o&&(l="week"!==o||!N(r)&&!0!==r?i.startOf(l,o):i.startOf(l,"isoWeek",r)),+l)}function Bo(t,e,i,s){const n=zo.length;for(let o=zo.indexOf(t);o=e?i[s]:i[n]]=!0}}else t[e]=!0}function No(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a=0&&(e[l].major=!0);return e}(t,s,n,i):s}class Ho extends tn{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new In._date(t.adapters.date);s.init(e),b(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Vo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();function l(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}o&&r||(l(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||l(this.getMinMax(!1))),s=a(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=a(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=nt(s,n,this.max);return this._unit=e.unit||(i.autoSkip?Bo(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,i,s,n){for(let o=zo.length-1;o>=zo.indexOf(i);o--){const i=zo[o];if(Io[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return zo[i?zo.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=zo.indexOf(t)+1,i=zo.length;e+t.value)))}initOffsets(t=[]){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=Z(s,0,o),n=Z(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||Bo(n.minUnit,e,i,this._getLabelCapacity(e)),a=l(s.ticks.stepSize,1),r="week"===o&&n.isoWeekday,h=N(r)||!0===r,c={};let d,u,f=e;if(h&&(f=+t.startOf(f,"isoWeek",r)),f=+t.startOf(f,h?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const g="data"===s.ticks.source&&this.getDataTimestamps();for(d=f,u=0;d+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,s=this._unit,n=e||i[s];return this._adapter.format(t,n)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.ticks.callback;if(o)return d(o,[t,e,i],this);const a=n.time.displayFormats,r=this._unit,l=this._majorUnit,h=r&&a[r],c=l&&a[l],u=i[e],f=l&&c&&u&&u.major;return this._adapter.format(t,s||(f?c:h))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=it(t,"pos",e)),({pos:s,time:o}=t[r]),({pos:n,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=it(t,"time",e)),({time:s,pos:o}=t[r]),({time:n,pos:a}=t[l]));const h=n-s;return h?o+(a-o)*(e-s)/h:o}var $o=Object.freeze({__proto__:null,CategoryScale:class extends tn{static id="category";static defaults={ticks:{callback:mo}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(s(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Z(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:po(i,t,l(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return mo.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:_o,LogarithmicScale:So,RadialLinearScale:Ro,TimeScale:Ho,TimeSeriesScale:class extends Ho{static id="timeseries";static defaults=Ho.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=jo(e,this.min),this._tableRange=jo(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,l,h;for(o=0,a=t.length;o=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;ot-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(jo(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return jo(this._table,i*this._tableRange+this._minPos,!0)}}});const Yo=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Uo=Yo.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Xo(t){return Yo[t%Yo.length]}function qo(t){return Uo[t%Uo.length]}function Ko(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof $n?e=function(t,e){return t.backgroundColor=t.data.map((()=>Xo(e++))),e}(i,e):n instanceof Yn?e=function(t,e){return t.backgroundColor=t.data.map((()=>qo(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Xo(e),t.backgroundColor=qo(e),++e}(i,e))}}function Go(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Jo={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:o}=n,a=Go(s)||(r=n)&&(r.borderColor||r.backgroundColor)||o&&Go(o)||"rgba(0,0,0,0.1)"!==ue.borderColor||"rgba(0,0,0,0.1)"!==ue.backgroundColor;var r;if(!i.forceOverride&&a)return;const l=Ko(t);s.forEach(l)}};function Zo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Qo(t){t.data.datasets.forEach((t=>{Zo(t)}))}var ta={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Qo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:a,indexAxis:r}=e,l=t.getDatasetMeta(o),h=a||e.data;if("y"===Pi([r,t.options.indexAxis]))return;if(!l.controller.supportsDecimation)return;const c=t.scales[l.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:u}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=Z(it(e,o.axis,a).lo,0,i-1)),s=h?Z(it(e,o.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(l,h);if(u<=(i.threshold||4*n))return void Zo(e);let f;switch(s(a)&&(e._data=h,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":f=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,f,g,p=e;for(a[l++]=t[p],c=0;cu&&(u=f,d=t[s],g=s);a[l++]=d,p=g}return a[l++]=t[h],a}(h,d,u,n,i);break;case"min-max":f=function(t,e,i,n){let o,a,r,l,h,c,d,u,f,g,p=0,m=0;const x=[],b=e+i-1,_=t[e].x,y=t[b].x-_;for(o=e;og&&(g=l,d=o),p=(m*p+a.x)/++m;else{const i=o-1;if(!s(c)&&!s(d)){const e=Math.min(c,d),s=Math.max(c,d);e!==u&&e!==i&&x.push({...t[e],x:p}),s!==u&&s!==i&&x.push({...t[s],x:p})}o>0&&i!==u&&x.push(t[i]),x.push(a),h=e,m=0,f=g=l,c=d=u=o}}return x}(h,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=f}))},destroy(t){Qo(t)}};function ea(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=G(n),o=G(o)),{property:t,start:n,end:o}}function ia(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function sa(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function na(t,e){let i=[],s=!1;return n(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=ia(t,e,n);const a=n[t],r=n[e];null!==s?(o.push({x:a.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}(t,e),i.length?new oo({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function oa(t){return t&&!1!==t.fill}function aa(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!a(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function ra(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=l(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(o(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return a(n)&&Math.floor(n)===n?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function la(t,e,i){const s=[];for(let n=0;n=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),s&&i.fill&&ua(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;oa(i)&&ua(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;oa(s)&&"beforeDatasetDraw"===i.drawTime&&ua(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _a=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class ya extends $s{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=d(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=Si(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=_a(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,a,r)+10):(h=this.maxHeight,l=this._fitCols(o,s,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+n.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,u+=h,d++),r[f]={left:0,top:u,row:d,width:g,height:s},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:p,itemHeight:m}=function(t,e,i,s,n){const o=function(t,e,i,s){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+s.measureText(n).width}(s,t,e,i),a=function(t,e,i){let s=t;"string"!=typeof e.text&&(s=va(e,i));return s}(n,s,e.lineHeight);return{itemWidth:o,itemHeight:a}}(i,e,n,t,s);o>0&&u+m+2*a>h&&(c+=d+a,l.push({width:d,height:u}),f+=d+a,g++,d=u=0),r[o]={left:f,top:u,col:g,width:p,height:m},d=Math.max(d,p),u+=m+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=Oi(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=ft(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=ft(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=ft(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=ft(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Ie(t,this),this._draw(),ze(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=ue.color,r=Oi(t.rtl,this.left,this.width),h=Si(o.font),{padding:c}=o,d=h.size,u=d/2;let f;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:g,boxHeight:p,itemHeight:m}=_a(o,d),x=this.isHorizontal(),b=this._computeTitleHeight();f=x?{x:ft(n,this.left+c,this.right-i[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:ft(n,this.top+b+c,this.bottom-e[0].height),line:0},Ai(this.ctx,t.textDirection);const _=m+c;this.legendItems.forEach(((y,v)=>{s.strokeStyle=y.fontColor,s.fillStyle=y.fontColor;const M=s.measureText(y.text).width,w=r.textAlign(y.textAlign||(y.textAlign=o.textAlign)),k=g+u+M;let S=f.x,P=f.y;r.setWidth(this.width),x?v>0&&S+k+c>this.right&&(P=f.y+=_,f.line++,S=f.x=ft(n,this.left+c,this.right-i[f.line])):v>0&&P+_>this.bottom&&(S=f.x=S+e[f.line].width+c,f.line++,P=f.y=ft(n,this.top+b+c,this.bottom-e[f.line].height));if(function(t,e,i){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const n=l(i.lineWidth,1);if(s.fillStyle=l(i.fillStyle,a),s.lineCap=l(i.lineCap,"butt"),s.lineDashOffset=l(i.lineDashOffset,0),s.lineJoin=l(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=l(i.strokeStyle,a),s.setLineDash(l(i.lineDash,[])),o.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,g/2);Ee(s,a,l,e+u,o.pointStyleWidth&&g)}else{const o=e+Math.max((d-p)/2,0),a=r.leftForLtr(t,g),l=wi(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?He(s,{x:a,y:o,w:g,h:p,radius:l}):s.rect(a,o,g,p),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(S),P,y),S=gt(w,S+g+u,x?S+k:this.right,t.rtl),function(t,e,i){Ne(s,i.text,t,e+m/2,h,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(S),P,y),x)f.x+=k+c;else if("string"!=typeof y.text){const t=h.lineHeight;f.y+=va(y,t)+c}else f.y+=_})),Ti(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Si(e.font),s=ki(e.padding);if(!e.display)return;const n=Oi(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=ft(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+ft(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=ft(a,c,c+d);o.textAlign=n.textAlign(ut(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Ne(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=Si(t.font),i=ki(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(tt(t,this.left,this.right)&&tt(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),h=ki(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:s||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:a&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class wa extends $s{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=n(i.text)?i.text.length:1;this._padding=ki(i.padding);const o=s*Si(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,l,h,c=0;return this.isHorizontal()?(l=ft(a,i,n),h=e+t,r=n-i):("left"===o.position?(l=i+t,h=ft(a,s,e),c=-.5*C):(l=n-t,h=ft(a,e,s),c=.5*C),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Si(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);Ne(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:ut(e.align),textBaseline:"middle",translation:[n,o]})}}var ka={id:"title",_element:wa,start(t,e,i){!function(t,e){const i=new wa({ctx:t.ctx,options:e,chart:t});ls.configure(t,i,e),ls.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ls.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;ls.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Sa=new WeakMap;var Pa={id:"subtitle",start(t,e,i){const s=new wa({ctx:t.ctx,options:i,chart:t});ls.configure(t,s,i),ls.addBox(t,s),Sa.set(t,s)},stop(t){ls.removeBox(t,Sa.get(t)),Sa.delete(t)},beforeUpdate(t,e,i){const s=Sa.get(t);ls.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Da={average(t){if(!t.length)return!1;let e,i,s=new Set,n=0,o=0;for(e=0,i=t.length;et+e))/s.size,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,s,n,o=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i-1?t.split("\n"):t}function Aa(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Ta(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,l=Si(e.bodyFont),h=Si(e.titleFont),c=Si(e.footerFont),d=o.length,f=n.length,g=s.length,p=ki(e.padding);let m=p.height,x=0,b=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){m+=g*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(b-g)*l.lineHeight+(b-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){x=Math.max(x,i.measureText(t).width+_)};return i.save(),i.font=h.string,u(t.title,y),i.font=l.string,u(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?a+2+e.boxPadding:0,u(s,(t=>{u(t.before,y),u(t.lines,y),u(t.after,y)})),_=0,i.font=c.string,u(t.footer,y),i.restore(),x+=p.width,{width:x,height:m}}function La(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function Ea(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||La(t,e,i,s),yAlign:s}}function Ra(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=wi(a);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===r?g+=h:"right"===r&&(g-=h):"left"===r?g-=Math.max(c,u)+n:"right"===r&&(g+=Math.max(d,f)+n),{x:Z(g,0,s.width-e.width),y:Z(p,0,s.height-e.height)}}function Ia(t,e,i){const s=ki(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function za(t){return Ca([],Oa(t))}function Fa(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Va={beforeTitle:e,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex{const e={before:[],lines:[],after:[]},n=Fa(i,t);Ca(e.before,Oa(Ba(n,"beforeLabel",this,t))),Ca(e.lines,Ba(n,"label",this,t)),Ca(e.after,Oa(Ba(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return za(Ba(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=Ba(i,"beforeFooter",this,t),n=Ba(i,"footer",this,t),o=Ba(i,"afterFooter",this,t);let a=[];return a=Ca(a,Oa(s)),a=Ca(a,Oa(n)),a=Ca(a,Oa(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,l=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),u(l,(e=>{const i=Fa(t.callbacks,e);s.push(Ba(i,"labelColor",this,e)),n.push(Ba(i,"labelPointStyle",this,e)),o.push(Ba(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=Da[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Ta(this,i),a=Object.assign({},t,e),r=Ea(this.chart,i,a),l=Ra(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=wi(a),{x:d,y:u}=t,{width:f,height:g}=e;let p,m,x,b,_,y;return"center"===n?(_=u+g/2,"left"===s?(p=d,m=p-o,b=_+o,y=_-o):(p=d+f,m=p+o,b=_-o,y=_+o),x=p):(m="left"===s?d+Math.max(r,h)+o:"right"===s?d+f-Math.max(l,c)-o:this.caretX,"top"===n?(b=u,_=b-o,p=m-o,x=m+o):(b=u+g,_=b+o,p=m+o,x=m-o),y=b),{x1:p,x2:m,x3:x,y1:b,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const l=Oi(i.rtl,this.x,this.width);for(t.x=Ia(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Si(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,He(t,{x:e,y:g,w:h,h:l,radius:r}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),He(t,{x:i,y:g+1,w:h-2,h:l-2,radius:r}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,g,h,l),t.strokeRect(e,g,h,l),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=Si(i.bodyFont);let d=c.lineHeight,f=0;const g=Oi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+f),t.y+d/2),t.y+=d+n},m=g.textAlign(o);let x,b,_,y,v,M,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Ia(this,m,i),e.fillStyle=i.bodyColor,u(this.beforeBody,p),f=a&&"right"!==m?"center"===o?l/2+h:l+2+h:0,y=0,M=s.length;y0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=Da[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Ta(this,t),a=Object.assign({},i,this._size),r=Ea(e,t,a),l=Ra(t,a,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=ki(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),Ai(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Ti(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!f(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!f(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=Da[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}var Na={id:"tooltip",_element:Wa,positioners:Da,afterInit(t,e,i){i&&(t.tooltip=new Wa({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Va},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};return Tn.register(Un,$o,go,t),Tn.helpers={...Hi},Tn._adapters=In,Tn.Animation=As,Tn.Animations=Ts,Tn.animator=bt,Tn.controllers=nn.controllers.items,Tn.DatasetController=js,Tn.Element=$s,Tn.elements=go,Tn.Interaction=Ki,Tn.layouts=ls,Tn.platforms=Ds,Tn.Scale=tn,Tn.Ticks=ae,Object.assign(Tn,Un,$o,go,t,Ds),Tn.Chart=Tn,"undefined"!=typeof window&&(window.Chart=Tn),Tn})); -//# sourceMappingURL=chart.umd.js.map diff --git a/pluginsSrc/disqusjs/dist/browser/disqusjs.es2015.umd.min.js b/pluginsSrc/disqusjs/dist/browser/disqusjs.es2015.umd.min.js deleted file mode 100644 index 68bb3722..00000000 --- a/pluginsSrc/disqusjs/dist/browser/disqusjs.es2015.umd.min.js +++ /dev/null @@ -1 +0,0 @@ -var e,n;e=this,n=function(){"use strict";function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n(n){for(var t=1;t2&&(_.children=arguments.length>3?r.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)null==_[i]&&(_[i]=e.defaultProps[i]);return k(e,_,o,l,null)}function k(e,n,t,r,i){var _={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++l:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(_),_}function j(e){return e.children}function w(e,n){this.props=e,this.context=n}function N(e,n){if(null==n)return e.__?N(e.__,e.__i+1):null;for(var t;ns&&i.sort(u),e=i.shift(),s=i.length,e.__d&&(n=void 0,r=(t=e.__v).__e,l=[],_=[],e.__P&&((n=g({},t)).__v=t.__v+1,o.vnode&&o.vnode(n),U(e.__P,n,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,l,null==r?N(t):r,!!(32&t.__u),_),n.__v=t.__v,n.__.__k[n.__i]=n,H(l,n,_),n.__e!=r&&function e(n){var t,r;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,t=0;t0?k(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_).__=e,_.__b=e.__b+1,s=null,-1!=(c=_.__i=function(e,n,t,r){var o,l,i=e.key,_=e.type,s=n[t];if(null===s&&null==e.key||s&&i==s.key&&_==s.type&&0==(2&s.__u))return t;if(r>+(null!=s&&0==(2&s.__u)))for(o=t-1,l=t+1;o>=0||l=0){if((s=n[o])&&0==(2&s.__u)&&i==s.key&&_==s.type)return o;o--}if(la?f--:lu?f--:f++,_.__u|=4))):e.__k[i]=null;if(d)for(i=0;i0?n:y(n)?n.map(e):g({},n)}(d.props.children)),u=C(e,y(A)?A:[A],n,t,l,i,_,s,u,c,a),f.base=n.__e,n.__u&=-161,f.__h.length&&s.push(f),k&&(f.__E=f.__=null)}catch(e){if(n.__v=null,c||null!=_)if(e.then){for(n.__u|=c?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;_[_.indexOf(u)]=null,n.__e=u}else for(I=_.length;I--;)b(_[I]);else n.__e=t.__e,n.__k=t.__k;o.__e(e,n,t)}else null==_&&n.__v==t.__v?(n.__k=t.__k,n.__e=t.__e):u=n.__e=function(e,n,t,l,i,_,s,u,c){var a,d,f,p,m,v,g,q=t.props,k=n.props,j=n.type;if("svg"==j?i="http://www.w3.org/2000/svg":"math"==j?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=_){for(a=0;a<_.length;a++)if((m=_[a])&&"setAttribute"in m==!!j&&(j?m.localName==j:3==m.nodeType)){e=m,_[a]=null;break}}if(null==e){if(null==j)return document.createTextNode(k);e=document.createElementNS(i,j,k.is&&k),u&&(o.__m&&o.__m(n,_),u=!1),_=null}if(null==j)q===k||u&&e.data==k||(e.data=k);else{if(_=_&&r.call(e.childNodes),q=t.props||h,!u&&null!=_)for(q={},a=0;a2&&(s.children=arguments.length>3?r.call(arguments,2):t),k(e.type,s,o||e.key,l||e.ref,null)}function M(e){function n(e){var t,r;return this.getChildContext||(t=new Set,(r={})[n.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+p++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}r=m.slice,o={__e:function(e,n,t,r){for(var o,l,i;n=n.__;)if((o=n.__c)&&!o.__)try{if((l=o.constructor)&&null!=l.getDerivedStateFromError&&(o.setState(l.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(n){e=n}throw e}},l=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},t),this.props)),e&&g(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),P(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},w.prototype.render=j,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,n){return e.__v.__b-n.__v.__b},S.__r=0,c=/(PointerCapture)$|Capture$/i,a=0,d=D(!1),f=D(!0),p=0;var R,L,F,W,B=0,V=[],Q=o,z=Q.__b,J=Q.__r,Z=Q.diffed,Y=Q.__c,G=Q.unmount,K=Q.__;function X(e,n){Q.__h&&Q.__h(L,e,B||n),B=0;var t=L.__H||(L.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function ee(e){return B=1,function(e,n,t){var r=X(R++,2);if(r.t=e,!r.__c&&(r.__=[ea(void 0,n),function(e){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,e);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=L,!L.__f)){var o=function(e,n,t){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return!!e.__c});if(o.every(function(e){return!e.__N}))return!l||l.call(this,e,n,t);var i=r.__c.props!==e;return o.forEach(function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(i=!0)}}),l&&l.call(this,e,n,t)||i};L.__f=!0;var l=L.shouldComponentUpdate,i=L.componentWillUpdate;L.componentWillUpdate=function(e,n,t){if(this.__e){var r=l;l=void 0,o(e,n,t),l=r}i&&i.call(this,e,n,t)},L.shouldComponentUpdate=o}return r.__N||r.__}(ea,e)}function en(e,n){var t=X(R++,3);!Q.__s&&ec(t.__H,n)&&(t.__=e,t.u=n,L.__H.__h.push(t))}function et(e){return B=5,er(function(){return{current:e}},[])}function er(e,n){var t=X(R++,7);return ec(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function eo(e,n){return B=8,er(function(){return e},n)}function el(e){var n=L.context[e.__c],t=X(R++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(L)),n.props.value):e.__}function ei(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(es),e.__H.__h.forEach(eu),e.__H.__h=[]}catch(n){e.__H.__h=[],Q.__e(n,e.__v)}}Q.__b=function(e){L=null,z&&z(e)},Q.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),K&&K(e,n)},Q.__r=function(e){J&&J(e),R=0;var n=(L=e.__c).__H;n&&(F===L?(n.__h=[],L.__h=[],n.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(n.__h.forEach(es),n.__h.forEach(eu),n.__h=[],R=0)),F=L},Q.diffed=function(e){Z&&Z(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==V.push(n)&&W===Q.requestAnimationFrame||((W=Q.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),e_&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,35);e_&&(n=requestAnimationFrame(t))})(ei)),n.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),F=L=null},Q.__c=function(e,n){n.some(function(e){try{e.__h.forEach(es),e.__h=e.__h.filter(function(e){return!e.__||eu(e)})}catch(t){n.some(function(e){e.__h&&(e.__h=[])}),n=[],Q.__e(t,e.__v)}}),Y&&Y(e,n)},Q.unmount=function(e){G&&G(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(e){try{es(e)}catch(e){n=e}}),t.__H=void 0,n&&Q.__e(n,t.__v))};var e_="function"==typeof requestAnimationFrame;function es(e){var n=L,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),L=n}function eu(e){var n=L;e.__c=e.__(),L=n}function ec(e,n){return!e||e.length!==n.length||n.some(function(n,t){return n!==e[t]})}function ea(e,n){return"function"==typeof n?n(e):n}function ed(e,n){for(var t in n)e[t]=n[t];return e}function ef(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function ep(e,n){this.props=e,this.context=n}function eh(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:ef(this.props,e)}function r(n){return this.shouldComponentUpdate=t,q(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ep.prototype=new w).isPureReactComponent=!0,ep.prototype.shouldComponentUpdate=function(e,n){return ef(this.props,e)||ef(this.state,n)};var em=o.__b;o.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),em&&em(e)};var ev="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,ey=o.__e;o.__e=function(e,n,t,r){if(e.then){for(var o,l=n;l=l.__;)if((o=l.__c)&&o.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),o.__c(e,n)}ey(e,n,t,r)};var eg=o.unmount;function eb(){this.__u=0,this.o=null,this.__b=null}function eq(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function ek(){this.i=null,this.l=null}o.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),eg&&eg(e)},(eb.prototype=new w).__c=function(e,n){var t=n.__c,r=this;null==r.o&&(r.o=[]),r.o.push(t);var o=eq(r.__v),l=!1,i=function(){l||(l=!0,t.__R=null,o?o(_):_())};t.__R=i;var _=function(){if(!--r.__u){if(r.state.__a){var e,n=r.state.__a;r.__v.__k[0]=function e(n,t,r){return n&&r&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return e(n,t,r)}),n.__c&&n.__c.__P===t&&(n.__e&&r.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=r)),n}(n,n.__c.__P,n.__c.__O)}for(r.setState({__a:r.__b=null});e=r.o.pop();)e.forceUpdate()}};r.__u++||32&n.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},eb.prototype.componentWillUnmount=function(){this.o=[]},eb.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),n.__c.__H=null),null!=(n=ed({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return e(n,t,r)})),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__a&&q(j,null,e.fallback);return o&&(o.__u&=-33),[q(j,null,n.__a?null:e.children),o]};var ej=function(e,n,t){if(++t[1]===t[0]&&e.l.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}let eL=eh(e=>{let{contexts:n,children:t}=e;return n.reduceRight((e,n)=>(function(e){return e&&e.$$typeof===ew?I.apply(null,arguments):e})(n,{children:e}),t)}),eF=eh(()=>eI("footer",{className:"dsqjs-footer-container",children:eI("p",{className:"dsqjs-footer",children:["Powered by ",eI("a",{className:"dsqjs-disqus-logo",href:"https://disqus.com",target:"_blank",rel:"external nofollow noopener noreferrer"})," ","&"," ",eI("a",{className:"dsqjs-dsqjs-logo",href:"https://disqusjs.skk.moe",target:"_blank",children:"DisqusJS"})]})}));var eW={dsqjs:"__dsqjs_15s36o"};let eB=function(e,n){en(()=>{let n=new AbortController,t=e(n.signal);return()=>{n.abort(),null==t||t()}},n)},eV=()=>{};function eQ(e){let n=M(e),t=M(eV);return[r=>{let{children:o}=r,[l,i]=ee(e);return eI(n.Provider,{value:l,children:eI(t.Provider,{value:i,children:o})})},()=>el(n),()=>el(t),n]}let[ez,eJ,eZ]=eQ(function(){{let e=localStorage.getItem("dsqjs_mode");if("dsqjs"===e||"disqus"===e)return e}return null}());function eY(){let e=eZ();return eo(n=>{e(n),Promise.resolve().then(()=>{null===n?localStorage.removeItem("dsqjs_mode"):localStorage.setItem("dsqjs_mode",n)})},[e])}let[eG,eK,eX]=eQ(!1),e0=eh(e=>{var{isError:t,isLoading:r}=e,o=eR(e,["isError","isLoading"]);let l=er(()=>t?"加载失败,请重试":r?"正在加载...":"加载更多评论",[t,r]);return eI("a",eM(n({},o),{id:"dsqjs-load-more",className:"dsqjs-load-more "+(t?"is-error":""),role:"button",children:l}))}),e1=eh(({children:e})=>{let n=eY();return eI("a",{id:"dsqjs-force-disqus",className:"dsqjs-msg-btn",onClick:()=>n("disqus"),children:e})}),e3=eh(({children:e})=>{let n=eY();return eI("a",{id:"dsqjs-test-disqus",className:"dsqjs-msg-btn",onClick:()=>n(null),role:"button",children:e})}),e2=eh(({children:e})=>{let n=eY();return eI("a",{id:"dsqjs-force-dsqjs",className:"dsqjs-msg-btn",onClick:()=>n("dsqjs"),role:"button",children:e})}),e9=eh(({children:e})=>{let n=eX();return eI("a",{id:"dsqjs-reload-dsqjs",className:"dsqjs-msg-btn",onClick:()=>n(!1),role:"button",children:e})}),[e8,e4,e6]=eQ(null),e5=function(e,n){var t=X(R++,4);!Q.__s&&ec(t.__H,n)&&(t.__=e,t.u=n,L.__h.push(t))},e7="disqus_thread",ne="dsq-embed-scr",nn=eh(({shortname:e,identifier:n,url:t,title:r})=>{let o=e6(),[l,i]=ee(!1);return e5(()=>o(null)),en(()=>{let o=()=>{{var e;window.disqus_config=void 0;let n=document.getElementById(ne);n&&(document.head.removeChild(n),n.remove()),null==(e=window.DISQUS)||e.reset({});try{delete window.DISQUS}catch(e){window.DISQUS=void 0}let t=document.getElementById(e7);if(t)for(;t.hasChildNodes();)t.firstChild&&t.firstChild.remove();document.querySelectorAll('link[href*="disquscdn.com/next"], link[href*="disqus.com/next"], script[src*="disquscdn.com/next/embed"], script[src*="disqus.com/count-data.js"], iframe[title="Disqus"]').forEach(e=>e.remove())}};window.disqus_shortname!==e&&o();let l=()=>function(){n&&(this.page.identifier=n),t&&(this.page.url=t),r&&(this.page.title=r),this.callbacks.onReady=[()=>i(!0)]};if(window.DISQUS&&document.getElementById(ne))window.DISQUS.reset({reload:!0,config:l()});else{window.disqus_config=l(),window.disqus_shortname=e;let n=document.createElement("script");n.id=ne,n.src=`https://${e}.disqus.com/embed.js`,n.async=!0,document.head.appendChild(n)}return o},[e,n,t,r]),eI(j,{children:[eI("div",{id:e7,children:["评论完整模式加载中... 如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或切换至"," ",eI(e2,{children:"评论基础模式"})]}),!l&&eI("div",{id:"dsqjs-msg",children:["评论完整模式加载中... 如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或切换至"," ",eI(e2,{children:"评论基础模式"})]})]})});function nt(e,n,t,r,o,l,i){try{var _=e[l](i),s=_.value}catch(e){t(e);return}_.done?n(s):Promise.resolve(s).then(r,o)}function nr(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var l=e.apply(n,t);function i(e){nt(l,r,o,i,_,"next",e)}function _(e){nt(l,r,o,i,_,"throw",e)}i(void 0)})}}let no=eh(()=>eI("div",{id:"dsqjs-msg",children:["评论基础模式加载失败,请"," ",eI(e9,{children:"重载"})," ","或"," ",eI(e3,{children:"尝试完整 Disqus 模式"})]})),nl=eh(()=>eI("div",{id:"dsqjs-msg",children:["当前 Thread 尚未创建。是否切换至"," ",eI(e1,{children:"完整 Disqus 模式"}),"?"]})),ni=eh(({text:e})=>eI("p",{className:"dsqjs-no-comment",children:e}));function n_(e,n){let t=new URL(n);return t.searchParams.set("api_key",e),fetch(t.href).then(e=>e.json())}let ns=e=>new Date(e).getTime(),nu=null;function nc(e){let n=e.replaceAll("a.disquscdn.com","c.disquscdn.com").replaceAll(/https?:\/\/disq.us\/url\?url=(.+)%3A[\w-]+&cuid=\d+/g,(e,n)=>decodeURIComponent(n));nu||(nu=new DOMParser);let t=nu.parseFromString(n,"text/html");return t.querySelectorAll("script").forEach(e=>e.remove()),t.querySelectorAll("a").forEach(e=>{e.target="_blank",e.rel="external noopener nofollow noreferrer"}),t.body.innerHTML}let na=new Date().getTimezoneOffset(),nd=e=>(e+"").padStart(2,"0");function nf(e){return new Promise((n,t)=>{let r=new Image,o=setTimeout(()=>{_(),t()},3e3);function l(){clearTimeout(o),_(),n()}function i(){clearTimeout(o),_(),t()}function _(){r.removeEventListener("load",l),r.removeEventListener("error",i),r.remove()}r.addEventListener("error",i),r.addEventListener("load",l),r.src=`https://${e}/favicon.ico?${Date.now()}=${Date.now()}`})}let np=M(null),nh=np.Provider;function nm(){return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'[foxact/invariant] "value" is null or undefined';if(null==e)throw TypeError(n);return e}(el(np)," is missing")}function nv({comment:e,children:n,nesting:t}){let{admin:r,adminLabel:o}=nm(),l=e.author.profileUrl,i=nc(e.author.avatar.cache),_=eI("img",{alt:e.author.username,src:i});return eI("li",{id:"comment-"+e.id,children:[eI("div",{className:"dsqjs-post-item dsqjs-clearfix",children:[eI("div",{className:"dsqjs-post-avatar",children:l?eI("a",{href:l,target:"_blank",rel:"noreferrer noopenner nofollow external",children:_}):_}),eI("div",{className:"dsqjs-post-body",children:[eI("div",{className:"dsqjs-post-header",children:[l?eI("span",{className:"dsqjs-post-author",children:eI("a",{href:l,target:"_blank",rel:"noreferrer noopenner nofollow external",children:e.author.name})}):eI("span",{className:"dsqjs-post-author",children:e.author.name}),r===e.author.username&&eI("span",{className:"dsqjs-admin-badge",children:o})," ",eI("span",{className:"dsqjs-bullet"})," ",e.createdAt&&eI("span",{className:"dsqjs-meta",children:eI("time",{children:function(e){let n=new Date(ns(e)-60*na*1e3);return`${n.getFullYear()}-${nd(n.getMonth()+1)}-${nd(n.getDate())} ${nd(n.getHours())}:${nd(n.getMinutes())}`}(e.createdAt)})})]}),e.isDeleted?eI("div",{className:"dsqjs-post-content",children:eI("small",{children:"此评论已被删除"})}):eI("div",{className:"dsqjs-post-content",dangerouslySetInnerHTML:{__html:nc(e.message)}})]})]}),eI(ny,{nesting:t,children:n}),e.hasMore&&eI("p",{className:"dsqjs-has-more",children:["切换至 ",eI(e1,{children:"完整 Disqus 模式"})," 显示更多回复"]})]})}function ny({children:e,nesting:t=1}){let{nesting:r=4}=nm();return e&&0!==e.length?eI("ul",{className:"dsqjs-post-list "+(tq(nv,eM(n({},e),{key:e.comment.id})))}):null}function ng({comments:e}){return eI("ul",{className:"dsqjs-post-list",id:"dsqjs-post-container",children:er(()=>{let n=[],t=[];return e.map((e,n)=>({i:n,p:e.parent,d:ns(e.createdAt)})).sort((e,n)=>e.p&&n.p?e.d-n.d:0).forEach(({i:r})=>{(e[r].parent?t:n).push(e[r])}),n.map(e=>(function e(n,t,r){return{comment:n,children:function(n,t,r){if(0===n.length)return null;let o=[];return n.forEach(l=>{l.parent===t&&o.unshift(e(l,n,r))}),o}(t,Number(n.id),r+1),nesting:r+1}})(e,t,0))},[e]).map(e=>q(nv,eM(n({},e),{key:e.comment.id})))})}let nb=(t=Math.random,(e,n)=>Math.floor(t()*(n-e+1))+e),nq=function(e){return 1===e.length?e[0]:e[nb(0,e.length-1)]};function nk(e){return er(()=>Array.isArray(e)?nq(e):e,[e])}let[nj,nw,nN]=eQ(function(){{let e=localStorage.getItem("dsqjs_sort");if("popular"===e||"asc"===e||"desc"===e)return e}return null}());function nP({sortType:e,onChange:n,checked:t,title:r,label:o}){return eI(j,{children:[eI("input",{className:"dsqjs-order-radio",id:"dsqjs-order-"+e,type:"radio",name:"comment-order",value:e,onChange:n,checked:t}),eI("label",{className:"dsqjs-order-label",htmlFor:"dsqjs-order-"+e,title:r,children:o})]})}let nS=eh(()=>{let e=nw(),n=nN();return eI("div",{className:"dsqjs-order",children:[eI(nP,{checked:"desc"===e||null===e,sortType:"desc",title:"按从新到旧",label:"最新",onChange:eo(()=>n("desc"),[n])}),eI(nP,{checked:"asc"===e,sortType:"asc",title:"按从旧到新",label:"最早",onChange:eo(()=>n("asc"),[n])}),eI(nP,{checked:"popular"===e,sortType:"popular",title:"按评分从高到低",label:"最佳",onChange:eo(()=>n("popular"),[n])})]})}),nC=eh(({totalComments:e,siteName:n})=>eI("header",{className:"dsqjs-header",id:"dsqjs-header",children:eI("nav",{className:"dsqjs-nav dsqjs-clearfix",children:[eI("ul",{children:[eI("li",{className:"dsqjs-nav-tab dsqjs-tab-active",children:eI("span",{children:[e," Comments"]})}),eI("li",{className:"dsqjs-nav-tab",children:n})]}),eI(nS,{})]})}));function nx({id:e}){let{apikey:n,shortname:t,api:r}=nm(),o=et(nk(n)),[l,i]=ee([]),_=eX(),s=nw(),[u,c]=ee(!1),[a,d]=ee(!1),f=eo((n=!1)=>nr(function*(){if(!e)return;c(!0),d(!1);let u=n?null:l[l.length-1];if(u&&!u.cursor.hasNext)return;let a=`${r}3.0/threads/listPostsThreaded?forum=${t}&thread=${e}&order=${null!=s?s:"desc"}${0!==l.length&&(null==u?void 0:u.cursor.next)?"&cursor="+encodeURIComponent(u.cursor.next):""}`,f=()=>{n?_(!0):d(!0),c(!1)};try{let e=yield n_(o.current,a);0===e.code?(i(t=>(n?[]:t).concat(e)),c(!1)):f()}catch(e){f()}})(),[e,l,r,t,s,_]),p=eo(()=>f(!0),[f]),h=eo(()=>f(!1),[f]);!function(e,n){let[t,r]=ee(n=[...n]),o=n.length!==t.length;for(let e=0;el.filter(Boolean).flatMap(e=>e.response),[l]);if(l.length>0){var v;return eI(j,{children:[eI(ng,{comments:m}),(null==(v=l[l.length-1])?void 0:v.cursor.hasNext)&&eI(e0,{isLoading:u,isError:a,onClick:u?void 0:h})]})}return null}function nE(){let{apikey:e,identifier:n,shortname:t,api:r,siteName:o,nocomment:l}=nm(),i=et(nk(e)),[_,s]=ee(null),u=eX(),c=null!=n?n:document.location.origin+document.location.pathname+document.location.search,a=eo(()=>nr(function*(){try{let e=yield n_(i.current,`${r}3.0/threads/list.json?forum=${encodeURIComponent(t)}&thread=${encodeURIComponent("ident:"+c)}`);0===e.code?s(e):u(!0)}catch(e){u(!0)}})(),[r,i,c,u,s,t]),d=e6(),f=et(null);if(en(()=>{let e=eI(j,{children:[eI(e3,{children:"尝试完整 Disqus 模式"})," | ",eI(e1,{children:"强制完整 Disqus 模式"})]});f.current===c?d(eI(j,{children:["你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并"," ",e]})):(d(eI(j,{children:["评论基础模式加载中... 如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并"," ",e]})),f.current=c,a())},[_,a,c,d,t,r]),!_)return null;if(1!==_.response.length)return eI(nl,{});let p=_.response[0],h=p.posts;return eI(j,{children:[eI(nC,{totalComments:h,siteName:null!=o?o:""}),0===h?eI(ni,{text:null!=l?l:"这里空荡荡的,一个人都没有"}):eI(nx,{id:p.id})]})}function nO(){let e=e6(),n=eJ(),t=eY(),{shortname:r,identifier:o,url:l,title:i}=nm();eB(o=>{"disqus"!==n&&"dsqjs"!==n&&(e("正在检查 Disqus 能否访问..."),Promise.all(["disqus.com",`${r}.disqus.com`].map(nf)).then(()=>{o.aborted||t("disqus")}).catch(()=>{o.aborted||t("dsqjs")}))},[n,t,e,r]);let _=eK(),s=e4();return _?eI(no,{}):eI(j,{children:[null!=s&&eI("div",{id:"dsqjs-msg",children:s}),"disqus"===n&&eI(nn,{shortname:r,identifier:o,url:l,title:i}),"dsqjs"===n&&eI(nE,{})]})}let nD=function(e){function n(n){var t=ed({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=ev,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n}((e,t)=>{var{shortname:r,siteName:o,identifier:l,url:i,title:_,api:s,apikey:u,nesting:c,nocomment:a,admin:d,adminLabel:f,className:p}=e,h=eR(e,["shortname","siteName","identifier","url","title","api","apikey","nesting","nocomment","admin","adminLabel","className"]);let m=er(()=>[eI(nh,{value:{shortname:r,siteName:o,identifier:l,url:i,title:_,api:s,apikey:u,nesting:c,nocomment:a,admin:d,adminLabel:f}},"config"),eI(ez,{},"mode"),eI(nj,{},"sortType"),eI(eG,{},"hasError"),eI(e8,{},"msg")],[d,f,s,u,l,c,a,r,o,_,i]);return!function(){let[e,n]=ee(!1);return en(()=>{n(!0)},[]),e}()?null:eI("div",eM(n({ref:t},h),{className:`${eW.dsqjs} ${null!=p?p:""}`,children:eI(eL,{contexts:m,children:eI("section",{id:"dsqjs",children:[eI(nO,{}),eI(eF,{})]})})}))});return class{render(e){let t;(t=e?"string"==typeof e?document.querySelector(e):e:document.getElementById("disqusjs"))&&(this.container=t,A(eI(nD,n({},this.config)),t))}destroy(){this.container&&A(null,this.container)}constructor(n){e(this,"config",void 0),e(this,"container",void 0),this.config=n}}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).DisqusJS=n(); diff --git a/pluginsSrc/disqusjs/dist/browser/styles/disqusjs.css b/pluginsSrc/disqusjs/dist/browser/styles/disqusjs.css deleted file mode 100644 index 5fe8c663..00000000 --- a/pluginsSrc/disqusjs/dist/browser/styles/disqusjs.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.__dsqjs_15s36o #dsqjs *{margin:0;padding:0}.__dsqjs_15s36o #dsqjs a{color:#1f6dda;text-decoration:none}.__dsqjs_15s36o #dsqjs:focus,.__dsqjs_15s36o #dsqjs:hover{color:#363636}.__dsqjs_15s36o #dsqjs #dsqjs-msg{font-size:14px;margin-bottom:4px;margin-top:4px;text-align:center}.__dsqjs_15s36o #dsqjs .dsqjs-msg-btn{cursor:pointer}.__dsqjs_15s36o #dsqjs .dsqjs-bullet{line-height:1.4;margin:0 2px}.__dsqjs_15s36o #dsqjs .dsqjs-bullet:after{color:#c2c6cc;content:"·";font-weight:700}.__dsqjs_15s36o #dsqjs .dsqjs-clearfix:after,.__dsqjs_15s36o #dsqjs .dsqjs-clearfix:before{clear:both;content:"";display:table;line-height:0}.__dsqjs_15s36o #dsqjs .dsqjs-nav{border-bottom:2px solid #e6e8ee;margin:0 0 20px;position:relative}.__dsqjs_15s36o #dsqjs ol,.__dsqjs_15s36o #dsqjs ul{list-style:none;list-style-type:none}.__dsqjs_15s36o #dsqjs .dsqjs-no-comment{word-wrap:break-word;color:#37475b;font-size:16px;line-height:1.5;margin-bottom:6px;overflow:hidden;text-align:center}.__dsqjs_15s36o #dsqjs .dsqjs-nav-tab{color:#37475b;display:block;float:left;font-size:15px;font-weight:700;line-height:1;margin:0 15px 0 0;padding:12px 8px;position:relative;text-transform:capitalize;transition:all .2s ease-in-out}.__dsqjs_15s36o #dsqjs .dsqjs-nav-tab:last-child{margin:0}.__dsqjs_15s36o #dsqjs .dsqjs-tab-active{color:#37475b}.__dsqjs_15s36o #dsqjs .dsqjs-tab-active>span:after{background-color:#076dd0!important;bottom:-5px;content:" ";display:block;height:2px;left:0;position:absolute;right:0}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item{margin-bottom:16px;position:relative}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item .dsqjs-post-avatar{background:#dbdfe4;border-radius:4px;display:block;float:left;margin-right:10px;padding:0;position:relative}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item .dsqjs-post-avatar img{border-radius:4px;display:block;height:44px;width:44px}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item .dsqjs-post-header{font-size:14px;line-height:1;margin-bottom:3px}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item .dsqjs-post-header .dsqjs-post-author{color:#656c7a;font-weight:700}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item .dsqjs-post-header .dsqjs-admin-badge{background:#687a86;border-radius:3px;color:#fff;display:inline-block;font-size:12px;font-weight:700;left:1px;line-height:1;margin-left:4px;padding:1px 3px;position:relative;top:-1px}.__dsqjs_15s36o #dsqjs .dsqjs-post-list .dsqjs-post-item .dsqjs-post-header .dsqjs-meta{color:#64778b;display:inline-block;font-size:12px}.__dsqjs_15s36o #dsqjs .dsqjs-post-body{word-wrap:break-word;color:#37475b;font-size:15px;line-height:1.5;overflow:hidden;word-break:break-all}.__dsqjs_15s36o #dsqjs .dsqjs-post-body :not(pre)>code{background:#e6e8ee;border-radius:3px;color:#405363;font-size:85%;margin:0;padding:.2em .4em}.__dsqjs_15s36o #dsqjs .dsqjs-post-body :not(pre)>code pre{background:#f5f5f5;border-radius:3px;font-size:85%;line-height:1.45;margin:.5em 0;overflow:auto;padding:.5em}.__dsqjs_15s36o #dsqjs .dsqjs-post-body blockquote{border-left:.25em solid #e3e6eb;color:#6a737d;margin:.5em 0;padding:0 .8em}.__dsqjs_15s36o #dsqjs .dsqjs-post-body p:last-child{margin:0}.__dsqjs_15s36o #dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:30px}.__dsqjs_15s36o #dsqjs .dsqjs-post-list.dsqjs-children>li .dsqjs-post-avatar img{height:38px;width:38px}.__dsqjs_15s36o #dsqjs .dsqjs-load-more{background:#687a86;color:#fff;cursor:pointer;display:block;font-size:14px;font-weight:400;margin:0 0 24px;padding:11px 14px;text-align:center}.__dsqjs_15s36o #dsqjs .dsqjs-load-more.is-error{background:#dc222f}.__dsqjs_15s36o #dsqjs .dsqjs-load-more.is-error:hover{color:#fff;opacity:.8}.__dsqjs_15s36o #dsqjs .dsqjs-footer-container{border-top:2px solid #e6e8ee;color:#555;font-size:16px;font-weight:700;line-height:1.5;margin-top:12px;padding-right:10px;padding-top:10px;text-align:right}.__dsqjs_15s36o #dsqjs .dsqjs-footer{color:#64778b}.__dsqjs_15s36o #dsqjs .dsqjs-disqus-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 438 80'%3E%3Cpath fill='%23575B5D' d='M30.2 1.6H1v76h28.9C57 77.6 73 61.3 73 39.4v-.2c0-22-15.7-37.6-42.9-37.6zm21.3 38.1c0 12.3-8.4 19.3-21 19.3H22V20.3h8.5c12.6 0 21 7 21 19.2v.2zm35.6 38h21.2V1.5H87.1v76zm70-47.4c-10.4-2.4-13-4-13-7.4v-.2c0-2.7 2.4-5 7.6-5 6.7 0 14.3 2.7 21.2 7.6l10.6-14.9A47.9 47.9 0 0 0 152.2.3c-18.3 0-29.4 10.2-29.4 24.3v.2c0 15.7 12.4 20.3 28.6 24 10.4 2.3 12.9 4 12.9 7.2v.2c0 3.3-3 5.2-8.7 5.2-8.8 0-17.2-3.1-24.7-9l-11.7 14a53.1 53.1 0 0 0 35.6 12.5c18.5 0 30.7-9.2 30.7-24.7V54c0-14.3-10.8-20-28.3-23.7zm120.7 9.3v-.2A39.5 39.5 0 0 0 236.9.1c-23.4 0-41 17.7-41 39.5v.2a39.5 39.5 0 0 0 40.8 39.4c8.7 0 16.6-2.5 23.1-6.8l8.4 7.5L279 68.1l-7.9-6.6a38 38 0 0 0 6.8-21.9zm-21.4.5c0 2.6-.5 5-1.3 7.3l-10.4-9.3-10.6 12 10.5 9a21.7 21.7 0 0 1-7.7 1.4c-11.6 0-19.4-9.7-19.4-20.7v-.2c0-11 7.7-20.5 19.2-20.5 11.7 0 19.7 9.7 19.7 20.7v.3zm83.5 4.3c0 10.6-5.5 15.6-14 15.6s-14-5.2-14-16.1V1.6h-21.4v42.7C290.5 68 304 79 325.7 79s35.6-10.8 35.6-35.3V1.5h-21.4v42.8zm68.9-14.1c-10.6-2.4-13.2-4-13.2-7.4v-.2c0-2.7 2.5-5 7.6-5 6.8 0 14.4 2.7 21.3 7.6l10.6-14.9A47.9 47.9 0 0 0 403.8.3c-18.3 0-29.5 10.2-29.5 24.3v.2c0 15.7 12.5 20.3 28.7 24 10.3 2.3 12.8 4 12.8 7.2v.2c0 3.3-3 5.3-8.7 5.3-8.8 0-17.1-3.2-24.6-9.2l-11.7 14A53.1 53.1 0 0 0 406.4 79c18.5 0 30.7-9.2 30.7-24.7V54c0-14.3-10.8-20-28.3-23.7z'/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;display:inline-block;height:12px;width:65.7px}.__dsqjs_15s36o #dsqjs .dsqjs-order{align-items:center;display:flex;float:right;margin-bottom:12px;margin-top:10px}.__dsqjs_15s36o #dsqjs .dsqjs-order-radio{display:none}.__dsqjs_15s36o #dsqjs .dsqjs-order-radio:checked+.dsqjs-order-label{background-color:#64778b;color:#eceef2}.__dsqjs_15s36o #dsqjs .dsqjs-order-label{background-color:#eceef2;border-radius:2px;cursor:pointer;display:block;font-size:12px;height:20px;line-height:20px;margin-right:10px;padding:0 5px}.__dsqjs_15s36o #dsqjs .dsqjs-has-more{font-size:13px;line-height:15px;margin-bottom:24px;margin-left:48px}@media (min-width:769px){.__dsqjs_15s36o #dsqjs #dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:48px}.__dsqjs_15s36o #dsqjs #dsqjs .dsqjs-post-list .dsqjs-post-avatar{margin-right:12px}.__dsqjs_15s36o #dsqjs #dsqjs .dsqjs-post-list .dsqjs-post-item{margin-bottom:20px}}@media (min-width:1024px){.__dsqjs_15s36o #dsqjs #dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:60px}} \ No newline at end of file diff --git a/pluginsSrc/gitalk/dist/gitalk.css b/pluginsSrc/gitalk/dist/gitalk.css deleted file mode 100644 index 365cad04..00000000 --- a/pluginsSrc/gitalk/dist/gitalk.css +++ /dev/null @@ -1,1251 +0,0 @@ -@font-face { - font-family: octicons-link; - src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff'); -} - -.markdown-body { - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; - line-height: 1.5; - color: #24292e; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-size: 16px; - line-height: 1.5; - word-wrap: break-word; -} - -.markdown-body .pl-c { - color: #6a737d; -} - -.markdown-body .pl-c1, -.markdown-body .pl-s .pl-v { - color: #005cc5; -} - -.markdown-body .pl-e, -.markdown-body .pl-en { - color: #6f42c1; -} - -.markdown-body .pl-smi, -.markdown-body .pl-s .pl-s1 { - color: #24292e; -} - -.markdown-body .pl-ent { - color: #22863a; -} - -.markdown-body .pl-k { - color: #d73a49; -} - -.markdown-body .pl-s, -.markdown-body .pl-pds, -.markdown-body .pl-s .pl-pse .pl-s1, -.markdown-body .pl-sr, -.markdown-body .pl-sr .pl-cce, -.markdown-body .pl-sr .pl-sre, -.markdown-body .pl-sr .pl-sra { - color: #032f62; -} - -.markdown-body .pl-v, -.markdown-body .pl-smw { - color: #e36209; -} - -.markdown-body .pl-bu { - color: #b31d28; -} - -.markdown-body .pl-ii { - color: #fafbfc; - background-color: #b31d28; -} - -.markdown-body .pl-c2 { - color: #fafbfc; - background-color: #d73a49; -} - -.markdown-body .pl-c2::before { - content: "^M"; -} - -.markdown-body .pl-sr .pl-cce { - font-weight: bold; - color: #22863a; -} - -.markdown-body .pl-ml { - color: #735c0f; -} - -.markdown-body .pl-mh, -.markdown-body .pl-mh .pl-en, -.markdown-body .pl-ms { - font-weight: bold; - color: #005cc5; -} - -.markdown-body .pl-mi { - font-style: italic; - color: #24292e; -} - -.markdown-body .pl-mb { - font-weight: bold; - color: #24292e; -} - -.markdown-body .pl-md { - color: #b31d28; - background-color: #ffeef0; -} - -.markdown-body .pl-mi1 { - color: #22863a; - background-color: #f0fff4; -} - -.markdown-body .pl-mc { - color: #e36209; - background-color: #ffebda; -} - -.markdown-body .pl-mi2 { - color: #f6f8fa; - background-color: #005cc5; -} - -.markdown-body .pl-mdr { - font-weight: bold; - color: #6f42c1; -} - -.markdown-body .pl-ba { - color: #586069; -} - -.markdown-body .pl-sg { - color: #959da5; -} - -.markdown-body .pl-corl { - text-decoration: underline; - color: #032f62; -} - -.markdown-body .octicon { - display: inline-block; - vertical-align: text-top; - fill: currentColor; -} - -.markdown-body a { - background-color: transparent; - -webkit-text-decoration-skip: objects; -} - -.markdown-body a:active, -.markdown-body a:hover { - outline-width: 0; -} - -.markdown-body strong { - font-weight: inherit; -} - -.markdown-body strong { - font-weight: bolder; -} - -.markdown-body h1 { - font-size: 2em; - margin: 0.67em 0; -} - -.markdown-body img { - border-style: none; -} - -.markdown-body svg:not(:root) { - overflow: hidden; -} - -.markdown-body code, -.markdown-body kbd, -.markdown-body pre { - font-family: monospace, monospace; - font-size: 1em; -} - -.markdown-body hr { - -webkit-box-sizing: content-box; - box-sizing: content-box; - height: 0; - overflow: visible; -} - -.markdown-body input { - font: inherit; - margin: 0; -} - -.markdown-body input { - overflow: visible; -} - -.markdown-body [type="checkbox"] { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} - -.markdown-body * { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.markdown-body input { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} - -.markdown-body a { - color: #0366d6; - text-decoration: none; -} - -.markdown-body a:hover { - text-decoration: underline; -} - -.markdown-body strong { - font-weight: 600; -} - -.markdown-body hr { - height: 0; - margin: 15px 0; - overflow: hidden; - background: transparent; - border: 0; - border-bottom: 1px solid #dfe2e5; -} - -.markdown-body hr::before { - display: table; - content: ""; -} - -.markdown-body hr::after { - display: table; - clear: both; - content: ""; -} - -.markdown-body table { - border-spacing: 0; - border-collapse: collapse; -} - -.markdown-body td, -.markdown-body th { - padding: 0; -} - -.markdown-body h1, -.markdown-body h2, -.markdown-body h3, -.markdown-body h4, -.markdown-body h5, -.markdown-body h6 { - margin-top: 0; - margin-bottom: 0; -} - -.markdown-body h1 { - font-size: 32px; - font-weight: 600; -} - -.markdown-body h2 { - font-size: 24px; - font-weight: 600; -} - -.markdown-body h3 { - font-size: 20px; - font-weight: 600; -} - -.markdown-body h4 { - font-size: 16px; - font-weight: 600; -} - -.markdown-body h5 { - font-size: 14px; - font-weight: 600; -} - -.markdown-body h6 { - font-size: 12px; - font-weight: 600; -} - -.markdown-body p { - margin-top: 0; - margin-bottom: 10px; -} - -.markdown-body blockquote { - margin: 0; -} - -.markdown-body ul, -.markdown-body ol { - padding-left: 0; - margin-top: 0; - margin-bottom: 0; -} - -.markdown-body ol ol, -.markdown-body ul ol { - list-style-type: lower-roman; -} - -.markdown-body ul ul ol, -.markdown-body ul ol ol, -.markdown-body ol ul ol, -.markdown-body ol ol ol { - list-style-type: lower-alpha; -} - -.markdown-body dd { - margin-left: 0; -} - -.markdown-body code { - font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 12px; -} - -.markdown-body pre { - margin-top: 0; - margin-bottom: 0; - font: 12px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; -} - -.markdown-body .octicon { - vertical-align: text-bottom; -} - -.markdown-body .pl-0 { - padding-left: 0 !important; -} - -.markdown-body .pl-1 { - padding-left: 4px !important; -} - -.markdown-body .pl-2 { - padding-left: 8px !important; -} - -.markdown-body .pl-3 { - padding-left: 16px !important; -} - -.markdown-body .pl-4 { - padding-left: 24px !important; -} - -.markdown-body .pl-5 { - padding-left: 32px !important; -} - -.markdown-body .pl-6 { - padding-left: 40px !important; -} - -.markdown-body::before { - display: table; - content: ""; -} - -.markdown-body::after { - display: table; - clear: both; - content: ""; -} - -.markdown-body>*:first-child { - margin-top: 0 !important; -} - -.markdown-body>*:last-child { - margin-bottom: 0 !important; -} - -.markdown-body a:not([href]) { - color: inherit; - text-decoration: none; -} - -.markdown-body .anchor { - float: left; - padding-right: 4px; - margin-left: -20px; - line-height: 1; -} - -.markdown-body .anchor:focus { - outline: none; -} - -.markdown-body p, -.markdown-body blockquote, -.markdown-body ul, -.markdown-body ol, -.markdown-body dl, -.markdown-body table, -.markdown-body pre { - margin-top: 0; - margin-bottom: 16px; -} - -.markdown-body hr { - height: 0.25em; - padding: 0; - margin: 24px 0; - background-color: #e1e4e8; - border: 0; -} - -.markdown-body blockquote { - padding: 0 1em; - color: #6a737d; - border-left: 0.25em solid #dfe2e5; -} - -.markdown-body blockquote>:first-child { - margin-top: 0; -} - -.markdown-body blockquote>:last-child { - margin-bottom: 0; -} - -.markdown-body kbd { - display: inline-block; - padding: 3px 5px; - font-size: 11px; - line-height: 10px; - color: #444d56; - vertical-align: middle; - background-color: #fafbfc; - border: solid 1px #c6cbd1; - border-bottom-color: #959da5; - border-radius: 3px; - -webkit-box-shadow: inset 0 -1px 0 #959da5; - box-shadow: inset 0 -1px 0 #959da5; -} - -.markdown-body h1, -.markdown-body h2, -.markdown-body h3, -.markdown-body h4, -.markdown-body h5, -.markdown-body h6 { - margin-top: 24px; - margin-bottom: 16px; - font-weight: 600; - line-height: 1.25; -} - -.markdown-body h1 .octicon-link, -.markdown-body h2 .octicon-link, -.markdown-body h3 .octicon-link, -.markdown-body h4 .octicon-link, -.markdown-body h5 .octicon-link, -.markdown-body h6 .octicon-link { - color: #1b1f23; - vertical-align: middle; - visibility: hidden; -} - -.markdown-body h1:hover .anchor, -.markdown-body h2:hover .anchor, -.markdown-body h3:hover .anchor, -.markdown-body h4:hover .anchor, -.markdown-body h5:hover .anchor, -.markdown-body h6:hover .anchor { - text-decoration: none; -} - -.markdown-body h1:hover .anchor .octicon-link, -.markdown-body h2:hover .anchor .octicon-link, -.markdown-body h3:hover .anchor .octicon-link, -.markdown-body h4:hover .anchor .octicon-link, -.markdown-body h5:hover .anchor .octicon-link, -.markdown-body h6:hover .anchor .octicon-link { - visibility: visible; -} - -.markdown-body h1 { - padding-bottom: 0.3em; - font-size: 2em; - border-bottom: 1px solid #eaecef; -} - -.markdown-body h2 { - padding-bottom: 0.3em; - font-size: 1.5em; - border-bottom: 1px solid #eaecef; -} - -.markdown-body h3 { - font-size: 1.25em; -} - -.markdown-body h4 { - font-size: 1em; -} - -.markdown-body h5 { - font-size: 0.875em; -} - -.markdown-body h6 { - font-size: 0.85em; - color: #6a737d; -} - -.markdown-body ul, -.markdown-body ol { - padding-left: 2em; -} - -.markdown-body ul ul, -.markdown-body ul ol, -.markdown-body ol ol, -.markdown-body ol ul { - margin-top: 0; - margin-bottom: 0; -} - -.markdown-body li>p { - margin-top: 16px; -} - -.markdown-body li+li { - margin-top: 0.25em; -} - -.markdown-body dl { - padding: 0; -} - -.markdown-body dl dt { - padding: 0; - margin-top: 16px; - font-size: 1em; - font-style: italic; - font-weight: 600; -} - -.markdown-body dl dd { - padding: 0 16px; - margin-bottom: 16px; -} - -.markdown-body table { - display: block; - width: 100%; - overflow: auto; -} - -.markdown-body table th { - font-weight: 600; -} - -.markdown-body table th, -.markdown-body table td { - padding: 6px 13px; - border: 1px solid #dfe2e5; -} - -.markdown-body table tr { - background-color: #fff; - border-top: 1px solid #c6cbd1; -} - -.markdown-body table tr:nth-child(2n) { - background-color: #f6f8fa; -} - -.markdown-body img { - max-width: 100%; - -webkit-box-sizing: content-box; - box-sizing: content-box; - background-color: #fff; -} - -.markdown-body code { - padding: 0; - padding-top: 0.2em; - padding-bottom: 0.2em; - margin: 0; - font-size: 85%; - background-color: rgba(27,31,35,0.05); - border-radius: 3px; -} - -.markdown-body code::before, -.markdown-body code::after { - letter-spacing: -0.2em; - content: "\A0"; -} - -.markdown-body pre { - word-wrap: normal; -} - -.markdown-body pre>code { - padding: 0; - margin: 0; - font-size: 100%; - word-break: normal; - white-space: pre; - background: transparent; - border: 0; -} - -.markdown-body .highlight { - margin-bottom: 16px; -} - -.markdown-body .highlight pre { - margin-bottom: 0; - word-break: normal; -} - -.markdown-body .highlight pre, -.markdown-body pre { - padding: 16px; - overflow: auto; - font-size: 85%; - line-height: 1.45; - background-color: #f6f8fa; - border-radius: 3px; -} - -.markdown-body pre code { - display: inline; - max-width: auto; - padding: 0; - margin: 0; - overflow: visible; - line-height: inherit; - word-wrap: normal; - background-color: transparent; - border: 0; -} - -.markdown-body pre code::before, -.markdown-body pre code::after { - content: normal; -} - -.markdown-body .full-commit .btn-outline:not(:disabled):hover { - color: #005cc5; - border-color: #005cc5; -} - -.markdown-body kbd { - display: inline-block; - padding: 3px 5px; - font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; - line-height: 10px; - color: #444d56; - vertical-align: middle; - background-color: #fafbfc; - border: solid 1px #d1d5da; - border-bottom-color: #c6cbd1; - border-radius: 3px; - -webkit-box-shadow: inset 0 -1px 0 #c6cbd1; - box-shadow: inset 0 -1px 0 #c6cbd1; -} - -.markdown-body :checked+.radio-label { - position: relative; - z-index: 1; - border-color: #0366d6; -} - -.markdown-body .task-list-item { - list-style-type: none; -} - -.markdown-body .task-list-item+.task-list-item { - margin-top: 3px; -} - -.markdown-body .task-list-item input { - margin: 0 0.2em 0.25em -1.6em; - vertical-align: middle; -} - -.markdown-body hr { - border-bottom-color: #eee; -} -/* variables */ -/* functions & mixins */ -/* variables - calculated */ -/* styles */ -.gt-container { - -webkit-box-sizing: border-box; - box-sizing: border-box; - font-size: 16px; -/* loader */ -/* error */ -/* initing */ -/* no int */ -/* link */ -/* meta */ -/* popup */ -/* header */ -/* comments */ -/* comment */ -} -.gt-container * { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.gt-container a { - color: #6190e8; -} -.gt-container a:hover { - color: #81a6ed; - border-color: #81a6ed; -} -.gt-container a.is--active { - color: #333; - cursor: default !important; -} -.gt-container a.is--active:hover { - color: #333; -} -.gt-container .hide { - display: none !important; -} -.gt-container .gt-svg { - display: inline-block; - width: 1em; - height: 1em; - vertical-align: sub; -} -.gt-container .gt-svg svg { - width: 100%; - height: 100%; - fill: #6190e8; -} -.gt-container .gt-ico { - display: inline-block; -} -.gt-container .gt-ico-text { - margin-left: 0.3125em; -} -.gt-container .gt-ico-github { - width: 100%; - height: 100%; -} -.gt-container .gt-ico-github .gt-svg { - width: 100%; - height: 100%; -} -.gt-container .gt-ico-github svg { - fill: inherit; -} -.gt-container .gt-spinner { - position: relative; -} -.gt-container .gt-spinner::before { - content: ''; - -webkit-box-sizing: border-box; - box-sizing: border-box; - position: absolute; - top: 3px; - width: 0.75em; - height: 0.75em; - margin-top: -0.1875em; - margin-left: -0.375em; - border-radius: 50%; - border: 1px solid #fff; - border-top-color: #6190e8; - -webkit-animation: gt-kf-rotate 0.6s linear infinite; - animation: gt-kf-rotate 0.6s linear infinite; -} -.gt-container .gt-loader { - position: relative; - border: 1px solid #999; - -webkit-animation: ease gt-kf-rotate 1.5s infinite; - animation: ease gt-kf-rotate 1.5s infinite; - display: inline-block; - font-style: normal; - width: 1.75em; - height: 1.75em; - line-height: 1.75em; - border-radius: 50%; -} -.gt-container .gt-loader:before { - content: ''; - position: absolute; - display: block; - top: 0; - left: 50%; - margin-top: -0.1875em; - margin-left: -0.1875em; - width: 0.375em; - height: 0.375em; - background-color: #999; - border-radius: 50%; -} -.gt-container .gt-avatar { - display: inline-block; - width: 3.125em; - height: 3.125em; -} -@media (max-width: 479px) { - .gt-container .gt-avatar { - width: 2em; - height: 2em; - } -} -.gt-container .gt-avatar img { - width: 100%; - height: auto; - border-radius: 3px; -} -.gt-container .gt-avatar-github { - width: 3em; - height: 3em; - cursor: pointer; -} -@media (max-width: 479px) { - .gt-container .gt-avatar-github { - width: 1.875em; - height: 1.875em; - } -} -.gt-container .gt-btn { - padding: 0.75em 1.25em; - display: inline-block; - line-height: 1; - text-decoration: none; - white-space: nowrap; - cursor: pointer; - border: 1px solid #6190e8; - border-radius: 5px; - background-color: #6190e8; - color: #fff; - outline: none; - font-size: 0.75em; -} -.gt-container .gt-btn-text { - font-weight: 400; -} -.gt-container .gt-btn-loading { - position: relative; - margin-left: 0.5em; - display: inline-block; - width: 0.75em; - height: 1em; - vertical-align: top; -} -.gt-container .gt-btn.is--disable { - cursor: not-allowed; - opacity: 0.5; -} -.gt-container .gt-btn-login { - margin-right: 0; -} -.gt-container .gt-btn-preview { - background-color: #fff; - color: #6190e8; -} -.gt-container .gt-btn-preview:hover { - background-color: #f2f2f2; - border-color: #81a6ed; -} -.gt-container .gt-btn-public:hover { - background-color: #81a6ed; - border-color: #81a6ed; -} -.gt-container .gt-error { - text-align: center; - margin: 0.625em; - color: #ff3860; -} -.gt-container .gt-initing { - padding: 1.25em 0; - text-align: center; -} -.gt-container .gt-initing-text { - margin: 0.625em auto; - font-size: 92%; -} -.gt-container .gt-no-init { - padding: 1.25em 0; - text-align: center; -} -.gt-container .gt-link { - border-bottom: 1px dotted #6190e8; -} -.gt-container .gt-link-counts, -.gt-container .gt-link-project { - text-decoration: none; -} -.gt-container .gt-meta { - margin: 1.25em 0; - padding: 1em 0; - position: relative; - border-bottom: 1px solid #e9e9e9; - font-size: 1em; - position: relative; - z-index: 10; -} -.gt-container .gt-meta:before, -.gt-container .gt-meta:after { - content: " "; - display: table; -} -.gt-container .gt-meta:after { - clear: both; -} -.gt-container .gt-counts { - margin: 0 0.625em 0 0; -} -.gt-container .gt-user { - float: right; - margin: 0; - font-size: 92%; -} -.gt-container .gt-user-pic { - width: 16px; - height: 16px; - vertical-align: top; - margin-right: 0.5em; -} -.gt-container .gt-user-inner { - display: inline-block; - cursor: pointer; -} -.gt-container .gt-user .gt-ico { - margin: 0 0 0 0.3125em; -} -.gt-container .gt-user .gt-ico svg { - fill: inherit; -} -.gt-container .gt-user .is--poping .gt-ico svg { - fill: #6190e8; -} -.gt-container .gt-version { - color: #a1a1a1; - margin-left: 0.375em; -} -.gt-container .gt-copyright { - margin: 0 0.9375em 0.5em; - border-top: 1px solid #e9e9e9; - padding-top: 0.5em; -} -.gt-container .gt-popup { - position: absolute; - right: 0; - top: 2.375em; - background: #fff; - display: inline-block; - border: 1px solid #e9e9e9; - padding: 0.625em 0; - font-size: 0.875em; - letter-spacing: 0.5px; -} -.gt-container .gt-popup .gt-action { - cursor: pointer; - display: block; - margin: 0.5em 0; - padding: 0 1.125em; - position: relative; - text-decoration: none; -} -.gt-container .gt-popup .gt-action.is--active:before { - content: ''; - width: 0.25em; - height: 0.25em; - background: #6190e8; - position: absolute; - left: 0.5em; - top: 0.4375em; -} -.gt-container .gt-header { - position: relative; - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.gt-container .gt-header-comment { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - margin-left: 1.25em; -} -@media (max-width: 479px) { - .gt-container .gt-header-comment { - margin-left: 0.875em; - } -} -.gt-container .gt-header-textarea { - padding: 0.75em; - display: block; - -webkit-box-sizing: border-box; - box-sizing: border-box; - width: 100%; - min-height: 5.125em; - max-height: 15em; - border-radius: 5px; - border: 1px solid rgba(0,0,0,0.1); - font-size: 0.875em; - word-wrap: break-word; - resize: vertical; - background-color: #f6f6f6; - outline: none; - -webkit-transition: all 0.25s ease; - transition: all 0.25s ease; -} -.gt-container .gt-header-textarea:hover { - background-color: #fbfbfb; -} -.gt-container .gt-header-preview { - padding: 0.75em; - border-radius: 5px; - border: 1px solid rgba(0,0,0,0.1); - background-color: #f6f6f6; -} -.gt-container .gt-header-controls { - position: relative; - margin: 0.75em 0 0; -} -.gt-container .gt-header-controls:before, -.gt-container .gt-header-controls:after { - content: " "; - display: table; -} -.gt-container .gt-header-controls:after { - clear: both; -} -@media (max-width: 479px) { - .gt-container .gt-header-controls { - margin: 0; - } -} -.gt-container .gt-header-controls-tip { - font-size: 0.875em; - color: #6190e8; - text-decoration: none; - vertical-align: sub; -} -@media (max-width: 479px) { - .gt-container .gt-header-controls-tip { - display: none; - } -} -.gt-container .gt-header-controls .gt-btn { - float: right; - margin-left: 1.25em; -} -@media (max-width: 479px) { - .gt-container .gt-header-controls .gt-btn { - float: none; - width: 100%; - margin: 0.75em 0 0; - } -} -.gt-container:after { - content: ''; - position: fixed; - bottom: 100%; - left: 0; - right: 0; - top: 0; - opacity: 0; -} -.gt-container.gt-input-focused { - position: relative; -} -.gt-container.gt-input-focused:after { - content: ''; - position: fixed; - bottom: 0%; - left: 0; - right: 0; - top: 0; - background: #000; - opacity: 0.6; - -webkit-transition: opacity 0.3s, bottom 0s; - transition: opacity 0.3s, bottom 0s; - z-index: 9999; -} -.gt-container.gt-input-focused .gt-header-comment { - z-index: 10000; -} -.gt-container .gt-comments { - padding-top: 1.25em; -} -.gt-container .gt-comments-null { - text-align: center; -} -.gt-container .gt-comments-controls { - margin: 1.25em 0; - text-align: center; -} -.gt-container .gt-comment { - position: relative; - padding: 0.625em 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.gt-container .gt-comment-content { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - margin-left: 1.25em; - padding: 0.75em 1em; - background-color: #f9f9f9; - overflow: auto; - -webkit-transition: all ease 0.25s; - transition: all ease 0.25s; -} -.gt-container .gt-comment-content:hover { - -webkit-box-shadow: 0 0.625em 3.75em 0 #f4f4f4; - box-shadow: 0 0.625em 3.75em 0 #f4f4f4; -} -@media (max-width: 479px) { - .gt-container .gt-comment-content { - margin-left: 0.875em; - padding: 0.625em 0.75em; - } -} -.gt-container .gt-comment-header { - margin-bottom: 0.5em; - font-size: 0.875em; - position: relative; -} -.gt-container .gt-comment-block-1 { - float: right; - height: 1.375em; - width: 2em; -} -.gt-container .gt-comment-block-2 { - float: right; - height: 1.375em; - width: 4em; -} -.gt-container .gt-comment-username { - font-weight: 500; - color: #6190e8; - text-decoration: none; -} -.gt-container .gt-comment-username:hover { - text-decoration: underline; -} -.gt-container .gt-comment-text { - margin-left: 0.5em; - color: #a1a1a1; -} -.gt-container .gt-comment-date { - margin-left: 0.5em; - color: #a1a1a1; -} -.gt-container .gt-comment-like, -.gt-container .gt-comment-edit, -.gt-container .gt-comment-reply { - position: absolute; - height: 1.375em; -} -.gt-container .gt-comment-like:hover, -.gt-container .gt-comment-edit:hover, -.gt-container .gt-comment-reply:hover { - cursor: pointer; -} -.gt-container .gt-comment-like { - top: 0; - right: 2em; -} -.gt-container .gt-comment-edit, -.gt-container .gt-comment-reply { - top: 0; - right: 0; -} -.gt-container .gt-comment-body { - color: #333 !important; -} -.gt-container .gt-comment-body .email-hidden-toggle a { - display: inline-block; - height: 12px; - padding: 0 9px; - font-size: 12px; - font-weight: 600; - line-height: 6px; - color: #444d56; - text-decoration: none; - vertical-align: middle; - background: #dfe2e5; - border-radius: 1px; -} -.gt-container .gt-comment-body .email-hidden-toggle a:hover { - background-color: #c6cbd1; -} -.gt-container .gt-comment-body .email-hidden-reply { - display: none; - white-space: pre-wrap; -} -.gt-container .gt-comment-body .email-hidden-reply .email-signature-reply { - padding: 0 15px; - margin: 15px 0; - color: #586069; - border-left: 4px solid #dfe2e5; -} -.gt-container .gt-comment-body .email-hidden-reply.expanded { - display: block; -} -.gt-container .gt-comment-admin .gt-comment-content { - background-color: #f6f9fe; -} -@-webkit-keyframes gt-kf-rotate { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes gt-kf-rotate { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -/*# sourceMappingURL=gitalk.css.map*/ \ No newline at end of file diff --git a/pluginsSrc/gitalk/dist/gitalk.min.js b/pluginsSrc/gitalk/dist/gitalk.min.js deleted file mode 100644 index 02b3e8c7..00000000 --- a/pluginsSrc/gitalk/dist/gitalk.min.js +++ /dev/null @@ -1,35 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gitalk=t():e.Gitalk=t()}(this,function(){return function(e){function t(a){if(n[a])return n[a].exports;var i=n[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist",t(t.s=191)}([function(e,t,n){"use strict";function a(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}t.a=a},function(e,t,n){"use strict";function a(e){i.a(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}t.a=a;var i=n(0)},function(e,t,n){"use strict";function a(e){return function(t){var n=t||{},a=n.width?String(n.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}t.a=a},function(e,t,n){"use strict";function a(e){return function(t,n){var a,i=n||{},r=i.context?String(i.context):"standalone";if("formatting"===r&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,u=i.width?String(i.width):o;a=e.formattingValues[u]||e.formattingValues[o]}else{var s=e.defaultWidth,d=i.width?String(i.width):e.defaultWidth;a=e.values[d]||e.values[s]}return a[e.argumentCallback?e.argumentCallback(t):t]}}t.a=a},function(e,t,n){"use strict";function a(e){return function(t,n){var a=String(t),i=n||{},r=a.match(e.matchPattern);if(!r)return null;var o=r[0],u=a.match(e.parsePattern);if(!u)return null;var s=e.valueCallback?e.valueCallback(u[0]):u[0];return s=i.valueCallback?i.valueCallback(s):s,{value:s,rest:a.slice(o.length)}}}t.a=a},function(e,t,n){"use strict";function a(e){return function(t,n){var a=String(t),o=n||{},u=o.width,s=u&&e.matchPatterns[u]||e.matchPatterns[e.defaultMatchWidth],d=a.match(s);if(!d)return null;var c,l=d[0],m=u&&e.parsePatterns[u]||e.parsePatterns[e.defaultParseWidth];return c="[object Array]"===Object.prototype.toString.call(m)?r(m,function(e){return e.test(l)}):i(m,function(e){return e.test(l)}),c=e.valueCallback?e.valueCallback(c):c,c=o.valueCallback?o.valueCallback(c):c,{value:c,rest:a.slice(l.length)}}}function i(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function r(e,t){for(var n=0;n0;)n[a]=arguments[a+2];if(!v(e))return e;var i=e.attributes||e.props,r=I.h(e.nodeName||e.type,i,e.children||i&&i.children),o=[r,t];return n&&n.length?o.push(n):t&&t.children&&o.push(t.children),p(I.cloneElement.apply(void 0,o))}function v(e){return e&&(e instanceof J||e.$$typeof===L)}function w(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function b(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var a={};for(var i in n)a[i.toLowerCase()]=i;if(a.ondoubleclick&&(n.ondblclick=n[a.ondoubleclick],delete n[a.ondoubleclick]),a.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var r=a.oninput||"oninput";n[r]||(n[r]=z([n[r],n[a.onchange]]),delete n[a.onchange])}}}function y(e){var t=e.attributes;if(t){var n=t.className||t.class;n&&(t.className=n)}}function M(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function k(e,t){for(var n in e)if(!(n in t))return!0;for(var a in t)if(e[a]!==t[a])return!0;return!1}function P(e){return e&&e.base||e}function W(){}function x(e){function t(e,t){S(this),A.call(this,e,t,U),N.call(this,e,t)}return e=M({constructor:t},e),e.mixins&&T(e,j(e.mixins)),e.statics&&M(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),W.prototype=A.prototype,t.prototype=M(new W,e),t.displayName=e.displayName||"Component",t}function j(e){for(var t={},n=0;n1)for(var n=1;n0,o=i?(r+a(t))%r:a(t);return n*r+o}t.a=i;var r=6e4},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";function a(e,t){o.a(2,arguments);var n=r.a(e),a=i.a(t);return isNaN(a)?new Date(NaN):a?(n.setDate(n.getDate()+a),n):n}t.a=a;var i=n(6),r=n(1),o=n(0)},function(e,t,n){"use strict";function a(e,t){o.a(1,arguments);var n=t||{},a=n.locale,u=a&&a.options&&a.options.weekStartsOn,s=null==u?0:r.a(u),d=null==n.weekStartsOn?s:r.a(n.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=i.a(e),l=c.getDay(),m=(l0?1:o}t.a=a;var i=n(1),r=n(0)},function(e,t,n){"use strict";var a=n(48),i=n(341),r=n(35),o=n(36),u=n(37),s={code:"en-US",formatDistance:a.a,formatLong:i.a,formatRelative:r.a,localize:o.a,match:u.a,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.a=s},function(e,t,n){var a=n(51);e.exports=function(e,t,n){if(a(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,a){return e.call(t,n,a)};case 3:return function(n,a,i){return e.call(t,n,a,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,n){var a=n(104),i=n(70);e.exports=function(e){return a(i(e))}},function(e,t,n){var a=n(70);e.exports=function(e){return Object(a(e))}},function(e,t,n){"use strict";function a(e){o.a(1,arguments);var t=i.a(e),n=t.getFullYear(),a=new Date(0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);var u=r.a(a),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var d=r.a(s);return t.getTime()>=u.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}t.a=a;var i=n(1),r=n(25),o=n(0)},function(e,t,n){"use strict";function a(e,t,n,a){return i[e]}t.a=a;var i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"}},function(e,t,n){"use strict";function a(e,t){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"}var i=n(3),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},o={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},u={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},s={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},d={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},l={ordinalNumber:a,era:i.a({values:r,defaultWidth:"wide"}),quarter:i.a({values:o,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:i.a({values:u,defaultWidth:"wide"}),day:i.a({values:s,defaultWidth:"wide"}),dayPeriod:i.a({values:d,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})};t.a=l},function(e,t,n){"use strict";var a=n(4),i=n(5),r=/^(\d+)(th|st|nd|rd)?/i,o=/\d+/i,u={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},s={any:[/^b/i,/^(a|c)/i]},d={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},c={any:[/1/i,/2/i,/3/i,/4/i]},l={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},m={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},h={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},p={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},v={ordinalNumber:a.a({matchPattern:r,parsePattern:o,valueCallback:function(e){return parseInt(e,10)}}),era:i.a({matchPatterns:u,defaultMatchWidth:"wide",parsePatterns:s,defaultParseWidth:"any"}),quarter:i.a({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:c,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:i.a({matchPatterns:l,defaultMatchWidth:"wide",parsePatterns:m,defaultParseWidth:"any"}),day:i.a({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),dayPeriod:i.a({matchPatterns:p,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})};t.a=v},function(e,t,n){"use strict";function a(e,t){for(var n=e<0?"-":"",a=Math.abs(e).toString();a.length=t.length?{value:void 0,done:!0}:(e=a(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports=!0},function(e,t,n){var a=n(103),i=n(75);e.exports=Object.keys||function(e){return a(e,i)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function a(e,t){o.a(2,arguments);var n=r.a(e),a=i.a(t);if(isNaN(a))return new Date(NaN);if(!a)return n;var u=n.getDate(),s=new Date(n.getTime());return s.setMonth(n.getMonth()+a+1,0),u>=s.getDate()?s:(n.setFullYear(s.getFullYear(),s.getMonth(),u),n)}t.a=a;var i=n(6),r=n(1),o=n(0)},function(e,t,n){"use strict";function a(e,t){o.a(2,arguments);var n=r.a(e).getTime(),a=i.a(t);return new Date(n+a)}t.a=a;var i=n(6),r=n(1),o=n(0)},function(e,t,n){"use strict";function a(e){o.a(1,arguments);var t=i.a(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),r.a(n)}t.a=a;var i=n(34),r=n(25),o=n(0)},function(e,t,n){"use strict";function a(e,t){r.a(2,arguments);var n=i.a(e),a=i.a(t);return n.getTime()===a.getTime()}t.a=a;var i=n(57),r=n(0)},function(e,t,n){"use strict";function a(e,t,n){n=n||{};var a;return a="string"==typeof i[e]?i[e]:1===t?i[e].one:i[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+a:a+" ago":a}t.a=a;var i={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}}},function(e,t,n){"use strict";function a(e,t){o.a(2,arguments);var n=i.a(t);return r.a(e,-n)}t.a=a;var i=n(6),r=n(45),o=n(0)},function(e,t,n){"use strict";function a(e,t){o.a(1,arguments);var n=t||{},a=n.locale,u=a&&a.options&&a.options.weekStartsOn,s=null==u?0:i.a(u),d=null==n.weekStartsOn?s:i.a(n.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=r.a(e),l=c.getUTCDay(),m=(l0?Math.floor(n):Math.ceil(n)}t.a=a;var i=n(59),r=n(0)},function(e,t,n){"use strict";function a(e){r.a(1,arguments);var t=i.a(e);return t.setDate(1),t.setHours(0,0,0,0),t}t.a=a;var i=n(1),r=n(0)},function(e,t,n){"use strict";function a(e){r.a(1,arguments);var t=i.a(e),n=t.getUTCDay(),a=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}t.a=a;var i=n(1),r=n(0)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var a=n(192),i=function(e){return e&&e.__esModule?e:{default:e}}(a);t.default=function(){function e(e,t){for(var n=0;n0?a:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var a=n(14),i=n(212),r=n(75),o=n(73)("IE_PROTO"),u=function(){},s=function(){var e,t=n(66)("iframe"),a=r.length;for(t.style.display="none",n(105).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("
      \ No newline at end of file + })(window)

      我的作品

      1、360小水滴直播客户端

      可以查看多个直播的小水滴的PC客户端(新功能开发中…)

      +

      2、linux快盘脚本

      bash脚本,实现了在linux中上传文件到快盘,以及下载到本地等功能

      +
      \ No newline at end of file diff --git a/r-to-tell-you-a-true-beijing.html b/r-to-tell-you-a-true-beijing.html new file mode 100644 index 00000000..516d0f28 --- /dev/null +++ b/r-to-tell-you-a-true-beijing.html @@ -0,0 +1,191 @@ +(转)告诉你一个真实的北京 | 王恒's Blog + + + + + + + + + + + + + +

      (转)告诉你一个真实的北京

      +纯转发 + +

      clip_image001clip_image002
      近日网上盛传一篇题为“大量内幕:告诉你一个真实的北京”的文章。文章称,北京真是一个神奇的城市,吸引了全国各地的“人才”(从只有小学学历的到海龟博士后)。但真是不知道为什么全国各地那么多人非要削尖了脑袋扎进北京?
      北京挺好 跟你有多大关系?
      作者说,客观的说,北京挺好。不论悠久的历史文化、快速发展的经济、还是宏伟大气的城市风貌,异常丰富的教育资源,全国顶尖的医疗条件….这个城市都堪称绝对的国际化大都市。
      具体点儿:
      故宫、长城、颐和园、圆明园、后海儿….这是帝都!(如果这儿的历史文化你都看不上,那中国也没啥你能看上的地儿了。)
      清华、北大、北邮、北航、人大….这是中国的教育中心!(如果这儿都教育不好你,那你基本也是没法教育好的料儿了。)
      协和、301、武总、空总、阜外、中日友好….这是中国顶尖的医疗高地。(如果这儿都治不好你的病,基本你就只有见阎王的份儿了。)
      中石油、中石化、五矿、神化、中行、建行、农行、中xx….中央企业总部的集散地!(如果这儿的工作你都看不上,那你只能上外星找工作了。)
      川、苏、鲁、粤、闽、湘、徽、淮扬,海鲜、烧烤、火锅、西餐,民间小吃、国宴大菜….全国美食集大成之地!(如果这儿的菜你都不爱吃,基本地球也没你能吃的东西了。)
      奔驰、宝马、迈巴赫、劳斯莱斯、宾利、布加迪….世界名车的展览会!(如果这儿的车你都看不上,你只能坐着“天宫”奔上月球找嫦娥了。)
      党中央、国务院、中纪委、发改委、国资委、各部委,全国行政指挥部!(如果这儿都解决不了你的事,那你只能冲进白宫去问奥巴马了。)
      北京真好,确实好,但有你的啥?
      故宫长城都说好,天天爆棚挤死你!清华北大门儿开着,就怕你高考分不够!协和、武总、301,先别说治病,早晨5点排队就要你命!石油石化玩垄断,工资一月发八回,没人你进得去吗?川苏鲁粤、奔驰宝马,没钱都是纯扯淡!言归正传。
      本文旨在给各位看官展示真实的北京生活。北京是好,但未必适合所有人,未必适合人的生活,千万不要被表面的繁华和虚荣所迷惑,还要谨慎的选择。普通人的生活无非就是几件事,吃饭、住房、教育、医疗、交通,支撑这些事的支柱就是–工作。有份好工作就解决了。没错,但也不绝对。
      一、咱们先探讨探讨工作和收入吧
      作者说,大学生毕业,包括研究生,刚毕业找份月薪5000(实际到手)的工作算不算好工作?我觉得应该算。至少我知道的985,211工程大学的学生刚毕业在北京头两年也就是这个数左右。那么,我告诉你,5000刚够一个外地人在北京的基本生活。算笔账:房租1500(合租一个单元的一个房间,四环外,10-15平米,如果想降低租金,ok,5环外到6环),房租外分摊煤气水电费200,交通费200,吃饭1000(一天30,基本算是最低了吧),日用品支出(牙膏、香皂、洗发水、内裤、袜子、卫生巾等)均到每月算200,自己改善伙食+应酬吃饭每月500(这就算两顿饭,现在随便两人下次馆子也得200。你在北京没个朋友同学吗?人家请你,你不得回请?外地同学朋友来北京玩,找你你不去?),电话费100,宽带费100。每年可能的其他开销平均到月500不多吧?(换手机、笔记本电脑、买鞋、衣服、假期回家来回的火车票飞机票、人情世故婚丧嫁娶随礼、给家里买点特产)。这已经4300了。还剩几百机动。所以月光很正常。
      有人该说了,北京的好工作有的是。赚个万八千的很正常,低于5000的很少。我很客观的告诉你,那都是听说,道听途说。你一个毕业生,不管本科生研究生,过来赚个我看看。5000到手的工资,基本就是税前7000,单位还要给你缴纳个人所得税、五险一金或六险二金。你想想你刚毕业能给单位做什么正事,凭什么给你高薪?
      接着给你分析分析北京的工作结构。北京好工作,从数量和质量上,比其他城市确实要多和好一些。
      第一类,就是中央公务员和地方公务员,绝对的光鲜,好工作。外交部、铁道部、农业部,不错吧?如果你有朋友在这些地方,问问吧。科员基本月收入到手现金都在5000以内,处长8000以内,司长1万以内,待遇很好每年能多发点购物卡、水果啥的,好的部委能分保障性住房,3000到5000一平方,但怎么需要个5年以上。部委的工资都是国家规定的,就是这样。就是这样的工资,还砸破头呢。因为这样的工作是铁饭碗,社会地位高,体面,稳定。要考公务员,甚至还需要背景,也就是所谓的“拼爹”。
      第二类,中央企业(含二级子公司驻京单位),所谓的石油石化能源电力金融等,普通员工主流年薪基本在8万到20万之间,很少有再高的。(金融投资类要高很多,30万50万都有,但入门门槛也很高,专业性极强)待遇也不错。没人能说这样的工作还不好吧?你知道这工作好,是人就知道,大伙都知道。也是砸破头,没关系基本别想。没关系的就是特有实力的或者有点运气成分的。再有就是这样单位招的打杂的,但工资和待遇也就差远了,打杂的一般还都要北京本地有户口的。
      第三类,央企下属的三级以下企业或合资企业,其他北京地方国有企业。这个很复杂,不了解。有的薪金待遇比央企还好,有的就差一些,要看企业自身情况。
      第四类,科研院所、大学等事业单位。这类单位是需要高学历的,最低硕士。如果你不是师出名门名校,学历只是本科,那基本也就没戏了。工资待遇类似国家部委,有高有低。但科研院所的学科带头人,高级工程师有项目的,收入颇丰。一年百八十万的也是有的。
      以上是户口基本都能解决的。当年解决不了,过几年也有希望解决。但以上单位每年招人都不会太多,因为业务基本稳定。
      第五类,外资企业。这类也很复杂,好的外企很多,IBM、google、马士基啥的,工资确实挺好2,30万很正常,就怕您不是那人才,清华、北大海归回来的都得层层面试。你要觉得你能把他们搞定,可以来试试。烂的也不少,一个月3,5千,用人还用的贼狠,经常加班。比如所谓的“四大”,听着工资挺高,天天干活儿如山,夜夜加班,性价比太低。你20岁时,老板30岁;你30岁时,老板和你同岁;你40岁时,老板比你小10岁。不管你怎么奋,老板都是30多的老外。
      第六类,私营企业。少数很好,多数剥削为主。但也是北京人才市场需求量最大的一块。少数的包括著名的大连万达(总部在北京),soho中国,中关村的大IT企业华为,中兴,sina,sohu,baidu等,比国企还正规,待遇也很好;但多数都是聚居在各大型写字楼的小公司,干什么的都有。月薪3000-5000,没有五险一金。私企的特点是,你赚的每一分钱都是从老板口袋掏出去的,所以你拿的每分钱都会有你的付出。除了工资,很难再想其他的待遇。年终多给你一个月工资已经算老板开恩了。
      第七类,自己创业当老板。有个好项目可能你就发了。但多数还是淹没在茫茫商海之中了。
      那北京那么多有钱人哪来的啊?我告诉你,有钱人都不是靠这样正规工作打工的。正规工作打工的基本没有啥有钱人。北京的有钱人不是私营企业的大老板暴发户,就是政商,官商,红二代,外企中国区总裁,影视明星,作家,画家,收藏家….。跟你有个毛关系?你自己觉得有多大几率成为有钱人?如果你认为有钱人的定义是在北京买两套房,那我告诉你你太可悲了。如果你成不了有钱人,就只能过普通人的日子。
      这还是对有学历的人来说。那些没学历在北京饭店里打工的姑娘小伙们,请问你们图啥?一个月1500-2000的收入,真能让你看到光明和希望吗?可能一万个能有三两个混出来的,那剩下那9000多人找谁说理去?

      + + +

      二、说说吃饭吧
      作者说,说实话,在北京混口饭吃还是挺简单的。北京的吃真的不算贵。当然你不能天天去北平会、顺峰、厉家菜等宰人的大饭店。平常老百姓居家过日子,吃肉吃菜还是挺经济的,北京是首都,国家首先要保北京的市场供应,所以物价一直都比较稳定。不像很多刚来北京的外地人说北京的东西真贵,你天天到超市买小包装的蔬菜,肉类能不贵吗?住的时间长了,你肯定能在家附近发现很多便宜的菜市场。
      北京的美食聚集度在全国应该排个第一。全国甚至全世界你听到过的风味基本都能吃到。光是全国各地开设的驻京办的饭店就够你吃一阵的,特色餐馆非常之多,价位比一般大城市略贵,不天天吃,还是可以接受的。
      clip_image003三、说到住房就沉重了
      作者说,在提到房价之前,我首先要问你“你有资格买房吗?”如果你没有北京户口,也拿不出来在北京连续五年缴税的证明,那你没资格买房了。不管你家境多么殷实,有钱也没法买。
      再说说房价,北京的房价可以让绝大多数人绝望,尤其是在对比了一套100平方的普通住房和自己的年收入之后,就会立刻产生痛不欲生的感觉。北京五环内的二手房价格基本在2万5到3万之间,新房普遍都是3万大几,4万。一百平二手房意味着250-300万,新房意味着将近400万。年薪20万,也要15到20年不吃不喝白干。大学毕业22到60退休,一共才38年工龄。那么如果你年薪不到20万,甚至10万,那意味着你一辈子就是为这套房。(当然不能这么算,有的人赚钱是几何式上升的,但多数人还是线性增长的。)再说,你能不吃不喝不养孩子吗。
      那么请问,你来北京干什么?就为了买套房吗?
      四、说到教育就更沉重了
      作者说,有人说,北京教育有啥沉重的?那么多好学校,北京人考大学分那么低,多轻松啊。那我只能恕你外地人不知情无罪了。教育是个笼统的概念,不只是大学教育,从幼儿园到大学都是教育。你在北京安家立户,就要娶妻生子。如果你遇到了一位贤妻,肯在你无房无地之时就嫁给你,并为你生儿育女,那你是幸运的。但接下来的子女教育,你可能就是不幸的了。
      儿女在北京受教育的前提是你的儿女有北京户口。请问有吗?儿女有户口的前提是你或你的配偶有北京户口。请问有吗?如果你和你的爱人进入的是私营企业和小型外资企业的话,又不是北京户籍政策的照顾对象,那多数情况,户口是拿不到的了。这就意味着你的儿女不能在北京接受教育,或不能无偿的在北京接受教育。
      这种情况下就有三条路可走,一条就是把孩子送回原籍上学;另一条就是把孩子送到贵族学校,国际学校;再一条就是花大价钱托人进普通中小学借读,费用也不比贵族国际学校低多少。送回原籍,万万不妥,让乡里乡亲的怎么看?贵族学校一年动辄15到20万的学费不是一般人交的起的。借读托人就是一笔,还有每年2,3万的借读费。何去何从?我不知道。(我家亲戚就遇到了这种情况,他们夫妻都是大型私企高管,家庭年薪百万,但没有北京户口,孩子应该是去私立学校了,从幼儿园到高中都可能如此。)
      有北京户口没事?幼儿园就要你命!
      有北京户口,你就别以为没事了。一个幼儿园就要你命!没听说新闻吗?2号早晨9点xx重点幼儿园开始报名,1号夜里11点,幼儿园门口已经排起了长队。爷爷奶奶爸爸妈妈分头来排队,就怕报名满员。这不是危言耸听,这是真事。北京很多幼儿园都出现了这样的胜景。排上队报上名,事又来了,孩子要面试。看看孩子智商怎么样,不合格的不录取。更有甚者,学前班不是在我们幼儿园上的坚决不予录取。还有孩子面试要父母简历的,看看父母是什么学历、工作。
      好,即使全过了,事又来了。请交钱吧,赞助费、园区建设费、师资队伍建设费3万。每月还得交2000多。进去了,事又来了。幼儿园3点半下课,请家长来接孩子吧。家长都是上班族,谁能3点半接孩子?不接?好,上兴趣班吧。一天一节,3点半到5点半,一节50,一周五天250,一个月1000。过节过年,家长都得给老师塞红包,不然你孩子拉屎,不一定有老师给你孩子擦屁股;你孩子吃饭慢,就得挨饿。你说公立幼儿园不行,那去私立吧。一个月5000起步。
      小学,初中,高中,以此类推,没有不抢的。没有少花钱的。有的学校,家里有钱学习好的孩子都不一定能进,没关系肯定进不去。因为这班里孩子有的爷爷是中央办公厅的,爸爸是军委办公厅的,大爷是北京市教委的,妈是区教育局的。你说有你事吗?
      五、说到医疗 更牛逼了
      作者说,北京大医院的数量和质量那是全国之最。哪个学科都有顶尖的老中医老西医。你说我工作正规,有医保,怕什么?呵呵,这事和医保真就一点关系都没有。北京的医疗资源之紧张,也是全国第一。全国的病患都到北京求医问药,能好的了吗?
      协和医院的一个专家号,不论哪个科室的,你按照医院门诊的开门时间去挂号,100%没号。门口的黄牛党票贩子大声叫卖着各个科室的专家号。医院卖一个专家号7块到15块。到黄牛那少了要300,多了得500。就这还抢呢,你拿钱还不一定就能拿上当天的号。早晨5点医院门口就排起长队。
      如果得了大病,废了,没人基本等于等死。住院排队,做手术更要排队。等轮到你手术了,基本人都凉了。301医院是中央军委首长的特护医院,你觉得专家治病轮的上你吗?
      知道为什么那么多国家领导人都死这儿?
      有次,我头疼,到著名的中日友好医院看病。中日友好医院,不用多言,很多国家领导人都是在这病逝的。还没进医院大门,挂号的时候我脑袋都大了,各色人等各色口音跟打架似的,再加上挂号大夫的冷言冷语,没病的都得气出病来。看病时候更牛了,拿了号,没专家的,都挂完了,普通号排了半个小时,大夫告你照ct吧。照ct半个小时,再排半个小时队,让大夫看看ct片子,拿药,走人。排了2小时队,大夫一共说了4,5句话。我算知道为什么那么多国家领导人都死这儿了。
      六、轮到交通了 那是绝对绝对绝逼了
      作者说,北京是名副其实的“首堵”,不错。但想体验“首堵”的感觉,我还得问你一句,你有资格吗?买车现在已经不是钱的事了。两年前,你有钱没钱,买个QQ,夏利,3万5万的,不是个事。现在你手里握着百八十万等着买奔驰宝马,那也只能碰碰运气了。这个月的买车摇号概率已经降到了2.5%。也就是100个人里有两个半人能摇上号。还是那句话,如果没有北京户口,又不能提供连续五年在北京纳税的证明,你连参与摇号都没资格。有这个资格,你就得烧高香拜菩萨,保佑你成为那两个半人。
      当你有了户口或者纳税证明,准备好了钱,烧高香摇到了号,买了车。还得有停车位。一个车位最少15到20万。租车位一年4000到6000块钱。临时停车三环以内,第一个小时10块,第二个小时15。上班如果单位没有停车位,你上一天班就为了停一天的车。这不是开玩笑,是真的。当这一切都ok了。那准备起步,体会首堵风采吧。从早晨7点到9点,五环以内基本不会让你有持续1分钟以上开到50km/h的机会。 起步停车,起步停车…。下班更别提了,17公里的路,我最夸张一次开了2小时20分钟。我的车是自动挡的,下车后,我右腿都瘸了。手动挡的基本就瘫痪了。
      那些没钱买车,没户口没资格摇号的该在旁边偷笑了。“让你们有钱,让你们得瑟,让你们买车!还是我们坐地铁、公交的省心吧?”别笑。你们还不如开车的呢。开车的再堵,也是在自己的小车里,风吹日晒、雨打风吹跟我都没多大关系,最多就是烦点、腿累点。
      再看看坐地铁的吧。天天早晨地铁5号线,从始发站出去三站以后,人就都不是走上地铁的了。都是被后面人挤上车,或者被工作人员推上车的。地铁车门一关,你后背就贴在门上了。夏天不管空调怎么开,你在地铁上也是一身臭汗,还得忍受旁边人的狐臭,汗臭。小偷儿是别想下手了,连手都抬不起来。女士更得小心了,故意和无意的性骚扰是难免的了。
      公交就三不沾了。晚了一趟车就晚了半小时。和地铁一样遭罪,时间还没法保证,该堵车堵车,刮蹭了全车人都得下车,不管三伏三九。如果上下班来回坐公交的话,每天至少怎么得2,3个小时在路上晃。那每天除了工作,在工作和回家的路上,还剩下什么时间了?
      在北京生活的人多数不幸福
      文章说,以上所言全是个人真实的感受。“我感觉在北京生活的人多数都并不幸福,或者已经不知道什么是幸福了。至少不如在其他大城市生活幸福。那人都不幸福了,怎么还不离开北京呢?”
      混在北京的人多数都有一个梦,希望自己有朝一日能够发达、光宗耀祖,在北京有房有地,出人头地。还有一部份人处于矛盾之中,to be or not to be,离开了怕别人说自己混不下去了才走,不走吧,生活状态只有自己知道。还有一部份人确实是热爱北京大城市的文化和生活,再辛苦也觉得比在自己老家强。再有一部份人,就是习惯了,麻木了,生活就如此,到哪都一样。
      就像《北京人在纽约》,还应该有一部小说《外地人在北京》。If you love him,bring him to Beijing, for its heaven; if you hate him, bring him to Beijing, for its hell.

      +
      文章作者: 王恒
      文章链接: http://wangheng.org/r-to-tell-you-a-true-beijing.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file diff --git a/raspberry-dht11-yeekink.html b/raspberry-dht11-yeekink.html index b18247a7..ec1f20fa 100644 --- a/raspberry-dht11-yeekink.html +++ b/raspberry-dht11-yeekink.html @@ -1,197 +1,298 @@ -raspi+DHT11+yeelink监控家里温湿度 | all4fun blog +raspi+DHT11+yeelink监控家里温湿度 | 王恒's Blog - - + + - + - - + + -

      raspi+DHT11+yeelink监控家里温湿度

      + })(window)

      raspi+DHT11+yeelink监控家里温湿度

      wiring Pi 是专门为树莓派打造的类似于arduino下的wiring驱动库,安装好这个库后可以直接调用函数配置和控制GPIO功能。

      我买的树莓派B+版本,如图:

      -raspberry_b+_version - +

      raspberry_b+_version

      可见共有个40pin的扩展 gpio,电源IO包含3.3v  5v  ,接口定义如下图所示:

      -

      gpio_detail - -

      一、首先我们先安装开发环境 - -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      #首先安装依赖包
      sudo apt-get install libi2c-dev
      sudo apt-get install git-core
      #获取安装包
      git clone git://git.drogon.net/wiringPi
      cd wiringPi
      git pull origin
      #切换到编译目录
      cd wiringPi/
      #编译并安装
      ./build
      #检查安装
      gpio -v
      gpio readall
      +

      gpio_detail

      一、首先我们先安装开发环境
      #首先安装依赖包
      + sudo apt-get install libi2c-dev
      + sudo apt-get install git-core
      +#获取安装包
      + git clone git://git.drogon.net/wiringPi
      + cd wiringPi
      + git pull origin
      +#切换到编译目录
      + cd wiringPi/
      +#编译并安装
      + ./build
      +#检查安装
      + gpio -v
      + gpio readall
       
      -

      执行完 gpio readall 会显示当前板子的接口定义!如下图:

      +


      执行完 gpio readall 会显示当前板子的接口定义!如下图:

      -wiringPi_readall - +

      wiringPi_readall

      比如 12 | 1 | IN   | GPIO. 1 | 1   | 18

      表示你用wiring库中的函数操作gpio1,其实是操作BCM格式的gpio18端口,物理的12针脚。

      二、模块准备

      DHT11是比较常用的一块传感器,物美价廉,同时可以获取到环境的温度和湿度。由于比较简单,我就没有买那种焊接好的模块,只是一个DHT11的传感器,回来自己简单焊接封装了一下。

      DHT11的针脚说明如下:

      -dht11_pin_define - +

      dht11_pin_define

      从左至右分别是1、2、3、4针脚,使用的时候我们需要加装一个上拉电阻,简单地说就是在第一第二针脚之间接一个10K左右的电阻。

      接线比较简单,就不过多介绍了。

      三、获取传感器数据

      由于树莓派比起Arduino还是强大的太多,所以无论是用c还是python都可以很方便的按照模块的时序图编写驱动。网上各种各样的版本也是太多,思路就是严格按照手册规范来,数据校验失败的作为垃圾数据扔掉。参照比较正统的做法,自己整理了一份代码,需要的朋友也可以顺手拿走。

      代码很短,参考如下:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      72
      73
      74
      75
      76
      77
      78
      79
      80
      81
      82
      83
      84
      85
      86
      87
      88
      89
      90
      91
      92
      93
      94
      95
      96
      97
      98
      99
      100
      101
      102
      103
      104
      105
      106
      107
      108
      109
      110
      111
      112
      #include <wiringPi.h>
      #include <stdio.h>
      #include <stdlib.h>

      typedef unsigned char uint8;
      typedef unsigned int uint16;
      typedef unsigned long uint32;

      #define HIGH_TIME 32

      int gpioPin =4;
      uint32 databuf;



      uint8 readSensorData(void)
      {
      uint8 crc;
      uint8 i;

      pinMode(gpioPin,OUTPUT);
      digitalWrite(gpioPin, 0);
      delay(25);
      digitalWrite(gpioPin, 1);
      pinMode(gpioPin, INPUT);
      pullUpDnControl(gpioPin,PUD_UP);

      delayMicroseconds(27);
      if(digitalRead(gpioPin)==0)
      {
      while(!digitalRead(gpioPin));

      for(i=0;i<32;i++)
      {
      while(digitalRead(gpioPin));
      while(!digitalRead(gpioPin));
      delayMicroseconds(HIGH_TIME);
      databuf*=2;
      if(digitalRead(gpioPin)==1)
      {
      databuf++;
      }
      }

      for(i=0;i<8;i++)
      {
      while(digitalRead(gpioPin));
      while(!digitalRead(gpioPin));
      delayMicroseconds(HIGH_TIME);
      crc*=2;
      if(digitalRead(gpioPin)==1)
      {
      crc++;
      }
      }
      return 1;
      }
      else
      {
      return 0;
      }
      }

      int main (int argc, char **argv)
      {

      if (argc != 2) {
      printf("usage: %s GPIOpin#\n", argv[0]);
      printf("example: %s 1 - Read from wiringPi GPIO #1\n", argv[0]);
      return 2;
      }

      gpioPin = atoi(argv[1]);

      if (gpioPin <= 0) {
      printf("Please select a valid GPIO pin #\n");
      return 3;
      }


      printf("Use GPIO%d to read data!\n",gpioPin);

      if (-1 == wiringPiSetup()) {
      printf("Setup wiringPi failed!");
      return 1;
      }

      pinMode(gpioPin, OUTPUT);
      digitalWrite(gpioPin, 1);

      while(1) {
      pinMode(gpioPin,OUTPUT);
      digitalWrite(gpioPin, 1);
      delay(3000);
      if(readSensorData())
      {
      printf("Success! Sensor data read ok!\n");
      printf("Hum=%d.%d\%\n",(databuf>>24)&0xff,(databuf>>16)&0xff);
      printf("Temp=%d.%dC\n",(databuf>>8)&0xff,databuf&0xff);
      databuf=0;
      break;
      }
      else
      {

      databuf=0;
      }
      }
      return 0;
      }


      +
      #include <wiringPi.h>
      +#include <stdio.h>
      +#include <stdlib.h>
      +
      +typedef unsigned char uint8;
      +typedef unsigned int  uint16;
      +typedef unsigned long uint32;
      +
      +#define HIGH_TIME 32
      +
      +int gpioPin =4;  
      +uint32 databuf;
      +
      +
      +
      +uint8 readSensorData(void)
      +{
      +    uint8 crc; 
      +    uint8 i;
      +
      +    pinMode(gpioPin,OUTPUT); 
      +    digitalWrite(gpioPin, 0); 
      +    delay(25);
      +    digitalWrite(gpioPin, 1); 
      +    pinMode(gpioPin, INPUT); 
      +    pullUpDnControl(gpioPin,PUD_UP);
      +
      +    delayMicroseconds(27);
      +    if(digitalRead(gpioPin)==0) 
      +    {
      +        while(!digitalRead(gpioPin)); 
      +
      +        for(i=0;i<32;i++)
      +        {
      +            while(digitalRead(gpioPin)); 
      +            while(!digitalRead(gpioPin)); 
      +            delayMicroseconds(HIGH_TIME);
      +            databuf*=2;
      +            if(digitalRead(gpioPin)==1) 
      +            {
      +                databuf++;
      +            }
      +        }
      +
      +        for(i=0;i<8;i++)
      +        {
      +            while(digitalRead(gpioPin)); 
      +            while(!digitalRead(gpioPin)); 
      +            delayMicroseconds(HIGH_TIME);
      +            crc*=2;  
      +            if(digitalRead(gpioPin)==1) 
      +            {
      +                crc++;
      +            }
      +        }
      +        return 1;
      +    }
      +    else
      +    {
      +        return 0;
      +    }
      +}
      +
      +int main (int argc, char **argv)
      +{
      +
      +    if (argc != 2) {
      +        printf("usage: %s GPIOpin#\n", argv[0]);
      +        printf("example: %s 1 - Read from wiringPi GPIO #1\n", argv[0]);
      +        return 2;
      +    }
      +
      +    gpioPin = atoi(argv[1]);
      +
      +    if (gpioPin <= 0) {
      +        printf("Please select a valid GPIO pin #\n");
      +        return 3;
      +    }
      +
      +
      +    printf("Use GPIO%d to read data!\n",gpioPin);
      +
      +    if (-1 == wiringPiSetup()) {
      +        printf("Setup wiringPi failed!");
      +        return 1;
      +    }
       
      +    pinMode(gpioPin, OUTPUT); 
      +    digitalWrite(gpioPin, 1); 
       
      +    while(1) {
      +        pinMode(gpioPin,OUTPUT); 
      +        digitalWrite(gpioPin, 1); 
      +        delay(3000);
      +        if(readSensorData())
      +        {
      +            printf("Success! Sensor data read ok!\n");
      +            printf("Hum=%d.%d\%\n",(databuf>>24)&0xff,(databuf>>16)&0xff); 
      +            printf("Temp=%d.%dC\n",(databuf>>8)&0xff,databuf&0xff);
      +            databuf=0;
      +            break;
      +        }
      +        else
      +        {
      +            
      +            databuf=0;
      +        }
      +    }
      +    return 0;
      +}

      完整的代码放在了我的github共享:https://github.com/wujiwh/DHT11_yeelink/

       

      使用方式:

      @@ -203,69 +304,137 @@

      数据上传就更简单了,这已经基本跟硬件没多少关系了,众多的物联网平台里面yeelink算是做的不错的,各方面的文档也很容易搜到。官网是:http://www.yeelink.net/ 你需要注册一个账号来获取你的apikey,有了这个apikey我们才能发布我们的数据到物联网平台。网上有很详细的介绍,我就不冗述了。

      1、linux下面发送POST请求,最简单的莫过于直接使用crul了!我写了一个简陋的脚本来发送温度数据到yeelink平台,湿度类似。

      代码如下:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      #!/bin/sh
      #=============================================================================
      # FileName: dht11_curl.sh
      # Desc:
      # Author: wangheng
      # Email: wujiwh@gmail.com
      # HomePage: http://wangheng.org
      # Version: 0.0.1
      # LastChange: 2015-01-28 00:30:11
      # History:
      #=============================================================================
      #填入yeelink的API KEY
      yeelink_ApiKey='XXX'
      yeelink_URL='http://api.yeelink.net/v1.1/device/XXX/sensor/XXX/datapoints'
      temp=$(./dht11 1 |awk '/Hum/' |awk -F '=' '{print $2}'|sed 's/%//')
      echo $temp
      curl_cmd="curl --request POST --data '{\"value\":$temp}' --header U-ApiKey:$yeelink_ApiKey --verbose $yeelink_URL"
      echo $curl_cmd|sh

      +
      #!/bin/sh
      +#=============================================================================
      +# FileName: dht11_curl.sh
      +# Desc:
      +# Author: wangheng
      +# Email: wujiwh@gmail.com
      +# HomePage: http://wangheng.org
      +# Version: 0.0.1
      +# LastChange: 2015-01-28 00:30:11
      +# History:
      +#=============================================================================
      +#填入yeelink的API KEY
      + yeelink_ApiKey='XXX'
      + yeelink_URL='http://api.yeelink.net/v1.1/device/XXX/sensor/XXX/datapoints'
      + temp=$(./dht11 1 |awk '/Hum/' |awk -F '=' '{print $2}'|sed 's/%//')
      + echo $temp
      +curl_cmd="curl --request POST --data '{\"value\":$temp}' --header U-ApiKey:$yeelink_ApiKey --verbose $yeelink_URL"
      +echo $curl_cmd|sh
      +
       
      +
      +

      PS:awk用的还不是很熟,写的比较啰嗦,有更专业的朋友看到,欢迎拍砖。

      +

       

      +

       

      2、使用python似乎也是一个非常不错的选择,python漂亮的语法,写起来也很简单。

      代码如下:

      -
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      #!/usr/bin/python
      '''
      #=============================================================================
      # FileName: dht11_post.py
      # Desc:
      # Author: wangheng
      # Email: wujiwh@gmail.com
      # HomePage: http://wangheng.org
      # Version: 0.0.1
      # LastChange: 2015-01-27 22:40:37
      # History:
      #=============================================================================
      '''

      import subprocess
      import re
      import json
      import sys
      import time
      import datetime
      import requests

      API_Headers = {'U-ApiKey': 'XXX', 'content-type': 'application/json'}
      API_URL="http://api.yeelink.net/v1.1/device/%s/sensor/%s/datapoints"

      device_id="XXX"
      hum_sensor_id="XXX"
      temp_sensor_id="XXX"

      hum_url = API_URL % (device_id, hum_sensor_id)
      temp_url = API_URL % (device_id, temp_sensor_id)

      # Continuously append data
      while(True):
      #to get the humidity and temperature readings!
      output = subprocess.check_output(["./dht11", "1"]);
      #print output
      matches = re.search("Temp=([0-9.]+)C", output)
      if (not matches):
      time.sleep(3)
      continue
      temp = float(matches.group(1))

      # search for humidity printout
      matches = re.search("Hum=([0-9.]+)\%", output)
      if (not matches):
      time.sleep(3)
      continue
      humidity = float(matches.group(1))

      print "Temperature: %.1f C" % temp
      print "Humidity: %.1f %%" % humidity

      try:

      #Post temp data
      post_data = {'value': temp}
      r = requests.post(temp_url, headers=API_Headers, data=json.dumps(post_data))
      #Post Humidity data
      post_data = {'value': humidity}
      r = requests.post(hum_url, headers=API_Headers, data=json.dumps(post_data))

      print "Post to yeelink success!"
      except:
      print "Unable to post data. Check your connection?"
      sys.exit()

      # Wait seconds before continuing
      time.sleep(15)


      +
      #!/usr/bin/python
      +'''
      +#=============================================================================
      +#     FileName: dht11_post.py
      +#         Desc: 
      +#       Author: wangheng
      +#        Email: wujiwh@gmail.com
      +#     HomePage: http://wangheng.org
      +#      Version: 0.0.1
      +#   LastChange: 2015-01-27 22:40:37
      +#      History:
      +#=============================================================================
      +'''
       
      -
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/raspberry-dht11-yeekink.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/raspberry-wifi-car-1.html b/raspberry-wifi-car-1.html index 40bfa2b9..0857f37c 100644 --- a/raspberry-wifi-car-1.html +++ b/raspberry-wifi-car-1.html @@ -1,165 +1,153 @@ -树莓派Wifi小车(一) | all4fun blog +树莓派Wifi小车(一) | 王恒's Blog - + - + - - + + -

      树莓派Wifi小车(一)

      + })(window)

      树莓派Wifi小车(一)

      到年末了,最近也有了一些自己的时间。回到了原来的技术处,晚上终于不用疯狂加班了,下班回家也终于有功夫折腾自己以前想玩的玩具了: )

      树莓派刚发布的时候就一直想搞一台,但是淘宝上面的价格也是一直居高不下,想想家里已经N多PC,NAS和笔记本了,一直找不到入手的理由。圣诞节附近随便一刷淘宝,发现新版本B+ 已经降到了170块,果断买下。

      @@ -168,18 +156,17 @@

      不怕见笑,Beta版完成图如下:

      - - +

       

      驱动板有两种,一种是L298N

      主控芯片

      L298N

      包装形式

      盒装出货

      逻辑电压

      5V

      驱动电压

      5V-35V

      逻辑电流

      0mA-36mA

      驱动电流

      2A(MAX单桥)

      存储温度

      -20℃ 到 +135℃

      最大功率

      25W

      -另一种是L9110S芯片的驱动板,参数如下: 模块供电电压:2.5-12V

      电机工作电压2.5v-12V之间,

      最大工作电流0.8A

      考虑到我们的小车不需那么大功率,直接用一个L9110S驱动板,单侧的轮子并联为一组,这样相当于驱动板驱动两路直流电机组。

      代码部分,小车的server端用python写的,用了个把小时(网页css多年没写过了,折腾死)。网页版控制页面如下:

      +另一种是L9110S芯片的驱动板,参数如下: 模块供电电压:2.5-12V

      电机工作电压2.5v-12V之间,

      最大工作电流0.8A

      考虑到我们的小车不需那么大功率,直接用一个L9110S驱动板,单侧的轮子并联为一组,这样相当于驱动板驱动两路直流电机组。

      代码部分,小车的server端用python写的,用了个把小时(网页css多年没写过了,折腾死)。网页版控制页面如下:

      刚开始用的图标太丑,在同事的提醒下,改了个按钮图标现在看起来顺眼多了,感谢@Jane同学。

      运行效果:

      核心代码:

      '''
      #=============================================================================

      -

      FileName: views.py

      Desc:

      Author: wangheng

      Email: wujiwh@gmail.com

      HomePage: http://wangheng.org

      Version: 0.0.1

      LastChange: 2015-01-14 13:46:29

      History:

      #=============================================================================
      '''
      from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
      from contextlib import closing
      from pi_car import app
      import re
      import RPi.GPIO as GPIO
      @app.route('/')
      def show_index():
      return render_template('home.html')

      +

      FileName: views.py

      Desc:

      Author: wangheng

      Email: wujiwh@gmail.com

      HomePage: http://wangheng.org

      Version: 0.0.1

      LastChange: 2015-01-14 13:46:29

      History:

      #=============================================================================
      '''
      from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
      from contextlib import closing
      from pi_car import app
      import re
      import RPi.GPIO as GPIO
      @app.route('/')
      def show_index():
      return render_template('home.html')

      @app.route("/login", methods=["GET", "POST"])
      def login():
      if request.method=="GET":
      return "get"+request.form["user"]
      elif request.method=="POST":
      return "post"

      @app.route('/ctl',methods=['GET','POST'])
      def ctrl_id():
      if request.method == 'POST':
      id=request.form['id']
      GPIO.setmode(GPIO.BOARD)
      GPIO.setwarnings(False)
      GPIO.setup(11,GPIO.OUT)
      GPIO.setup(12,GPIO.OUT)
      GPIO.setup(15,GPIO.OUT)
      GPIO.setup(16,GPIO.OUT)

          if id == &#039;t_left&#039;:
      @@ -207,61 +194,37 @@ 

      def t_right():
      GPIO.output(11, True)
      GPIO.output(12, False)
      GPIO.output(15, False)
      GPIO.output(16, True)

      启动网页服务:

      使用root用户ssh登陆到树莓派,切换到piCar的目录,执行python server.py 打开你的浏览器,输入树莓派IP:2000 就能看到你的控制页面了。 :)

      程序的完整源码放到了  https://github.com/wujiwh/piCar/tree/master/server 需要的朋友可以参考一下。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/raspberry-wifi-car-1.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      \ No newline at end of file +} + \ No newline at end of file diff --git a/raspberry-wifi-car-2.html b/raspberry-wifi-car-2.html index 1262e242..fde2f34b 100644 --- a/raspberry-wifi-car-2.html +++ b/raspberry-wifi-car-2.html @@ -1,165 +1,153 @@ -树莓派Wifi小车(二) | all4fun blog +树莓派Wifi小车(二) | 王恒's Blog - + - + - - + + -

      树莓派Wifi小车(二)

      + })(window)

      树莓派Wifi小车(二)

      上篇文章 之后,继续折腾我的小车,又用C#和Android 写了两个控制客户端。

      思路比较直接,使用POST请求去发送小车转向参数,然后就动起来了。C#不说了,很熟练写起来也非常简单,使用钩子捕获全局键盘,这样及时程序不在前台也能控制小车。

      @@ -424,14 +412,12 @@

      依然没有访问网络的权限 :(

      为此还特意加了几个Android的开发群,但是群里一个个爱答不理,趾高气扬的态度,我就呵呵了。果断退群,还是得靠自己,扶梯子上Google,一顿搜搜搜,果然有同病相怜的朋友。

      原因竟然是一个小问题目标SDK版本不对。。。好吧,果然弱爆了。

      -android_target_sdk_version_error - +

      android_target_sdk_version_error

       

       

       

      按上图将Target SDK Version 从18改成19,运行,测试,这次果然可以了。如下:

      -piCar截图 - +

      piCar截图

       

       

       

      @@ -666,61 +652,37 @@ }

      完整的代码放到了我的Github 共享,需要的朋友可以参考下载:

      https://github.com/wujiwh/piCar/tree/master/client/android

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/raspberry-wifi-car-2.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/raspberry-wifi-car-3.html b/raspberry-wifi-car-3.html index 00203a5e..99ea66d3 100644 --- a/raspberry-wifi-car-3.html +++ b/raspberry-wifi-car-3.html @@ -1,165 +1,153 @@ -树莓派Wifi小车(三) | all4fun blog +树莓派Wifi小车(三) | 王恒's Blog - + - + - - + + -

      树莓派Wifi小车(三)

      + })(window)

      树莓派Wifi小车(三)

      前面1,2中我们的小车能跑了,现在在加一些有意思的功能,那就是网络摄像头,这样我们的小车就变成了一个巡逻小车啦!

      首先当然你需要有一个USB摄像头,现在市面上的大部门的UVC摄像头都能直接被Linux驱动,当然raspberry也是可以的,比起windows那乱七八糟的驱动程序是不是方便很多。

      @@ -172,8 +160,7 @@

      一、motion安装以及使用

      #首先更新系统软件源
      sudo apt-get update
      #升级系统软件包
      sudo apt-get upgrade
      #安装motion软件包
      sudo apt-get install motion
      #配置motion
      #首先备份默认配置
      cp /etc/motion/motion.conf /etc/motion/motion.conf.bak
      #修改参数设置
      #启用daemon
      daemon on
      #取消只绑定到本地,这样局域网其他机器才能访问到摄像头图像
      webcam_localhost off
      #监测到动作的时候不保存图片,否则会保存大量的图片占用SD卡
      output_normal off
      #启动motion后天服务,下面执行一下
      motion

      接下来使用firefox访问IP:8081 应该就能看到移动的图像了。

      我们修改一下小车控制页面,将图像监视显示出来,效果如下:

      -带摄像头移动小车 - +

      带摄像头移动小车

      是不是还不错! : )

       

      二、mjpg-streamer安装以及使用

      @@ -191,61 +178,37 @@ ./start.sh

      打开 IP:8080看看效果吧!

       

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/raspberry-wifi-car-3.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/razer-drivers-installed-linux-system.html b/razer-drivers-installed-linux-system.html index db22d12e..f26891cb 100644 --- a/razer-drivers-installed-linux-system.html +++ b/razer-drivers-installed-linux-system.html @@ -1,165 +1,153 @@ -Linux系统中安装Razer驱动 | all4fun blog +Linux系统中安装Razer驱动 | 王恒's Blog - + - + - - + + -

      Linux系统中安装Razer驱动

      + })(window)

      Linux系统中安装Razer驱动

      最近无线网卡出了点小问题,所以回来基本是用Linux了。可惜使用的razer鼠标却没有官方的Linux驱动,高DPI的鼠标在Linux用着感觉很是飘,于是忍不住折腾一番。经过一阵子的搜索终于看到了希望,喜欢razer的朋友有福音了,国外一位牛人搞出了Linux下的razer驱动以及配置工具razercfg。目前最新的版本是razercfg-0.17.tar.bz2,支持的Razer鼠标有: Razer DeathAdder Classic mouse Razer DeathAdder 3500 DPI mouse @@ -200,63 +188,39 @@ ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd 4、razer的图形配置工具 -

      首先确保razerd已经运行,如果配置好了第三步,可以重启电脑或者在终端输入命令
      razerd 来启动。
      命令行配置工具有qrazercfg,或者使用更酷的图形配置工具qrazercfg,在终端输入qrazercfg来启动这个小工具,运行界面如图:






      它提供的配置是不是很丰富呢,基本上windows上面的配置选项在这里都可以找到。

      +

      首先确保razerd已经运行,如果配置好了第三步,可以重启电脑或者在终端输入命令
      razerd 来启动。
      命令行配置工具有qrazercfg,或者使用更酷的图形配置工具qrazercfg,在终端输入qrazercfg来启动这个小工具,运行界面如图:






      它提供的配置是不是很丰富呢,基本上windows上面的配置选项在这里都可以找到。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/razer-drivers-installed-linux-system.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/razer-krait-mouse-change-budge.html b/razer-krait-mouse-change-budge.html index fcc2c5c5..777459fd 100644 --- a/razer-krait-mouse-change-budge.html +++ b/razer-krait-mouse-change-budge.html @@ -1,14 +1,14 @@ -Razer Krait 鼠标换微动 | all4fun blog +Razer Krait 鼠标换微动 | 王恒's Blog - + - + - - + + @@ -16,120 +16,16 @@ -

      Razer Krait 鼠标换微动

      -08年底买的Razer 鼠标已经越来越不好用了,左键经常单击变双击。拿到公司用了几天很是郁闷,根本做不了开发工作,于是动了自己修理鼠标的想法。从网上搜索得知鼠标用的微动是欧姆龙的D2FC-F-7N,于是动身前往中关村买微动。刚开始去了淘宝的一家实体店,买来的型号是D2F-01L 据称是日产的高档微动,外加买了一套电烙铁。路上仔细用手点了点刚买的微动,感觉手感一般。想起网上说的一款德产的DG2 ,0.74N 的力度和适中的键程堪称游戏利器,经过一番搜索找到了中关村4楼的一家游戏装备店,没买到DG2,却被介绍了另一款手感很好的日产灰点D2F-01F,而且老板那还有Razer原厂的D2FC-F-7N,经过一番讨价以10块RMB买来一个D2FC-F-7N 和D2F-01F。 + postUpdate: '2021-10-11 10:11:44' +}
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      Razer Krait 鼠标换微动

      +08年底买的Razer 鼠标已经越来越不好用了,左键经常单击变双击。拿到公司用了几天很是郁闷,根本做不了开发工作,于是动了自己修理鼠标的想法。从网上搜索得知鼠标用的微动是欧姆龙的D2FC-F-7N,于是动身前往中关村买微动。刚开始去了淘宝的一家实体店,买来的型号是D2F-01L 据称是日产的高档微动,外加买了一套电烙铁。路上仔细用手点了点刚买的微动,感觉手感一般。想起网上说的一款德产的DG2 ,0.74N 的力度和适中的键程堪称游戏利器,经过一番搜索找到了中关村4楼的一家游戏装备店,没买到DG2,却被介绍了另一款手感很好的日产灰点D2F-01F,而且老板那还有Razer原厂的D2FC-F-7N,经过一番讨价以10块RMB买来一个D2FC-F-7N 和D2F-01F。 - gitalk.render('gitalk-container') - } +

      image

      +

      回家拆开鼠标,赞一下,Razer的做工真的很棒,换微动的时候更是应了老板的那句“Razer的微动很不好拆”,经过一番折腾,终于成功的换上了新的微动!至此,我的Razer 金环蛇成功复活!

      +
      文章作者: 王恒
      文章链接: http://wangheng.org/razer-krait-mouse-change-budge.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/reinstall-grub.html b/reinstall-grub.html index ed137fa6..9e7a8be4 100644 --- a/reinstall-grub.html +++ b/reinstall-grub.html @@ -1,166 +1,154 @@ -卸载grub2重新装回grub legacy | all4fun blog +卸载grub2重新装回grub legacy | 王恒's Blog - + - + - - + + -

      卸载grub2重新装回grub legacy

      + })(window)

      卸载grub2重新装回grub legacy

      还是习惯用grub,grub2虽然好用,但是最近安装xen时却频频出现问题。于是果断卸载,重新装回了grub。

      步骤很简单:

      @@ -184,61 +172,37 @@
      grub-install /dev/sda 

      现在终于可以方便的修改menu.lst了!

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/reinstall-grub.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/reorder-objects-by-certain-attribute.html b/reorder-objects-by-certain-attribute.html new file mode 100644 index 00000000..ee63af7d --- /dev/null +++ b/reorder-objects-by-certain-attribute.html @@ -0,0 +1,207 @@ +按对象的某个属性值来排序 | 王恒's Blog + + + + + + + + + + + + + + + +

      按对象的某个属性值来排序

      +需求可以抽象为一个小例子,比如现在一个学生是一个对象,它具有学号这个属性,要求按照学号排序。 + +

      首先写一个比较器,很简单:

      +
      public class StudentComparer : IComparer
      +{
      +    //实现按xuehao排序
      +    public int Compare(Student x, Student y)
      +    {
      +        return (x.xuehao.CompareTo(y.xuehao));
      +    }
      +}
      +

      使用也很简单:

      +
      +List stu = new List();
      +
      +…………………
      +
      +stu.Sort(new StudentComparer());
      +
      +
      +
      文章作者: 王恒
      文章链接: http://wangheng.org/reorder-objects-by-certain-attribute.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file diff --git a/resolve-syntaxhighlighter-google-fonts-pop-issue.html b/resolve-syntaxhighlighter-google-fonts-pop-issue.html index 901f1a2b..ec782c33 100644 --- a/resolve-syntaxhighlighter-google-fonts-pop-issue.html +++ b/resolve-syntaxhighlighter-google-fonts-pop-issue.html @@ -1,165 +1,153 @@ -解决插件调用google字体巨慢的问题 | all4fun blog +解决插件调用google字体巨慢的问题 | 王恒's Blog - + - + - - + + -

      解决插件调用google字体巨慢的问题

      + })(window)

      解决插件调用google字体巨慢的问题

      写博客免不了贴代码,但是每次使用syntaxhighlighter 贴代码弹出的窗体总是慢的要死,加上wordpress本来也不快,卡上加卡终于无法忍受。

      wordpress现在越来越臃肿常常打扰我的思路,这也是我平时经常随手将一些笔记直接扔到了vimwiki中的缘由。

      @@ -183,63 +171,38 @@

      找到问题就好办了,删掉第一行,将Sans字体改成Consolas,这下次终于顺畅了!

      -google_fonts2consolas -
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/resolve-syntaxhighlighter-google-fonts-pop-issue.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/sae-used-tmpfs-function.html b/sae-used-tmpfs-function.html index ce540e22..e86cc212 100644 --- a/sae-used-tmpfs-function.html +++ b/sae-used-tmpfs-function.html @@ -1,165 +1,153 @@ -SAE中使用TmpFS功能 | all4fun blog +SAE中使用TmpFS功能 | 王恒's Blog - + - + - - + + -

      SAE中使用TmpFS功能

      + })(window)

      SAE中使用TmpFS功能

              前一段时间做的项目需要提供导出CSV报表的功能,我用php直接拼出csv的文件流输出到页面,以提供csv文件的下载,功能在wamp环境中运行很正常,但是到了SAE平台却怎么都不好使。不管是改请求的响应头content-type 还是修改输出的文件格式,每次SAE都是把内容直接输出在了页面。因为SAE不支持通用方式的本地IO,于是想到了使用SAE提供的tmpFS功能。

      TmpFS

      因为平台安全性的考虑,SAE限制了用户对于本地IO的使用,但这样对于一些传统的PHP项目,也许带来了很多不便,因为它们都或多或少的有对本地 IO的操作,像Smarty的编译模板。为了解决这个问题,SAE提供了TmpFS功能。TmpFS允许开发者通过标准的IO函数临时读写本地IO,这样 方便了很多非SAE项目的移植。

      特别注意:

      @@ -170,61 +158,37 @@

      例子:

      appname: saetest
      appversion: 1

      在一个php文件中:


      file_put_contents( SAE_TMP_PATH . '/mycode.txt' , 'dummy test' );
      echo file_get_contents( SAE_TMP_PATH . '/mycode.txt' ); // will echo dummy test;

      如果是两个独立的php文件:
      a.php


      file_put_contents( SAE_TMP_PATH . '/mycode.txt' , 'dummy test' );

      b.php


      echo file_get_contents( SAE_TMP_PATH . '/mycode.txt' ); // 出错啦,文件已经不存在了...

      说到这里,大家应该明白了, tmpFS中的文件在后台PHP代码执行完后就已经不存在了,囧。最后只好用了个折中的办法,临时把文件放在了SAE的永久化存储的Storage里面。不知看到这里的朋友有无更好的办法解决SAE中导出文件的问题,欢迎联系告知~


      -
      文章作者: all4fun
      文章链接: http://wangheng.org/sae-used-tmpfs-function.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      目录
      \ No newline at end of file +} + \ No newline at end of file diff --git a/search.json b/search.json deleted file mode 100644 index 620def76..00000000 --- a/search.json +++ /dev/null @@ -1 +0,0 @@ -[{"title":"apple keyboard helper苹果键盘tools","url":"/apple-keyboard-the-helper.html","content":"\n前一阵终于忍受不了 iPad 2 上面的虚拟键盘,为了发博码字的方便,入手了 Apple 的蓝牙键盘,清脆的手感非常不错。虽然苹果键盘一直以来都是与 Mac 搭配使用的,但是 Apple 键盘简洁精美的做工也深受许多玩家的喜爱。加上蓝牙键盘既可以用在 PC 上又可以用在 iOS 设备上,相信拥有 Apple Keyboard 的玩家也不在少数。但是 Apple 的键盘用在普通 PC 上的时候,发现很多功能键都不能用,甚至连 Del 键都没有,多少带来了一些不便。最近发现了一款小工具 Apple Keyboard Helper,安装 Apple Keyboard Helper 之后,苹果键盘的 F3(屏幕截图)、F4(任务管理器)、F7–F9(iTunes 控制)、F10–F12(系统音量控制)等按键就可以在 Windows PC 上使用了。\n\n\n\n下载地址如下:apple keyboard helper\n同时作者还将源码开放了,有兴趣的同学不妨看一下 :)\n\n","categories":["Route"],"tags":["Apple"]},{"title":"C#利用反射给对象赋值","url":"/c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html","content":"\n我们如果想利用凡是给一个对象属性赋值可以通过PropertyInfo.SetValue()方式进行赋值,但要注意值的类型要与属性保持一致,例如:\n\nvar property = obj.GetType().GetProperty(“PropertyName”);//此时可以使用GetProperty获取属性数组,循环进行赋值。\n该属性类型是已知基本类型可以直接将变量传入, 例如:string\nvar value=”wangheng.org”;\nproperty.SetValue(obj,value,null);\n这里需要注意value值的类型必须和属性类型一致,否则会抛出TargetException异常。\n如果原值是其他类型。例如:目标类型为int,值为string\nstring value=”100”;\nproperty.SetValue(obj,int.TryParse(value),null);//类型转换。\n上面几种都比较容易处理,但是如果该属性类型是未知非泛型类型,例如 int?\nvar value=”100”;\nproperty.SetValue(obj,Convert.ChangeType(value, property.PropertyType), null);//类型转换。这时简单调用 ChangeType()方法,类型会报错。\n想解决这个问题,需要首先把属性值类型转成基本类型,然后进行转换。如下:\n if (!property.PropertyType.IsGenericType)\n {\n //非泛型\n property.SetValue(obj, string.IsNullOrEmpty(value) ? null : Convert.ChangeType(value, property.PropertyType), null);\n }\n else\n {\n //泛型Nullable<>\n Type genericTypeDefinition = property.PropertyType.GetGenericTypeDefinition();\n if (genericTypeDefinition == typeof(Nullable<>))\n {\n property.SetValue(obj, string.IsNullOrEmpty(value) ? null : Convert.ChangeType(value, Nullable.GetUnderlyingType(property.PropertyType)), null);\n }\n }\n这样,在使用Convert.ChangeType()转换可空类型时,就不会报错了。\n","categories":["最近添加"]},{"title":"清除mysql的log-bin日志","url":"/clear-the-mysql-log-bin-log.html","content":"\n前一阵子工作项目上的事情忙的焦头烂额,最近要进行部门调整将要去做新的项目。又要学习很多新的知识了,还是很兴奋激动的。今天下班回来查看了一下VPS状态,发现VPS的空间只剩下了1G多!第一反应是被入侵了,但是看了一下log并没有发现什么异常的登录,加上平时基本都是用私钥免密码登录的VPS,别入侵的可能也不是很大。那我就很疑惑了,因为系统文件占用应该也就3G多,我平时并没有在VPS放过什么大文件,不应该一下子少那么多空间。于是开始一番du查找终于找到了罪魁祸首!原来是mysql的log文件导致的。 装mysql并运行一段时间后,在mysql目录下出现一堆类似mysql-bin.000***,从mysql-bin.000001开始一直排列下来,而且占用了大量硬盘空间,高达十几个G.。原来mysql-bin.000001、mysql-bin.000002等文件是数据库的操作日志,例如UPDATE一个表,或者DELETE一些数据,即使该语句没有匹配的数据,这个命令也会存储到日志文件中,还包括每个语句执行的时间,也会记录进去的。 这些形如mysql-bin.00001的文件主要是用来做什么的呢? 1、数据恢复 如果你的数据库出问题了,而你之前有过备份,那么可以看日志文件,找出是哪个命令导致你的数据库出问题了,想办法挽回损失。 2、主从服务器之间同步数据 主服务器上所有的操作都在记录日志中,从服务器可以根据该日志来进行,以确保两个同步。 3、清除办法 运行 /usr/local/mysql/bin/mysql -u root -p 登录执行: reset master;\n\n如果你只有一个mysql服务器,在/etc/ 下面找到my.cnf文件vim /etc/my.cnf把里面的 \n\n\n#log-bin=mysql-bin \n#binlog_format=mixed \n这两行注释掉,然后将mysql下的var目录中的这些日志文件全部删除,重启mysql服务即可。\n\n\n但是如果你设置了主从服务器,那么就需要做以下操作了。 \n\nA:在每个从属服务器上,使用SHOW SLAVE STATUS来检查它正在读取哪个日志。 \n\nB:使用SHOW MASTER LOGS获得主服务器上的一系列日志。 \n\nC:在所有的从属服务器中判定最早的日志,这个是目标日志,如果所有的从属服务器是更新的,就是清单上的最后一个日志。 \n\nD:清理所有的日志,但是不包括目标日志,因为从服务器还要跟它同步。 简单地说,这些MySQL目录下的形如mysql-bin.000***的文件时MySQL的事务日志。 删除复制服务器已经拿走的binlog是安全的,一般来说网络状况好的时候,保留最新的那一个足以。 \n\n","categories":["Technical"],"tags":["ssh","VPS","日志","IOS"]},{"title":"CMD窗口属性设置","url":"/cmd-in-window-property-the-settings.html","content":"\n首先打开注册表编辑器,Win+R(win就是那个Windows标志的按键)。具体设置参考如下:\n\n1、默认设置:保存在 HKEY_CURRENT_USER\\Console2、自定义设置:保存在 [HKEY_CURRENT_USER\\Console%SystemRoot%_system32_cmd.exe]\n里面是一些自定义的设置,优先级高于默认设置。3、各键及其值所代表的意义:“WindowPosition”=dword:00640104“CodePage”=dword:000003a8“FontSize”=dword:00100008“FontFamily”=dword:00000030“FontWeight”=dword:00000190“HistoryNoDup”=dword:00000000“FullScreen”=dword:00000000“ScreenColors”=dword:000000ce“ScreenBufferSize”=dword:12c00504、键值意义:注:各键值均为十六进制表示窗口位置—–WindowPosition—高四位为上,低四位为左。如00640104,即距屏幕上沿64H=100,距屏幕左沿104H=260字体大小—–FontSize———高四位为字高,低四位为字宽如00100008,即字体宽×高=08H×10H=8×16全屏幕——-FullScreen——-0:窗口 1:全屏幕(此时WindowPosition失效)窗口尺寸—–WindowSize——-高四位为高度,低四位为宽度默认00190050,即高19H=25行,宽50H=80列缓冲区尺寸—ScreenBufferSize-高四位为高度,低四位为宽度默认012c0050,即高12cH=300行,宽50H=80列字体颜色—–ScreenColors—–低两位同color设置中的字体颜色值字体类型—–FontFamily——-36:新宋体 30:点阵字体当前代码页—CodePage———默认3a8H=936:ANSI/OEM-简体中文GBK丢弃旧副本—HistoryNoDup—–0:不丢弃 1:丢弃旧副本5、自定义与默认关系:系统首先在自定义里面查找相关设置,若自定义中没有,则到默认里面查找。即自定义优先级高于默认。6、批处理设定窗口属性 set rr=\"HKCU\\Console%%SystemRoot%%_system32_cmd.exe\"reg delete %rr% /f>nulreg add %rr% /v \"WindowPosition\" /t REG_DWORD /d 0x00640104 /f>nulreg add %rr% /v \"WindowSize\" /t REG_DWORD /d 0x00190050 /f>nulreg add %rr% /v \"ScreenBufferSize\" /t REG_DWORD /d 0x00190050 /f>nulreg add %rr% /v \"FullScreen\" /t REG_DWORD /d 0x00000001 /f>nulreg add %rr% /v \"FontSize\" /t REG_DWORD /d 0x00100008 /f>nul可以将上面的代码保存到一个文本文件,并将扩展名改成.bat批处理文件来双击运行。\n7、字体大小:\n(1)点阵字体(较小)\n3×5——-00050003\n5×8——-00080005\n6×12——000c0006\n6×13——000d0006\n8×16——00100008\n8×18——00120008\n10×20—–0014000a\n10×22—–0016000a\n12×27—–001b000c\n(2)新宋体(较大)\n6—-00060000—3*7\n8—-00080000—4*9\n10—000a0000—5*11\n12—000c0000—6*14\n14—000e0000—7*16\n16—00100000—8*18\n18—00120000—9*21\n20—00140000—10*23\n24—00180000—12*27\n28—001c0000—14*32\n36—00240000—18*41\n72—00480000—36*82\n以上是自定义cmd窗口属性的基本知识\n","categories":["Technical"],"tags":["Windows","命令行","家庭"]},{"title":"为ipad2安装和配置gcc编译环境","url":"/configure-gcc-on-ipad2.html","content":"\niPad2可不仅仅是一个电子书,也不仅仅是用来看电影大号MP4。 废话就不多说了,下面介绍的是我给iPad2配置gcc编译环境的过程。\n\n1、首先你必须越狱,网上教程也很多,这里就不多讲了。\n声明:越狱可以让你的ipad运行无签名的可执行文件,但可能损害你的设备,对于你设备可能出现的问题,本文不负任何责任!\n好了,现在我假设你的设备已经越狱成功。很棒,下面请让你的ipad接入一个无线网络,后续的步骤也可能需要网络 :)\n如果你想使用电脑来SSH 到iPad2 你可能需要使用Cydia来安装openssh。\n记得安装完Openssh要修改root和mobile用户的密码哦!(默认是alpine)\nPC端可以可以使用putty 和winscp配合来访问iPad2,MAC系统或者Linux可以使用系统自带的终端 ssh root@192.168.1.6  。我这里使用的是Tunnelier,它集成了putty 和winscp两款工具的功能,个人感觉很好用!\n可能用的的工具:\nTunnelier (地址:www.bitvise.com/tunnelier)推荐\nputty (地址:www.putty.org/)\nwinscp(地址:http://winscp.net/)\n需要在cydia安装一些必要的工具:\nOpenssh(提供SSH 服务)\nwget (下载工具)\nunzip 及 zip (解压缩及压缩打包工具)\nsudo(允许普通用户执行root命令的工具)\nmake(很强大的工具)\nAptitude 及 APT 0.6 Transitional (deb 包工具,允许执行apt-get等命令)\n是不是觉得iPad2越来越像台电脑了呢? :)\n\n\n2、使用Tunnelier SSH到你的iPad\n\n\nHost:添入你的iPad的IP地址\nProt:默认是22\nUsername:root(用root或者mobile用户登录,这里是root)\nPassword:默认是alpine,如果修改过请填入修改后的密码(再次提醒一定要修改root密码!)\nSPN:不填\n为了系统的安全性,建议平时使用普通用户登录。\n将mobile用户加到sudo组,在命令行输入:$ visudo这个和vi的用法一样,移动光标到最后一行,按A在最后添加\nmobile ALL=(ALL) ALL\n如图:\n\n\n使用:wq或者ZZ保存并退出vi。\n以后就可以用 mobile用户登录并使用sudo命令来执行一些危险的操作了!\n3、开始安装\n再次使用mobile用户重新SSH到iPad后,在终端输入以下命令:\nwget http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb\nsudo dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb\nsudo apt-get install iphone-gcc ldid\n#注:安装ldid为应用程序签名(防止在应用启动时被iOS杀掉)\n\n\n\n安装 libSystem:cd /usr/lib/sudo ln -s libSystem.B.dylib libSystem.dylib下载并安装SDK(IPAD)头文件:\n下载sys32Libheader.tgz 文件到 iPad 路径 /var\n点击下载\n也可以将下载下来的tgz包通过sftp传到/var 目录,终端中输入代码:\ncd /var\ntar xzvf sys32Libheader.tgz\n此时gcc的默认include和lib目录里还没有那些sys32的内容。继续如下步骤:\n使用电脑ssh入ipad,或者在ipad里面使用终端,在mobile目录下生成 .bash_profile文件:\ncd /private/var/mobile\nvim .bash_profile\n填入如下内容\nC_INCLUDE_PATH=/var/sys32/usr/include\nexport C_INCLUDE_PATH\nCPLUS_INCLUDE_PATH=/var/sys32/usr/include\nexport CPLUS_INCLUDE_PATH\nLIBRARY_PATH=/var/sys32/usr/lib\nexport LIBRARY_PATH\n使用:wq或者ZZ保存并退出vim。\n切换成root用户:\nsu – root\n修改/etc/profile文件,在里面加入一行source /var/mobile/.bash_profile\n切换回mobile用户:\nsu – mobile\n此时gcc环境已经配置好了!\n使用gcc 测试 hello.ccd /private/var/mobilevim hello.c输入下面的内容:#include main(){printf(\"Hello iPad2!\\n\");}使用:wq或者ZZ保存并退出。\n编译并执行:\n\ngcc hello.c -o hello\nldid -S hello\n./hello\n#为编译后的应用程序签名的方式是,运行:ldid –S [Aplication];\n哈哈,看到iPad2上成功的第一次执行了自己写的代码!\n附图:\n\n\n注:部分内容参考http://antirez.com/page/iphone-gcc-guide.html\n","categories":["Technical"],"tags":["ssh","iPad2","越狱","GCC","环境搭建","putty","Tunnelier","winscp","vim","vi","visudo","编程"]},{"title":"配置nginx伪静态以支持ThinkPHP的PATHINFO模式","url":"/configure-nginx-to-support-thinkphp-pathinfo-mode.html","content":"\nThinkPHP是一款很不错的框架,也是PHP开发中最近用的比较火的。平时在本地开发中打开apache的modrewrite 配合.htaccess文件就可以完美的支持ThinkPHP的PATHINFO模式,但是家里的linux机器搭建的却是nginx 环境。这就造成了url 重写出现了很多奇怪的问题,所以需要对nginx 的配置文件修改一下来让它支持ThinkPHP的框架。\n首先你的项目的config文件中要配置这一项\n 'URL_MODEL' => 2, // rewrite\n在服务器中切换到nginx的安装目录,我这里是 /usr/local/nginx。然后添加thinkphp.conf 文件\n\nvim /usr/local/nginx/conf/thinkphp.conf内容如下\nlocation / {\n if (!-e $request_filename){\n rewrite ^/(.*)$ /index.php?s=/$1 last;\n }\n}\n\n然后在你的配置文件中include一下刚刚的配置文件。\n\n\n如果你的ThinkPHP入口文件index.php不在根目录,则需要把thinkphp.conf改成这样\nlocation /入口文件所在目录/ {\n if (!-e $request_filename){\n rewrite ^/abc/(.*)$ /abc/index.php?s=/$1 last;\n }\n}\n\n","categories":["Technical"],"tags":["中文乱码","Oracle"]},{"title":"禁用或替换博客google字体","url":"/disable-or-replace-google-font.html","content":"\n由于在Wordpress中很多地方用到了google的字体,加上最近我朝又在全面禁用google的服务,直接导致了博客访问慢的无法忍受。没办法只有割爱,先临时禁用google的字体。方法如下:\n\n方法一:在functions.php中注释掉,vim打开functions.php文件,搜索googleapis, 加//注释即可,代码如下:\nfunction wpan_fonts() {\n$protocol = is_ssl() ? ‘https’ : ‘http’;\n //</strong>wp_register_style( ‘underthesea-portlligatsans’, “$protocol://fonts.googleapis.com/css?family=Port+Lligat+Sans” );\n //</strong>wp_register_style( ‘underthesea-oswald’, “$protocol://fonts.googleapis.com/css?family=Oswald:400,700,300″ );\n //</strong>wp_register_style( ‘underthesea-pacifico’, “$protocol://fonts.googleapis.com/css?family=Pacifico” );\n}\n方法二:使用插件\n\n使用插件Remove Open Sans font from WP core,非常给力。使用插件也有一定的好处,就是你下次更新wordpress 的时候不需要再重新更改functions.php代码。\n以上两种方式均能明显改善博客打开的速度,有需要的朋友不妨试试。\n","categories":["最近添加"]},{"title":"高效办公辅助工具Autohotkey","url":"/efficient-office-support-tool-autohotkey.html","content":"\n序:工欲善其事,必先利其器。近期工作中要对公司的AFP软件进行汉化,由此也带来了大量的重复性工作,海量的字符串提取,组合,规整,键盘鼠标表示压力颇大~ 为此特别找回了大学玩魔兽对战用的改键插件Autohotkey,嘿嘿。 AutoHotKey 软件可以实现很多有趣的功能,可以简化你的重复性工作。这里下载 选择一个适合你的版本,办公环境稳定的可以选择安装版,需要便携要求的可以下载绿色版本,当然安装版的好处是:系统会自动关联 .ahk 文件。安装完成后打开Autohotkey软件,然后你会在系统托盘处看到一个H字样的小图标。现在右击托盘处图标,选择Edit this Script来设置。\n\n \n \n在打开的配置文件中加入你需要的功能。例如:加入 #w::Run wangheng.org\n\n然后选择Reload This Script,现在按win键(小旗标识那个键)+w,怎么样是不是直接在浏览器打开本博的主页呢?\n\n这里简单地解释一下那两行语句的意思:#号代表 Win 键;两个英文冒号作为热键和命令的分隔符使用;run是Autohotkey中常用的命令之一,它的后面是要运行的程序完整路径或网址(思考:如果要按win+q就打开QQ,该怎么写呢?)。当然如果你的程序或命令的所在目录是加到了系统的PATH中,则可以直接写执行程序的名字。例如\n\n#n::run notepad代码中只是写着“notepad”,没有写上完整路径但是却能打开,明白为什么了吧。(Tips:Autohotkey 能替换掉系统的默认快捷键)\n\nCtrl 的符号是 ^ \n\nAlt 的符号是 ! \n\nShift 的符号是 + \n\n如果你想按下Ctrl + Alt + Shift + N来启动 notepad的话,可以这样写:\n\n^!+n::run notepad\n\n所以一法通,万法通,现在你可以完全定制自己的热键了。\n\n如果只是上面的这些技巧那么这篇博客就没有什么必要了,下面要介绍的是我如果利用visual studio中的Vim插件和Autohotkey来完成一些很费事的工作的。\n\n由于经常拼接类似这样的语句\n\npublic const String A="A";\n\n每个源码文件中都可能有数十个这样的字符串,所以带来的工作量可想而知!~我是这样写的,首先将A字符串复制到剪切板。\n\n!d::send {esc}{o}public const String {esc}{p}{A}{=}{"}{esc}{p}{A}{"}{;}\n\n哈哈,现在随便在哪一行按alt+d,是不是直接在下一行打出了public const String A="A";这条语句呢?如果你的机器没有安装vim或者vim插件还可以这样写:(不过需要先手动换行,代码倒是少一些)\n\n!d::send public const String ^{v}="^{v}";\n\n很多浏览器或编辑工具都支持按Ctrl+Tab来切换标签,但总感觉Ctrl不如Alt好按,所以加了一条\n\n!a::send ^{tab}\n\n平时好多地方登录都要输入邮箱,所以加了这样一行:\n\n!u::send me@wangheng.org\n\n这样平时也能节省自己不少时间~分秒必争嘛~\n\n","categories":["Technical","Autohotkey"],"tags":["Windows","vim","visual studio","Win7","Cron"]},{"title":"Globus Toolkit 安装与配置","url":"/globus-toolkit-install.html","content":"\n1. 安装前准备工作\n准备工作包括软件的准备和环境变量的设置。操作系统选用ubuntu 11.10,Globus Toolkit的安装包为:gt4.0.8-all-source-installer.tar.gz(或者使用适用于ubuntu的gt4.0.8-x86_deb_3.1-installer.tar.gz)下载地址:http://globus.org/toolkit/downloads/,此外还需安装JDK、ANT 下载地址:\nhttp://ant.apache.org/bindownload.cgi、JUNIT最新版本。\n图1表示了各软件之间的层级关系。\n\n\n\n图1 各软件层级关系\n图2为GT4的安装流程图。\n\n\n图2 GT 安装流程图\n辅助软件安装完成之后,需要设置系统环境变量。具体方法是修改系统变量配置文件 /etc/profile。\n参考:\n# /etc/profile: system-wide .profile file for the Bourne bash (sh(1))\n# and Bourne compatible bashs (bash(1), ksh(1), ash(1), ...).\n\nif [ -d /etc/profile.d ]; then\nfor i in /etc/profile.d/*.sh; do\nif [ -r $i ]; then\n. $i\nfi\ndone\nunset i\n#Add\nunset pathmunge\nexport ANT_HOME=/usr/local/apache-ant-1.8.2\nexport JAVA_HOME=/usr/lib/jvm/java-6-openjdk\nexport GLOBUS_LOCATION=/usr/local/globus\nexport GPT_LOCATION=/usr/local/globus\nexport CLASSPATH="./:JAVA_HOME/lib:JAVA_HOME/jre/lib"\nexport PATH=$PATH:$JAVA_HOME/bin:JAVA_HOME/jre/bin:$GLOBUS_LOCATION/bin:$GLOBUS_LOCATION/sbin:$ANT_HOME/bin:/bin:/usr/bin:/usr/sbin\nexport LD_LIBRARY_PATH=$/usr/local/globus/lib\n\nfi\n\nif [ "$PS1" ]; then\nif [ "$BASH" ]; then\nPS1='\\u@\\h:\\w\\$ '\nif [ -f /etc/bash.bashrc ]; then\n. /etc/bash.bashrc\nfi\nelse\nif [ "`id -u`" -eq 0 ]; then\nPS1='# '\nelse\nPS1='$ '\nfi\nfi\nfi\numask 022\n\n关于安装需要注意以下几个问题:1 .要确认已安装C编译器gcc,及g++,否则GT4.0.8将无法 进行编译;\n\n2.确认GUN TAR在安装目录中.否则将无法进行解压缩.\n3.注意设置自己的主机名,如果使用默认主机名Localhost则在进行服务器认证请求时会失败.关于用户需要注意以下几个问题:除了设置一个globus用户外,还应设置几个普通用户,并且要注意普通用户的权限设置,应能访问globus的安装目录.\n如我就设置了4个普通用户,如feetoo,postgre,user01, user02。在进行用户认证时,常会因为用户权限问题失败,且此用户名不能重新认证,所以应多设几个普通用户。\n必要用户:root,globus,普通用户(建议多个)2.基本环境的配置(主节点和子节点一样)2.1 Install JDK首先把JDK安装文件拷贝到/usr/local下面\n[root@xx1 win]# cp jdk-6u1-linux-i586.bin /usr/local/\n然后,我们查看权限\n[root@xx1 local]# ls -la jdk-6u1-linux-i586.bin-rwxr-xr-x 1 root root 62772481 07-04 21:13 jdk-6u1-linux-i586.bin\nroot用户已经有执行权限,我们直接执行文件\n[root@xx1 local]# ./jdk-6u1-linux-i586.bin\nJDK解压完毕 ,我们查看一下,并建立符号链接\n[root@xx1 local]# ln -s jdk1.6.0_01 jdk\n我们查看链接是否正确\n[root@xx1 local]# ls -la jdklrwxrwxrwx 1 root root 11 07-04 21:18 jdk -> jdk1.6.0_012.2 Install ANT\n\nANT安装到/usr/local/文件夹下,并建立符号链接\n编辑/etc/profile文件,导出变量[root@xx1 local]# vi /etc/profile\n\n#编辑后,用tail命令查看[root@xx1 local]# tail /etc/profiledone\nunset iunset pathmunge\nexport ANT_HOME=/usr/local/antexport JAVA_HOME=/usr/local/jdkexport GLOBUS_LOCATION=/usr/local/globusexport GPT_LOCATION=/usr/local/globusexport CLASSPATH="./:JAVA_HOME/lib:JAVA_HOME/jre/lib"export PATH=$JAVA_HOME/bin:JAVA_HOME/jre/bin: $GLOBUS_LOCATION/bin:$GLOBUS_LOCATION/sbin: $ANT_HOME/bin:$PATHexport LD_LIBRARY_PATH=$/usr/local/globus /lib使变量生效[root@xx1 local]# source /etc/profile2.3 Install Globus添加一个globus用户,用来启动容器[root@xx1 local]# adduser globus -p myglobus在/usr/local下面建立globus文件\n[root@xx1 local]# mkdir globus\n更改属主\n[root@xx1 local]# chown globus.globus globus\n把网格的安装源文件拷贝过来,到globus文件夹下\n[root@xx1 local]# cp /mnt/win/ gt4.0.8-all-source-installer.tar.gz ./globus\n修改属主\n[root@xx1 local]# cd globus/\n[root@xx1 globus]# chown globus.globus gt4.0.8-all-source-installer.tar.gz\n切换为globus用户\n[root@xx1 globus]# su - globus\n进入globus目录\n[globus@xx1 ~]$ cd /usr/local/globus/\n解压\n[globus@xx1 globus]$ tar -zxvf gt4.0.8-all-source-installer.tar.gz\n已经成功解压了\n[globus@xx1 globus]$ ls \ngt4.0.8-all-source-installer gt4.0.8-all-source-installer.tar.gz\n进入安装程序[globus@xx1 globus]$ cd gt4.0.8-all-source-installer\nConfigure一下[想要特殊配置看帮助或者文档][globus@xx1 gt4.0.8-all-source-installer]$ ./configure –prefix=/usr/local/globus/checking for javac… /usr/local/jdk/bin/javacchecking for ant… /usr/local/ant/bin/antconfigure: creating ./config.statusconfig.status: creating Makefile\n开始make[globus@xx1 gt4.0.8-all-source-installer]$ makecd gpt && OBJECT_MODE=32 ./build_gptbuild_gpt ====> installing GPT into /usr/local/globus/…………….…………….echo “Your build completed successfully. Please run make install.”Your build completed successfully. Please run make install.(make时经常出错,原因是系统缺少各种包,装个yum源,具体安装什么包应根据自己的系统而进行选择,大概有openssl、openssh、grid-packaging-tools-3.2-22.fc14.noarch.rpm、g++ glibc-static perl-ExtUtils-*等等。rm /usr/bin/env; cp /bin/env /usr/bin/env )安装一下[globus@xx1 gt4.0.8-all-source-installer]$ make installln -sf /usr/local/globus//etc/gpt/packages /usr/local/globus//etc/globus_packages/usr/local/globus//sbin/gpt-postinstall…………….…………….find-fork-tools: WARNING: “Cannot locate mpiexec”find-fork-tools: WARNING: “Cannot locate mpirun”checking for mpiexec… nochecking for mpirun… nofind-fork-tools: creating ./config.statusconfig.status: creating fork.pm..Done\n3 配置主节点我们是实验环境,所以用SimpleCA来进行加密认证。在这里,我采用了本机+虚拟机的安装方式,把本机作为主节点,虚拟机作为子节点。本机[xx1.com]:ip:192.168.1.107mask:255.255.255.0gateway:192.168.1.1\n虚拟机[xx2.com]:ip:192.168.1.207mask:255.255.255.0gateway:192.168.1.1把/etc/hosts文件修改如下:[root@xx1 globus]# more /etc/hosts\n127.0.0.1 localhost.localdomain localhost192.168.1.107 xx1.com xx1192.168.1.207 xx2.com xx2\n然后,我在查看主机名称是不是正确[root@xx1 globus]# more /etc/sysconfig/networkNETWORKING=yesNETWORKING_IPV6=yesHOSTNAME=xx1.com\n修改主机名称之后,我们可以安装SimpleCA了\n3.1 安装SimpleCA切换到如下目录[globus@xx1 globus]$ pwd/usr/local/globus-4.0.1/setup/globus\n[globus@xx1 globus]$ sudo ./setup-simple-ca\nC e r t i f i c a t e A u t h o r i t y S e t u p\nThis script will setup a Certificate Authority for signing Globususers certificates. It will also generate a simple CA packagethat can be distributed to the users of the CA.\nThe CA information about the certificates it distributes willbe kept in:\n/home/globus/.globus/simpleCA/\nThe unique subject name for this CA is:\ncn=Globus Simple CA, ou=simpleCA-xx1.com, ou=GlobusTest, o=Grid\nDo you want to keep this as the CA subject (y/n) [y]:\n可以看到,本机作为主节点,ou=simpleCA-xx1.com,这就对应了上边让大家修改主机名称的作用。\n直接回车键即可,然后又提示让电邮,这里可以随便填写,这是让别人向你索取证书的地址。\nEnter the email of the CA (this is the email where certificaterequests will be sent to be signed by the CA):\n接着,就是证书过期日期,默认五年,直接回车:\nThe CA certificate has an expiration date. Keep in mind thatonce the CA certificate has expired, all the certificatessigned by that CA become invalid. A CA should regeneratethe CA certificate and start re-issuing ca-setup packagesbefore the actual CA certificate expires. This can be doneby re-running this setup script. Enter the number of DAYSthe CA certificate should last before it expires.[default: 5 years (1825 days)]:\n又提示给打开证书提供一个密码,并且确认Enter PEM pass phrase:Verifying - Enter PEM pass phrase:\n接着,又是一堆输出,我们可以看到公钥和私玥放在什么地方了,还有分发包放在那里[分发包可以用来配置自节点]:The private key of the CA is stored in /home/globus/.globus/simpleCA//private/cakey.pemThe public CA certificate is stored in /home/globus/.globus/simpleCA//cacert.pem\nThe distribution package built for this CA is stored in\n/home/globus/.globus/simpleCA//globus_simple_ca_b62cb8c1_setup-0.19.tar.gz\nThis file must be distributed to any host wishing to requestcertificates from this CA.\nCA setup complete.\nThe following commands will now be run to setup the securityconfiguration files for this CA:\n$GLOBUS_LOCATION/sbin/gpt-build /home/globus/.globus/simpleCA//globus_simple_ca_b62cb8c1_setup-0.19.tar.gz\n$GLOBUS_LOCATION/sbin/gpt-postinstall最后,终于完成了,SimpleCA生成了,但是我们也得到提示,还有一步:Note: To complete setup of the GSI software you need to run thefollowing script as root to configure your security configurationdirectory:\n/usr/local/globus//setup/globus_simple_ca_b62cb8c1_setup/setup-gsi\nFor further information on using the setup-gsi script, use the -helpoption. The -default option sets this security configuration to bethe default, and -nonroot can be used on systems where root access isnot available.\n\nsetup-ssl-utils: Complete\n我们查看一下,是不是真的生成了分发包:[globus@xx1 globus]$ sudo ls ~/.globus/simpleCA/cacert.pem crl grid-ca-ssl.conf newcerts serialcerts globus_simple_ca_b62cb8c1_setup-0.19.tar.gz index.txt private\n接下来,我们要让我们的本机[xx1.com],信任我们的globus的证书,那么我们要切换到root\n[globus@xx1 globus]$ su - root口令:\n执行最后一步命令[root@xx1 ~]# /usr/local/globus/setup/globus_simple_ca_b62cb8c1_setup/setup-gsi -defaultsetup-gsi: Configuring GSI securityMaking /etc/grid-security…mkdir /etc/grid-securityMaking trusted certs directory: /etc/grid-security/certificates/mkdir /etc/grid-security/certificates/Installing /etc/grid-security/certificates//grid-security.conf.b62cb8c1…Running grid-security-config…Installing Globus CA certificate into trusted CA certificate directory…Installing Globus CA signing policy into trusted CA certificate directory…setup-gsi: Complete(这步出现错误:ERROR: Setup package not found. Looking for:name=globus_simple_ca_11ad4bb3_setup,setup_name=, and setup version=就是因为环境变量没有设置好,把/etc/profile中的环境变量设置好就行了)根据上面的输出,我们看看相应的目录下面是不是多了什么。[root@xx1 ~]# ls /etc/grid-security/certificates/b62cb8c1.0 globus-host-ssl.conf.b62cb8c1 grid-security.conf.b62cb8c1b62cb8c1.signing_policy globus-user-ssl.conf.b62cb8c1\n[root@xx1 ~]# ls /etc/grid-security/certificates globus-host-ssl.conf globus-user-ssl.conf grid-security.conf\n这些都是SimpleCA的配置文件,它们的具体总用,可以参考相应的文档。\n3.2           让本机请求证书并得到SimpleCA的认证。\n[root@xx1 bin]#\n./grid-cert-request -host xx1.com\n\nGenerating a 1024bit RSA private key\n.++++++\n……………………..++++++\nwriting new privatekey to ‘/etc/grid-security/hostkey.pem’\n\nYou are about to beasked to enter information that will be incorporated\ninto yourcertificate request.\nWhat you are aboutto enter is what is called a Distinguished Name or a DN.\nThere are quite afew fields but you can leave some blank\nFor some fieldsthere will be a default value,\nIf you enter ‘.’,the field will be left blank.\n\nLevel 0 Organization[Grid]:Level 0 Organizational Unit [GlobusTest]:Level 1 Organizational Unit[simpleCA-xx1.com]:Name (e.g., John M. Smith) []:\n \nA private host keyand a certificate request has been generated\nwith the subject:\n \n/O=Grid/OU=GlobusTest/OU=simpleCA-xx1.com/CN=host/xx1.com\n \n\n \nThe private key isstored in /etc/grid-security/hostkey.pem\nThe request isstored in /etc/grid-security/hostcert_request.pem\n \nPlease e-mail therequest to the Globus Simple CA cy_xiaoxiao@yahoo.com.cn\nYou may use acommand similar to the following:\n \ncat /etc/grid-security/hostcert_request.pem |mail cy_xiaoxiao@yahoo.com.cn\n \nOnly use the aboveif this machine can send AND receive e-mail. if not, please\nmail using someother method.\n \nYour certificatewill be mailed to you within two working days.\nIf you receive noresponse, contact Globus Simple CA at cy_xiaoxiao@yahoo.com.cn\n \n[root@xx1grid-security]# pwd\n/etc/grid-security\n \n运行完成后会产生以下几个文件:\n/etc/grid-security/hostkey.pem\n/etc/grid-security/hostcert_request.pem\n/etc/grid-security/hostcert.pem(空文件)\n \n下一步,我们要做的,就是转换为SimpleCA的角色,签署一下我们本机的认证请求。\n \n我们首先拷贝请求文件到/usr/local/globus/bin下\n[root@xx1 ~]# cp/etc/grid-security/hostcert_request.pem /usr/local/globus/bin/\n \n转换到globus下,因为我们本机是用globus用户产生的SimpleCA\n[root@xx1 ~]# su -globus\n \n[globus@xx1 ~]$ cd/usr/local/globus/bin\n \n签署证书\n[globus@xx1 bin]$./grid-ca-sign -in hostcert_request.pem -out hostcert.pem\n \nTo sign the request\nplease enter the passwordfor the CA key:\n \nThe new signedcertificate is at: /home/globus/.globus/simpleCA//newcerts/01.pem\n \n把签署过的证书复制回去,覆盖原来的空文件\n[globus@xx1 bin]$ su\n\nroot\n\n口令:\n \n[root@xx1 ~]# cp/usr/local/globus/bin/hostcert.pem /etc/grid-security/\ncp:是否覆盖“/etc/grid-security/hostcert.pem”?yes\n \n这三个文件属主都是root,但是我们的gridftp要用到它们,并且我们要采用globus用户启动web容器,所以我们就得有\n两套认证的证书,一套归root使用,另一套归globus\n[root@xx1grid-security]# cp hostcert.pem containercert.pem\n \n[root@xx1grid-security]# cp hostkey.pem containerkey.pem\n \n[root@xx1 grid-security]#chown globus.globus container*.pem\n","categories":["Technical"],"tags":["Globus Toolkit","Ubuntu","Ant","Openjdk","openssh"]},{"title":"HTML 页面跳转的几种方法","url":"/html-page-several-methods-of-jump.html","content":"\n1、使用Html实现\n\n\n<!—使用下面的方式只是刷新不跳转 –>\n\n\n\n\n\n\n\n2、使用javascript实现\n\n\n\n// 使用以下的方式可以直接跳转\n\nwindow.location.href='hi.html';\n\n// 使用以下方式定时跳转,同样是五秒后跳转的hi.html页面,具体请自行更改\n\nsetTimeout(\"javascript:location.href='hi.html' \", 5000);\n\n\n当然还有很多中实现的方法,写到博客仅仅是为了方便查询,欢迎各位高手指教!\n\n","categories":["Technical"],"tags":["html","javascript","页面跳转"]},{"title":"IIS无法识别的属性targetFramework、错误模块ManagedPipelineHandler","url":"/iis-identify-attributes-targetframework-managedpipelinehandler.html","content":"\n微软服务器与开发工具事业部 黄捷 原文地址\n\n如果你创建寄宿在IIS中的WCF Service网站项目,(图1显示怎样创建这样的网站项目),或者你把你的WCF Web Application项目或者WCF Service网站项目发布或部署到IIS网站服务器上后,你可以用网页浏览器去访问你的网站。如果你在尝试打开这些网页时无法看到正确的页面显示,或者看到错误提示页面(图2是错误提示页面的一个例子: HTTP Error 500.21 – Internal Server Error Handler “svc-Integrated” has a bad module “ManagedPipelineHandler” in its module list),下面是最常见的问题和解决办法。\n\n\n图1\n\n\n图2常见问题与解决办法:\n1. 检查IIS是否正确安装和运行\n你需要保证你的IIS服务器已经正确安装并正常运行。这里我们不讨论IIS安装的方法(你可你根据你的Windows版本和需要的IIS版本去bing中搜索), 只给出简单的验证方法。如图2所示,在IE地址栏中输入http://localhost, 如果你看到如图所示的页面或者类似的其他版本IIS的默认页面。那么就说明IIS已经在正常运行了。\n\n图3\n\n2. 正确注册安装ASP.net\n打开Visual Studio命令行提示工具(Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt, 如果你的OS是Windows Vista及以后的版本,你需要以管理员身份打开),运行”aspnet_regiis.exe -i”。在命令运行完成后重新尝试你的网站。\n3. 在IIS中配置正确的Application Pool\n在IIS管理工具(IIS Manager)中找到你的Website, 选中。在右侧的面板中点击Basic Settings。 你将看到如图3所示的弹出窗口,其中有你正在使用的Application Pool的信息。 选择IIS管理工具中的Applications Pools节点。选中你在使用的Application Pool, 点击右侧的Basic Settings。 你将看到如图4所示的弹出窗口。确定其中的.NET Framework版本是v4.0.xxxxx。如果不是,这也许就是你看到错误页面的原因。尝试在图2中把它改成v4.0或者在图3中选择”Select…”, 更改成其他的使用.NET Framework v4.0的Application Pool。\n\n\n图4\n\n图5\n\n4. 安装注册WCF组件\nWCF没有正确的在IIS中注册也许是导致看到错误页面的最常见原因。如果你在安装Visual Studio后才安装IIS, 那么你就很可能遇到这样的问题。打开Visual Studio命令行提示工具(Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt, 如果你的OS是Windows Vista及以后的版本,你需要以管理员身份打开),运行” ServiceModelReg.exe –ia”。 命令完成后再次访问你的WCF 网站。\n","categories":["Technical"],"tags":["Windows","git"]},{"title":"实现SSH无密码登录","url":"/implement-ssh-without-password.html","content":"\n好久没有写博客了,前一阵子工作实在是太忙,回来也没有了写博的激情。这几天给自己放了个假,出去玩了两天,状态好了不少。\n\n一、在Linux中\n有机器A[192.168.1.1],B[192.168.1.2]。现想A通过ssh免密码登录到B。第一步,在A机下生成公钥/私钥对。[root@A ~]$ ssh-keygen\n\n\n直接三次回车,它将在~/下生成.ssh目录,.ssh下有id_rsa和id_rsa.pub。\n第二步,把A机下的id_rsa.pub复制到B机下\n完成后还需要将id_rsa.pub内容追加到B机的.ssh/authorized_keys文件里。\n[root@A ~]$ scp ~/.ssh/id_rsa.pub root@192.168.1.2:~/id_rsa.pub\n\n由于还没有免密码登录的,所以这里还要输入密码。 输入B机器的登录密码后,文件就复制到了B机器的~/目录。\n第三步、B机把从A机复制的id_rsa.pub添加到.ssh/authorzied_keys文件里。\n\n\n[root@B ~]$ cat id_rsa.pub >> .ssh/authorized_keys \n[root@B ~]$ chmod 600 .ssh/authorized_keysauthorized_keys的权限必须是600。(要保证.ssh和authorized_keys都只有用户自己有写权限。否则验证无效。)\n\n第四步、验证A机无密码登录B机。[root@A ~]$ ssh root@192.168.1.2第一次登录时如果询问是否将B机器加到A机器的list of known hosts,还需要你输入yes。现在A机可以无密码登录B机了。\n小结:私钥文件也可以保存下来在别的机器上面使用,被登录的机子要有登录机子的公钥。这个公钥/私钥对一般在私钥宿主机产生。想让A,B机无密码互登录,B机器上重复以上步骤即可~\n二、在Windows中\n在Windows中要想实现无密码登录Linux主机也很简单。一般在Windows中远程ssh连接Linux主机大家都会使用putty 或者Tunnelier这样的工具,我一般使用Tunnelier比较多,因为它集成了sftp工具和其他一些很实用的功能。例如使用Tunnelier很容易实现Firefox+SSH+AutoProxy智能翻墙,想试试的同学可以翻翻我以前发过的文章。下面具体介绍Windows下使用putty无密码登录Linux\n1、首先使用PUTTYGEN.EXE这个工具生成公钥/私钥对,点击Generate,并在空白处移动鼠标几次就行了,如下:\n\n\n2、选择Save public key和Save private key可以分别保存公钥和私钥,然后将public key的内容追加到Linux主机中的.ssh/authorzied_keys文件里。\n3、使用putty这个工具创建自动登录的session\n首先在Session节点填写Host Name和你Linux VPS的ssh端口,然后在/Connection/SSH/Auth节点选择你Private key文件的保存位置,然后在/Connection/Data节点填写自动登录的用户名,最后在Session节点为Session起一个名字并保存,以后就可以直接双击保存的Session名字来自动无密码登录Linux主机了。\n","categories":["Technical"],"tags":["ssh","putty","Tunnelier","Win7","Linux"]},{"title":"C#实现Windows版Cron","url":"/implementation-windows-version-the-the-the-cron.html","content":"\n由于用惯了Linux下面的Cron工具,平时在Windows下面工作却总是不适应Task Schedule,于是自己写了一个Cron for Windows。功能已经基本实现,不过可能有一些小bug。思路很简单,利用线程起一个Timer,然后每分钟去检查一下是不是有符合的规则,添加符合则执行crontab最后的command参数。源码托管在https://github.com/wujiwh/Cron,欢迎各位同学批评指正。\n\n具体核心代码如下:(加到github项目托管)\n\n我把Cron作为了一个Windows Service并且把ServiceInstaller的StartType设置为了Automatic来保证每次重启系统后能自动启动服务。同时serviceProcessInstaller的Account属性设置成LocalSystem来保证服务对于的进程有较高的系统权限。\n使用方法很简单,将cron.exe利用.net的installutil.exe安装到系统服务(需要.net4 framework),然后在c:\\cron目录中新建一个crontab文件,对照cron说明写一条规则后启动服务,就OK了。服务执行的log文件也在c:\\cron目录。这里是我写的一个安装/卸载脚本,想尝试一下Windows版Cron的同学可以直接下载,解压后执行setup.bat来安装服务。服务安装好默认是stop的,需要手动启动,请确保执行前写好你的crontab文件,启动可以在命令行执行sc start cron或者在任务管理器的服务标签右击cron来启动。\n","categories":["Technical","Route"],"tags":["Windows","Win7","C#","coder","Viki"]},{"title":"Linux编译安装Darwin Streaming Server 6.0.3","url":"/install-darwin-streaming-server-6-0-3-on-linux.html","content":"\n    买回来VPS后就一直想在上面搭建一个流媒体服务,在网上搜索了很多资料,大部分都是介绍Linux中安装Darwin Streaming Server 5.5.5版本,因为这个版本提供了针对linux的安装脚本。但既然官网有了6.0.3版本,于是果断尝试安装最新的版本。 1、什么是Darwin Streaming Server     目前主流的流媒体服务器有微软的windows media server、RealNetworks的Helixserver和苹果公司的Darwin Streaming Server. 微软的windows media server只能在windows2000 server和windows 2003 server下使用,不在考虑之列。RealNetworks的Helixserver是一款跨平台的软件,功能也很强大,但并非免费软件。     Darwin Streaming Server简称DSS。DSS是Apple公司提供的开源实时流媒体播放服务器程序。整个程序使用C++编写,在设计上遵循高性能,简单,模块化等程序设计原则,务求做到程序高效,可扩充性好。并且DSS是一个开放源代码的,基于标准的流媒体服务器,可以运行在Windows NT和Windows 2000,以及几个UNIX实现上,包括Mac OS X,Linux,FreeBSD,和Solaris操作系统上的。 2、在Linux中编译安装Darwin Streaming Server 首先需要进行一些必要的准备工作: apt-get install patch make gcc g++ \n\n准备好软件暂存的目录,并从官网下载软件的源码:\n\nmkdir soft\ncd soft\nwget http://dss.macosforge.org/downloads/DarwinStreamingSrvr6.0.3-Source.tar\n\n源码下载完成后,需要解压tar包,\n\ntar xvf DarwinStreamingSrvr6.0.3-Source.tar\n\n给源码安装补丁文件,进入DarwinStreamingSrvr6.0.3-Source目录,并打补丁:cd DarwinStreamingSrvr6.0.3-Source\nwget http://www.abrahamsson.com/dss-6.0.3.patch\npatch -p1 < dss-6.0.3.patch \n\n执行\n\n./Buildit \n\n编译完成后,我们来生成linux下的dss安装包\n\n执行 ./buildtarball \n\n生成DarwinStreamingSrvr-Linux.tar.gz\n\n解压缩\n\ntar -zxvf DarwinStreamingSrvr-Linux.tar.gz \ncd DarwinStreamingSrvr-Linux \n\n对Install文件做修改\n\nif [ $INSTALL_OS = \"Linux\" ]; then \n/usr/sbin/useradd -M qtss > /dev/null 2>&1 \nelse \n/usr/sbin/useradd qtss > /dev/null 2>&1 \nfi\n\n将-M修改成-m\n\n\n\n执行./Install \n\nPlease enter a new administrator user name: 【新管理员】\n\nPlease enter a new administrator Password: 【密码】\n\n查看是否安裝成功\n\nps aux | grep Darwin(查看流媒体服务器的进程) \n\nroot ... ... ... /usr/local/sbin/DarwinStreamingServer \n \n\n qtss … … … /usr/local/sbin/DarwinStreamingServer\nnetstat -ntulp | grep Darwin(查看流媒体服务器的端口)\n\n \n\n3、启动 Darwin Streaming Server \n\nsudo /usr/local/sbin/DarwinStreamingServer\n\n启动 Web 管理介面 (tcp port 1220)\n\nsudo /usr/local/sbin/streamingadminserver.pl\n\nps. 以上两项在刚安装好的时候会自动启动,不需手动执行\n\n小技巧:自动启动流媒体服务器的方法:\n\n自动运行流媒体服务器序非常简单,把上述命令添加在/etc/rc.d/rc.local脚本中即可。\n\n最后在服务器输入 http://你的IP:1220/来访问web管理\n\n\n\n默认的媒体文件存放在/usr/local/movies\n\n你可以在web管理面板修改这个路径。\n\n4、访问自己的流媒体服务\n\n可以使用VLC media player这个软件,输入\n\nrtsp://你的IP/sample_100kbit.mp4\n\n来播放默认的测试视频。如果你的网速够给力的话效果还不错 :)\n\n","categories":["Technical"],"tags":["Linux","编译","Darwin Streaming Server","流媒体"]},{"title":"安装nvidia官方驱动","url":"/install-nvidia-official-drivers.html","content":"\n以前未发布的文章,现在一块贴出来吧。Ubuntu10.10 安装nvidia官方驱动 1. 下载最新版的nVidia驱动,命名为NVIDIA.run。 http://www.nvidia.com/page/drivers.html 2.编辑blacklist.conf。 sudo gedit /etc/modprobe.d/blacklist.conf 添加以下部分并保存: blacklist vga16fb blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv 3. 删除之前所安装的nVidia驱动。 sudo apt-get –purge remove nvidia-* sudo apt-get --purge remove xserver-xorg-video-nouveau 4. 重启电脑。 5. 按Ctrl + Alt +F1到第一控制台。 6. 输入用户名和密码后,登录后执行: sudo /etc/init.d/gdm stop 7. 进入驱动所在的文件夹,安装驱动。 sudo sh NVIDIA.run –k $(uname –r) 8.启动GDM : sudo /etc/init.d/gdm start 9.重启电脑。 sudo reboot 10.如果存在花屏等问题,执行: sudo nvidia-xconfig sudo nvidia-settings 11.根据自己的电脑配置设置分辨率和刷新频率。\n\n","categories":["Technical"],"tags":["NVIDIA","程序员"]},{"title":"Centos 6.5 安装 Oracle 12C","url":"/install-oracle12c-on-centos6-5.html","content":"\nOracle已经发布Oracle 12C 一段时间了,Oracle此次发布只有64位版本,并无32位版本。我们的系统安装环境为CentOS 6.5 x86_64 。\n1、安装Oracle依赖包\n修改yum配置,默认同时安装32位和64位rpm\n\nyum install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel libXext libXtst libX11 libXau libxcb libXi make sysstat\n \n2 、配置用户2.1.   创建相关用户和用户组\n/usr/sbin/groupadd oinstall\n\n/usr/sbin/groupadd dba\n/usr/sbin/useradd -g oinstall -G dba oracle\n#如果已经创建过oracle 可以执行\n/usr/sbin/usermod -g oinstall -G dba oracle\n \n2.2 修改系统内核参数\ncp /etc/sysctl.conf /etc/sysctl.conf.bak\n\n \nvim /etc/sysctl.conf\nfs.aio-max-nr = 1048576\nfs.file-max = 6815744\nkernel.shmall =33554432\nkernel.shmmax = 137438953472\nkernel.shmmni = 4096\nkernel.sem = 250 32000 100 128\nnet.ipv4.ip_local_port_range = 9000 65500\nnet.core.rmem_default = 262144\nnet.core.rmem_max = 4194304\nnet.core.wmem_default = 262144\nnet.core.wmem_max = 1048586\n \n查看oracle用户组的id\nmore /etc/passwd\noracle:x:500:501::/home/oracle:/bin/bash\n \n修改大内存限制\necho 500 > /proc/sys/vm/hugetlb_shm_group\nvi /etc/sysctl.conf\nvm.hugetlb_shm_group=500\n \n修改用户Limits\nvi /etc/security/limits.conf\n新增如下内容:\noracle soft nofile 65536\noracle hard nofile 65536\noracle soft nproc 16384\noracle hard nproc 16384\noracle stack nproc 16384\n \n2.3 创建目录\nmkdir -p /u01/app/\n\nchown -R oracle:oinstall /u01/app/\nchmod -R 775 /u01/app/\n \n2.4 配置网络配置hosts\nhostname\n\nOracle12\nvi /etc/hosts\n127.0.0.1 Oracle12\n \n2.5   配置环境变量\nsu - oracle\n\necho $SHELL\n/bin/bash\n \ncd ~\nvi .bash_profile\n \nTMP=/tmp\nTMPDIR=/tmp\nexport TMP TMPDIR\n \n3正式开始安装Oracle3.1首先解压文件到oracle 用户目录,并进入database 目录。\nxhost +\n\ncd ~\nunzip unzip linuxamd64_12c_database_1of2.zip\nunzip unzip linuxamd64_12c_database_2of2.zip\ncd database\n./runInstaller\n4 后续工作4.1. 配置环境变量\ncd ~\n\nvi .bash_profile\n \n########## for Oracle ##########\nORACLE_BASE=/u01/app/oracle\nexport ORACLE_BASE\nORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1\nexport ORACLE_HOME\nORACLE_SID=orcl.org\nexport ORACLE_SID\nPATH=$PATH:.:$ORACLE_HOME/bin\nexport PATH\n5 疑难问题:\n在安装的过程中遇到了ORA-00845: MEMORY_TARGET not supported on this system\n\n这个问题是由于设置SGA的大小超过了操作系统/dev/shm的大小这个问题是由于设置SGA的大小超过了操作系统/dev/shm的大小\n查看shm大小:\n[oracle@localhost dbs]$ df -h /dev/shm\n文件系统              容量  已用 可用 已用% 挂载点\ntmpfs                 2.0G     0  2.0G   0% /dev/shm.\n利用/etc/fstab文件来修改/dev/shm大小:\n将tmps后面加上size=100G,然后将/dev/shm卸载后重新挂载.\numount /dev/shm\nmount -all\n如果/dev/shm 卸载不掉\numount /dev/shmumount: /dev/shm: device is busy.\n用fuser处理\nfuser -km /dev/shm此时再启动oracle,就没有问题了。\n","categories":["最近添加"]},{"title":"ipad2下的vim安装和配置","url":"/ipad2-by-vim-installation-and-configuration.html","content":"\n前面写了给ipad2配置gcc编译环境的过程,中间用到了vim这款文字编辑工具,默认安装的vim需要一些配置才能对语句正确着色和自动折行。\n\nvim可以通过cydia中搜索安装,或者ssh到ipad,直接执行命令:\nsudo apt-get install vim\n来安装(apt命令需要安装Aptitude 及 APT 0.6 Transitional deb 包工具)\nipad中配置vim跟Linux中配置vim基本一致,使用mobile用户ssh到ipad,然后在mobile用户目录下增加.vimrc文件。\nvim .vimrc\n输入如下内容:\nset nocompatible “取消vi兼容模式\nsyntax on “设置语法高亮\nset cursorline\nset number\nset hlsearch\nset foldmethod=syntax\nset foldenable\nset laststatus=2\nset statusline=\\ %\n使用:wq或者ZZ保存并退出\n\n\n\n重新使用vim编辑文件,看看是不是有语法高亮了。: )\n","categories":["Technical"],"tags":["ssh","iPad2","vim","语法高亮"]},{"title":"Javascript编码解码方法","url":"/javascript-coding-decoding-method.html","content":"\nASP(Server.UrlEncode)、PHP(urlencode())函数编码结果,或是经过asp、php等动态语言直接写入COOKIES的中文字符,用JS读取的时候,都会碰到一个编码的问题,那就是最终字符串被urlencode编码了,而又时有需要从JS在客户端去读取这些数据。而本文,就大概说说如何在js中通过系统自带的函数去解决这个问题。\n\n而相信碰到过此问题的朋友应该都有所了解,目前网络上流行一些js下的自定义函数去解决这个问题,如说vbscript(URLDecode())、javascript(UrlDecode())等。而这两个函数,都无法很好的与asp(Server.UrlEncode)、php(urlencode())这两个函数相互通讯。\njavascript(UrlDecodedecodeURIComponent())这个函数名称实在太常了,个人真的不太了解,毕竟js的系统函数很多,很容易遗漏。烦恼在偶然间发现了这个函数!编码函数:encodeURIComponent()解码函数:decodeURIComponent()decodeURIComponent()语法\ndecodeURIComponent(URIstring)参 数:(URIstring)必需。一个字符串,含有编码 URI 组件或其他要解码的文本。返回值:URIstring 的副本,其中的十六进制转义序列将被它们表示的字符替换。\n示例:\n<script type="text/javascript">\n// <![CDATA[\nvar test1="烦恼";\n\nvar test2="%E7%83%A6%E6%81%BC";\n\ndocument.write("编码(原="+test1+"):"+encodeURIComponent(test1));\n\ndocument.write("解码(原="+test2+"):"+decodeURIComponent(test2));\n// ]]>\n</script>\n结果:\n编码(原=烦恼):%E7%83%A6%E6%81%BC\n解码(原=%E7%83%A6%E6%81%BC):烦恼\n注意:在UTF-8编码环境下测试通过。\n\n","categories":["Technical"],"tags":["javascript","node.js"]},{"title":"JavaScript中的鼠标滚轮事件","url":"/javascript-mouse-wheel-event.html","content":"\nFirefox使用DOMMouseScroll,其他的浏览器使用mousewheel。滚动事件触发时Firefox使用detail属性捕捉滚轮信息,其他的浏览器使用wheelDelta。不知道为何在该问题上其他厂商和微软的如此一致。Firefox可以使用addEventListener方法绑定DomMouseScroll事件。\nelem.addEventListener('DOMMouseScroll', func, false);\nIE和其他的主流浏览器可以使用传统的事件绑定模型。但不要使用IE专有的attachEvent方法,其他主流浏览器并不识别微软的这个方法。下面先测试一下。\n120// <script type="text/javascript">\n    // <![CDATA[\n    var mouseWheel = document.getElementById('mouseWheel');\n    \n    if (mouseWheel.addEventListener) {\n        \n        mouseWheel.addEventListener('DOMMouseScroll', function(event) {\n            \n            event.target.innerHTML = event.detail;\n            event.stopPropagation();\n            event.preventDefault();\n            \n        }, false);\n    }\n    mouseWheel.onmousewheel = function(event) {\n        \n        event = event || window.event;\n        mouseWheel.innerHTML = event.wheelDelta;\n        event.returnValue = false;\n        \n    }\n    // ]]>\n</script>\n测试之后得到如下的结论。\n Firefox\n 鼠标滚轮向上滚动是-3,向下滚动是3\n\nIE\n鼠标滚轮向上滚动是120,向下滚动是-120\n\nSafari\n鼠标滚轮向上滚动是360,向下滚动是-360\n\nOpera\n鼠标滚轮向上滚动是120,向下滚动是-120\n\nChrome\n鼠标滚轮向上滚动是120,向下滚动是-120</pre>\n\n有人在Safari下做了一些测试:”只是滚动一圈的话,值为+-0.1,如果滚动地稍微快点的话(多滚动几圈),这个值也会变大。 这是因为Mac OS下有鼠标滚轮加速功能。滚动一次,浏览器滚动1像素,滚动3次,浏览器却滚动30像素”。同时他也对Camino(基于Gecko的内核引擎)进行研究:“与Safari相似(+- 0.3 to +-Infinity),虽然使用了与firefox相同的内核引擎,但结果这个delta值却只在+-2.666666里浮动,无论滚动速度如何。”\n","categories":["Technical"],"tags":["html","javascript"]},{"title":"金山快盘丢文件","url":"/kingsoft-disk-lost-files.html","content":"\n这几天金山快盘似乎在做服务器端的升级,今天打开快盘发现一些重要的东西都没了!话说你这个有点太扯了吧~\n\n我用vim写了好久的wiki文件!~ 只给我剩下了一个!\n还好快盘有个隐藏的缓存目录,折腾了半天终于算是把我的文件找回来了! 如下图:\n\n\n \n \n \n \n \n \n恶心的是它把每个文件的名字都改了~ 好吧,我们要手动改回来。\n写了一段代码来实现改名~ 首先是把前面那一堆乱七八糟的字符串去掉,然后把它替换成空格的下划线替换回来~ 如下:\n\nstatic void Main()\n {\n string path = @\"c:\\wiki\\\";\n var files=Directory.GetFiles(path);\n foreach (var file in files)\n {\n string[] substr = file.Split('_');\n string newname = path + substr[3];\n newname = newname.Replace(' ', '_');\n File.Move(file, newname);\n Console.WriteLine(file+\"is renamed to :\"+newname);\n }\n Console.ReadKey();\n }\n\n\n","categories":["Technical","Route"],"tags":["金山快盘","encode"]},{"title":"linux版快盘上传下载脚本","url":"/kuaipan-uploader.html","content":"\n\n\n⚠️ 警告提醒:本文档已过期!因金山快盘已停止服务,此脚本不再维护,请勿继续使用。\n\n\nPS:将脚本的开发过程移动到了这里。想了解下开发步骤的可以参考~~ \n安装使用\n此脚本适用于大部分bash环境,已经在cygwin,ubuntu14.04,debian,centos6,mac-osx等环境通过测试。\n\n1.依赖项使用此程序前请确认你的Linux或者Cygwin支持如下命令:\ncurl sed awk basename date grep tr od openssl base642.配置\n\n如果你想使用自己的app_key你需要首先注册一个金山快盘账号,然后到这里地址创建一个你自己的应用并把得到的 consumer_key、consumer_secret填写到脚本相应位置。当然此步骤可以略过,你可以直接使用脚本中填写好的consumer_key、consumer_secret,我创建的应用名称all4fun.\n3.安装wget https://github.com/wujiwh/kuaipan_uploader/archive/master.zipunzip master.zipcd kuaipan_uploader-master#或者 :git clone https://github.com/wujiwh/kuaipan_uploader.gitcd kuaipan_uploader#上面两种方式选择一种即可#赋予脚本执行权限并执行chmod a+x kuaipan_uploader.sh./kuaipan_uploader.sh然后根据提示完成API的授权流程,得到授权Token。脚本会自动保存得到的授权信息到CONFIG_FILE 变量对应配置文件,默认为~/.kuaipan_upload.conf \n4.使用说明KuaiPan Uploader v1.1.0wangheng - wujiwh@gmail.com\nUsage: /usr/bin/kuaipan COMMAND [PARAMETERS]…\nCommands: upload [local file] <remote file> download [remote file] <local file> delete [remote file/remote dir] list <remote dir> info relink\nFor more informations, please visit http://wangheng.org.其中[XXX]内的为必填参数,<XXX>内的为可选参数\n比如执行 ./kuaipan_uploader.sh upload a.txt\n后面的<remote file>可以不填,不填写的话,默认上传到网盘根目录或者应用程序根目录的同名文件。 (跟你创建应用的时候选择的选项有关)\n其他,下载和删除都是类似如上…\n\n 注意:如果上传到远程某个目录内的话,请务必保证此目录已存在!\n执行 ./kuaipan_uploader.sh info 可以查看网盘的用户名,总容量和可用容量。\n\n执行 ./kuaipan_uploader.sh list 可以查看网盘内已经存在的文件以及目录(非结构化)。\n执行 ./kuaipan_uploader.sh relink 可以删除网盘授权信息并重新授权\n5、卸载\n此工具为绿色软件,使用时候复制到执行目录并赋予执行权限即可。\n如果想卸载删除此工具,请连带删除 CONFIG_FILE 变量后面的配置文件,默认为~/.kuaipan_upload.conf \n许可证\nKuaipan Uploader 基于GPL第二版或以后版本发布。详见LICENSE文件\n项目开源在我的Github:https://github.com/wujiwh/kuaipan_uploader\n","categories":["Technical"],"tags":["Linux","awk","curl","shell","openssl","开源","denyhost","server"]},{"title":"kuaipan_uploader开发分享","url":"/kuaipan-uploader-dev-share.html","content":"\n\n\n⚠️ 警告提醒:本文档已过期!因金山快盘已停止服务,此脚本不再维护,请勿继续使用。\n\n\nPS:将原来的一篇文章拆开了,上篇是安装使用讲解,这篇是开发过程讲解。\n以前使用dropbox的linux客户端备份VPS上的文件和数据,但是近来dorpbox在国内越来越难访问,加上dropbox本身的容量只有几G,于是有了自己动刀写一个网盘的客户端,首先想到的是百度网盘,2T的巨大容量肯定是够用了!\n没想到这个决定却是悲剧的开始,按照百度PCS的API文档写了半天,没想到PCS开通居然审核了一周多还不通过! 联系客服,没想到他们的PCS API已经不审核新的申请了!再次吐槽下,你不审核,申请的时候就不能给个提示么!!! 遂放弃!\n然后就想到了还是用金山快盘吧,前段时间刚被迅雷收购,速度方面应该是没有问题。找到金山快盘的官方开放平台,看了看文档似乎是…有点麻烦啊。不过本着有难度才有挑战的原则,还是开搞了。下面介绍下开发过程中遇到的一些问题。\n首先就是快盘的授权机制,本来是不太复杂,但是它的授权流程签名并不支持PLAINTEXT明文文本格式,只支持了一个HMAC-SHA1加密方式。为了处理这个签名倒是走了一些弯路。\n拿到授权token的过程可以总结为三歩走:\n\n 获取未授权的临时 token;\n 用户登陆并授权你的应用;\n 根据临时 token换取真实的 access_token。\n\n\n图示如下:\n\n\n在每次请求中,下面几个参数是必须的\nNameRequiredType and LimitDescriptionoauth_consumer_keyYstring第1步的 consumer_keyoauth_signatureYstring本次请求的签名,生成方法请参考附录-签名生成算法oauth_timestampYint时间戳,正整数,和标准时间不超过5分钟oauth_nonceYstring[ 0-9A-Za-z_ ]随机字符串,长度小于32字节。每次请求请使用不同的nonce\noauth_consumer_key可以在你创建应用的时候拿到,oauth_timestamp为标准的unix时间戳格式,oauth_nonce每次都生成一个随机数,这几个参数都非常好处理,主要就是oauth_signature这个费些周章。\n\n官方的OAuth签名生成讲的比较具体,其实获取签名的方式也非常简单:\n\n 计算串基\n 根据串基按HMAC-SHA1获取签名并使用bash64和url_encode 转码\n生成签名的时候,如果是申请request_token 那么HMAC_SHA1加密的key 就是你的consumer_secret+&,其他都是consumer_secret+&+oauth_token_secret!\n\nLinux shell中处理url_encode 没有太好的办法,我索性就写了一个函数用sed处理了,代码如下:\n#url encode\nfunction url_encode\n{\n\n url=$1\n echo -n $(echo -n "$url" | sed 's/\\%/\\%25/g'|sed 's/&/\\%26/g' |sed 's/:/\\%3A/g' |sed 's/\\//\\%2F/g'| sed 's/=/\\%3D/g' |sed 's/ /\\%20/g' |sed 's/@/\\%40/g' |sed 's/+/\\%2B/g' |sed 's/\\*/\\%2A/g')\n \n}\n拼接字符串基可归结为:请求方式&url_encode(请求URL)&(url_encode(参数1+参数2… ))\n使用bash获取签名处理方法如下:\nfunction get_signature\n{\n method=$1\n url=$2\n data=$3\n token_secret=$4\n baseUrl="$1&$(url_encode "$2")&$(url_encode "$3")"\n signature=$(echo -n $baseUrl | openssl dgst -sha1 -binary -hmac "$APP_CONSUMER_SECRET&$token_secret" |base64)\n \n echo -n $(url_encode $signature)\n}\n\n有了签名,一切都简单了。按照官方开发文档上参数列表把其他必选的参数拼好就行了。\n请求使用的curl,命令格式如下:\nCurl –s –S –L –d “参数” “请求的URL” –o “本地缓存文件”\n整个脚本的源码如下:\n#!/usr/bin/env bash\n#\n# KuaiPan Uploader\n#\n#===========================================================================\n# Copyright (C) 2014-2015 wangheng <wujiwh@gmail.com>\n#\n# This file is part of Kuaipan Uploader source code.\n#\n# Kuaipan Uploader is free software; you can redistribute it\n# and/or modify it under the terms of the GNU General Public License as\n# published by the Free Software Foundation; either version 2 of the License,\n# or (at your option) any later version.\n#\n# Kuaipan Uploader is distributed in the hope that it will be\n# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Foobar; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n#===========================================================================\n\n#===========================================================================\n# FileName: kuaipan_uploader.sh\n# Desc: API Doc is: http://www.kuaipan.cn/developers/document.htm\n# Author: wangheng\n# Email: wujiwh@gmail.com\n# HomePage: http://wangheng.org\n# Version: 1.0.1\n# LastChange: 2015-05-09 09:34:59\n# History:\n#===========================================================================\n\n#配置文件.\nCONFIG_FILE=~/.kuaipan_upload.conf\n\nRESPONSE_FILE="/tmp/resp_kuaipan"\nCOOKIE_FILE="/tmp/kuaipan.cookie"\n\nVersion="1.0.1"\n\n#使用整个快盘此处填"kuaipan",使用应用目录填"app_folder"\nROOT_DIR="app_folder"\n\n#这里改为你自己应用的consumer_key和consumer_secret_key\nAPP_CONSUMER_KEY="xc0kwh2EAKlTQqCd"\nAPP_CONSUMER_SECRET="6mnnfufVvWzPzOgb"\n\n#授权相关\nAPI_REQUEST_TOKEN_URL="https://openapi.kuaipan.cn/open/requestToken"\nAPI_USER_AUTH_URL="https://www.kuaipan.cn/api.php?ac=open&op=authorise&oauth_token="\nAPI_AUTH_TOKEN_URL="https://openapi.kuaipan.cn/open/accessToken"\n\n#统计信息相关\nAPI_ACCOUNT_INFO_URL="http://openapi.kuaipan.cn/1/account_info"\nAPI_METADATA_URL="http://openapi.kuaipan.cn/1/metadata"\n\n#上传、下载、删除\nAPI_UPLOAD_REQUEST_URL="http://api-content.dfs.kuaipan.cn/1/fileops/upload_locate"\nAPI_DOWNLOAD_URL="http://api-content.dfs.kuaipan.cn/1/fileops/download_file"\nAPI_DELETE_FILE_URL="http://openapi.kuaipan.cn/1/fileops/delete"\n\n\nDependents="curl sed awk basename date grep tr od openssl base64"\nCURL="curl" \n\n#检查程序的依赖项\nfor i in $Dependents; do\n which $i > /dev/null\n if [ $? -ne 0 ]; then\n echo -e "Error: $i Not Found"\n exit 1\n fi\ndone\n\n#清理环境\nif [ -f "$RESPONSE_FILE" ]; then\n rm -f $RESPONSE_FILE\nfi\n\n#==========通用方法========\n\nfunction get_json_value()\n{\n KEY=$1\n echo $(cat $RESPONSE_FILE| sed 's/ //g'| sed -n 's/.*'$KEY'":"\\([a-zA-Z0-9\\.\\-\\/:]*\\)".*/\\1/p')\n}\n\n#get unix timestamp\nfunction unix_time\n{\n echo $(date +%s)\n}\n\n#url encode\nfunction url_encode\n{\n url=$1\n echo -n $(echo -n "$url" | sed 's/\\%/\\%25/g'|sed 's/&/\\%26/g' |sed 's/:/\\%3A/g' |sed 's/\\//\\%2F/g'| sed 's/=/\\%3D/g' |sed 's/ /\\%20/g' |sed 's/@/\\%40/g' |sed 's/+/\\%2B/g' |sed 's/\\*/\\%2A/g')\n #echo -ne $(echo $url |tr -d '\\n' |od -An -tx1 |tr '[a-z]' '[A-Z]' |tr ' ' \\%)\n}\n\n#url decode\nfunction url_decode\n{\n url=$1\n echo -ne $(echo -n $url | sed 's/\\\\/\\\\\\\\/g;s/\\(%\\)\\([0-9a-fA-F][0-9a-fA-F]\\)/\\\\x\\2/g')"\\n"\n}\n\nfunction get_signature\n{\n method=$1\n url=$2\n data=$3\n token_secret=$4\n baseUrl="$1&$(url_encode "$2")&$(url_encode "$3")"\n signature=$(echo -n $baseUrl | openssl dgst -sha1 -binary -hmac "$APP_CONSUMER_SECRET&$token_secret" |base64)\n \n echo -n $(url_encode $signature)\n}\n\nfunction account_setup\n{\n #1. 获取未授权的临时 token;\n DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_version=1.0"\n oauth_signature=$(get_signature 'GET' $API_REQUEST_TOKEN_URL "$DATA")\n $CURL -k -s -S --globoff -L -G -d "$DATA&oauth_signature=$oauth_signature" "$API_REQUEST_TOKEN_URL" -o "$RESPONSE_FILE" \n \n tmp_oauth_token=$(get_json_value 'oauth_token')\n tmp_oauth_token_secret=$(get_json_value 'oauth_token_secret')\n\n\n #2. 浏览器访问URL获取授权\n echo -ne "\\nVisit this URL from your Browser, and login with your kuaipan account\\n"\n echo -ne "\\n --> $API_USER_AUTH_URL$tmp_oauth_token \\n"\n echo -ne "\\nPress enter when done...\\n"\n read\n\n #3. 获取真实oauth_token\n DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$tmp_oauth_token"\n oauth_signature=$(get_signature 'GET' $API_AUTH_TOKEN_URL "$DATA" $tmp_oauth_token_secret)\n \n $CURL -k -s -S -L -G -d "$DATA&oauth_signature=$oauth_signature" $API_AUTH_TOKEN_URL -o "$RESPONSE_FILE"\n\n OAUTH_TOKEN=$(get_json_value 'oauth_token')\n OAUTH_TOKEN_SECRET=$(get_json_value 'oauth_token_secret')\n\n if [ -n "$OAUTH_TOKEN" -a -n "$OAUTH_TOKEN_SECRET" -a -n "$APP_CONSUMER_KEY" ]; then\n echo -ne "Congratulations!!! login succeed!\\n"\n \n #Saving data\n echo "APP_CONSUMER_KEY:$APP_CONSUMER_KEY" > "$CONFIG_FILE"\n echo "APP_CONSUMER_SECRET:$APP_CONSUMER_SECRET" >> "$CONFIG_FILE"\n echo "OAUTH_TOKEN:$OAUTH_TOKEN" >> "$CONFIG_FILE"\n echo "OAUTH_TOKEN_SECRET:$OAUTH_TOKEN_SECRET" >> "$CONFIG_FILE"\n \n echo -ne "All saved as $CONFIG_FILE!\\n\\n"\n else\n echo -ne "Unfortunately!!! login failed! please retray or contact wujiwh@gmail.com for help! \\n\\n"\n fi\n\n}\n\nfunction account_relink\n{\n echo -ne "Warrning: \\nAre you sure? [y/n]y"\n read aw\n if [ "$aw" == "n" ];then\n echo -ne "Cancelled! \\n"\n else\n rm -f "$CONFIG_FILE"\n account_setup\n fi\n}\n\n#========== First Setup ========== \n#先检查本地是否存在配置文件\nif [ -f "$CONFIG_FILE" ]; then\n \n APP_CONSUMER_KEY=$(sed -n 's/APP_CONSUMER_KEY:\\([a-zA-Z0-9]*\\)/\\1/p' "$CONFIG_FILE")\n APP_CONSUMER_SECRET=$(sed -n 's/APP_CONSUMER_SECRET:\\([a-zA-Z0-9]*\\)/\\1/p' "$CONFIG_FILE")\n OAUTH_TOKEN=$(sed -n 's/OAUTH_TOKEN:\\([a-zA-Z0-9\\.]*\\)/\\1/p' "$CONFIG_FILE")\n OAUTH_TOKEN_SECRET=$(sed -n 's/OAUTH_TOKEN_SECRET:\\([a-zA-Z0-9\\.]*\\)/\\1/p' "$CONFIG_FILE")\n \n if [ -z "$APP_CONSUMER_KEY" -o -z "$APP_CONSUMER_SECRET" -o -z "$OAUTH_TOKEN" -o -z "$OAUTH_TOKEN_SECRET" ]; then\n echo -ne "Cannot loading data from $CONFIG_FILE...\\n"\n echo -ne "Please run [$0 relink] to retray! \\n"\n exit 1\n fi\n \n#新用户,获取Token并保存到配置文件\nelse\n account_setup\nfi\n\n\n#========= OAUTH API 功能实现 =========\n\nfunction get_common_oauthdata\n{\n echo "oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$OAUTH_TOKEN"\n}\n\n#获取用户信息\nfunction account_info()\n{\n OAUTH_DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$OAUTH_TOKEN"\n signature=$(get_signature 'GET' $API_ACCOUNT_INFO_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)\n \n $CURL -k -s -S -G -L -d "$OAUTH_DATA&oauth_signature=$signature" "$API_ACCOUNT_INFO_URL" -o "$RESPONSE_FILE"\n \n userName=$(sed -n 's/.*user_name":"\\([a-zA-Z0-9\\.\\-\\@]*\\)".*/\\1/p' $RESPONSE_FILE) \n let quota_total=$(sed -n 's/.*quota_total":\\([0-9]*\\),.*/\\1/p' $RESPONSE_FILE)/1024/1024/1024\n let quota_used=$(sed -n 's/.*quota_used":\\([0-9]*\\),.*/\\1/p' $RESPONSE_FILE)/1024/1024/1024\n \n echo ""\n echo "User Name: $userName"\n echo "Total Quota: $quota_total GB"\n echo "Used Quota: $quota_used GB"\n echo ""\n}\n\n#文件上传\nfunction file_upload\n{\n local overwrite=$1\n local file_Local=$2\n local file_Remote=$3\n\n if [ -z "$file_Remote" ]; then\n file_Remote=$(basename "$file_Local")\n fi\n\n OAUTH_DATA=$(get_common_oauthdata)\n signature=$(get_signature 'GET' $API_UPLOAD_REQUEST_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)\n $CURL -k -s -S -G -L -d "$OAUTH_DATA&oauth_signature=$signature" "$API_UPLOAD_REQUEST_URL" -o "$RESPONSE_FILE"\n \n upload_url=$(get_json_value "url")"1/fileops/upload_file"\n #echo $upload_url\n\n OAUTH_DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$OAUTH_TOKEN&overwrite=$overwrite&path=$(url_encode $file_Remote)&root=app_folder"\n signature=$(get_signature 'POST' $upload_url "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)\n \n $CURL -k --progress-bar -i -o "$RESPONSE_FILE" -F "file=@$file_Local" "$upload_url?$OAUTH_DATA&oauth_signature=$signature" \n \n grep "HTTP/1.1 200 OK" "$RESPONSE_FILE" > /dev/null\n if [ $? -eq 0 ]; then\n echo -ne "--Upload Success.\\n"\n else\n echo -ne "--Upload Failed.\\n"\n echo -ne "--Error occurred while uploading $file_Local.\\n"\n exit 1\n fi \n #cat $RESPONSE_FILE\n}\n\n#下载文件\nfunction file_download\n{\n local file_Remote=$1\n local file_Local=$2\n\n echo -ne "Begin to download $file_Remote...\\n"\n OAUTH_DATA=$(get_common_oauthdata)"&path=$(url_encode $file_Remote)&root=$ROOT_DIR"\n signature=$(get_signature 'GET' $API_DOWNLOAD_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)\n #$CURL -S -L -v -G -d "$OAUTH_DATA&oauth_signature=$signature" "$API_DOWNLOAD_URL" -o "$file_Local"\n $CURL -L --compressed --progress-bar -G -D "$RESPONSE_FILE" -d "$OAUTH_DATA&oauth_signature=$signature" "$API_DOWNLOAD_URL" --cookie-jar "$COOKIE_FILE" -o "$file_Local"\n rm -f $COOKIE_FILE\n\n grep "HTTP/1.1 200 OK" "$RESPONSE_FILE" > /dev/null\n if [ $? -eq 0 ]; then\n echo -ne "--Download Success.\\n"\n else\n echo -ne "--Download Failed.\\n"\n exit 1\n fi \n}\n\n#删除文件\nfunction file_delete\n{\n local file_Remote=$1\n\n OAUTH_DATA=$(get_common_oauthdata)"&path=$file_Remote&root=$ROOT_DIR"\n signature=$(get_signature 'GET' $API_DELETE_FILE_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)\n $CURL -k -s -S -i -S -L -G -d "$OAUTH_DATA&oauth_signature=$signature" "$API_DELETE_FILE_URL" -o "$RESPONSE_FILE"\n \n grep "HTTP/1.1 200 OK" "$RESPONSE_FILE" > /dev/null\n if [ $? -eq 0 ]; then\n echo -ne "\\033[0;32;1m--Delete Success.\\033[0m\\n"\n else\n echo -ne "\\033[0;31;1m--Delete Failed.\\033[0m\\n"\n exit 1\n fi \n echo ""\n}\n\n#显示文件夹信息,默认显示根目录\nfunction show_list\n{\n local remote_path=$1\n\n local metaUrl="$API_METADATA_URL/$ROOT_DIR/$remote_path"\n OAUTH_DATA=$(get_common_oauthdata)\n signature=$(get_signature 'GET' $metaUrl "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)\n $CURL -k -s -S -G -L -d "$OAUTH_DATA&oauth_signature=$signature" "$metaUrl" -o "$RESPONSE_FILE"\n\n sed 's/,/\\n/g' $RESPONSE_FILE|grep name|awk -F ':' '{print $2}'|tr -d '"'|tr "\\n" "\\t"|sed 's/$/\\n/'\n}\n\n#=====================================\n\nfunction usage() {\n echo -e "KuaiPan Uploader v$Version"\n echo -e "wangheng - wujiwh@gmail.com\\n"\n echo -e "Usage: $0 COMMAND [PARAMETERS]..."\n echo -e "\\nCommands:"\n \n echo -e "\\t upload [local file] <remote file>"\n echo -e "\\t download [remote file] <local file>"\n echo -e "\\t delete [remote file/remote dir]"\n echo -e "\\t list <remote dir>"\n echo -e "\\t info"\n echo -e "\\t relink"\n \n echo -en "\\nFor more informations, please visit \\033[0;32;1m http://wangheng.org.\\033[0m \\n\\n"\n exit 1\n}\n\n#===============Main =================\nCOMMAND=$1\n\ncase $COMMAND in\n\n upload)\n\n file_Local=$2\n file_Remote=$3\n\n #检查本地文件是否存在\n if [ ! -f "$file_Local" ]; then\n echo -e "Error: Please specify a valid source file!"\n exit 1\n fi\n \n \n file_upload "True" "$file_Local" "$file_Remote"\n \n ;;\n\n download)\n\n file_Remote=$2 \n file_Local=$3 \n\n if [ -z "$file_Remote" ]; then\n echo -ne "Error: Please input a valid remote file.\\n"\n exit 1\n fi\n\n if [ -z "$file_Local" ]; then\n file_Local=$(basename "$file_Remote")\n fi\n \n file_download "$file_Remote" "$file_Local"\n \n ;;\n\n \n info)\n \n account_info\n \n ;;\n\n delete)\n\n file_Remote=$2 \n\n if [ -z "$file_Remote" ]; then\n echo -ne "Error: Please input a valid remote file.\\n"\n exit 1\n fi\n\n file_delete "$file_Remote"\n\n ;;\n\n list)\n\n RemoteDir=$2\n if [ -z "$RemoteDir" ]; then\n RemoteDir="/"\n fi\n \n show_list "$RemoteDir"\n\n ;;\n \n relink)\n account_relink \n ;;\n \n *)\n usage\n ;;\n\nesac\n \n项目开源在我的Github:https://github.com/wujiwh/kuaipan_uploader\n欢迎大家多多交流~~\n","categories":["linux"],"tags":["Windows","Linux","awk","curl","shell","开源","备份"]},{"title":"Linux中dd命令详解","url":"/linux-dd-command-detailed.html","content":"\n一、dd命令\ndd:用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换。\n注意:指定数字的地方若以下列字符结尾,则乘以相应的数字:b=512;c=1;k=1024;w=2\n参数注释:\n1. if=文件名:输入文件名,缺省为标准输入。即指定源文件。< if=input file >\n2. of=文件名:输出文件名,缺省为标准输出。即指定目的文件。< of=output file >\n3. ibs=bytes:一次读入bytes个字节,即指定一个块大小为bytes个字节。\nobs=bytes:一次输出bytes个字节,即指定一个块大小为bytes个字节。\nbs=bytes:同时设置读入/输出的块大小为bytes个字节。\n4. cbs=bytes:一次转换bytes个字节,即指定转换缓冲区大小。\n5. skip=blocks:从输入文件开头跳过blocks个块后再开始复制。\n6. seek=blocks:从输出文件开头跳过blocks个块后再开始复制。\n注意:通常只用当输出文件是磁盘或磁带时才有效,即备份到磁盘或磁带时才有效。\n7. count=blocks:仅拷贝blocks个块,块大小等于ibs指定的字节数。\n8. conv=conversion:用指定的参数转换文件。\nascii:转换ebcdic为ascii\nebcdic:转换ascii为ebcdic\nibm:转换ascii为alternate ebcdic\nblock:把每一行转换为长度为cbs,不足部分用空格填充\nunblock:使每一行的长度都为cbs,不足部分用空格填充\nlcase:把大写字符转换为小写字符\nucase:把小写字符转换为大写字符\nswab:交换输入的每对字节\nnoerror:出错时不停止\nnotrunc:不截短输出文件\nsync:将每个输入块填充到ibs个字节,不足部分用空(NUL)字符补齐。\n二、dd应用实例\n\n \n1.将本地的/dev/hdb整盘备份到/dev/hddheng@me: dd if=/dev/hdb of=/dev/hdd\n2.将/dev/hdb全盘数据备份到指定路径的image文件heng@me:dd if=/dev/hdb of=/root/image\n3.将备份文件恢复到指定盘heng@me:dd if=/root/image of=/dev/hdb\n4.备份/dev/hdb全盘数据,并利用gzip工具进行压缩,保存到指定路径heng@me:dd if=/dev/hdb | gzip > /root/image.gz\n5.将压缩的备份文件恢复到指定盘heng@me:gzip -dc /root/image.gz | dd of=/dev/hdb\n6.备份与恢复MBR备份磁盘开始的512个字节大小的MBR信息到指定文件:heng@me:dd if=/dev/hda of=/root/image count=1 bs=512count=1指仅拷贝一个块;bs=512指块大小为512个字节。恢复:heng@me:dd if=/root/image of=/dev/had将备份的MBR信息写到磁盘开始部分\n7.备份软盘heng@me:dd if=/dev/fd0 of=disk.img count=1 bs=1440k (即块大小为1.44M)\n8.拷贝内存内容到硬盘heng@me:dd if=/dev/mem of=/root/mem.bin bs=1024 (指定块大小为1k)\n9.拷贝光盘内容到指定文件夹,并保存为cd.iso文件heng@me:dd if=/dev/cdrom(hdc) of=/root/cd.iso\n10.增加swap分区文件大小第一步:创建一个大小为256M的文件:heng@me:dd if=/dev/zero of=/swapfile bs=1024 count=262144第二步:把这个文件变成swap文件:heng@me:mkswap /swapfile第三步:启用这个swap文件:heng@me:swapon /swapfile第四步:编辑/etc/fstab文件,使在每次开机时自动加载swap文件:/swapfile swap swap default 0 0\n11.销毁磁盘数据heng@me:dd if=/dev/urandom of=/dev/hda1注意:利用随机的数据填充硬盘,在某些必要的场合可以用来销毁数据。\n12.测试硬盘的读写速度heng@me:dd if=/dev/zero bs=1024 count=1000000 of=/root/1Gb.fileheng@me:dd if=/root/1Gb.file bs=64k | dd of=/dev/null通过以上两个命令输出的命令执行时间,可以计算出硬盘的读、写速度。\n13.确定硬盘的最佳块大小:heng@me:dd if=/dev/zero bs=1024 count=1000000 of=/root/1Gb.fileheng@me:dd if=/dev/zero bs=2048 count=500000 of=/root/1Gb.fileheng@me:dd if=/dev/zero bs=4096 count=250000 of=/root/1Gb.fileheng@me:dd if=/dev/zero bs=8192 count=125000 of=/root/1Gb.file通过比较以上命令输出中所显示的命令执行时间,即可确定系统最佳的块大小。\n14.修复硬盘:heng@me:dd if=/dev/sda of=/dev/sda 或dd if=/dev/hda of=/dev/hda当硬盘较长时间(一年以上)放置不使用后,磁盘上会产生magnetic flux point,当磁头读到这些区域时会遇到困难,并可能导致I/O错误。当这种情况影响到硬盘的第一个扇区时,可能导致硬盘报废。上边的命令有可能使这些数 据起死回生。并且这个过程是安全、高效的。\n15.利用netcat远程备份heng@me:dd if=/dev/hda bs=16065b | netcat < targethost-IP > 1234在源主机上执行此命令备份/dev/hdaheng@me:netcat -l -p 1234 | dd of=/dev/hdc bs=16065b在目的主机上执行此命令来接收数据并写入/dev/hdcheng@me:netcat -l -p 1234 | bzip2 > partition.imgheng@me:netcat -l -p 1234 | gzip > partition.img\n以上两条指令是目的主机指令的变化分别采用bzip2、gzip对数据进行压缩,并将备份文件保存在当前目录。将一个很大的视频文件中的第i个字节的值改成0x41(也就是大写字母A的ASCII值)echo A | dd of=bigfile seek=$i bs=1 count=1 conv=notrunc三、/dev/null和/dev/zero的区别/dev/null,外号叫无底洞,你可以向它输出任何数据,它通吃,并且不会撑着!/dev/zero,是一个输入设备,你可你用它来初始化文件。该设备无穷尽地提供0,可以使用任何你需要的数目——设备提供的要多的多。他可以用于向设备或文件写入字符串0。/dev/null——它是空设备,也称为位桶(bit bucket)。任何写入它的输出都会被抛弃。如果不想让消息以标准输出显示或写入文件,那么可以将消息重定向到位桶。\nheng@me:if=/dev/zero of=./test.txt bs=1k count=1\n heng@me:ls –l\n total 4\n -rw-r--r-- 1 oracle dba 1024 Jul 15 16:56 test.txt\n heng@me:find / -name access_log 2>/dev/null3.1使用/dev/null\n把/dev/null看作”黑洞”, 它等价于一个只写文件,所有写入它的内容都会永远丢失.,而尝试从它那儿读取内容则什么也读不到。然而, /dev/null对命令行和脚本都非常的有用\n禁止标准输出\n heng@me:cat $filename >/dev/null #文件内容丢失,而不会输出到标准输出.\n禁止标准错误\n heng@me:rm $badname 2>/dev/null #这样错误信息[标准错误]就被丢到太平洋去了\n禁止标准输出和标准错误的输出\n heng@me:cat $filename 2>/dev/null >/dev/null\n如果”$filename”不存在,将不会有任何错误信息提示;如果”$filename”存在, 文件的内容不会打印到标准输出。因此,上面的代码根本不会输出任何信息。当只想测试命令的退出码而不想有任何输出时非常有用。\n3.2使用/dev/zero像/dev/null一样, /dev/zero也是一个伪文件, 但它实际上产生连续不断的null的流(二进制的零流,而不是ASCII型的)。 写入它的输出会丢失不见, 而从/dev/zero读出一连串的null也比较困难, 虽然这也能通过od或一个十六进制编辑器来做到。 /dev/zero主要的用处是用来创建一个指定长度用于初始化的空文件,就像临时交换文件。\n用/dev/zero创建一个交换临时文件#!/bin/bash\n创建一个交换文件.ROOT_UID=0 # Root 用户的 $UID 是 0.E_WRONG_USER=65 # 不是 root?FILE=/swapBLOCKSIZE=1024MINBLOCKS=40SUCCESS=0\n这个脚本必须用root来运行.if [ "$UID" -ne "$ROOT_UID" ]thenecho; echo "You must be root to run this script."; echoexit $E_WRONG_USERfiblocks=${1:-$MINBLOCKS} # 如果命令行没有指定,#+ 则设置为默认的40块.\n上面这句等同如:————————————————–if [ -n "$1" ]thenblocks=$1elseblocks=$MINBLOCKSfi————————————————–if [ "$blocks" -lt $MINBLOCKS ]thenblocks=$MINBLOCKS # 最少要有 40 个块长.fiecho "Creating swap file of size $blocks blocks (KB)."dd if=/dev/zero of=$FILE bs=$BLOCKSIZE count=$blocks # 把零写入文件.mkswap $FILE $blocks # 将此文件建为交换文件(或称交换分区).swapon $FILE # 激活交换文件.echo "Swap file created and activated."exit $SUCCESS关于 /dev/zero 的另一个应用是为特定的目的而用零去填充一个指定大小的文件, 如挂载一个文件系统到环回设备 (loopback device)或"安全地" 删除一个文件例子创建ramdisk#!/bin/bash\nramdisk.sh"ramdisk"是系统RAM内存的一段, #+ 它可以被当成是一个文件系统来操作.\n它的优点是存取速度非常快 (包括读和写).缺点: 易失性, 当计算机重启或关机时会丢失数据. #+ 会减少系统可用的RAM.\n10 # 那么ramdisk有什么作用呢?保存一个较大的数据集在ramdisk, 比如一张表或字典, #+ 这样可以加速数据查询, 因为在内存里查找比在磁盘里查找快得多. E_NON_ROOT_USER=70 # 必须用root来运行. ROOTUSER_NAME=root MOUNTPT=/mnt/ramdisk SIZE=2000 # 2K 个块 (可以合适的做修改) BLOCKSIZE=1024 # 每块有1K (1024 byte) 的大小 DEVICE=/dev/ram0 # 第一个 ram 设备 username=id -nu if [ "$username" != "$ROOTUSER_NAME" ] then echo "Must be root to run &quot;basename $0&quot;." exit $E_NON_ROOT_USER fi if [ ! -d "$MOUNTPT" ] # 测试挂载点是否已经存在了, then #+ 如果这个脚本已经运行了好几次了就不会再建这个目录了 mkdir $MOUNTPT #+ 因为前面已经建立了. fi dd if=/dev/zero of=$DEVICE count=$SIZE bs=$BLOCKSIZE\n把RAM设备的内容用零填充.为何需要这么做? mke2fs $DEVICE # 在RAM设备上创建一个ext2文件系统. mount $DEVICE $MOUNTPT # 挂载设备. chmod 777 $MOUNTPT # 使普通用户也可以存取这个ramdisk.\n但是, 只能由root来缷载它. echo "&quot;$MOUNTPT&quot; now available for use."\n现在 ramdisk 即使普通用户也可以用来存取文件了.注意, ramdisk是易失的, 所以当计算机系统重启或关机时ramdisk里的内容会消失.拷贝所有你想保存文件到一个常规的磁盘目录下.重启之后, 运行这个脚本再次建立起一个 ramdisk.仅重新加载 /mnt/ramdisk 而没有其他的步骤将不会正确工作.如果加以改进, 这个脚本可以放在 /etc/rc.d/rc.local, #+ 以使系统启动时能自动设立一个ramdisk.\n这样很合适速度要求高的数据库服务器. exit 0\n","categories":["最近添加"]},{"title":"Linux中设置代理服务器","url":"/linux-set-up-a-proxy-server.html","content":"\n      由于单位限制网络使用,给分配的一个Linux服务器是没有外网权限的,这给我配置开发调试环境造成了很大的不便。但是这怎么能难道我们一个专业的程序猿呢。下面介绍在Linux中使用代理服务器的步骤: 全局设置 如果您在 /etc/yum.conf 中定义代理服务器,所有 用户在使用 yum 时都会应用这个代理服务器设置。 为单个用户配置代理服务器 要为一个特定的用户启用代理访问,只要将实例框中的文本行加入这个用户的 shell 配置中。对于默认的 bash shell,配置是在 ~/.bash_profile 中。这一设置使得 yum 使用代理服务器 192.168.1.47:808,连接端口号 808。 # 这个帐号使用的代理服务器 http_proxy=”http://192.168.1.47:808” export http_proxy 配置设定,为使用代理服务器 如果代理服务器需要用户名和密码,只要将它们加入 URL。要包含用户名 a,密码 a,添加设定: # 这个帐号使用的代理服务器和用户名/密码 http_proxy="http://a:a@192.168.1.47:808" export http_proxy https_proxy="https://a:a@192.168.1.47:808" export https_proxy 最后用wget试一下,成功! \n\n\n\n\n","categories":["Technical"],"tags":["Linux","代理"]},{"title":"Linux/Windows/Mac刷新DNS缓存","url":"/linux-windows-mac-refresh-dns.html","content":"\n有时候在网络环境比较糟糕的情况下,修改了域名的A记录执行,本地DNS却迟迟不主动更新。这个时候就需要我们去手动刷新一下本地的DNS记录缓存,方法记录如下:\nWindows ( XP, ME, 2000, 98)系统:\n\n\n开始——>运行——>输入cmd并回车\n在打开的命令行窗口,输入ipconfig /flushdns\n完成!你的Windows DNS 缓存已经得到刷新。\n\nWindows Vista 或 Windows 7 系统:1、打开命令提示符,并选择以管理员身份运行2. 在打开的命令行窗口,输入ipconfig /flushdns你将会看到如下的确认信息: Windows IP 配置已成功刷新 DNS 解析缓存。\nLinux系统:刷新 DNS 缓存需要重起 nscd daemon:\n\n要重起nscd daemon,在命令行窗口(terminal)输入/etc/rc.d/init.d/nscd restart\n命令执行完毕,你的DNS缓存就被刷新了。如果是比较新的Linux版本,你可能需要使用下面的命令: /etc/init.d/nscd restart\n\nMac OS X苹果系统:\n\n在命令行窗口(terminal)输入lookupd -flushcache例如:bash$ lookupd -flushcache\n\n命令执行完毕,你的DNS缓存就得到了更新。较新的苹果Mac OS X系统应该使用下面的命令: type  dscacheutil -flushcache\n\n\n","categories":["最近添加"]},{"title":"Linux临时或永久修改DNS","url":"/linux-temporarily-or-permanently-modify-the-dns.html","content":"\n最近给VPS重装了系统,因为服务商不提供DHCP,所以只好手动设置IP和DNS Server。悲催的是系统重装的时候忘记了输入DNS Server,最后导致进去系统后,各种域名无法解析。\n\nLinux中修改DNS有两种方式,临时修改和永久修改,下面分别介绍。\n1、临时修改网卡DNS地址sudo vim /etc/resolv.conf改为如下内容:\nnameserver 8.8.8.8 #修改成你的主DNS\nnameserver 8.8.4.4 #修改成你的备用DNS\nsearch localhost #你的域名\n我这里用了谷歌的DNS解析服务器,修改后:wq退出,配置会实时生效,但是重启系统后可能会丢失配置。其实编辑这个文件的时候,你也应该能看到文件头部“不要手动编辑”的注释。\n\n\n\n2、永久修改网卡DNSsudo –icd /etc/resolvconf/resolv.conf.dvim base添加如下内容\nnameserver 8.8.8.8\nnameserver 8.8.4.4\n:wq 保存退出,这样重启后设置就不会丢失了。\n其实你cat head文件会找到图片中头部注释的那段话,不难推测resolv.conf文件就是根据/etc/resolvconf/resolv.conf.d目录中的这几个文件生成的。\n","categories":["Technical"],"tags":["vim","Linux","DNS","Firefox"]},{"title":"手动编译vim配置","url":"/manually-compile-vim-configuration.html","content":"\n下载vim源码http://www.vim.org/sources.php\n\n设置编译选项, 我的配置是:\n./configure --prefix=/usr/local/vim \\\n--enable-multibyte \\\n--enable-fontset \\\n--enable-xim \\\n--enable-gui=auto \\\n--enable-pythoninterp=dynamic \\\n--enable-pythoninterp \\\n--enable-python3interp=dynamic \\\n--enable-rubyinterp=dynamic \\\n--enable-rubyinterp \\\n--enable-perlinterp \\\n--enable-cscope \\\n--enable-sniff \\\n--with-x \\\n--with-compiledby=erocpil \\\n--with-features=huge \\\n--enable-luainterp=dynamic \\\n--with-python-config-dir=/usr/lib/python2.7/config \\\n--with-python3-config-dir=/usr/lib/python3.2/config\n其他选项参见 ./configure –help\n补充说明:\n在CentOS上编译时不支持“–enable-multibyte”\n在debian上编译时不支持“–enable-fontset”\n","categories":["linux"],"tags":["vim","Linux","编译"]},{"title":"手动制作VPN登录器","url":"/manually-produced-vpn-login.html","content":"\n1、新建一个文本文件,重命名,文件名可以随便取但是后缀必须为.pbk。输入如下内容:\n\n[要显示的拨号名称]\n Encoding=1\n PBVersion=1\n Type=2\n AutoLogon=0\n UseRasCredentials=1NETCOMPONENTS=\n ms_msclient=1\n ms_server=1MEDIA=rastapi\n Port=VPN1-0\n Device=WAN Miniport (IKEv2)\n DEVICE=vpn\n PhoneNumber=服务器的IP或域名\n AreaCode=\n CountryCode=0\n CountryID=0\n UseDialingRules=0\n Comment=\n FriendlyName=\n LastSelectedPhone=0\n PromoteAlternates=0\n TryNextAlternateOnFail=1\n\n[ XXX] 部分是需要你修改的内容,请分别修改为你要显示的名称和你Vpn服务器的地址。最后,注意将后缀名改成.pbk,如果你看到不后缀名,请打开:控制面板->文件夹选项->查看,将隐藏已知文件扩展名前面的对号点去。\n\n\n2、打开你新建的.pbk文件,你上面设置的名字是不是显示了出来?点击连接并输入你的用户名密码来建立连接。连接前,可以选择保存用户名密码,以后就只需要点击连接了,当你有很多的vpn账号时,此方法可以很方便的用来管理。\n\n3、重复添加这段代码可以加入多个vpn拨号到列表中,如图\n\n\n\n\n此方法只是建立了一个vpn拨号的列表,所以可以很安全的作为一个登录列表发给别人,用户名和密码需要在拨号的时候另外输入。\n\n注:登录器可在XP、Windows 2003、Windows 7等系统上使用。\n\n\n\n","categories":["Technical","Route"],"tags":["Windows","Win7","VPN"]},{"title":"从wordpress迁移到hexo填坑","url":"/migrating-from-wordpress-to-hexo.html","content":"前记用了好久的wordpress,说起来上次更新还是三年前。今天本想整理总结下最近的学习,却总也打不开wp-admin后台了,看了下是vps的php进程有报错 :( 想了想wordpress这套框架虽然很好,然而好多功能对我来说并不是必要的,于是动了心思从wordpress 迁移到静态化的博客框架 hexo。当然另外一个好处就是可以用 Markdown 语法写日志了 :)\n迁移过程遇到一些坑,这里做下备忘…\n开始迁移安装hexo网上安装hexo的文章已经很多了,这里不再冗述,大概流程就是\n\n1、安装nodejs\n2、配置环境变量\n3、npm install -g hexo-cli\n4、初始化站点 hexo init blog_dir\n5、修改_config.yml\n\n导出wordpress文章因为无法打开博客的后台管理,只能在本地临时又搭建了一套wordpress 环境,这里再次坚定了迁移的决心(弄php+mysql+nginx这一套只用来写博客,太麻烦了)访问后台 – 工具 – 导出,下载导出的文件,你将得到一个 .XML 文件,这个XML文件包含全部文章、页面、评论、自定义栏目、分类目录和标签。\n导入文章到hexo首先安装 hexo-migrator-wordpress 插件:\n安装cd blog_dirnpm install hexo-migrator-wordpress --save\n\n插件安装完成后,执行下列命令来迁移所有文章。source 可以是 WordPress 导出的文件路径或网址。\n导入hexo migrate wordpress <source>\n\n这个插件并不完美,好多文章和页面生成的md文件都很杂乱,而且页面排版也有很多问题,所以后来我又写了一个py脚本来处理历史数据\n\n使用主题 next解决标签和分类Not foud问题在配置文件中增加了tag 和categories ,但是在首页点开却得到了一个not found 的错误。官方的issues 有朋友提到并提供了解决方案(参考tag和categories无内容)。\n首先在next的配置文件_config.yml 中打开如下配置\nmenu: home: / categories: /categories #about: /about archives: /archives tags: /tags #commonweal: /404.html\n\n然后执行 hexo new page tags,在生成的文件/source/tags/index.md,增加type\n---title: 标签date: 2018-10-21 10:35:32type: "tags"---\n\n分类页面也类似执行 hexo new page categories,在生成的文件 source/categories/index.md,修改如下\n---title: 分类type: "categories"date: 2018-10-21 10:35:50---\n\n使用python 脚本解决文章错乱问题使用 hexo-migrator-wordpress 插件导入的文章有很多的问题,错行,样式杂乱,内容错误。\n最无法忍受的是之前文章中因为有代码高亮,<pre><code> 标签内的文字导过来全错了,多了很多\\ 以及其他转义符号,所以自己写了一个脚本来处理这个问题,代码可以参考如下:\n导出wordpress文章#!/usr/bin/env python3# author: http://wangheng.org# fileName: import_wordpress_content.py# date: 2018-10-21import pymysqlimport reHOST = "your wordpress db host"DB = "your wordpress db"USER = "your db user"PASSWORD = "your db passwd"EXP_PATH = "wp_exp" # path to export .md filesconn = pymysql.connect( host=HOST, database=DB, user=USER, password=PASSWORD, charset='utf8mb4')def getData(query): cur = conn.cursor() cur.execute(query) data = cur.fetchall() return datadef getPostTags(post_id, tag_type): tags = getData('''SELECT\twpt.`name`,\twpt.slug,\twptt.taxonomy FROM\twp_terms wpt\tLEFT JOIN wp_term_relationships wptr ON wpt.term_id = wptr.term_taxonomy_id\tLEFT JOIN wp_term_taxonomy wptt ON wptt.term_taxonomy_id = wptr.term_taxonomy_id WHERE\twptr.object_id = %d\tand wptt.taxonomy="%s"''' % (post_id, tag_type)) res = "" for tag in tags: res += " - %s\\n" % tag[0] return resdef main(): posts = getData( "SELECT post_name,post_content,post_date,post_title,ID FROM `wp_posts` where post_type='post' and post_status='publish' " ) for post in posts: content = post[1] content = content.replace('http://wangheng.org/wp-content/uploads', 'uploads') content = content.replace('>\\n<', '><') content = content.replace('>\\r<', '><') content = content.replace('>\\r\\n<', '><') blog = '''---title: %stags:%surl: %s.htmlid: %dcategories:%sdate: %s---<content>%s</content>''' % (post[3], getPostTags(post[4], "post_tag"), post[0], post[4], getPostTags(post[4], "category"), post[2], content) print(blog) file = open("wp_exp/%s.md" % post[0], 'wb') file.write(blog.encode("utf-8")) file.flush()if __name__ == '__main__': main()\n\n解决非常多空行的问题这里还遇到了个非常奇葩的问题,如果写到md 文件的两个html 标签不在同一行,那么md 再生成的文章会多出很多的 <br> 换行符。。。\n参考代码content = content.replace('>\\n<', '><')content = content.replace('>\\r<', '><')content = content.replace('>\\r\\n<', '><')\n\n解决迁移后图片以及附件问题迁移后图片和附件的地址无法再使用wordpress 目录了,因此需要将文章内的链接修改下\ncontent = content.replace('http://wangheng.org/wp-content/uploads', 'uploads')\n\n然后将vps 中的wp-content 文件夹copy到hexo目录,设置配置文件\n#指定目录以及子目录文件跳过渲染skip_render: uploads/**\n\n代码高亮使用脚本导出的.md 文件相当于把之前wordpress 中的文章富文本直接copy 到了md 文件中,因此文章结构几乎没怎么变化,也利于博客站的SEO。\n另外保持了原来代码高亮的结构,只要在主题的配置文件设置一下开启代码高亮,效果还可以~\n# Code Highlight theme# Available values: normal | night | night eighties | night blue | night bright# https://github.com/chriskempson/tomorrow-themehighlight_theme: night eighties\n\n其他todo 暂时整理这些,其他待补充…\n","tags":["wordpress","hexo","migrating"]},{"title":"推荐几款visual studio配色方案和字体","url":"/modify-font-and-color.html","content":"\n以前经常用Live Writer写博客,最近发现文章发布不上去了,google了一下发现原来GFW才是罪魁祸首。前几天把笔记本的硬盘换了,发现上次写的两篇博文还没发布,真悲剧。只好凭记忆重写一遍了… 年假前连续三天都加班到了晚上十二点,长时间的工作导致对着电脑code时,越来越反感白色背景配色。为了缓解眼睛的刺痛,还是决定换个舒服的配色方案。经过一翻搜寻,找到了几款很不错的配色! 1、son of obsidian(推荐) \n\n 这是http://studiostyl.es/上最热门的一款的配色方案,也是我目前正在使用的配色,只是感觉选中文字时的底色太不明显,于是将底色改成了蓝色。用了一段时间后确实看着很舒服,看来用的人多总是有一定道理的。\n\n2、Bespin 很喜欢这款Bespin的配色方案,清新,温和,用着也很舒服。唯一的问题是使用 vim 查找字符时,高亮后看不到光标的位置,懒得去改,所以也就没用这款配色。 3、wekeroad-ink 也是款不错的配色方案,喜欢的朋友也可以试一下。但是背景是纯黑的,个人感觉看时间长了还是不舒服。 :) 点击下载:配置文件 其实配色都没有好坏之分,只要找到自己最喜欢最适合的那它就是最好的! 编辑器的字体我选择的是系统自带的幼圆,它也是等宽字体,字形瘦长好看并且支持 ClearType,综合效果都很好!所以完全没有必要费力气再去网上下载其他的字体。\n\n","categories":["Technical"],"tags":["visual studio","配色","Font","字体"]},{"title":"修改openssh-server 的默认端口号","url":"/modify-openssh-server-port-number.html","content":"\n买来的一个VPS默认的SSH端口号是22,为了安全,防止别人恶意枚举密码,可以自己修改成别的端口号。\n\n1、首先,编辑sshd_config文件$ sudo nano /etc/ssh/sshd_config\n将Port 修改成自己定义的端口号,我这里改成了8080\n\n2、重启sshd服务$ sudo service sshd restart\n如果没什么错误,就可以使用新的端口连接了\n\n","categories":["Technical"],"tags":["ssh","openssh","端口"]},{"title":"nginx设置目录浏览及中文乱码问题解决","url":"/nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html","content":"\n在Nginx下默认是不允许列出整个目录的。如需此功能,\n先打开nginx.conf文件,在location server 或 http段中加入\n\nautoindex on;另外两个参数最好也加上去:\nautoindex_exact_size off;默认为on,显示出文件的确切大小,单位是bytes。改为off后,显示出文件的大概大小,单位是kB或者MB或者GB\nautoindex_localtime on;默认为off,显示的文件时间为GMT时间。注意:改为on后,显示的文件时间为文件的服务器时间\n\n\n\n\n但是如果有中文目录的话会出现乱码问题,所以还需要在下面添加这一句:\ncharset utf-8,gbk;\n","categories":["Technical"],"tags":["中文乱码","air video"]},{"title":"raspi+DHT11+yeelink监控家里温湿度","url":"/raspberry-dht11-yeekink.html","content":"\nwiring Pi 是专门为树莓派打造的类似于arduino下的wiring驱动库,安装好这个库后可以直接调用函数配置和控制GPIO功能。\n\n我买的树莓派B+版本,如图:\n\n\n可见共有个40pin的扩展 gpio,电源IO包含3.3v  5v  ,接口定义如下图所示:\n\n\n一、首先我们先安装开发环境\n\n#首先安装依赖包 sudo apt-get install libi2c-dev sudo apt-get install git-core#获取安装包 git clone git://git.drogon.net/wiringPi cd wiringPi git pull origin#切换到编译目录 cd wiringPi/#编译并安装 ./build#检查安装 gpio -v gpio readall\n\n执行完 gpio readall 会显示当前板子的接口定义!如下图:\n\n\n\n\n比如 12 | 1 | IN   | GPIO. 1 | 1   | 18\n表示你用wiring库中的函数操作gpio1,其实是操作BCM格式的gpio18端口,物理的12针脚。\n二、模块准备\nDHT11是比较常用的一块传感器,物美价廉,同时可以获取到环境的温度和湿度。由于比较简单,我就没有买那种焊接好的模块,只是一个DHT11的传感器,回来自己简单焊接封装了一下。\nDHT11的针脚说明如下:\n\n\n从左至右分别是1、2、3、4针脚,使用的时候我们需要加装一个上拉电阻,简单地说就是在第一第二针脚之间接一个10K左右的电阻。\n接线比较简单,就不过多介绍了。\n三、获取传感器数据\n由于树莓派比起Arduino还是强大的太多,所以无论是用c还是python都可以很方便的按照模块的时序图编写驱动。网上各种各样的版本也是太多,思路就是严格按照手册规范来,数据校验失败的作为垃圾数据扔掉。参照比较正统的做法,自己整理了一份代码,需要的朋友也可以顺手拿走。\n代码很短,参考如下:\n#include <wiringPi.h>#include <stdio.h>#include <stdlib.h>typedef unsigned char uint8;typedef unsigned int uint16;typedef unsigned long uint32;#define HIGH_TIME 32int gpioPin =4; uint32 databuf;uint8 readSensorData(void){ uint8 crc; uint8 i; pinMode(gpioPin,OUTPUT); digitalWrite(gpioPin, 0); delay(25); digitalWrite(gpioPin, 1); pinMode(gpioPin, INPUT); pullUpDnControl(gpioPin,PUD_UP); delayMicroseconds(27); if(digitalRead(gpioPin)==0) { while(!digitalRead(gpioPin)); for(i=0;i<32;i++) { while(digitalRead(gpioPin)); while(!digitalRead(gpioPin)); delayMicroseconds(HIGH_TIME); databuf*=2; if(digitalRead(gpioPin)==1) { databuf++; } } for(i=0;i<8;i++) { while(digitalRead(gpioPin)); while(!digitalRead(gpioPin)); delayMicroseconds(HIGH_TIME); crc*=2; if(digitalRead(gpioPin)==1) { crc++; } } return 1; } else { return 0; }}int main (int argc, char **argv){ if (argc != 2) { printf("usage: %s GPIOpin#\\n", argv[0]); printf("example: %s 1 - Read from wiringPi GPIO #1\\n", argv[0]); return 2; } gpioPin = atoi(argv[1]); if (gpioPin <= 0) { printf("Please select a valid GPIO pin #\\n"); return 3; } printf("Use GPIO%d to read data!\\n",gpioPin); if (-1 == wiringPiSetup()) { printf("Setup wiringPi failed!"); return 1; } pinMode(gpioPin, OUTPUT); digitalWrite(gpioPin, 1); while(1) { pinMode(gpioPin,OUTPUT); digitalWrite(gpioPin, 1); delay(3000); if(readSensorData()) { printf("Success! Sensor data read ok!\\n"); printf("Hum=%d.%d\\%\\n",(databuf>>24)&0xff,(databuf>>16)&0xff); printf("Temp=%d.%dC\\n",(databuf>>8)&0xff,databuf&0xff); databuf=0; break; } else { databuf=0; } } return 0;}\n\n\n完整的代码放在了我的github共享:https://github.com/wujiwh/DHT11_yeelink/\n \n使用方式:\n1、首先编译,切换到工作目录\nmake\n2、执行 ./dht11 GPIO端口号\n看看是不是有数据显示了!\n四、上传传感器数据到yeelink\n数据上传就更简单了,这已经基本跟硬件没多少关系了,众多的物联网平台里面yeelink算是做的不错的,各方面的文档也很容易搜到。官网是:http://www.yeelink.net/ 你需要注册一个账号来获取你的apikey,有了这个apikey我们才能发布我们的数据到物联网平台。网上有很详细的介绍,我就不冗述了。\n1、linux下面发送POST请求,最简单的莫过于直接使用crul了!我写了一个简陋的脚本来发送温度数据到yeelink平台,湿度类似。\n代码如下:\n#!/bin/sh#=============================================================================# FileName: dht11_curl.sh# Desc:# Author: wangheng# Email: wujiwh@gmail.com# HomePage: http://wangheng.org# Version: 0.0.1# LastChange: 2015-01-28 00:30:11# History:#=============================================================================#填入yeelink的API KEY yeelink_ApiKey='XXX' yeelink_URL='http://api.yeelink.net/v1.1/device/XXX/sensor/XXX/datapoints' temp=$(./dht11 1 |awk '/Hum/' |awk -F '=' '{print $2}'|sed 's/%//') echo $tempcurl_cmd="curl --request POST --data '{\\"value\\":$temp}' --header U-ApiKey:$yeelink_ApiKey --verbose $yeelink_URL"echo $curl_cmd|sh\n\nPS:awk用的还不是很熟,写的比较啰嗦,有更专业的朋友看到,欢迎拍砖。\n2、使用python似乎也是一个非常不错的选择,python漂亮的语法,写起来也很简单。\n代码如下:\n#!/usr/bin/python'''#=============================================================================# FileName: dht11_post.py# Desc: # Author: wangheng# Email: wujiwh@gmail.com# HomePage: http://wangheng.org# Version: 0.0.1# LastChange: 2015-01-27 22:40:37# History:#============================================================================='''import subprocessimport reimport jsonimport sysimport timeimport datetimeimport requestsAPI_Headers = {'U-ApiKey': 'XXX', 'content-type': 'application/json'} API_URL="http://api.yeelink.net/v1.1/device/%s/sensor/%s/datapoints"device_id="XXX"hum_sensor_id="XXX"temp_sensor_id="XXX"hum_url = API_URL % (device_id, hum_sensor_id)temp_url = API_URL % (device_id, temp_sensor_id)# Continuously append datawhile(True): #to get the humidity and temperature readings! output = subprocess.check_output(["./dht11", "1"]); #print output matches = re.search("Temp=([0-9.]+)C", output) if (not matches): time.sleep(3) continue temp = float(matches.group(1)) # search for humidity printout matches = re.search("Hum=([0-9.]+)\\%", output) if (not matches): time.sleep(3) continue humidity = float(matches.group(1)) print "Temperature: %.1f C" % temp print "Humidity: %.1f %%" % humidity try: #Post temp data post_data = {'value': temp} r = requests.post(temp_url, headers=API_Headers, data=json.dumps(post_data)) #Post Humidity data post_data = {'value': humidity} r = requests.post(hum_url, headers=API_Headers, data=json.dumps(post_data)) print "Post to yeelink success!" except: print "Unable to post data. Check your connection?" sys.exit() # Wait seconds before continuing time.sleep(15)\n\n\n","categories":["最近添加"]},{"title":"树莓派Wifi小车(一)","url":"/raspberry-wifi-car-1.html","content":"\n到年末了,最近也有了一些自己的时间。回到了原来的技术处,晚上终于不用疯狂加班了,下班回家也终于有功夫折腾自己以前想玩的玩具了: )\n\n树莓派刚发布的时候就一直想搞一台,但是淘宝上面的价格也是一直居高不下,想想家里已经N多PC,NAS和笔记本了,一直找不到入手的理由。圣诞节附近随便一刷淘宝,发现新版本B+ 已经降到了170块,果断买下。\n回家折腾了几天,性能果然弱的跟价格成正比。。。百兆的小网卡实在看不上眼。算了,从小玩意玩起吧,先装一个wifi小车。\n有了想法,开始组装! 由于之前折腾了几天Arduino对于各种驱动板已经基本熟悉,所以接线非常简单。底盘随便找了块塑料板,轮子直接双面胶+热熔胶固定,总之是很丑,好吧。。。\n\n\n不怕见笑,Beta版完成图如下:\n\n\n \n驱动板有两种,一种是L298N\n主控芯片L298N包装形式盒装出货逻辑电压5V驱动电压5V-35V逻辑电流0mA-36mA驱动电流2A(MAX单桥)存储温度-20℃ 到 +135℃最大功率25W\n另一种是L9110S芯片的驱动板,参数如下: 模块供电电压:2.5-12V电机工作电压2.5v-12V之间,最大工作电流0.8A考虑到我们的小车不需那么大功率,直接用一个L9110S驱动板,单侧的轮子并联为一组,这样相当于驱动板驱动两路直流电机组。 代码部分,小车的server端用python写的,用了个把小时(网页css多年没写过了,折腾死)。网页版控制页面如下:\n刚开始用的图标太丑,在同事的提醒下,改了个按钮图标现在看起来顺眼多了,感谢@Jane同学。\n\n运行效果:\n\n核心代码:'''#=============================================================================\nFileName: views.pyDesc:Author: wanghengEmail: wujiwh@gmail.comHomePage: http://wangheng.orgVersion: 0.0.1LastChange: 2015-01-14 13:46:29History:#============================================================================='''from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flashfrom contextlib import closingfrom pi_car import appimport reimport RPi.GPIO as GPIO@app.route('/')def show_index(): return render_template('home.html')\n@app.route("/login", methods=["GET", "POST"])def login(): if request.method=="GET": return "get"+request.form["user"] elif request.method=="POST": return "post"\n@app.route('/ctl',methods=['GET','POST'])def ctrl_id(): if request.method == 'POST': id=request.form['id'] GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(11,GPIO.OUT) GPIO.setup(12,GPIO.OUT) GPIO.setup(15,GPIO.OUT) GPIO.setup(16,GPIO.OUT)\n if id == &#039;t_left&#039;:\n t_left()\n return &quot;left&quot;\n elif id == &#039;t_right&#039;:\n t_right()\n return &quot;right&quot;\n elif id == &#039;t_up&#039;:\n t_up()\n return &quot;up&quot;\n elif id == &#039;t_down&#039;:\n t_down()\n return &quot;down&quot;\n elif id == &#039;t_stop&#039;:\n t_stop()\n return &quot;stop&quot;\n\nreturn redirect(url_for(&#039;show_index&#039;))\n\ndef t_stop(): GPIO.output(11, False) GPIO.output(12, False) GPIO.output(15, False) GPIO.output(16, False)\ndef t_up(): GPIO.output(11, True) GPIO.output(12, False) GPIO.output(15, True) GPIO.output(16, False)\ndef t_down(): GPIO.output(11, False) GPIO.output(12, True) GPIO.output(15, False) GPIO.output(16, True)\ndef t_left(): GPIO.output(11, False) GPIO.output(12, True) GPIO.output(15, True) GPIO.output(16, False)\ndef t_right(): GPIO.output(11, True) GPIO.output(12, False) GPIO.output(15, False) GPIO.output(16, True)启动网页服务:\n使用root用户ssh登陆到树莓派,切换到piCar的目录,执行python server.py 打开你的浏览器,输入树莓派IP:2000 就能看到你的控制页面了。 :)\n程序的完整源码放到了  https://github.com/wujiwh/piCar/tree/master/server 需要的朋友可以参考一下。\n","categories":["最近添加"]},{"title":"树莓派Wifi小车(三)","url":"/raspberry-wifi-car-3.html","content":"\n前面1,2中我们的小车能跑了,现在在加一些有意思的功能,那就是网络摄像头,这样我们的小车就变成了一个巡逻小车啦!\n\n首先当然你需要有一个USB摄像头,现在市面上的大部门的UVC摄像头都能直接被Linux驱动,当然raspberry也是可以的,比起windows那乱七八糟的驱动程序是不是方便很多。\n如果你不确定你的摄像头能不能直接被你的树莓派识别,你可以首先执行\nlsusb 看看你的摄像头vid在不在UVC协议的官方支持列表。支持列表可查看:http://linux-uvc.berlios.de/\n确定好了摄像头的驱动问题,下面就是安装网络摄像头监控软件了。\n常用的有motion以及mjpg-streamer这两款软件\n我之前一直用的是motion 这款软件,在openwrt和NAS的软件源里面都能很容易的安装,raspberry也不例外。我们先试试motion的效果!\n\n\n一、motion安装以及使用#首先更新系统软件源sudo apt-get update#升级系统软件包sudo apt-get upgrade#安装motion软件包sudo apt-get install motion#配置motion#首先备份默认配置cp /etc/motion/motion.conf /etc/motion/motion.conf.bak#修改参数设置#启用daemondaemon on#取消只绑定到本地,这样局域网其他机器才能访问到摄像头图像webcam_localhost off#监测到动作的时候不保存图片,否则会保存大量的图片占用SD卡output_normal off#启动motion后天服务,下面执行一下motion接下来使用firefox访问IP:8081 应该就能看到移动的图像了。\n我们修改一下小车控制页面,将图像监视显示出来,效果如下:\n\n\n是不是还不错! : )\n \n二、mjpg-streamer安装以及使用\n1、安装依赖软件包\nsudo apt-get install libv4l-dev libjpeg8-dev  imagemagick\n2、下载mjpg-streamer软件源码包\nwget http://downloads.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz\n3、处理videodev.h丢失问题\n编译过程会报错,错误的原因是Linux 2.4以上的内核里面都没有包含videodev.h这个文件了。在include/linux/下面有videodev2.h这个文件,但是在源文件中部分包含了videodev.h这个头文件。导致报错。解决的办法是:\nsudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h\n4、解压安装\ntar xvf mjpg-streamer-r63.tar.gz\ncd mjpg-streamer-r63/\nmake USE_LIBV4L2=true clean all\n./start.sh\n打开 IP:8080看看效果吧!\n \n","categories":["最近添加"]},{"title":"树莓派Wifi小车(二)","url":"/raspberry-wifi-car-2.html","content":"\n上篇文章 之后,继续折腾我的小车,又用C#和Android 写了两个控制客户端。\n\n思路比较直接,使用POST请求去发送小车转向参数,然后就动起来了。C#不说了,很熟练写起来也非常简单,使用钩子捕获全局键盘,这样及时程序不在前台也能控制小车。\n核心代码如下:\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.Linq;\nusing System.Net;\nusing System.Net.Security;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Windows.Forms;\n\nnamespace WangHeng.Org.PiCar\n{\n public partial class MainFrm : Form\n {\n public MainFrm()\n {\n InitializeComponent();\n InitControl();\n KeyHookUtils.Hook_Start();\n }\n\n private void InitControl()\n {\n this.StartPosition = FormStartPosition.CenterScreen;\n this.Text = "PiCar Control v" + this.ProductVersion;\n this.MaximizeBox = false;\n this.MinimizeBox = true;\n this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\n\n this.btnDown.Tag = "t_down";\n this.btnLeft.Tag = "t_left";\n this.btnRight.Tag = "t_right";\n this.btnUp.Tag = "t_up";\n this.btnStop.Tag = "t_stop";\n this.statusStrip1.SizingGrip = false;\n this.lblPostResultInfo.Text = "启动成功!";\n }\n protected override bool ProcessDialogKey(Keys keyData)\n {\n if (keyData == Keys.Left)\n {\n lblPostResultInfo.Text = "left";\n }\n return base.ProcessDialogKey(keyData);\n }\n\n private void ctlButton_Click(object sender, EventArgs e)\n {\n var btn = sender as Button;\n var result = CarCtl.TurnFunc(btn.Tag.ToString());\n this.lblPostResultInfo.Text = "请求成功 - " + result;\n }\n\n\n }\n\n public static class CarCtl\n {\n public enum CarStatus\n {\n Left,\n Right,\n Up,\n Down,\n Stop,\n Unknown\n }\n\n public static CarStatus CurrentStatus = CarStatus.Unknown;\n public static string TurnFunc(string direcID)\n {\n try\n {\n var requestUrl = "http://192.168.1.171:2000/ctl";\n var requestData = new Dictionary<string, string>() { { "id", direcID } };\n var requestUserAgent = "WangHeng PiCar/v1.0";\n var requestEncoding = Encoding.Default;\n var result = HttpUtility.CreatePostHttpResponse(\n requestUrl,\n requestData,\n 5000,\n requestUserAgent,\n requestEncoding,\n null);\n\n using (var sr = new StreamReader(result.GetResponseStream(), requestEncoding))\n {\n return sr.ReadToEnd();\n }\n }\n catch (Exception ex)\n {\n return null;\n }\n }\n }\n\n\n public class KeyHookUtils\n {\n [StructLayout(LayoutKind.Sequential)]\n public class KeyBoardHookStruct\n {\n public int vkCode;\n public int scanCode;\n public int flags;\n public int time;\n public int dwExtraInfo;\n }\n //委托 \n public delegate int HookProc(int nCode, int wParam, IntPtr lParam);\n static int hHook = 0;\n public const int WH_KEYBOARD_LL = 13;\n //LowLevel键盘截获,如果是WH_KEYBOARD=2,并不能对系统键盘截取,Acrobat Reader会在你截取之前获得键盘。 \n static HookProc KeyBoardHookProcedure;\n\n //设置钩子 \n [DllImport("user32.dll")]\n public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);\n\n //抽掉钩子 \n [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]\n public static extern bool UnhookWindowsHookEx(int idHook);\n\n //调用下一个钩子 \n [DllImport("user32.dll")]\n public static extern int CallNextHookEx(int idHook, int nCode, int wParam, IntPtr lParam);\n\n [DllImport("kernel32.dll")]\n public static extern int GetCurrentThreadId();\n\n [DllImport("kernel32.dll")]\n public static extern IntPtr GetModuleHandle(string name);\n\n public static void Hook_Start()\n {\n if (hHook == 0)\n {\n KeyBoardHookProcedure = new HookProc(KeyBoardHookProc);\n hHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyBoardHookProcedure,\n GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName), 0);\n //如果设置钩子失败. \n if (hHook == 0)\n {\n Hook_Clear();\n }\n }\n }\n\n /// <summary>\n /// 取消钩子事件\n /// </summary>\n public static void Hook_Clear()\n {\n bool retKeyboard = true;\n if (hHook != 0)\n {\n retKeyboard = UnhookWindowsHookEx(hHook);\n hHook = 0;\n }\n }\n\n public static int KeyBoardHookProc(int nCode, int wParam, IntPtr lParam)\n {\n if (nCode >= 0)\n {\n KeyBoardHookStruct kbh = (KeyBoardHookStruct)Marshal.PtrToStructure(lParam, typeof(KeyBoardHookStruct));\n Keys k = (Keys)Enum.Parse(typeof(Keys), kbh.vkCode.ToString());\n switch (k)\n {\n case Keys.Left:\n if (kbh.flags == 1)\n {\n // 这里写按下后做什么事\n if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)\n {\n CarCtl.TurnFunc("t_left");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Up;\n }\n }\n else if (kbh.flags == 129)\n {\n //放开后做什么事\n CarCtl.TurnFunc("t_stop");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;\n }\n return 1;\n case Keys.Up:\n if (kbh.flags == 1)\n {\n // 这里写按下后做什么事\n if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)\n {\n CarCtl.TurnFunc("t_up");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Up;\n }\n }\n else if (kbh.flags == 129)\n {\n //放开后做什么事\n CarCtl.TurnFunc("t_stop");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;\n }\n return 1;\n case Keys.Right:\n if (kbh.flags == 1)\n {\n if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)\n {\n CarCtl.TurnFunc("t_right");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Up;\n }\n }\n else if (kbh.flags == 129)\n {\n //放开后做什么事\n CarCtl.TurnFunc("t_stop");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;\n }\n return 1;\n case Keys.Down:\n if (kbh.flags == 1)\n {\n if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)\n {\n CarCtl.TurnFunc("t_down");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Up;\n }\n }\n else if (kbh.flags == 129)\n {\n //放开后做什么事\n CarCtl.TurnFunc("t_stop");\n CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;\n }\n return 1;\n default:\n break;\n }\n }\n return CallNextHookEx(hHook, nCode, wParam, lParam);\n }\n }\n}\n\n\n这里主要说一下Android 的客户端\nAndroid之前虽没怎么接触过,但凭着自己一些基础,还是慢慢摸索到了门路。唯一比较坑的是,在获取Wifi权限的时候,照着网上的介绍改了AndroidManifest.xml 加入\n <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>\n <uses-permission android:name="android.permission.INTERNET"/>\n <uses-permission android:name="android.permission.WAKE_LOCK"/>\n <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>\n <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>\n依然没有访问网络的权限 :(\n为此还特意加了几个Android的开发群,但是群里一个个爱答不理,趾高气扬的态度,我就呵呵了。果断退群,还是得靠自己,扶梯子上Google,一顿搜搜搜,果然有同病相怜的朋友。\n原因竟然是一个小问题目标SDK版本不对。。。好吧,果然弱爆了。\n\n\n \n \n \n按上图将Target SDK Version 从18改成19,运行,测试,这次果然可以了。如下:\n\n\n \n \n \n \n \n \n \n \n \n \n代码也比较简单,核心代码如下:\npackage com.apiof.picar;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.net.HttpURLConnection;\nimport java.net.InetAddress;\nimport java.net.MalformedURLException;\nimport java.net.NetworkInterface;\nimport java.net.SocketException;\nimport java.net.URL;\nimport java.util.Enumeration;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport android.net.wifi.WifiInfo;\nimport android.net.wifi.WifiManager;\nimport android.os.Bundle;\nimport android.os.StrictMode;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.util.Log;\nimport android.view.KeyEvent;\nimport android.view.Menu;\nimport android.view.View;\nimport android.view.WindowManager;\nimport android.widget.Button;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport android.view.View.OnClickListener;\n\npublic class MainActivity extends Activity {\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n // 禁止屏幕锁屏,也可以用View.setKeepScreenOn(boolean)来实现\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n InitHandler();\n\n TestNetWork();\n }\n\n public void DisplayToast(String str)\n {\n Toast.makeText(this, str, Toast.LENGTH_SHORT).show();\n }\n\n public boolean onKeyDown(int KeyCode, KeyEvent event) {\n switch (KeyCode) {\n case KeyEvent.KEYCODE_0:\n DisplayToast("按下数字0");\n break;\n }\n return super.onKeyDown(KeyCode, event);\n }\n\n @Override\n public boolean onKeyUp(int keyCode,KeyEvent event){\n switch(keyCode){\n case KeyEvent.KEYCODE_0:\n DisplayToast("松开数字0");\n break;\n }\n return super.onKeyUp(keyCode, event);\n }\n\n public void TestNetWork() {\n\n String strUrl = "http://nas.apiof.com:2000";\n StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\n .detectDiskReads().detectDiskWrites().detectNetwork()\n .penaltyLog().build());\n URL url = null;\n try {\n url = new URL(strUrl);\n System.out.println(url.getPort());\n HttpURLConnection urlConn = (HttpURLConnection) url\n .openConnection();\n InputStreamReader in = new InputStreamReader(\n urlConn.getInputStream());\n BufferedReader br = new BufferedReader(in);\n String result = "";\n String readerLine = null;\n while ((readerLine = br.readLine()) != null) {\n result += readerLine;\n }\n in.close();\n urlConn.disconnect();\n\n System.out.println("r:" + result);\n TextView textView = (TextView) this.findViewById(R.id.textView2);\n textView.setText(result);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n\n @Override\n public void onBackPressed() {\n new AlertDialog.Builder(this).setTitle("确认退出吗?")\n .setIcon(android.R.drawable.ic_dialog_info)\n .setPositiveButton("确定", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // 点击“确认”后的操作\n MainActivity.this.finish();\n }\n })\n .setNegativeButton("返回", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // 点击“返回”后的操作,这里不设置没有任何操作\n }\n }).show();\n }\n\n @Override\n public boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the menu; this adds items to the action bar if it is present.\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }\n\n private String intToIp(int i) {\n\n return (i & 0xFF) + "." + ((i >> 8) & 0xFF) + "." + ((i >> 16) & 0xFF)\n + "." + (i >> 24 & 0xFF);\n }\n\n public String getLocalIpAddress() {\n try {\n for (Enumeration<NetworkInterface> en = NetworkInterface\n .getNetworkInterfaces(); en.hasMoreElements();) {\n NetworkInterface intf = en.nextElement();\n for (Enumeration<InetAddress> enumIpAddr = intf\n .getInetAddresses(); enumIpAddr.hasMoreElements();) {\n InetAddress inetAddress = enumIpAddr.nextElement();\n if (!inetAddress.isLoopbackAddress()) {\n return inetAddress.getHostAddress().toString();\n }\n }\n }\n } catch (SocketException ex) {\n Log.e("WifiPreference IpAddress", ex.toString());\n }\n return null;\n }\n\n public void InitHandler() {\n // 获取wifi服务\n WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n // 判断wifi是否开启\n if (!wifiManager.isWifiEnabled()) {\n wifiManager.setWifiEnabled(true);\n }\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n int ipAddress = wifiInfo.getIpAddress();\n String ip = intToIp(ipAddress);\n TextView txt1 = (TextView) findViewById(R.id.textView1);\n txt1.setText(txt1.getText() + "\\r\\nLocal IP: " + ip);\n\n\n ((Button)findViewById(R.id.btnStop)).setOnClickListener(stopHandler);\n ((Button)findViewById(R.id.btnForward)).setOnClickListener(upHandler);\n ((Button)findViewById(R.id.btnBackward)).setOnClickListener(downHandler);\n ((Button)findViewById(R.id.btnTurnLeft)).setOnClickListener(leftHandler);\n ((Button)findViewById(R.id.btnTurnRight)).setOnClickListener(rightHandler);\n }\n\n private void Trun(String id) {\n TextView txt = (TextView) findViewById(R.id.textView2);\n try {\n String requestUrl = "http://192.168.1.171:2000/ctl";\n Map<String, String> requestParams = new HashMap<String, String>();\n requestParams.put("id", id);\n String result = HttpUtils.submitPostData(requestUrl,\n requestParams, "utf-8");\n\n txt.setText("turn to: "+result);\n } catch (Throwable e) {\n e.printStackTrace();\n }\n }\n \n private OnClickListener stopHandler=new OnClickListener() {\n public void onClick(View v) {\n Trun("t_stop");\n }\n };\n private OnClickListener leftHandler=new OnClickListener() {\n public void onClick(View v) {\n Trun("t_left");\n }\n };\n private OnClickListener rightHandler=new OnClickListener() {\n public void onClick(View v) {\n Trun("t_right");\n }\n };\n private OnClickListener upHandler=new OnClickListener() {\n public void onClick(View v) {\n Trun("t_up");\n }\n };\n private OnClickListener downHandler=new OnClickListener() {\n public void onClick(View v) {\n Trun("t_down");\n }\n };\n\n}\n完整的代码放到了我的Github 共享,需要的朋友可以参考下载:\nhttps://github.com/wujiwh/piCar/tree/master/client/android\n","categories":["最近添加"]},{"title":"Razer Krait 鼠标换微动","url":"/razer-krait-mouse-change-budge.html","content":"\n08年底买的Razer 鼠标已经越来越不好用了,左键经常单击变双击。拿到公司用了几天很是郁闷,根本做不了开发工作,于是动了自己修理鼠标的想法。从网上搜索得知鼠标用的微动是欧姆龙的D2FC-F-7N,于是动身前往中关村买微动。刚开始去了淘宝的一家实体店,买来的型号是D2F-01L 据称是日产的高档微动,外加买了一套电烙铁。路上仔细用手点了点刚买的微动,感觉手感一般。想起网上说的一款德产的DG2 ,0.74N 的力度和适中的键程堪称游戏利器,经过一番搜索找到了中关村4楼的一家游戏装备店,没买到DG2,却被介绍了另一款手感很好的日产灰点D2F-01F,而且老板那还有Razer原厂的D2FC-F-7N,经过一番讨价以10块RMB买来一个D2FC-F-7N 和D2F-01F。\n\n\n\n回家拆开鼠标,赞一下,Razer的做工真的很棒,换微动的时候更是应了老板的那句“Razer的微动很不好拆”,经过一番折腾,终于成功的换上了新的微动!至此,我的Razer 金环蛇成功复活!\n","categories":["Technical"],"tags":["Razer","Krait","mouse","DIY","微动","鼠标"]},{"title":"卸载grub2重新装回grub legacy","url":"/reinstall-grub.html","content":"\n还是习惯用grub,grub2虽然好用,但是最近安装xen时却频频出现问题。于是果断卸载,重新装回了grub。\n\n步骤很简单:\n首先执行:\n apt-get --purge remove grub-pc \n\n这时会有让你确认是否删除的提示信息,当然是选择yes\n然后删掉原来grub2的所有配置文件,并重建grub目录:\n\nrm -r /boot/grub/\nmkdir /boot/grub\n\n\n重新安装grub, 安装完需要 update-grub 提示 if you want create a menu.lst ? 输入y同意。\n\napt-get install grub\nupdate-grub\n\n\n最后可以选择将将grub loader写入物理MBR。(这里注意你是否是单硬盘,是否是多系统,请依据具体情况填写)\ngrub-install /dev/sda \n\n现在终于可以方便的修改menu.lst了!\n","categories":["Technical"],"tags":["grub2","grub legacy"]},{"title":"解决插件调用google字体巨慢的问题","url":"/resolve-syntaxhighlighter-google-fonts-pop-issue.html","content":"\n写博客免不了贴代码,但是每次使用syntaxhighlighter 贴代码弹出的窗体总是慢的要死,加上wordpress本来也不快,卡上加卡终于无法忍受。\n\nwordpress现在越来越臃肿常常打扰我的思路,这也是我平时经常随手将一些笔记直接扔到了vimwiki中的缘由。\n查看了一下网络请求,果然又是google font的问题。好吧,活在我大天朝,只好逆来顺受了。\n难道每次贴个代码都要等四五十秒。。。还是自己开刀改一下网站插件吧,祭出神器chrome网页debug工具,一顿调试之后找到原来是在tiny_mce_popup.js 这个文件的65行出现请求超时,跟进去找到对应的css 是这个\n\nwp-includes/js/tinymce/plugins/compat3x/css/dialog.css\n\n编辑器打开,果然啊,第一行就是:\n\n@import url(//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin);\n\n/* Generic */\nbody {\nfont-family: "Open Sans", sans-serif;\nfont-size:13px;\nbackground:#fcfcfc;\npadding:0;\nmargin:8px 8px 0 8px;\n}\n找到问题就好办了,删掉第一行,将Sans字体改成Consolas,这下次终于顺畅了!\n\n\n\n\n","categories":["最近添加"]},{"title":"Linux系统中安装Razer驱动","url":"/razer-drivers-installed-linux-system.html","content":"\n 最近无线网卡出了点小问题,所以回来基本是用Linux了。可惜使用的razer鼠标却没有官方的Linux驱动,高DPI的鼠标在Linux用着感觉很是飘,于是忍不住折腾一番。经过一阵子的搜索终于看到了希望,喜欢razer的朋友有福音了,国外一位牛人搞出了Linux下的razer驱动以及配置工具razercfg。目前最新的版本是razercfg-0.17.tar.bz2,支持的Razer鼠标有:\nRazer DeathAdder Classic mouse \nRazer DeathAdder 3500 DPI mouse \nRazer DeathAdder Black Edition mouse \nRazer Krait mouse \nRazer Lachesis mouse \nRazer Lachesis 5600 DPI mouse \nRazer Copperhead mouse \nRazer Naga mouse wired \nRazer Boomslang CE mouse \nAny wireless Razer mouse\n平时使用Linux系统,却又喜欢Razer鼠标的朋友不妨试试!\n 下面介绍一下驱动的安装过程\n1、安装必须的依赖项:\nsudo -i\napt-get install python\napt-get install libusb-1.0-0-dev\napt-get install python-qt4\napt-get install cmake\n\n\n\n\n2、下载razercfg-0.17.tar.bz2压缩包,并解压文件wget http://bues.ch/razercfg/razercfg-0.17.tar.bz2tar xjvf razercfg-0.17.tar.bz2cd razercfg-0.17\n3、开始安装首先生成Makefile文件,然后编译并安装,别漏掉第一条命令后面的小点\n\nsudo -i\ncmake .\nmake\nmake install \n\n为了在系统启动时自动加载razerd守护程序,你需要运行init-script脚本文件,执行如下命令:\n\n sudo -i # become root\n cp ./razerd.initscript /etc/init.d/razerd\n ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd\n ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd\n ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd\n ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd\n4、razer的图形配置工具\n首先确保razerd已经运行,如果配置好了第三步,可以重启电脑或者在终端输入命令razerd 来启动。命令行配置工具有qrazercfg,或者使用更酷的图形配置工具qrazercfg,在终端输入qrazercfg来启动这个小工具,运行界面如图:它提供的配置是不是很丰富呢,基本上windows上面的配置选项在这里都可以找到。\n\n","categories":["Technical"]},{"title":"SAE中使用TmpFS功能","url":"/sae-used-tmpfs-function.html","content":"\n        前一段时间做的项目需要提供导出CSV报表的功能,我用php直接拼出csv的文件流输出到页面,以提供csv文件的下载,功能在wamp环境中运行很正常,但是到了SAE平台却怎么都不好使。不管是改请求的响应头content-type 还是修改输出的文件格式,每次SAE都是把内容直接输出在了页面。因为SAE不支持通用方式的本地IO,于是想到了使用SAE提供的tmpFS功能。TmpFS因为平台安全性的考虑,SAE限制了用户对于本地IO的使用,但这样对于一些传统的PHP项目,也许带来了很多不便,因为它们都或多或少的有对本地 IO的操作,像Smarty的编译模板。为了解决这个问题,SAE提供了TmpFS功能。TmpFS允许开发者通过标准的IO函数临时读写本地IO,这样 方便了很多非SAE项目的移植。\n\n特别注意:\n临时文件的生存周期等同于PHP请求,也就是当该PHP请求完成执行时,所有写入TmpFS的临时文件都会被销毁TmpFS是本地临时文件,不是共享存储,而SAE是全分布式环境,所以不同请求之间无法通过TmpFS共享操作文件TmpFS操作的文件限于SAETMPPATH目录内,而不同App的SAETMPPATH是不同的TmpFS的文件为纯内存存储\n应用场景\n用户的可持久化存储,请使用Storage或者MySQL存储,而缓存存储请使用Memcache服务存储,TmpFS是满足用户的一个请求的临时 文件的读写需求。比如抓取一个URL的图片,判断一下大小,再决定是否写入Storage。需要在本地生成文件的情况大致分以下几种:\n缓存配置文件静态文件临时文件\n例子:\nappname: saetestappversion: 1\n在一个php文件中:file_put_contents( SAE_TMP_PATH . '/mycode.txt' , 'dummy test' );echo file_get_contents( SAE_TMP_PATH . '/mycode.txt' ); // will echo dummy test;如果是两个独立的php文件:a.phpfile_put_contents( SAE_TMP_PATH . '/mycode.txt' , 'dummy test' );b.phpecho file_get_contents( SAE_TMP_PATH . '/mycode.txt' ); // 出错啦,文件已经不存在了...说到这里,大家应该明白了, tmpFS中的文件在后台PHP代码执行完后就已经不存在了,囧。最后只好用了个折中的办法,临时把文件放在了SAE的永久化存储的Storage里面。不知看到这里的朋友有无更好的办法解决SAE中导出文件的问题,欢迎联系告知~\n","categories":["最近添加"]},{"title":"设置Win7无线网络共享","url":"/set-win7-wireless-share.html","content":"\n有时候难免碰到多个人需要上网却只有一根网线的情况,其实WIN7系统里还有很多有意思的东西我们没有用过,例如,方便设置WIN7的无线网卡,来实现共享WIFI上网。如果你电脑上同时有无线和有线网卡不妨试试,下面就来说一下设置过程:\n\n方法一:\n1、首先以管理员身份运行命令提示符\n开始->搜索框输入cmd,出来的cmd.exe上右键管理员身份运行,或者win+R打开运行提示框,输入cmd并回车。\n2、设置“虚拟Wifi网卡”模式\n敲入命令:\nnetsh wlan set hostednetwork mode=allow ssid=Master_Share key=1234567890\n\n\n其中:Mode:是否启用虚拟Wifi网卡,改为disallow则为禁用\nSsid:设定无线网络的名称\nKey:设定无线网络的密码。\n执行完以后我们会在网络适配器里面看到一个“无线网络连接4“的虚拟网卡(一般情况是无线网络连接2,因为我机器曾接入多块无线网卡故为无线连接4)\n\n\n3、启用“Internet连接共享”\n打开控制面板找到并打开“网络和共享中心”窗口,右键单击已连接到Internet的网络连接,选择“属性”,切换到“共享”选项卡,选中其中的复选框,并选择允许其共享Internet的网络连接在这里即我们的虚拟Wifi网卡。\n\n\n\n\n确定之后,提供共享的网卡图标旁边会出现“已共享”标志\n在命令提示符中运行以下命令:\nnetsh wlan start hostednetwork\n开启我们之前设置好的无线网络(将start改为stop即可关闭该无线网)。\n用你的手机搜索一下无线,找到名称为Master_Share的网络,点击连接并输入你设置的密码,\n是否能够上网了呢?\n方法二:(推荐)\n更酷的玩法:\n其实配置无线有更简单方便的方法 \n1、首先确保所有的网卡都没有设置Internet连接共享,如果设置过,请取消共享。\n打开控制面板->网络和共享中心->设置新的连接或网络\n选择“设置无线临时(计算机到计算机)网络”并点击下一步\n\n\n出现的窗口中输入你的无线网络名称和密码,注意安全类型选择WEP以方便设置(其实平时也不会总开着无线共享,所以也没必要非要wap2)。\n\n\n下一步继续,出现的窗口中选择启用Internet连接共享,(后面还可能让你选择已经接入网络的网卡,请正确选择)\n\n\n\n\n成功后无线状态显示为正“等待用户”~~\n\n\n用手机搜索一下无线信号,输入正确的密码来使用共享的无线网络。\n疑难解答:\n如果你前面的步骤不成功。\n1、请检查你提供共享的无线网卡(虚拟WIFI或方法二的无线网络2)的IP设置,确保配置如图所示:(DNS可以不用填)\n\n\n2、手机或者其他终端如果自动获取的IP跟上面图的IP地址不在一个网段(不是192.168.137.X),请在终端选择手动设置IP,设置如下:\nIP地址:192.168.137.2\n子网掩码:255.255.255.0\n默认网关:192.168.137.1\n方法拓展:\n其实前面的方法道理都是一样的,都用的是ICS(Internet连接共享)这个服务,所以你可以通过这种方法来实现:\n1、无线共享给无线(给手机或平板提供无线连接,毕竟笔记本的网卡比这些终端要好很多)\n2、有线共享给无线\n3、无线共享给有线(哈哈,这个给力吧,曾经大二的时候就通过这种方法跟同学一起联网上浩方,好怀念!)\n好了,其实Windows系统还是很强大的!有任何问题的朋友可以留言共同学习~!\n","categories":["Technical"],"tags":["Windows","Win7","虚拟WIFI","网络"]},{"title":"Ubuntu 搭建 Vpn 服务","url":"/setup-vpn-the-server.html","content":"\n最近通过优惠券买了一个美国的VPS,虽然配置低了点,但是用来做平时网站的备份,或者临时当作离线下载服务器都是很不错的主意!因为国内周知的原因,访问一些国外的网站很受限制,所以想起了用自己的VPS来搭建一个VPN的想法。具体实现如下:\n\n\n安装pptpd,这是个VPN服务器端软件sudo apt-get install pptpd\n修改文件 /etc/pptpd.confsudo vi /etc/pptpd.conf\n找到# TAG: localip一行,在后面添加以下2行:localip 192.168.0.1remoteip 192.168.0.234-238,192.168.0.245\n修改文件 /etc/ppp/pptpd-optionssudo vi /etc/ppp/pptpd-options\n找到 #ms-dns这行,去掉前面的#号,修改成google提供的DNS server或其他DNS:ms-dns 8.8.8.8ms-dns 8.8.4.4\n修改文件 /etc/ppp/chap-secrets,按一行四列添加账号、服务器名、密码和IP限制。服务器名(默认 写pptpd 即可,务必与 pptpd-options 文件的name一行一样)。如创建一个名为user,密码为userpasswd,不限制登录IP的VPN账号:user pptpd userpasswd *\n修改文件 /etc/sysctl.conf,去掉这一行 #net.ipv4.ip_forward=1 的#号,开启ipv4 forward,然后运行命令:sudo sysctl –p\n运行后会显示 net.ipv4.ip_forward = 1,就表示修改生效了。\n使用iptables建立一个NATsudo apt-get install iptables\niptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE\n上面的24表示子网掩码,代表24个1.eth0是网卡名字,可以通过命令 ifconfig 查看\n\n为防止重启服务器后iptables丢失,先运行\niptables-save > /etc/iptables.rule\n然后修改文件 /etc/network/interfaces ,在eth0/eth1.. 下面加入pre-up iptables-restore < /etc/iptables.rule7. 现在应该就搞定了,最后重启 pptpd\nsudo /etc/init.d/pptpd restart\n\n在client端设置连接VPN进行测试,client是Ubuntu的话请看这里测试是否可以连接到VPN server:ping server_IP\n不能的话,问题应该出在前4步。测试是否可以连接到外网:(任何其他外网IP都行)ping 8.8.8.8\n不能的话,问题应该出在第5-6步,看看是否正确设置了 ipv4 forward测试是否可以解析DNS:nslookup google.com\n\n\n","categories":["Technical"],"tags":["VPS","Ubuntu","代理","VPN","翻墙"]},{"title":"分享iPad2越狱工具","url":"/share-ipad2-jailbreak-tool.html","content":"\n过年在家看书学习之余,也有了闲工夫折腾一下ipad。虽然个人不提倡盗版,并且平时用到的工具ipad上也都装了。但越狱可不仅仅是为了装盗版,呵呵。顶着越狱后系统可能出现各种问题的压力,为了以后更方便的各种折腾,果断越了!\n\n附图:\n\n\n \n \n \n \n \n \n \n \n \n工具是傻瓜式的一键越狱,跟除夕时候放出的命令行越狱工具没太大本质区别,不过GUI工具却是修复了一些小bug,所以对需要的朋友还是推荐使用GUI工具。 :)\n下面是工具的下载地址:\n点击下载\n","categories":["Technical"],"tags":["iPad2","越狱","分享","工具"]},{"title":"分享个人wiki部署脚本","url":"/share-personal-wiki-deployment-script.html","content":"\n上一篇介绍了如何使用vimwiki组建个人wiki,但是如何同步自己的vimwiki 到线上却成了很多人的困扰。丘迟的维基世界介绍了同步 vimwiki 到线上的各种方法,如果你的桌面是使用linux的话,当然问题不大,很轻松就能写出一个同步的脚本。但是还是有很多人平时工作在windows的系统环境中,这里我自己写了一个vim的小插件用来一键同步vimwiki到线上。\n\n首先分析一下这个同步需求: 需要自动同步 vimwiki_html 的所有文件 有变更的文件才同步上去 被删掉的文件也要能同步删掉 由于文件修改频繁,不需要一旦修改就马上同步 有需要时可以手动同步 最好能排除一些不用放在线上的文件 不能占用太多系统资源这里我将vimwiki生成的html托管在了自己的github上面,此vim脚本的运行需要依赖你gvim对应版本的python,或者自己在windows下编译一个gvim。(好吧,这个实在够蛋疼。。。)\n安装并配置你的github\n首先关闭360安全卫士等流氓软件!切记!\n从github下载github for window,链接如下:\nhttp://github-windows.s3.amazonaws.com/GitHubSetup.exe\n安装完成后,用你的账号登录,然后在tools/options中设置默认的shell为cmd,如下图:\n完成后双击桌面上的git shell图标,打开git shell 后执行如下命令\necho %path% >>c:\\path.txt\n打开c:\\path.txt 将里面的内容全部复制,粘贴到系统的path变量中(覆盖原来的path)。完成此步骤后,cmd中会使用github生成的配置进行ssh的key-agent验证登录,故实现了git命令免密码的效果。完成后,运行cmd,输入git,能识别这个命令表示成功。然后就可以使用我写的这个脚本了(汗,脚本依赖有点高~~)\n脚本的代码如下:\n"=========================================================\n" FileName: vimwiki_sync.vim" Desc:" Author: WangHeng" Email: me@wangheng.org" HomePage: http://wangheng.org" Version: 1.1" LastChange: 2012-07-19 22:32:39" History: 1、2012-07-20 暂时注释VimwikiGet('path_html')" 不好用原因待研究"=========================================================\n" let s:wiki_html_path=VimwikiGet('path_html')这条命令有时候不好用,故暂时注释掉if !has('python') echo "Git Auto Upload Error:\\nRequired vim compiled with +python" finishendif\nfunction! s:Vimwiki_Upload()\npython <<EOFimport osimport time\ndt = time.strftime("%Y-%m-%d %H:%M", time.localtime())\n#Edit the html_path to your html files path.html_path='XXX\\html' #替换成你的public_html所在路径\nhtml_path=vim.eval('s:wiki_html_path')os.chdir(html_path)path=os.getcwd()print "Now, will sync files in "+path+" at "+dtos.system('git add .&&git commit -a -m "auto commited at %s "&&git push' % (dt))\nprint "All done~!"EOF\nendfunction\ncommand! -range VimwikiUpload :call s:Vimwiki_Upload()\nnnoremap <F11> :VimwikiUpload<cr>或者直接点击这里下载。\n使用方法是在vim的普通模式下按F11,另外你还可以将中间的那段python代码提出来作为一个单独的python脚本,这样你就可以将它加到计划任务定时执行了,有需求的朋友可以试试~~任何问题欢迎留言交流~\n","categories":["Technical","Route"],"tags":["vim","备份","vim插件","部署","github","python","symfony"]},{"title":"使用parted创建GPT分区","url":"/shi-yong-parted-chuang-jian-gpt-fen-qu.html","content":"\n操作环境:\n\nCentOS Linux 6.5\n硬盘:\n/dev/sda 大小500G,为4*15K HDD做的硬Raid10,用来部署系统分区以及Oracle应用分区。\n/dev/sdb 大小4.1T 为6*10K HDD做的硬Raid5,用来做Oracle的数据文件分区\n/dev/sdc 大小4.1T 为6*10K HDD做的硬Raid5,用来做Oracle的数据索引\n平时在Linux下使用的硬盘都没超过2T的单盘,所以刚开始用fdisk分区出来发现只有2T,还有点疑惑,一查才知道原来是因为fdisk不支持创建GPT分区,GPT支持大于2TB分区,MBR只能支持2TB的分区。下面是两种分区格式的具体区别:\nMBR分区表:(MBR含义:主引导记录)\n所支持的最大卷:2T (T; terabytes,1TB=1024GB)\n对分区的设限:最多4个主分区或3个主分区加一个扩展分区。\nGPT分区表:(GPT含义:GUID分区表)\n支持最大卷:18EB,(E:exabytes,1EB=1024TB)\n每个磁盘最多支持128个分区Linux下的parted工具的使用也很简单,具体操作如下:\n\nroot@me:/mnt# parted /dev/sdaUsing /dev/sdaWelcome to GNU Parted! Type ‘help’ to view a list of commands.\n(parted) mklabel gptWarning: The existing disk label on /dev/sda will be destroyed and all data on this diskwill be lost. Do you want to continue?Yes/No? yes\n(parted) print Model: DELL PERC 6/i Adapter (scsi)Disk /dev/sda: 500GBSector size (logical/physical): 512B/512BPartition Table: gptNumber  Start  End  Size  File system  Name  Flags\n(parted)mkpart primary 0GB 500GBWarning: You requested a partition from 0.00B to 500GB.The closest location we can manage is 17.4kB to 500GB.Is this still acceptable to you?Yes/No? yesWarning: The resulting partition is not properly aligned for best performance.Ignore/Cancel? Ignore\n(parted) print Model: DELL PERC 6/i Adapter (scsi)Disk /dev/sda: 500GBSector size (logical/physical): 512B/512BPartition Table: gptNumber  Start   End    Size   File system  Name     Flags1      17.4kB  500GB  500GB               primary\n(parted)quit Information: You may need to update /etc/fstab.root@me:/#mkfs.ext4 /dev/sda1mke2fs 1.41.12 (17-May-2010)文件系统标签=操作系统:Linux块大小=4096 (log=2)分块大小=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks30490624 inodes, 121962487 blocks6098124 blocks (5.00%) reserved for the super user第一个数据块=0Maximum filesystem blocks=42949672963722 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,102400000正在写入inode表: 完成Creating journal (32768 blocks): 完成Writing superblocks and filesystem accounting information: 完成This filesystem will be automatically checked every 24 mounts or180 days, whichever comes first.  Use tune2fs -c or -i to override.\n这样我们就完成了分区的创建以及格式化,其他分区步骤类似,全部完成并装好系统我们可以编辑/etc/fstab 文件以实现开机自动挂载分区。\n","categories":["最近添加"]},{"title":"备份网站到FTP和Dropbox脚本","url":"/site-backup-to-ftp-and-dropbox.html","content":"\n发一个一键备份脚本,可以将网站文件和数据库备份到FTP和Dropbox,可以从这里下载autobackup.\n1、配置dropbox_Uploader.sh运行dropbox_sync.sh,根据提示完成dropbox的授权。2、自动备份脚本autobackup.sh内容#!/bin/bash\n#你要修改的地方从这里开始\nMYSQL_USER= #mysql用户名\nMYSQL_PASS= #mysql密码\nMAIL_TO= #数据库发送到的邮箱\nFTP_USER= #ftp用户名\nFTP_PASS= #ftp密码\nFTP_IP= #ftp地址\nFTP_backup= #ftp上存放备份文件的目录,这个要自己得ftp上面建的\nWEB_DATA= #要备份的网站数据根目录\n#你要修改的地方从这里结束\n#定义数据库的名字和旧数据库的名字\nDataBakName=Data_$(date +"%Y%m%d").tar.gz\nWebBakName=Web_$(date +%Y%m%d).tar.gz\nOldData=Data_$(date -d -10day +"%Y%m%d").tar.gz\nOldWeb=Web_$(date -d -10day +"%Y%m%d").tar.gz\n#删除本地3天前的数据\ncd /home/backup\nrm -rf Data_$(date -d -3day +"%Y%m%d").tar.gz Web_$(date -d -3day +"%Y%m%d").tar.gz\n#导出数据库,一个数据库一个压缩文件\nfor db in `/usr/local/mysql/bin/mysql -u$MYSQL_USER -p$MYSQL_PASS -B -N -e 'SHOW DATABASES' | xargs`; do\n (/usr/local/mysql/bin/mysqldump -u$MYSQL_USER -p$MYSQL_PASS ${db} | gzip -9 - > ${db}.sql.gz)\ndone\n#压缩数据库文件为一个文件\ntar zcf $DataBakName *.sql.gz\nrm -rf *.sql.gz\n#发送数据库到Email,如果数据库压缩后太大,请注释这行\n#echo "主题:数据库备份" | mutt -a $DataBakName -s "内容:数据库备份" $MAIL_TO\n#压缩网站数据\ntar zcf $WebBakName $WEB_DATA\n#上传到FTP空间,删除FTP空间5天前的数据\nftp -v -n $FTP_IP << END\nuser $FTP_USER $FTP_PASS\ntype binary\ncd $FTP_backup\ndelete $OldData\ndelete $OldWeb\nput $DataBakName\nput $WebBakName\nbye\nEND\necho =====================Ftp backup finished at [$(date +%Y-%m-%d-%H-%M)]==============================\n#备份到dropbox空间\n/root/bin/dropbox_sync.sh upload $DataBakName $FTP_backup/$DataBakName\n/root/bin/dropbox_sync.sh upload $WebBakName $FTP_backup/$WebBakName\n#Delete Old Data\n/root/bin/dropbox_sync.sh delete $FTP_backup/$OldData\n/root/bin/dropbox_sync.sh delete $FTP_backup/$OldWeb\necho =====================dropbox backup finished at [$(date +%Y-%m-%d-%H-%M)]==========================\n\n3、给系统添加定时任务如果需要将数据库文件发送到邮箱,首先需要安装sendmail和mutt,安装方法请自行google\n给脚本添加执行权限:\n\nchmod +x /root/bin/autobackup.sh\n利用系统crontab实现每天自动运行:\ncrontab -e\n输入以下内容:\n00 00 * * * /root/bin/autobackup.sh\n其中00 00为时间分/小时,可自行修改,例如:30 12 ***,就是每天12.30运行这个脚本。\n\n","categories":["Technical"],"tags":["备份","Dropbox","脚本","IIS"]},{"title":"解决MySQL远程连接丢失问题","url":"/solve-the-mysql-remote-connection-is-lost.html","content":"\n最近服务器很不稳定,于是重装了mysql 和php 服务,但是接着却遇到了很头疼的麻烦。\n远程连接mysql是总是提示:\nLost connection to MySQL server at ‘reading initial communication packet’, system error: 0\n\n很明显这是连接初始化阶段就丢失了连接的错误。\ngoogle半天大多是说的注释掉配置文件中 bind-address = 127.0.0.1 这一句。但是我的配置文件并没有配置这一句,各种搜索均未果。今天偶然在网上看到一个遇到同样问题的人贴出的配置,发现他多了一句配置 skip-name-resolve,抱着试试看的态度改了一下并重启了mysql服务,果然远程一下子就连接上了,真是无语。\n其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配置文件即可。具体的解决步骤如下,希望能帮助遇到同样问题的同学们:找到并修改my.cnf文件。在不同的Linux系统下,my.cnf放在不同的位置。这里以Ubuntu Server做示例,其他系统请根据情况自行找到my.cnf的路径。一般只会存放在/etc/my.cnf或者/etc/mysql/my.cnf下。\n首先用vim打开my.cnf:\nvim /etc/mysql/my.cnf\n看看是否有绑定本地回环地址的配置,如果有,注释掉下面这段文字:(在文字之前加上#号即可)\nbind-address = 127.0.0.1\n然后找到[mysqld]部分的参数,在配置后面建立一个新行,添加下面这个参数:\nskip-name-resolve保存文件并重启MySQL:\n/etc/init.d/mysql restart\n这样就会发现,问题已经解决了!远程连接不会丢失了。\n","categories":["Technical"],"tags":["日志","Linux"]},{"title":"Apache2配置多域名","url":"/the-apache2-configure-multi-the-domain.html","content":"\n几经周折买回来的VPS终于能用了!  打算试用一段时间后,如果服务器足够稳定就将自己的博客完全转入新的VPS。搭建好LAMP环境 后需要对服务器进行一些配置以支持多个域名的独立管理。没有自己顶级域名的朋友可以试试 www.co.cc的免费二级域名,之前在大学期间一直用的是他们的免费域名去绑定一些不好记住的ip服务,解析速度也挺快的,再次感谢!为你的域名(例如:xxx.co.cc)新建一个文本文件并编辑xxx.co.cc的站点配置文件 xxx.co.cc \nServerName xxx.co.cc\nServerAlias xxx.co.cc\nDocumentRoot /var/www/test/\n \n\n\n将这xxx.co.cc文件上传到 /etc/apache2/sites-enabled/ 目录并重启apache服务以使配置生效。使用putty登录vps执行如下命令\n\n\n/etc/init.d/apache2 restart\n\n\n上传探针文件到/var/www/test/\n\ncd /var/www/test\nwget wangheng.org/tools/tz.zip\nunzip tz.zip\n\n\n如果上传文件的所有者为 root ,Apache 无法正常写入,需要设置上传文件的宿主为 www-data。设置 /var/www下的所有文件的宿主都是 www-data,这样apache2就可以正常读写:\n\n\nchown -R www-data:www-data /var/www/test/*\n\n\n好了现在输入“你的域名”/tz.php,这里是xxx.co.cc,是不是配置成功了呢?\n\n","categories":["Technical"],"tags":["环境搭建","Ubuntu","Apache2","多域名"]},{"title":"LNMP环境WordPress出现No Input File Specified的解决方案","url":"/the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html","content":"\n前阵子一直用的是LAMP的平台,最近换成LNMP环境,wordpress出现这个问题,在进入后台后,添加新文章或者进行其他操作时提示,后台经常提示“No Input File Specified”,经过一番股勾摆渡终于找到了原因,原来是路径后面少了一个”/”引起的。可以修改LNMP配置的重写规则文件来解决这个问题,下面是解决方案:\n\n修改lnmp下的wordpress.conf配置location / {if (-f $request_filename/index.html){rewrite (.) $1/index.html break;}if (-f $request_filename/index.php){rewrite (.) $1/index.php;}if (!-f $request_filename){rewrite (.*) /index.php;}rewrite /wp-admin$ $scheme://$host$uri/ permanent;}\n","categories":["Technical"],"tags":["Linux","LAMP","IP"]},{"title":"Windows下的git工具msysGit","url":"/the-git-tools-msysgit-under-the-windows.html","content":"\n下载请移步百度或者谷歌搜索:msysGit,安装完成后配置如下\n\n需要的配置:\n1、C:\\Program Files\\Git\\etc\\git-completion.bash:alias ls='ls --show-control-chars --color=auto'说明:使得在 Git Bash 中输入 ls 命令,可以正常显示中文文件名。\n2、C:\\Program Files\\Git\\etc\\inputrc:set output-meta onset convert-meta off说明:使得在 Git Bash 中可以正常输入中文,比如中文的 commit log。\n3、C:\\Program Files\\Git\\etc\\profile:export LESSCHARSET=utf-8说明:$ git log 命令不像其它 vcs 一样,n 条 log 从头滚到底,它会恰当地停在第一页,按 space 键再往后翻页。这是通过将 log 送给 less 处理实现的。以上即是设置 less 的字符编码,使得 $ git log 可以正常显示中文。其实,它的值不一定要设置为 utf-8,比如 latin1 也可以……。还有个办法是 $ git –no-pager log,在选项里禁止分页,则无需设置上面的选项。\n4、C:\\Program Files\\Git\\etc\\gitconfig:[alias]go = "! bash -c &quot;git pull && git add .; if [ \\&quot;$*\\&quot; == \\&quot;\\&quot; ]; then git commit -a; else git commit -am \\&quot;$*\\&quot;; fi; git push origin master:your-id;&quot;"说明:强大的 alias,有了这个,我们 90% 的情况下只需要输入 $ git go 这一个命令,免去了先拉后提交再推的繁琐步骤。\n$ git go\n命令后带修订说明时,会直接提交。需要注意的是,在“修订说明”之前,有还个“aaa”,这是个 bug,参数中的第一个会被忽略,所以随便写一个凑数的……。\n若命令行里没有提供修订说明,则会自动弹出一个编辑器,等待输入。默认的编辑器是 Vim。Vim 的使用是很简单的,首先要明白它有两个模式,一个是命令模式、一个是输入模式。Vim 启动的时候默认的是命令模式,需要先按’i’键,进入输入模式;然后就正常编辑;编辑完成之后,将输入法切换回英文状态,按 Esc 重新进入命令模式;此时按 ‘(Shift):wq‘ 并回车,w 表示写入保存、q 表示退出。完毕!\n若实在不习惯 Vim,也可以设置为其它编辑器:\n$ git config --global core.editor "notepad"\n其中 notepad 可以替换为更好用的 wordpad、notepad++ 等(不过它们在命令行里无法直接访问,得先设置 PATH 变量)。\n以上 alias 是为 Windows 定制的,Linux 下可以写得更优雅,不过鉴于使用上没分别,就保持一致吧~。\n[gui]\nencoding = utf-8\n说明:我们的代码库是统一用的 utf-8,这样设置可以在 git gui 中正常显示代码中的中文。\n[i18n]\ncommitencoding = GB2312\n说明:如果没有这一条,虽然我们在本地用 $ git log 看自己的中文修订没问题,但,一、我们的 log 推到服务器后会变成乱码;二、别人在 Linux 下推的中文 log 我们 pull 过来之后看起来也是乱码。这是因为,我们的 commit log 会被先存放在项目的 .git/COMMIT_EDITMSG 文件中;在中文 Windows 里,新建文件用的是 GB2312 的编码;但是 Git 不知道,当成默认的 utf-8 的送出去了,所以就乱码了。有了这条之后,Git 会先将其转换成 utf-8,再发出去,于是就没问题了。\n不过仍然有 3 个问题:\n1、上面的 alias $ git go 有 bug,代码修订说明之前要输入一串字符凑数; \n2、$ git diff,如果代码里有中文,会显示乱码; \n3、$ git checkout 有时候需要修改/增删很多文件,如果某些文件被占用,会被 Windows 拒绝,导致失败,甚至可能造成版本库出现无法修复的问题。 \n具体操作可以参考《Windows 下 git 配置与使用》 执行。\n","categories":["Route"],"tags":["Windows","post-format-image"]},{"title":"简单配置PHP","url":"/the-simple-to-configure-php.html","content":"\n为了修改PHP的配置,我们需要编辑/etc/php5/apache2/php.ini文件,在改动之前,请先将该配置文件做个备份,以便在出错的时候可以恢复。\n\n修改成内存的大小限制:\n\nmemory_limit = 32M\n\n修改上传文件的大小限制:\n\nupload_max_filesize = 16M\n\ndl()函数支持(enable_dl):\n\nenable_dl = On\n\n设置数据反斜杠转义,自动字符串转义:\n\nmagic_quotes_gpc\nDefault Value: On\nDevelopment Value: Off\nProduction Value: Off\n\n\n\n\n报告内存泄漏(report_memleaks):\n\nreport_memleaks = On\n\n最后记得重启apache2服务器\n\n/etc/init.d/apache2 restart\n\n\n","categories":["Technical"],"tags":["PHP","配置"]},{"title":"Route设置脚本,实现国内网不经VPN","url":"/the-route-setup-script-realize-domestic-network-by-the-vpn.html","content":"\n      使用vpn拨入后,所有的网络请求默认经vpn通道,故vpn拨号后不需要设置任何参数就可以直接访问国际网。但是这个时候访问国内的网络也要走vpn,所以导致了国内的部分网站打开速度很慢。这个问题可以修改本机的路由表来解决。 步骤: 首先断开机器的vpn连接 1、新建一个route_vpn.bat文件,右键编辑,将下面的代码复制进去@echo off\nrem Create by wangheng\nipconfig /flushdns\nroute.exe add 114.196.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 114.208.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 114.224.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 115.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.28.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 115.32.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.44.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.48.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 115.84.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 115.84.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 115.85.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 115.100.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.104.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.120.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.124.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 115.148.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.152.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 115.168.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 115.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 115.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 115.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 116.1.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.2.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.8.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.13.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 116.52.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.56.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.58.128.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.58.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.66.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 116.69.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.70.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 116.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.89.144.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.90.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.90.184.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 116.95.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.116.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.128.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 116.192.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.193.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.193.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 116.194.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.196.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.198.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.199.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 116.199.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 116.204.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.207.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.208.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.212.160.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.213.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 116.213.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 116.214.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 116.214.64.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 116.214.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 116.215.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 116.216.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 116.242.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 116.248.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.252.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 116.254.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 116.255.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 117.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 117.21.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 117.22.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 117.24.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 117.32.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 117.40.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 117.44.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 117.48.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 117.53.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 117.53.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 117.57.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 117.58.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 117.59.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 117.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 117.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 117.72.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 117.74.64.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 117.74.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 117.75.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 117.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 117.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 117.100.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 117.103.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 117.103.128.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 117.106.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 117.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 117.120.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 117.120.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 117.121.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 117.121.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 117.121.192.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 117.122.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 117.124.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 117.128.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 118.24.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 118.64.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 118.66.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.67.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 118.72.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 118.80.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 118.84.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 118.88.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 118.88.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 118.88.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 118.89.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.91.240.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 118.102.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 118.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 118.120.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 118.124.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 118.126.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.132.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 118.144.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 118.178.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 118.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 118.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 118.212.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 118.224.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 118.228.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 118.230.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.239.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.242.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 118.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 118.248.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 119.0.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.2.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 119.2.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 119.3.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.8.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.10.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 119.15.136.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 119.16.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.18.192.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 119.18.208.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 119.18.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 119.19.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.20.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.27.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 119.27.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 119.27.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 119.28.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.30.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 119.31.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 119.32.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 119.40.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 119.40.64.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 119.40.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 119.41.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.42.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 119.42.136.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 119.42.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 119.44.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.48.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 119.57.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.58.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.59.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 119.60.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.62.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.63.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 119.75.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 119.78.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.80.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.84.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 119.108.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.112.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 119.128.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 119.144.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.148.160.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 119.161.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 119.162.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.164.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.176.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 119.232.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 119.235.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 119.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 119.253.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 119.254.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 120.0.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 120.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 120.30.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 120.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 120.48.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 120.52.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 120.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 120.72.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 120.72.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 120.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 120.80.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 120.88.8.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 120.90.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 120.92.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 120.94.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 120.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 120.136.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 120.137.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 120.192.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 121.0.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 121.4.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 121.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 121.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 121.32.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 121.40.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 121.46.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 121.48.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 121.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 121.52.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 121.52.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 121.52.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 121.55.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 121.56.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 121.58.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 121.58.144.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 121.59.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 121.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 121.68.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 121.76.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 121.79.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 121.89.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 121.100.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 121.101.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 121.192.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 121.201.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 121.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 121.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 121.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 121.255.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 122.0.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 122.0.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 122.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 122.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 122.48.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 122.49.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 122.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 122.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 122.96.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 122.102.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 122.102.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 122.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 122.119.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 122.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 122.144.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 122.152.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 122.156.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 122.192.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 122.198.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 122.200.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 122.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 122.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 122.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 122.248.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 123.0.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 123.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 123.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 123.49.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 123.52.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 123.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 123.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 123.96.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 123.98.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 123.99.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 123.100.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 123.101.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 123.103.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 123.108.128.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 123.108.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 123.112.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 123.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 123.136.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 123.137.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 123.138.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 123.144.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 123.160.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 123.176.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 123.177.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 123.178.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 123.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 123.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 123.196.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 123.199.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 123.206.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 123.232.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 123.242.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 123.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 123.249.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 123.253.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.6.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.14.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 124.16.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 124.20.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 124.28.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.29.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 124.31.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.40.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 1.12.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 1.24.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 1.45.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 1.48.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 1.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 1.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 1.68.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 1.116.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 1.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 1.184.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 1.188.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 1.192.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 1.202.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 1.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 110.6.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.16.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 110.40.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 110.48.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 110.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 110.52.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 110.64.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.72.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.75.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 110.76.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 110.76.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 110.77.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 110.80.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 110.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 110.94.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.96.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 110.152.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 110.156.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.165.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 110.166.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.172.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 110.173.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 110.173.32.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 110.173.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 110.173.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 110.176.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 110.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 110.228.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 110.232.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 110.236.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 110.240.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 111.0.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 111.66.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 111.67.192.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 111.68.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 111.72.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 111.85.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 111.91.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 111.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 111.116.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 111.119.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 111.119.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 111.120.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 111.124.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 111.126.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 111.128.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 111.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 111.170.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 111.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 111.176.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 111.186.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 111.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 111.208.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 111.221.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 111.222.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 111.223.240.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 111.223.248.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 111.224.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 111.235.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 111.235.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 112.0.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 112.64.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 112.73.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 112.74.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 112.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 112.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 112.109.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 112.111.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 112.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 112.116.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 112.122.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 112.124.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 112.128.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 112.132.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 112.192.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 112.224.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 113.0.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 113.8.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.11.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 113.12.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.16.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.18.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 113.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.31.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 113.44.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.48.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.52.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 113.54.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.56.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.58.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 113.59.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 113.62.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.64.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 113.128.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.130.96.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 113.130.112.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 113.132.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 113.194.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.200.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.202.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 113.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.208.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 113.208.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 113.209.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 113.212.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 113.213.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 113.214.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.218.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 113.220.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 113.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 113.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 113.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 114.28.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 114.54.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 114.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 114.64.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 114.68.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 114.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 114.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 114.104.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 114.110.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 114.110.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 114.110.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 114.111.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 114.111.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 114.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 114.132.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 114.135.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 114.138.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 114.141.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.40.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.42.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.47.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.64.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 124.66.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 124.67.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.68.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 124.72.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 124.88.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 124.108.8.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 124.108.40.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 124.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 124.126.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 124.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 124.147.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 124.151.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.156.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 124.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 124.192.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 124.196.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 124.220.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 124.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 124.240.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 124.240.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.242.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.243.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 124.248.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 124.249.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 124.250.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 124.254.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 125.31.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 125.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 125.58.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 125.61.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 125.62.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 125.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 125.96.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 125.98.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 125.104.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 125.112.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 125.169.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 125.171.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 125.208.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 125.210.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 125.213.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 125.214.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 125.215.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 125.216.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 125.254.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 134.196.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 159.226.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 161.207.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 162.105.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 166.111.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 167.139.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 168.160.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 175.0.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 175.16.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 175.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 175.30.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 175.42.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 175.44.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 175.46.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 175.48.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 175.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 175.102.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 175.106.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 175.146.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 175.148.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 175.152.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 175.160.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 175.178.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 175.184.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 175.185.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 175.186.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 175.188.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 180.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 180.84.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 180.86.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 180.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 180.94.56.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 180.94.96.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 180.95.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 180.96.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 180.129.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 180.130.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 180.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 180.148.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 180.149.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 180.150.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 180.152.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 180.160.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 180.178.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 180.184.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 180.188.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 180.189.148.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 180.200.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 180.201.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 180.202.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 180.208.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 180.210.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 180.212.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 180.222.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 180.223.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 180.233.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 180.233.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 180.235.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 182.16.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 182.18.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 182.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 182.48.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 182.49.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 182.50.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 182.50.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 182.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 182.54.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 182.61.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 182.80.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 182.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 182.92.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 182.96.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 182.128.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 182.144.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 182.157.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 182.160.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 182.174.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 182.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 182.236.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 182.238.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 182.239.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 182.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 182.254.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 183.0.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 183.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 183.81.180.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 183.84.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 183.91.128.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 183.91.144.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 183.92.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 183.128.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 183.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 183.168.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 183.170.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 183.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 183.182.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 183.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 183.192.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 192.83.122.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 192.83.169.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 192.124.154.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 192.188.170.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 198.17.7.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.0.110.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.0.176.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.4.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.4.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.8.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.10.64.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.14.88.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.14.235.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.14.236.0 mask 255.255.254.0 172.16.19.254 metric 5\nroute.exe add 202.14.238.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.20.120.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.22.248.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.38.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.38.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 202.38.128.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.38.136.0 mask 255.255.254.0 172.16.19.254 metric 5\nroute.exe add 202.38.138.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.38.140.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.38.144.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.38.149.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.38.150.0 mask 255.255.254.0 172.16.19.254 metric 5\nroute.exe add 202.38.152.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.38.156.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.38.158.0 mask 255.255.254.0 172.16.19.254 metric 5\nroute.exe add 202.38.160.0 mask 255.255.254.0 172.16.19.254 metric 5\nroute.exe add 202.38.164.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.38.168.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.38.176.0 mask 255.255.254.0 172.16.19.254 metric 5\nroute.exe add 202.38.184.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.38.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 202.41.152.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.41.240.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.43.76.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.43.144.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.46.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.46.224.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.60.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.63.248.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.69.4.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.69.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.70.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.74.8.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.75.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.85.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.90.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.90.224.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.90.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.91.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.91.128.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.91.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.91.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.92.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.92.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.93.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.93.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.94.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.95.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.95.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.96.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 202.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 202.120.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 202.122.0.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.122.32.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.122.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.122.112.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.122.128.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.123.96.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.124.24.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.125.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.127.0.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.127.12.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.127.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.127.40.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.127.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.127.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.127.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.127.160.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.127.192.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.127.208.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.127.216.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.127.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.130.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.130.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.131.16.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.131.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.131.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.136.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.136.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.136.224.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.136.252.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 202.141.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.142.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.143.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.148.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.149.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.149.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.150.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.152.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.153.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.158.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.160.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.164.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.164.25.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 202.165.96.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.165.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.165.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.168.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.170.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.170.216.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.173.8.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 202.173.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.179.240.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.180.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 202.181.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.189.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 202.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 203.18.50.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 203.78.48.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.79.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.80.144.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.81.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.83.56.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.86.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.86.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.88.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.88.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.89.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.90.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.90.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.90.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.91.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.91.96.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.91.120.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.92.0.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.92.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.93.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 203.94.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.95.0.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.95.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.99.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.99.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.100.32.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.100.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.100.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.100.192.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.110.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.114.244.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.118.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.118.248.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.119.24.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.119.32.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.119.80.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.128.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.128.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.128.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.130.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.132.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.134.240.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.135.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.135.160.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.142.219.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 203.148.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.152.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.156.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.158.16.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.161.180.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 203.161.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.166.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.171.224.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.174.7.0 mask 255.255.255.0 172.16.19.254 metric 5\nroute.exe add 203.174.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.175.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.175.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.176.168.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.184.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.187.160.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.190.96.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.191.16.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.191.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.191.144.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.192.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.196.0.0 mask 255.255.248.0 172.16.19.254 metric 5\nroute.exe add 203.207.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 203.207.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 203.208.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.208.16.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 203.208.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.209.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 203.212.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.212.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.222.192.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 203.223.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 210.2.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.5.0.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.5.128.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.12.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 210.14.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.14.112.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 210.14.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 210.15.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 210.15.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 210.16.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 210.21.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 210.22.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 210.23.32.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.25.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 210.26.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 210.28.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 210.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 210.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 210.52.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 210.56.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.72.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 210.76.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 210.78.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 210.79.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 210.79.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.82.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 210.87.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 210.185.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 210.192.96.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 210.211.0.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 221.208.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 221.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 222.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 222.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 222.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 222.125.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 222.126.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 222.128.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 222.160.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 222.168.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 222.176.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 222.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 222.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 222.248.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 223.2.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 223.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 223.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 223.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 223.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 223.64.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 223.128.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 223.160.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 223.166.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 223.202.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 223.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 27.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 27.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 27.36.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 27.40.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 27.50.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 27.54.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 27.98.208.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 27.98.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 27.100.36.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 27.103.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 27.106.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 27.112.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 27.112.80.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 27.113.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 27.115.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 27.128.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 211.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 211.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 211.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 211.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 211.144.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 211.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 218.0.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 218.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 218.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 218.96.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 218.104.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 218.108.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 218.185.192.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 218.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 218.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 218.249.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 219.72.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 219.82.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 219.128.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 219.216.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 219.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 219.242.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 219.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 220.101.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 220.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 220.152.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 220.154.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 220.160.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 220.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 220.231.0.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 220.231.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 220.232.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 220.234.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 220.242.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 220.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 220.252.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 221.0.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 221.8.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 221.12.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 221.12.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 221.13.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 221.14.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 221.122.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 221.129.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 221.130.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 221.133.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 221.136.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 221.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 221.176.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 221.192.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 221.196.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 221.198.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 221.199.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 221.199.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 221.199.192.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 221.199.224.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 221.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 27.131.220.0 mask 255.255.252.0 172.16.19.254 metric 5\nroute.exe add 27.144.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 27.148.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 27.152.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 27.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 27.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 27.224.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 58.14.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.16.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 58.24.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.30.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 58.66.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.68.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 58.82.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.87.64.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 58.99.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 58.100.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.116.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 58.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 58.144.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 58.154.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 58.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 58.240.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 59.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 59.64.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 59.80.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 59.107.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 59.108.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 59.151.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 59.155.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 59.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 59.191.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 59.191.240.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 59.192.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 60.0.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 60.55.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 60.63.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 60.160.0.0 mask 255.224.0.0 172.16.19.254 metric 5\nroute.exe add 60.194.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 60.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 60.208.0.0 mask 255.240.0.0 172.16.19.254 metric 5\nroute.exe add 60.232.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 60.235.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 60.245.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 60.247.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 60.252.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 60.253.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 60.255.0.0 mask 255.255.0.0 172.16.19.254 metric 5\nroute.exe add 61.4.64.0 mask 255.255.224.0 172.16.19.254 metric 5\nroute.exe add 61.4.176.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 61.8.160.0 mask 255.255.240.0 172.16.19.254 metric 5\nroute.exe add 61.28.0.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 61.29.128.0 mask 255.255.128.0 172.16.19.254 metric 5\nroute.exe add 61.45.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 61.47.128.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 61.48.0.0 mask 255.248.0.0 172.16.19.254 metric 5\nroute.exe add 61.87.192.0 mask 255.255.192.0 172.16.19.254 metric 5\nroute.exe add 61.128.0.0 mask 255.192.0.0 172.16.19.254 metric 5\nroute.exe add 61.232.0.0 mask 255.252.0.0 172.16.19.254 metric 5\nroute.exe add 61.236.0.0 mask 255.254.0.0 172.16.19.254 metric 5\nroute.exe add 61.240.0.0 mask 255.252.0.0 172.16.19.254 metric 5\necho All done! Enjoy~\npause\n\n2、将所有的172.16.19.254换成你原来的默认网关地址(vpn拨号前的默认网关),然后保存文件。\n\n3、现在连接上你的vpn,然后执行这个脚本文件,成功后就可以实现国内的网站不走VPN通道,国外的网站走VPN的效果。现在访问国内的网站是不是快了很多呢?\n\nTips:机器重启后路由表会重置,故重启后再次vpn拨号需要再次执行脚本文件。\n\n","categories":["Technical"],"tags":["VPN","FTP"]},{"title":"使用ScribeFire离线编写博客","url":"/to-use-scribefire-offline-writing-a-blog.html","content":"\n 以前都是通过windows live writer在写博客,在windows中使用确实很不错。最近转做web开发后,对windows的依赖也越来越小了,刚好回家可以在自己喜欢的linux环境中谢谢代码。没有了游戏的诱惑,感觉专注了不少。 linux系统中live writer肯定是没戏了,不想面对wordpress蛋疼的在线编辑工具,所以最近写博客的频率也有点低。还好最近发现了ScribeFire这款插件,支持多种博客类型,也有FireFox和Chrome的版本,强烈推荐大家使用! 用ScribFire写博客,最大的好处当然是速度的优势,不用每次都登录自己博客的后台。 以下以Firefox浏览器上使用为例 1、在附加组建搜索并安装ScribeFire,有两个版本classic 和next,classic我这里安上报错,next版本正常,懒得折腾,直接用了next版本,装好重启firefox; 2、在firefox工具选项卡找到Scribeire,点击后会出现一个编辑界面; 3、按照Wizard的提示创建一个帐号,如图; 4、输入博客地址,ScribeFire会自动选择API接口。 5、输入用户名和密码,完成帐户创建过程。 6、在主编辑界面撰写文章内容,左边栏选择文章的分类,以及文章的标签等,很方便。 7、点击右下角的发布,来发表文章到你的博客; 8、文章发表完成。 ScribeFire编辑器本身自带大量的功能,并且同样支持插入标签、文章归类等等操作,强烈推荐给各位博友使用。 FireFox的ScribFire下载:https://addons.mozilla.org/en-US/firefox/addon/1730/ Chrome的ScribFire下载:http://code.google.com/p/scribefire-chrome/downloads/detail?name=scribefire-0.1.0.0.crx&can=2&q=#makechanges  \n\n","categories":["Technical","Route"],"tags":["Linux","IP","blog","AutoProxy"]},{"title":"性能调优备忘","url":"/tuning-memo-reproduced.html","content":"\n\n\n当性能遇到问题时,如果能在应用层进行计算和处理,那就把它从数据库层拿出来。排序和分组就是典型的例子。在应用层做性能提升总是要比在数据库层容易的多。就像对于MySQL,sqlite更容易掌控。\n\n关于并行计算,如果能避免就尽量避免。如果无法避免,记住,能力越大,责任越大。如果有可能,尽量避免直接对线程操作。尽可能在更高的抽象层上操作。例 如,在iOS中,GCD,分发和队列操作是你的好朋友。人类的大脑没有被设计成用来分析那些无穷临时状态——这是我的惨痛教训所得。\n\n尽可能简化状态,尽可能局部本地化。适用至上。\n\n短小可组合的方法是你的好朋友。\n\n代码注释是危险的,因为它们很容易更新不及时或给人误导,但这不能成为不写注释的理由。不要注释鸡毛蒜皮的事情,但如果需要,在某些特殊地方,战略性的长篇注释是需要的。你的记忆会背叛你,也许会在明天早上,也许会在一杯咖啡后。\n\n如果你认为一个用例场景也许“不会有问题吧”,它也许就是一个月后让你在发布的产品中遭受惨痛失败的地方。做一个怀疑主义者,测试,验证。\n\n有疑问时,和团队中所有相关人交流。\n\n做正确的事情——你通常会知道这指的是什么。\n\n你的用户并不傻,他们只是没有耐心理解你的捷径。\n\n如果一个开发人员没有被安排长期的维护你们开发的系统,对他保持警惕。80%的血、汗、泪水都是在软件发布后的时间里流的——那时你会变成一个厌世者,但也是更聪明的“行家”。\n\n任务清单是你的好朋友。\n\n主动让你的工作更有乐趣,有时这需要你付出努力。\n\n悄无声息的崩溃,我仍然会为此从噩梦中惊醒。监控,日志,警报。清楚各种的假警报和不可避免的感觉钝化。保持你的系统对故障的敏感和及时警报。\n\n复杂是大敌。\n\n\n部分内容从自己以前记录的笔记中摘抄过来的,忘记从哪看到的了,找不到原始链接。如作者看到,请留言认领!\n\n","categories":["Technical"]},{"title":"Ubuntu 10.10 更新源总结","url":"/ubuntu-10-10-update-source.html","content":"\n1.首先备份你的sources 文件sudo cp /etc/apt/sources.list /etc/apt/sources.list.bksudo gedit /etc/apt/sources.list\n编辑你的源列表,将原来的内容全部删除,添加下面列表中最适合你的源(注意不要全部添加),选择一个最合适你的即可,复制到你的列表中,然后保存列表。\n\n2.使用sudo apt-get update 更新源列表信息可以在运行“sudo apt-get update ”时查看一下错误信息,把不能连接的源删除再重新运行“sudo apt-get update ”。\n3.使用sudo apt-get upgrade 升级或者用ubuntu自带的更新管理器升级也可\nUbuntu 10.10源列表:\n台湾源代码:deb http://tw.archive.ubuntu.com/ubuntu/ maverick main universe restricted multiversedeb-src http://tw.archive.ubuntu.com/ubuntu/ maverick main universe restricted multiversedeb http://tw.archive.ubuntu.com/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://tw.archive.ubuntu.com/ubuntu/ maverick-security universe main multiverse restricteddeb http://tw.archive.ubuntu.com/ubuntu/ maverick-updates universe main multiverse restricteddeb-src http://tw.archive.ubuntu.com/ubuntu/ maverick-updates universe main multiverse restricted\nSRT Sources代码:\ndeb http://ubuntu.srt.cn/ubuntu/ maverick main restricted universe multiversedeb http://ubuntu.srt.cn/ubuntu/ maverick-security main restricted universe multiversedeb http://ubuntu.srt.cn/ubuntu/ maverick-updates main restricted universe multiversedeb http://ubuntu.srt.cn/ubuntu/ maverick-proposed main restricted universe multiversedeb http://ubuntu.srt.cn/ubuntu/ maverick-backports main restricted universe multiversedeb-src http://ubuntu.srt.cn/ubuntu/ maverick main restricted universe multiversedeb-src http://ubuntu.srt.cn/ubuntu/ maverick-security main restricted universe multiversedeb-src http://ubuntu.srt.cn/ubuntu/ maverick-updates main restricted universe multiversedeb-src http://ubuntu.srt.cn/ubuntu/ maverick-proposed main restricted universe multiversedeb-src http://ubuntu.srt.cn/ubuntu/ maverick-backports main restricted universe multiverse\n网易 Ubuntu 10.10 源(速度很快)代码:\ndeb http://mirrors.163.com/ubuntu/ maverick main universe restricted multiversedeb-src http://mirrors.163.com/ubuntu/ maverick main universe restricted multiversedeb http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted\nubuntu 10.10 上海 源,提供 Kernel,Hiweed,ubuntu代码:\ndeb http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiversedeb-src http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiversedeb http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricted\n搜狐 Ubuntu 10.10 源代码:\ndeb http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiversedeb-src http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiversedeb http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricted\n骨头源,骨头源是bones7456架设的一个Ubuntu源 ,提供ubuntu,deepin代码:deb http://ubuntu.srt.cn/ubuntu/ maverick main universe restricted multiversedeb-src http://ubuntu.srt.cn/ubuntu/ maverick main universe restricted multiversedeb http://ubuntu.srt.cn/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://ubuntu.srt.cn/ubuntu/ maverick-security universe main multiverse restricteddeb http://ubuntu.srt.cn/ubuntu/ maverick-updates universe main multiverse restricteddeb http://ubuntu.srt.cn/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://ubuntu.srt.cn/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://ubuntu.srt.cn/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://ubuntu.srt.cn/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://ubuntu.srt.cn/ubuntu/ maverick-updates universe main multiverse restricted\nlupaworld 源,提供 ArchLinux,Everest,FreeBSD,Fedora,LFS,Magiclinux,Mandriva,OpenOffice,openSUSE,Puppy,Red Hat,Slitaz,Turbolinux,Ubuntu,中标普华\n代码:\ndeb http://mirror.lupaworld.com/ubuntu/ maverick main universe restricted multiversedeb-src http://mirror.lupaworld.com/ubuntu/ maverick main universe restricted multiversedeb http://mirror.lupaworld.com/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirror.lupaworld.com/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirror.lupaworld.com/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirror.lupaworld.com/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirror.lupaworld.com/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirror.lupaworld.com/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirror.lupaworld.com/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirror.lupaworld.com/ubuntu/ maverick-updates universe main multiverse restricted\nrootguide源,ubuntu官方上海源,提供 Kernel,Hiweed,ubuntu\n代码:deb http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiversedeb-src http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiversedeb http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricted\n网易开源镜像站,提供FreeBSD,OpenBSD,archlinux,centos,cygwin,debian,fedora,gentoo,kernel,openSUSE,slackware,ubuntu\n代码:deb http://mirrors.163.com/ubuntu/ maverick main universe restricted multiversedeb-src http://mirrors.163.com/ubuntu/ maverick main universe restricted multiversedeb http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted\n搜 狐开源镜像站,提供 CPAN,FreeBSD,NetBSD,OpenBSD,apache,archlinux,centos,cygwin,dag,debian,fedora,gentoo,kernel,lfs,mysql,nginx,openSUSE,php,rpmfusion,slackware,ubuntu\n代码:\ndeb http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiversedeb-src http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiversedeb http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricteddeb http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricteddeb http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricteddeb http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricteddeb-src http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricted\n\n \n\n","categories":["Technical"],"tags":["Ubuntu","10.1","更新源","source"]},{"title":"ubuntu 12.04更新源","url":"/ubuntu-12-04-source-list.html","content":"\n1、首先备份Ubuntu 11.10源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)2、修改更新源 sudo gedit /etc/apt/sources.list\n#台湾源\ndeb http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse \ndeb-src http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse \ndeb http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted \ndeb-src http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted \ndeb http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted \ndeb-src http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted\n#网易源(速度很快)deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse \ndeb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse \ndeb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted \ndeb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted \ndeb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted \ndeb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted \ndeb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted \ndeb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted \ndeb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted \ndeb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted\n#电子科技大学\ndeb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse \ndeb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse \ndeb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse \ndeb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse \ndeb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse \ndeb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse \ndeb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse \ndeb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse \ndeb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse \ndeb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse\n#北京理工大学(真羡慕刘毅同学)\ndeb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe \ndeb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe \ndeb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe \ndeb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe \ndeb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe \ndeb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe \ndeb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe \ndeb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe \ndeb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe \ndeb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe3、保存后就是sudo apt-get update\nsudo apt-get upgrade\n经过6个月的开发周期,ubuntu 12.04 LTS (Precise Pangolin)终于发布了,这个版本是一个长期支持版本。官方正式版下载地址公布: http://releases.ubuntu.com/precise/ 完成同步的国内镜像站点(已经可以下载正式版本): 中科大地址(同步完毕,可下载):http://mirrors.ustc.edu.cn/ubuntu-releases/12.04/ 顺便提一下,其实unity用习惯了还是不错的\n\n","categories":["linux"],"tags":["Ubuntu","更新源"]},{"title":"ubuntu 安装配置denyhosts","url":"/ubuntu-14-04-install-configure-denyhosts.html","content":"\nDenyHosts是使用Python语言写的一个程序,它会分析sshd的日志文件(/var/log/auth.log*),当发现大量重复的攻击时会记录IP到/etc/hosts.deny文件,从而达到自动屏攻击者IP的功能。\n\n目前官网最新版本是2.10,记得以前的ubuntu版本(<=12.04LTS)中好像直接apt-get install denyhosts 就可以了,在最新的发行版不知为何不见了。\n安装\n你可以前往官网http://sourceforge.net/projects/denyhost/ 选择一个你喜欢的版本下载,或者直接运行下面的命令下载。\ncd /tmp/ && wget http://jaist.dl.sourceforge.net/project/denyhost/denyhost-2.10/denyhosts-2.10.tar.gz\n#解压\ntar xzvf denyhosts-2.10.tar.gz\n#切换到目录\ncd denyhosts\n#安装\nsudo python setup.py install\n\n配置\n经过上面这几步,基本已经完成了denyhosts 的安装,下面我们还需要进行一些配置。\n#复制daemon文件到init.d 目录\nsudo cp /usr/local/bin/daemon-control-dist /etc/init.d/denyhosts\nsudo vim /etc/init.d/denyhosts\n#A:将打开的文件里面的DENYHOSTS_BIN 修改为你自己denyhosts的目录,一般应该是/usr/local/bin/denyhosts.py\n#B:或者是建立一个软连接\nln -s /usr/local/bin/denyhosts.py /usr/sbin/denyhosts\n\n#注意:A或者B只需要执行一个就行了!</span></span>现在denyhosts 就已经安装配置好了,我们可以先把我们自己的IP加到系统的白名单里面#编辑白名单\n\nsudo vim /etc/hosts.allow \n#按下面的样例添加你的IP\n/etc/hosts.allow: list of hosts that are allowed to access the system.See the manual pages hosts_access(5) and hosts_options(5).Example: ALL: LOCAL @wangheng.orgALL: .wangheng.org EXCEPT terminalserver.wangheng.orgIf you’re going to protect the portmapper use the name “rpcbind” for thedaemon name. See rpcbind(8) and rpc.mountd(8) for further information. sshd: 123.123.123.123编辑保存后,我们需要重启一下服务:sudo /etc/init.d/denyhosts restart\n","categories":["linux"],"tags":["Ubuntu","Linux","快盘","tr"]},{"title":"ubuntu中安装air video server","url":"/ubuntu-install-air-video-server.html","content":"\nAirVideo 是IOS上很好用的一个媒体播放器。可以由局域网内的电脑完成实时转码,不用再做任何转换操作,就可以让你通过无线网络在iphone和ipad观看存在电脑上的视频,而不需要把视频拷贝过来。\n\n官方提供了MAC和Windows下的服务端程序,但因为服务端是基于FFmpeg和Java的,都是开源项目,所以也可以通过自行编译的方式,在Linux下安装服务端。前段日子自己组装了一台htpc,但要通过 iPad看里面的电影颇为麻烦。今天刚好看到有一份教程,简单的几个APT命令就可以完成安装了,具体步骤如下:\n1.打开终端\n2.安装python-software-properties\nsudo apt-get install python-software-properties\n\n3.添加AirVideo的源\nsudo add-apt-repository ppa:rubiojr/airvideo\n\n4.更新包的索引\nsudo apt-get update\n\n5.安装AirVideo Server\nsudo apt-get install airvideo-server\n\n6.编辑所要添加的媒体文件夹配置文件\nsudo nano /opt/airvideo-server/AirVideoServerLinux.properties\n\n7.编辑完成后,启动服务器\nsudo airvideo-server\n\n参阅:http://inmethod.com/air-video/index.html http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux http://www.inmethod.com/forum/posts/list/1856.page https://launchpad.net/~rubiojr/+archive/airvideo\n\n","categories":["Technical"],"tags":["Ubuntu","流媒体","thinkphp"]},{"title":"Ubuntu下添加开机启动脚本","url":"/ubuntu-to-add-boot-script.html","content":"\n1、方法一,编辑rc.loacl脚本 \n\nUbuntu开机之后会执行/etc/rc.local文件中的脚本,\n所以我们可以直接在/etc/rc.local中添加启动脚本。\n当然要添加到语句:exit 0 前面才行。\n如:\nsudo vi /etc/rc.local\n然后在 exit 0 前面添加好脚本代码。\n 2、方法二,添加一个Ubuntu的开机启动服务。\n如果要添加为开机启动执行的脚本文件,\n可先将脚本复制或者软连接到/etc/init.d/目录下,\n然后用:update-rc.d xxx defaults NN命令(NN为启动顺序),\n将脚本添加到初始化执行的队列中去。\n注意如果脚本需要用到网络,则NN需设置一个比较大的数字,如99。\n1) 将你的启动脚本复制到 /etc/init.d目录下 以下假设你的脚本文件名为 test。2) 设置脚本文件的权限 $ sudo chmod 755 /etc/init.d/test3) 执行如下命令将脚本放到启动脚本中去: $ cd /etc/init.d $ sudo update-rc.d test defaults 95 注:其中数字95是脚本启动的顺序号,按照自己的需要相应修改即可。在你有多个启动脚本,而它们之间又有先后启动的依赖关系时你就知道这个数字的具体作用了。该命令的输出信息参考如下:update-rc.d: warning: /etc/init.d/test missing LSB information\nupdate-rc.d: see <http://wiki.debian.org/LSBInitScripts>\n Adding system startup for /etc/init.d/test ...\n /etc/rc0.d/K95test -> ../init.d/test\n /etc/rc1.d/K95test -> ../init.d/test\n /etc/rc6.d/K95test -> ../init.d/test\n /etc/rc2.d/S95test -> ../init.d/test\n /etc/rc3.d/S95test -> ../init.d/test\n /etc/rc4.d/S95test -> ../init.d/test\n /etc/rc5.d/S95test -> ../init.d/test卸载启动脚本的方法: $ cd /etc/init.d$ sudo update-rc.d -f test remove命令输出的信息参考如下:Removing any system startup links for /etc/init.d/test ...\n /etc/rc0.d/K95test\n /etc/rc1.d/K95test\n /etc/rc2.d/S95test\n /etc/rc3.d/S95test\n /etc/rc4.d/S95test\n /etc/rc5.d/S95test\n /etc/rc6.d/K95test\n\n","categories":["linux"]},{"title":"ubuntu搭建LAMP环境","url":"/ubuntu-install-lamp.html","content":"\n首先安装apache2服务,在终端中使用命令:\nsudo apt-get install apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql\n如果希望开启Apache2 伪静态 rewrite 支持,输入如下命令安装\nsudo a2enmod rewrite\n安装mysql-server\nsudo apt-get install mysql-server\n安装php环境\n执行如下命令安装apache2的php5扩展和php的mysql扩展\napt-get install libapache2-mod-php5 php5-gd php5-mysql php5-curl\n安装数据库管理工具,使用命令:\nsudo apt-get install phpmyadmin\n重新启动apache2, 输入命令:\n/etc/init.d/apache2 start\n安装 php 探针\ncd /var/www #如果没有此目录可以手动创建 mkdir /var/www\nwget http://wangheng.org/tools/tz.zip\nunzip tz.zip\n执行完重启apache2后,浏览器查看http://localhost/tz.php正常打开说明环境搭建成功了,并且可以通过此页面查看服务器的一些状态\n\n","categories":["Technical"],"tags":["环境搭建","Ubuntu","LAMP"]},{"title":"Ubuntu下的 VPN 连接","url":"/ubuntu-vpn-connection.html","content":"\nubuntu的桌面版中,以前使用系统自带的网络管理工具总是连不上VPN , 最近自己试着搭一个VPN,发现可以用命令行连接上VPN。 命令很简单: \napt-get install pptpd\napt-get install pptp-linux\n\n然后执行:\n\nsudo pptpsetup –create test –encrypt –server HOST_NAME –username USER_NAME –password PSW –start\n\n 注:\n –create是创建的连接名称 \n –server是vpn的ip地址; \n –username是用户名 \n –password是密码,也可以没这个参数,命令稍后会自动询问。这样可以保证账号安全 \n –encrypt 是表示需要加密,不必指定加密方式,命令会读取配置文件中的加密方式 \n –start是表示创建连接完后马上连接 \n (如果不写这个–start参数要连接刚才定义好的vpn只能用 sudo pon lsavpn,断开用sudo poff) \n \n\n","categories":["Technical"],"tags":["Ubuntu","VPN"]},{"title":"Windows下安装PHP Pear","url":"/under-windows-install-php-pear.html","content":"\nPEAR简介 PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR之于PHP就像是CPAN(Comprehensive Perl Archive Network)之于Perl。 PEAR的基本目标是发展成为PHP扩展和库代码的知识库,而这个项目最有雄心的目标则是试图定义一种标准,这种标准将帮助开发者编写可移植、可重用的代码。 在WAMP集成环境中安装PEAR 1、首先下载一个go-pear.phar文件。 点击这里下载~ 2、进入到php的运行目录安装 我这里使用了一个wamp的集成开发环境,版本是wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b,我本地的安装路径是C:\\wamp\\bin\\php\\php5.4.3> 执行如下的命令: php.exe -d phar.require_hash=0 go-pear.phar 到这一步可以修改PEAR安装的$prefix路径,我选择了默认,一路回车进行安装。 3、修改include_path选项 最后PEAR默认扩展包安装后,提示是否需要配置php.ini文件中的include_path选项指向pear的安装目录 当然需要配置,否则无法使用,Y并回车,安装包会自动修改include_path选项。提示我们环境变量没有设置,所以下面我们还需要设置一下系统的环境变量。 新建一个环境变量名,如下图 然后在PATH变量中加入%php_home%就完成啦~。 PEAR常用命令 在命令行方式下,运用PEAR的相关命令可以安装自己需要的PEAR安装包。 pear help  列出pear的所有命令,类似于pear的命令帮助命令。 pear help <command>  列出某个pear命令的具体信息 pear help shortcuts  列出所有pear命令的简写\n\n","categories":["Technical"],"tags":["Windows","PHP","Apache"]},{"title":"北京联通DNS劫持!","url":"/unicom-dns-hijacking.html","content":"\n2011年8月31日凌晨上网时候访问自己的域名,发现被联通劫持到了http://202.106.33.158/DNS/这个页面!连续试了几次都是如此,太过分了!如截图所示\n\n\n\n截图为证\n","categories":["Technical"],"tags":["DNS","劫持","联通"]},{"title":"使用apt-get 安装NVIDIA官方驱动","url":"/use-apt-get-installation-official-nvidia-drivers.html","content":"\n1. 首先需要添加apt-get源:\n\n\nsudo add-apt-repository ppa:ubuntu-x-swat/x-update\n\n\n\n在线安装驱动命令:\nsudo apt-get update\nsudo apt-get install nvidia-current nvidia-current-modaliases nvidia-settings\n\n添加cuda和openCL库的支持(可选):\n\n\nsudo apt-get install nvidia-current-dev\n\n\n","categories":["linux"],"tags":["Ubuntu","NVIDIA","apt-get","官方驱动"]},{"title":"C#使用委托与多线程,解决界面假死","url":"/use-multiple-threads-resolve-interface-feign-death.html","content":"\n.NET Framework 为我们提供了一个处理控件闪烁的方案-双缓冲,我们可以直接调用它。\n 首先自己封装一个Windows组件 MyListView.cs,并让它继承自Listview。\n 在控件中添加打开双缓冲的代码如下:\npublic MyListView()\n{\n// 打开控件的双缓冲\nSetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);\n}\n\n 使用我们封装的MyListview 实例化一个对象,命名为ImageListView, 执行下面的方法来实现异步数据加载\nprivate void button1_Click(object sender, EventArgs e)\n{\n Thread ImageThread = new Thread((ThreadStart)(delegate()\n {\n for (int i = 0; i","categories":["Technical"],"tags":["C#","委托","多线程","界面假死"]},{"title":"使用vimwiki组建个人wiki","url":"/use-vimwiki-set-up-a-personal-wiki.html","content":"\n为什么用vimwiki?\n博客平台可以记录自己学习的总结,适合较多的知识积累才能写出一篇较好的博文。但是平时学到用到的很多零碎的小知识点却常常不知道该放在哪里。而且博客的组织结构也不能很好的把一些相关知识点总结在一起,种种原因吧。还好遇到了vimwiki这款插件,从此后便一发不可收拾的喜欢上了在vim中写自己的个人wiki。\n\n维基语法的作用有三点。\n\n使条目更规范。通过一定转换,wiki 能输出为拥有约定俗成格式的HTML;\n\n节约编辑时间。 显然,你不用写出完整的HTML标签,也不用在可视化编辑器中点来点去;\n\n充分的可读性。使用维基语法书写的文档,即使未被转为HTML,内容的语义也是一目了然,甚至表格也能清晰地阅读。\n\n\n\n\n安装\nvimwiki的安装可以参考这里。\n开始使用 vimwiki\n使用快捷键 <leader>ww 开始编辑您的第一个 vimwiki 吧! 首次使用 vimwiki 时, 它默认会在操作系统用户目录(即 ~/ )建立一个 vimwiki 文件夹,保存所有你的 wiki 条目。如果你调用 :!Vimwiki2HTML 命令把 wiki 条目转为 html 页面,它会创建一个名为 vimwiki_html 的文件夹保存所有生成的 html 文件。\n进阶技巧这里记录了一些vimwiki中用的比较多的命令和小技巧。\n为vimwiki添加语法高亮\n为vimwiki实现语法高亮可以参考vimwiki语法高亮。\n\n","categories":["Technical"],"tags":["vim","vim插件","部署"]},{"title":"使用Vim和Viki来写文章","url":"/vim-and-viki-to-write-articles.html","content":"\n已经改用vim中的vimwiki插件来实现!具体请参考使用vimwiki组建个人wiki和分享个人wiki部署脚本!\n\nViKi,就是 VIM WiKi 的缩写。WiKi 是一种非常方便快捷地组织信息的方式,而 ViKi也可以作为个人的Wiki管理工具。利用deplate来编译vim中写好的viki文件,可以快速的依据你自己的模板来生成带样式的html文件。这里是利用viki创建出来的测试html,效果还是很不错的,至少我很喜欢这种简约的风格。另外,我还写了bat脚本来配合自动部署html到web,所以我要得到一个viki页面流程很简单:\n1、gvim mypage.viki\n2、viki.bat mypage.viki\n这样在web就得到了刚刚写好的viki页面,很方便不是。\n安装配置viki\n因为需要deplate来编译写好的viki文件,所以首先需要配置好deplate。可以从这里下载,将解压出来的deplate.exe文件放到Windows目录,然后在你的工作目录建立一个html的模板文件。我使用的模板和css文件可以从这里下载。(请自行替换css文件地址)\nvim中的viki插件可以从官网搜索下载,安上后gvim 针对ViKi 提供了许多键绑定,编写工作会变得非常简单。现在假设你安装好了所有的插件和工具,建立test.viki文件并使用vim编辑,输入如下内容:\n\n\n#TITLE: Viki 测试\n\n一级标题测试\n\n二级标题测试\n\n\n** 三级标题测试正文内容。\n\nViki你好!今天是六月九号,用viki写文章真方便!\n使用命令生成html到当前目录的html文件夹:\ndeplate test.viki -m utf8 -m code-vim73 -t .\\template\\bright.html -d html\n现在打开你的test.html,是不是跟这个 一样呢?\n当然功能远远不止这些,鉴于我也是刚尝试,并且只是用它来记一些简单的文字,有空会在去慢慢摸索啦~\n","categories":["Technical","Route"],"tags":["vim","工具","deplate","mysql"]},{"title":"vim复制粘贴格式错乱","url":"/vim-copy-and-paste-format-disorder.html","content":"\n\n\n使用vim的过程中,用SSH打开的终端中复制代码,常常出现格式错乱的情况,解决办法如下:\n运行如下命令,进入 paste 模式:\n:set paste\n进入 paste 模式后,按 i 键进入插入模式,然后再Shift+Ins进行粘贴,文本格式就不会错乱了。\n粘帖完成后想结束 paste 模式可以执行:\n:set nopaste\n\n\n","categories":["最近添加"]},{"title":"使用SSH实现iPhone自动代理","url":"/using-ssh-for-the-iphone-automatic-proxy.html","content":"\n对于绝大部分国内网站,正常上网,对于twitter等,自动走SSH代理,无需手工切换,这即是所谓的“自动翻墙”,好处就是不影响国内网站的访问速度,不用来回切换网络。\n\nIOS中最方便的翻墙方式是使用VPN,速度尚可,但PPTP和L2TP是不能像OpenVPN一样定义路由的,打开VPN后,所有流量均走VPN线路,浏览国内网站很慢,需要来回切换。windows下可以用脚本定义静态路由,使用Route设置脚本,实现国内网不经VPN搞定,但IOS下在cydia找了半天也没找到iptable这个命令包,所以还是用ssh吧。下面是具体使用方法:\n1、越狱,并配置好ios的环境\n如何越狱就不用我说了吧,随便一搜网上一大堆,越狱后如果你不知道如何ssh连接到你的ios设备可以参考我以前的一篇文章:为ipad2安装和配置gcc编译环境,当然这里没必要安装gcc环境,所以进行到第二步就OK了。\n2、安装一些必须的软件包\n如果你确定第一步你已经没有问题了,我们下面要继续安装一些必须的软件包。ssh连接到你的iPhone或者iPad后执行下面的命令:\nsudo -i \napt-get install screen然后你的ios设备上面将会安装好screen这个软件包,不知道screen是什么的同学可以参考这里。\n执行下面的命令:\nscreen –S autossh \nssh -D 1987 [用户名]@[ip地址] \n#如果你自定义了ssh的端口号,记得使用-p 加你的端口号,如下: \nssh -D 1987 –p [端口号] [用户名]@[ip地址]3、配置PAC,用来实现自动切换。\n可以使用我的pac文件,http://wangheng.org/tools/autossh.pac。在iPhone的设置->WIFI->HTTP代理->自动->URL 里把它填上就可以了。内容不多,如下:\nfunction FindProxyForURL(url,host)\n{\nurl = url.toLowerCase();\nif(\nshExpMatch(url, “*facebook.com*”) ||\nshExpMatch(url, “*googlecode.com*”) ||\nshExpMatch(url, “*twitter.com*”) ||\nshExpMatch(url, “*youtube.com*”) ||\nshExpMatch(url, “*wordpress.com*”) ||\nshExpMatch(url, “*appspot.com*”) ||\nshExpMatch(url, “*.google.com*”)\n)\n{\nreturn “SOCKS 127.0.0.1:1987″;\n}\nreturn “DIRECT”;\n}\nreturn “DIRECT”;\n}\n好了,大功告成,享受你的无国界自由网络吧~\n","categories":["Technical"],"tags":["ssh","iPad2","Proxy","iPhone","Pear"]},{"title":"wamp配置多域名虚拟目录","url":"/wamp-to-configure-a-multi-domain-virtual-directory.html","content":"\n      安装完成wamp后默认的www目录是在我本地的C:\\wamp\\www,这个目录下我放了一些自己测试php写的一些小例子。但是我工作的项目都是在其他的D盘、E盘,反复的设置apache的DocumentRoot 路径实在不是一个好的解决方案。当然这点小问题还是很好解决的,跟VPS中设置多域名类似,使用Apache的虚拟主机扩展Vhost可以轻松解决这个问题。 现在先来配置虚拟主机: 1、首先打开apache的配置文件httpd.conf 我这里是C:\\wamp\\bin\\apache\\apache2.2.22\\conf\\httpd.conf,打开后去掉#Include conf/extra/httpd-vhosts.conf前面的#注释标记。 2、打开配置文件httpd-vhosts.conf 我这里的文件路径是C:\\wamp\\bin\\apache\\apache2.2.22\\conf\\extra\\httpd-vhosts.conf 。在httpd-vhosts.conf文件的末尾添加上:   <VirtualHost *:8080>          DocumentRoot 你的项目所在的路径 #例如E:\\src\\myproject\\web         ServerName d.com  #取一个自己容易记忆的名字我使用的是d.com         <Directory "你的项目所在的路径">             Options Indexes FollowSymLinks             AllowOverride None             Order allow,deny             Allow from all         </Directory>   </VirtualHost> 但是使用Vhost配置后,localhost访问则出现了问题,所以需要同样为localhost配置成一个虚拟主机目录,如下: <VirtualHost *:8080> DocumentRoot c:/wamp/www ServerName localhost <Directory "c:/wamp/www"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> 红色部分需要自己手动修改成你对于的目录,我这里设置的Apache的监听端口是8080,修改时请改为你自己的端口号。修改后,如图所示: 3、设置系统hosts文件 打开在C:/WINDOWS/system32/drivers/etc中的hosts文件中加上如下的内容     127.0.0.1    d.com 完成上面的步骤后,这样我们就配置好了我们的虚拟主机,重启一下Apache服务。 在浏览器输入http://localhost:8080 访问到的是c:/wamp/www目录下的内容了! 同样输入http://d.com:8080 访问到的是你自定义的E盘的那个路径,是不是很方便~\n\n","categories":["Technical","Route"],"tags":["多域名","WAMP","虚拟主机","wiki"]},{"title":"为Vim 添加vimgdb支持","url":"/wei-vim-tian-jia-vimgdb-zhi-chi.html","content":"\n1、    下载最新的vim74的源码包\nwget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2\n2、下载vimgdb-for-vim7.4源码\nwget https://github.com/larrupingpig/vimgdb-for-vim7.4/archive/master.zip -O vimgdb-for-vim74.zip\n3、解压所有文件,并应用补丁文件\n tar xjvf vim-7.4.tar.bz2 -C /tmp\n    unzip vimgdb-for-vim74.zip -d /tmp\n    cd /tmp\n    patch -p0 < vimgdb-for-vim7.4-master/vim74.patch\n    cd vim74/src\n    ./configure --enable-gdb --prefix=/usr/local/vim74 \\\n                --enable-multibyte \\\n                --enable-fontset \\\n                --enable-xim  \\\n                --enable-gui=auto \\\n                --enable-pythoninterp=dynamic \\\n                --enable-pythoninterp \\\n                --enable-python3interp=dynamic \\\n                --enable-rubyinterp=dynamic \\\n                --enable-rubyinterp \\\n                --enable-perlinterp \\\n                --enable-cscope \\\n                --enable-sniff \\\n                --with-x  \\\n                --with-compiledby=erocpil  \\\n                --with-features=huge \\\n                --enable-luainterp=dynamic  \\\n                --with-python-config-dir=/usr/lib/python2.7/config\n    make\n    sudo make install\n4、安装vimGdb运行文件:\n\n将解压缩出来的vimgdb_runtime文件夹中的文件复制到你的$VIMRUNTIME目录,通常是$HOME/.vim 目录。如果你不确定你本机的具体目录可以在打开的vim中执行:set runtimepath?来查看你自己机器环境中的具体目录。\ncp -rf /tmp/vimgdb-for-vim7.4-master/vimgdb_runtime/* ~/.vim\n切换到cd ~/.vim/doc/目录并执行 “:helptags .” 命令来在vim中创建帮助文档。cd ~/.vim/doc/vim:helptags .以后想查看关于vimgdb的使用说明可以在vim中执行”:help vimgdb” 命令来获取帮助。\n具体的使用方法以及可选配置,在官方帮助文档里面已经详细的介绍,请不了解的同学自行查阅,这里就不冗述了。\n","categories":["最近添加"]},{"title":"win7修改网卡MAC地址","url":"/win7-modify-the-network-card-mac-address.html","content":"\nWin7操作系统下修改MAC时不能随机生成MAC地址,修改时要注意如下规则:\n从左往右第二个字符必须为2、6、A、E其中之一,\n例如:\n02:00:00:00:00:00 —— 有效\n06:00:00:00:00:00 —— 有效\n0A:00:00:00:00:00 —— 有效\n0E:00:00:00:00:00 —— 有效\n\n至于用来修改的软件很多,例如:\nMac MakeUp (Mac makeup可以改外置usb网卡)。\n下载地址:http://www.gorlani.com/portal/projects/mac-makeup-the-original\n使用方法:\n\n选择需要修改的网卡,带无线网卡的电脑一般会有两个网卡,在这里选择你连接网络的那块网卡。可以在系统托盘的网络连接状态里看到你目前所使用的网卡名称。\n\n新 MAC 地址,用 10 来随机生产。4 可选择网卡生产商,就是说你可以把你的 Intel 的网卡伪装成 3com 的。\n\nChange,即可生效\n\n\nPS:公司网络各种限制各种监控,被监控的感觉很不爽,真想天天挂着代理或者联着自己的VPN上网~\n\n","categories":["Route"],"tags":["Windows","Win7"]},{"title":"windows下用pear安装symfony","url":"/windows-with-pear-install-symfony.html","content":"\n介绍\n\nSymfony是一个基于MVC模式的面向对象的PHP5框架。Symfony允许在一个web应用中分离事务控制,服务逻辑和表示层。同时,它还包含了很多工具和类用以缩短开发复杂的网络应用的时间。\n安装准备\n首先需要你在windows中安装好pear,没有安装的同学可以参考一下Windows下安装Pear。成功安装好pear并配置好环境变量后,就可以使用pear安装symfony了。\n开始安装\n首先确定你要使用的symfony的版本,下面依次介绍1.4版本和2.0版本的安装\n1、安装1.4版本的symfony\n按照symfony官方文档执行安装命令即可,依次执行:\npear upgrade PEAR\npear channel-discover pear.symfony-project.com\npear install symfony/symfony\npear install http://phing.info/pear/phing-current.tgz\n最后 symfony -V 确认一下版本\n\n\n2、安装2.0版本的symfony2\n注册channel执行:\npear channel-discover pear.symfony.com\n查看可用的包,执行:\npear remote-list -c symfony2\n安装包:\npear install symfony2/package_name不需要两个版本都安装,请根据你实际的项目需要自行选择1或者2安装~\n\n","categories":["Technical","Route"],"tags":["Windows","Apache","苦逼生活"]}] \ No newline at end of file diff --git a/search.xml b/search.xml new file mode 100644 index 00000000..c0e87609 --- /dev/null +++ b/search.xml @@ -0,0 +1,5643 @@ + + + + apple keyboard helper苹果键盘tools + /apple-keyboard-the-helper.html + +

         前一阵终于忍受不了iPad2上面的虚拟键盘,为了发博码字的方便,入手了apple的蓝牙键盘,清脆的手感非常不错。虽然苹果键盘一直以来都是与Mac搭配使用的,但是apple键盘简洁精美的做工也深受许多玩家的喜爱。加上蓝牙键盘既可以用在pc上又可以用在ios设备上,相信拥有apple keboard的玩家也不在少数。但是apple的键盘用在普通PC上的时候,发现很多功能键都不能用,甚至连del键都没有,多少带来了一些不便。最近发现了一款小工具apple keyboard helper,安装 Apple Keyboard Helper之后,苹果键盘的F3(屏幕截图)F4(任务管理器)F7-F9(iTunes控制)F10-12(系统音量控制)等按键就可以在Windows PC上使用了。

      下载地址如下:apple keyboard helper

      同时作者还将源码开放了,有兴趣的同学不妨看一下 :)

      +
      +]]> + + Route + + + Apple + +
      + + 博客服务器系统升级 + /blog-server-system-upgrade.html + +由于前两天博客所在的VPS机房搬迁,加之工作太忙无精力再去弄一个备份服务器,导致了博客连续两天都无法访问。近日拜访的朋友实在是抱歉了~~ + +

      刚好之前也是一直懒得升级服务器的系统版本,旧的系统(ubuntu 11.04) 已经不被支持了,所以今天升级到了最新的 LTS 版本。还好各种数据都有备份,升级过程很顺利,各种工具安装配置基本都很快弄好了。自己试了几次,访问速度还可以~~ 嘿嘿

      +

      很快就要新年了,希望各位朋友继续多多支持~~

      +

      提前祝各位新年快乐,工作顺利,学业有成~~

      +]]>
      + + 最近添加 + +
      + + C#利用反射给对象赋值 + /c-li-yong-fan-she-gei-dui-xiang-fu-zhi.html + +我们如果想利用凡是给一个对象属性赋值可以通过PropertyInfo.SetValue()方式进行赋值,但要注意值的类型要与属性保持一致,例如: + +

      var property = obj.GetType().GetProperty(“PropertyName”);//此时可以使用GetProperty获取属性数组,循环进行赋值。

      +

      该属性类型是已知基本类型可以直接将变量传入, 例如:string

      +

      var value=”wangheng.org”;

      +

      property.SetValue(obj,value,null);

      +

      这里需要注意value值的类型必须和属性类型一致,否则会抛出TargetException异常。

      +

      如果原值是其他类型。例如:目标类型为int,值为string

      +

      string value=”100”;

      +

      property.SetValue(obj,int.TryParse(value),null);//类型转换。

      +

      上面几种都比较容易处理,但是如果该属性类型是未知非泛型类型,例如 int?

      +

      var value=”100”;

      +

      property.SetValue(obj,Convert.ChangeType(value, property.PropertyType), null);//类型转换。这时简单调用 ChangeType()方法,类型会报错。

      +

      想解决这个问题,需要首先把属性值类型转成基本类型,然后进行转换。如下:

      +
                  if (!property.PropertyType.IsGenericType)
      +            {
      +                //非泛型
      +                property.SetValue(obj, string.IsNullOrEmpty(value) ? null : Convert.ChangeType(value, property.PropertyType), null);
      +            }
      +            else
      +            {
      +                //泛型Nullable<>
      +                Type genericTypeDefinition = property.PropertyType.GetGenericTypeDefinition();
      +                if (genericTypeDefinition == typeof(Nullable<>))
      +                {
      +                    property.SetValue(obj, string.IsNullOrEmpty(value) ? null : Convert.ChangeType(value, Nullable.GetUnderlyingType(property.PropertyType)), null);
      +                }
      +            }
      +

      这样,在使用Convert.ChangeType()转换可空类型时,就不会报错了。

      +]]>
      + + 最近添加 + +
      + + 清除mysql的log-bin日志 + /clear-the-mysql-log-bin-log.html + +

      前一阵子工作项目上的事情忙的焦头烂额,最近要进行部门调整将要去做新的项目。又要学习很多新的知识了,还是很兴奋激动的。今天下班回来查看了一下VPS状态,发现VPS的空间只剩下了1G多!第一反应是被入侵了,但是看了一下log并没有发现什么异常的登录,加上平时基本都是用私钥免密码登录的VPS,别入侵的可能也不是很大。那我就很疑惑了,因为系统文件占用应该也就3G多,我平时并没有在VPS放过什么大文件,不应该一下子少那么多空间。于是开始一番du查找终于找到了罪魁祸首!原来是mysql的log文件导致的。

      装mysql并运行一段时间后,在mysql目录下出现一堆类似mysql-bin.000***,从mysql-bin.000001开始一直排列下来,而且占用了大量硬盘空间,高达十几个G.。原来mysql-bin.000001、mysql-bin.000002等文件是数据库的操作日志,例如UPDATE一个表,或者DELETE一些数据,即使该语句没有匹配的数据,这个命令也会存储到日志文件中,还包括每个语句执行的时间,也会记录进去的。 这些形如mysql-bin.00001的文件主要是用来做什么的呢? 1、数据恢复

      如果你的数据库出问题了,而你之前有过备份,那么可以看日志文件,找出是哪个命令导致你的数据库出问题了,想办法挽回损失。

      2、主从服务器之间同步数据

      主服务器上所有的操作都在记录日志中,从服务器可以根据该日志来进行,以确保两个同步。

      3、清除办法

      运行 /usr/local/mysql/bin/mysql -u root -p 登录执行:

      reset master;
      + +

      如果你只有一个mysql服务器,在/etc/ 下面找到my.cnf文件vim /etc/my.cnf把里面的

      + +
      +#log-bin=mysql-bin 
      +#binlog_format=mixed 
      +这两行注释掉,然后将mysql下的var目录中的这些日志文件全部删除,重启mysql服务即可。
      +
      + +

      但是如果你设置了主从服务器,那么就需要做以下操作了。

      + +

      A:在每个从属服务器上,使用SHOW SLAVE STATUS来检查它正在读取哪个日志。

      + +

      B:使用SHOW MASTER LOGS获得主服务器上的一系列日志。

      + +

      C:在所有的从属服务器中判定最早的日志,这个是目标日志,如果所有的从属服务器是更新的,就是清单上的最后一个日志。

      + +

      D:清理所有的日志,但是不包括目标日志,因为从服务器还要跟它同步。 简单地说,这些MySQL目录下的形如mysql-bin.000***的文件时MySQL的事务日志。 删除复制服务器已经拿走的binlog是安全的,一般来说网络状况好的时候,保留最新的那一个足以。

      +
      +]]> + + Technical + + + ssh + VPS + 日志 + IOS + +
      + + CMD窗口属性设置 + /cmd-in-window-property-the-settings.html + +首先打开注册表编辑器,Win+R(win就是那个Windows标志的按键)。具体设置参考如下: + +

      1、默认设置:
      保存在 HKEY_CURRENT_USER\Console
      2、自定义设置:
      保存在 [HKEY_CURRENT_USER\Console%SystemRoot%_system32_cmd.exe]

      +

      里面是一些自定义的设置,优先级高于默认设置。
      3、各键及其值所代表的意义:
      “WindowPosition”=dword:00640104
      “CodePage”=dword:000003a8
      “FontSize”=dword:00100008
      “FontFamily”=dword:00000030
      “FontWeight”=dword:00000190
      “HistoryNoDup”=dword:00000000
      “FullScreen”=dword:00000000
      “ScreenColors”=dword:000000ce
      “ScreenBufferSize”=dword:12c0050
      4、键值意义:注:各键值均为十六进制表示
      窗口位置—–WindowPosition—高四位为上,低四位为左。
      如00640104,即距屏幕上沿64H=100,距屏幕左沿104H=260
      字体大小—–FontSize———高四位为字高,低四位为字宽
      如00100008,即字体宽×高=08H×10H=8×16
      全屏幕——-FullScreen——-0:窗口 1:全屏幕(此时WindowPosition失效)
      窗口尺寸—–WindowSize——-高四位为高度,低四位为宽度
      默认00190050,即高19H=25行,宽50H=80列
      缓冲区尺寸—ScreenBufferSize-高四位为高度,低四位为宽度
      默认012c0050,即高12cH=300行,宽50H=80列
      字体颜色—–ScreenColors—–低两位同color设置中的字体颜色值
      字体类型—–FontFamily——-36:新宋体 30:点阵字体
      当前代码页—CodePage———默认3a8H=936:ANSI/OEM-简体中文GBK
      丢弃旧副本—HistoryNoDup—–0:不丢弃 1:丢弃旧副本
      5、自定义与默认关系:
      系统首先在自定义里面查找相关设置,若自定义中没有,则到默认里面查找。
      即自定义优先级高于默认。
      6、批处理设定窗口属性


      set rr="HKCU\Console%%SystemRoot%%_system32_cmd.exe"
      reg delete %rr% /f>nul
      reg add %rr% /v "WindowPosition" /t REG_DWORD /d 0x00640104 /f>nul
      reg add %rr% /v "WindowSize" /t REG_DWORD /d 0x00190050 /f>nul
      reg add %rr% /v "ScreenBufferSize" /t REG_DWORD /d 0x00190050 /f>nul
      reg add %rr% /v "FullScreen" /t REG_DWORD /d 0x00000001 /f>nul
      reg add %rr% /v "FontSize" /t REG_DWORD /d 0x00100008 /f>nul

      可以将上面的代码保存到一个文本文件,并将扩展名改成.bat批处理文件来双击运行。

      +

      7、字体大小:

      +

      (1)点阵字体(较小)

      +

      3×5——-00050003

      +

      5×8——-00080005

      +

      6×12——000c0006

      +

      6×13——000d0006

      +

      8×16——00100008

      +

      8×18——00120008

      +

      10×20—–0014000a

      +

      10×22—–0016000a

      +

      12×27—–001b000c

      +

      (2)新宋体(较大)

      +

      6—-00060000—3*7

      +

      8—-00080000—4*9

      +

      10—000a0000—5*11

      +

      12—000c0000—6*14

      +

      14—000e0000—7*16

      +

      16—00100000—8*18

      +

      18—00120000—9*21

      +

      20—00140000—10*23

      +

      24—00180000—12*27

      +

      28—001c0000—14*32

      +

      36—00240000—18*41

      +

      72—00480000—36*82

      +

      以上是自定义cmd窗口属性的基本知识

      +]]>
      + + Technical + + + Windows + 命令行 + 家庭 + +
      + + 为ipad2安装和配置gcc编译环境 + /configure-gcc-on-ipad2.html + +iPad2可不仅仅是一个电子书,也不仅仅是用来看电影大号MP4。微笑 废话就不多说了,下面介绍的是我给iPad2配置gcc编译环境的过程。 + +

      1、首先你必须越狱,网上教程也很多,这里就不多讲了。

      +

      声明:越狱可以让你的ipad运行无签名的可执行文件,但可能损害你的设备,对于你设备可能出现的问题,本文不负任何责任!

      +

      好了,现在我假设你的设备已经越狱成功。很棒,下面请让你的ipad接入一个无线网络,后续的步骤也可能需要网络 :)

      +

      如果你想使用电脑来SSH 到iPad2 你可能需要使用Cydia来安装openssh。

      +

      记得安装完Openssh要修改root和mobile用户的密码哦!(默认是alpine

      +

      PC端可以可以使用putty 和winscp配合来访问iPad2,MAC系统或者Linux可以使用系统自带的终端 ssh root@192.168.1.6  。我这里使用的是Tunnelier,它集成了putty 和winscp两款工具的功能,个人感觉很好用!

      +

      可能用的的工具:

      +

      Tunnelier (地址:www.bitvise.com/tunnelier推荐

      +

      putty (地址:www.putty.org/

      +

      winscp(地址:http://winscp.net/

      +

      需要在cydia安装一些必要的工具:

      +

      Openssh(提供SSH 服务)

      +

      wget (下载工具)

      +

      unzip 及 zip (解压缩及压缩打包工具)

      +

      sudo(允许普通用户执行root命令的工具)

      +

      make(很强大的工具)

      +

      Aptitude 及 APT 0.6 Transitional (deb 包工具,允许执行apt-get等命令)

      +

      是不是觉得iPad2越来越像台电脑了呢? :)

      + + +

      2、使用Tunnelier SSH到你的iPad

      +

      image

      +

      Host:添入你的iPad的IP地址

      +

      Prot:默认是22

      +

      Username:root(用root或者mobile用户登录,这里是root)

      +

      Password:默认是alpine,如果修改过请填入修改后的密码(再次提醒一定要修改root密码!)

      +

      SPN:不填

      +

      为了系统的安全性,建议平时使用普通用户登录。

      +

      将mobile用户加到sudo组,在命令行输入:

      $ visudo

      这个和vi的用法一样,移动光标到最后一行,按A在最后添加

      +

      mobile ALL=(ALL) ALL

      +

      如图:

      +

      image

      +

      使用:wq或者ZZ保存并退出vi。

      +

      以后就可以用 mobile用户登录并使用sudo命令来执行一些危险的操作了!

      +

      3、开始安装

      +

      再次使用mobile用户重新SSH到iPad后,在终端输入以下命令:

      +
      wget http://apt.saurik.com/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb
      +sudo dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb
      +sudo apt-get install iphone-gcc ldid
      +#注:安装ldid为应用程序签名(防止在应用启动时被iOS杀掉)
      image + +

      安装 libSystem:

      cd /usr/lib/
      sudo ln -s libSystem.B.dylib libSystem.dylib
      下载并安装SDK(IPAD)头文件:

      +

      下载sys32Libheader.tgz 文件到 iPad 路径 /var

      +

      点击下载

      +

      也可以将下载下来的tgz包通过sftp传到/var 目录,终端中输入代码:

      +
      cd /var
      +tar xzvf sys32Libheader.tgz
      +

      此时gcc的默认include和lib目录里还没有那些sys32的内容。继续如下步骤:

      +

      使用电脑ssh入ipad,或者在ipad里面使用终端,在mobile目录下生成 .bash_profile文件:

      +
      cd /private/var/mobile
      +vim .bash_profile
      +

      填入如下内容

      +
      C_INCLUDE_PATH=/var/sys32/usr/include
      +export C_INCLUDE_PATH
      +CPLUS_INCLUDE_PATH=/var/sys32/usr/include
      +export CPLUS_INCLUDE_PATH
      +LIBRARY_PATH=/var/sys32/usr/lib
      +export LIBRARY_PATH
      +

      使用:wq或者ZZ保存并退出vim。

      +

      切换成root用户:

      +
      su – root
      +

      修改/etc/profile文件,在里面加入一行
      source /var/mobile/.bash_profile

      +

      切换回mobile用户:

      +
      su – mobile
      +

      此时gcc环境已经配置好了!

      +

      使用gcc 测试 hello.c

      cd /private/var/mobile
      vim hello.c
      输入下面的内容:

      #include
      main()
      {
      printf("Hello iPad2!\n");
      }

      使用:wq或者ZZ保存并退出。

      +

      编译并执行:

      +
      +gcc hello.c -o hello
      +ldid -S hello
      +./hello
      +#为编译后的应用程序签名的方式是,运行:ldid –S [Aplication];
      +

      哈哈,看到iPad2上成功的第一次执行了自己写的代码!

      +

      附图:

      +

      image

      +

      注:部分内容参考http://antirez.com/page/iphone-gcc-guide.html

      +]]>
      + + Technical + + + ssh + iPad2 + 越狱 + GCC + 环境搭建 + putty + Tunnelier + winscp + vim + vi + visudo + 编程 + +
      + + 配置nginx伪静态以支持ThinkPHP的PATHINFO模式 + /configure-nginx-to-support-thinkphp-pathinfo-mode.html + +ThinkPHP是一款很不错的框架,也是PHP开发中最近用的比较火的。平时在本地开发中打开apache的modrewrite 配合.htaccess文件就可以完美的支持ThinkPHP的PATHINFO模式,但是家里的linux机器搭建的却是nginx 环境。这就造成了url 重写出现了很多奇怪的问题,所以需要对nginx 的配置文件修改一下来让它支持ThinkPHP的框架。 +首先你的项目的config文件中要配置这一项 +
        'URL_MODEL' => 2, // rewrite
      +在服务器中切换到nginx的安装目录,我这里是 /usr/local/nginx。然后添加thinkphp.conf 文件 + +

      vim /usr/local/nginx/conf/thinkphp.conf
      内容如下

      +
      location / {
      +  if (!-e $request_filename){
      +  rewrite ^/(.*)$ /index.php?s=/$1 last;
      +  }
      +}
      + +

      然后在你的配置文件中include一下刚刚的配置文件。

      + + +

      如果你的ThinkPHP入口文件index.php不在根目录,则需要把thinkphp.conf改成这样

      +
      location /入口文件所在目录/ {
      +  if (!-e $request_filename){
      +  rewrite ^/abc/(.*)$ /abc/index.php?s=/$1 last;
      +  }
      +}
      +
      +]]> + + Technical + + + 中文乱码 + Oracle + +
      + + 禁用或替换博客google字体 + /disable-or-replace-google-font.html + +由于在Wordpress中很多地方用到了google的字体,加上最近我朝又在全面禁用google的服务,直接导致了博客访问慢的无法忍受。没办法只有割爱,先临时禁用google的字体。方法如下: + +

      方法一:在functions.php中注释掉,vim打开functions.php文件,搜索googleapis, 加//注释即可,代码如下:

      +
      function wpan_fonts() {
      +$protocol = is_ssl() ? ‘https’ : ‘http’;
      +    //</strong>wp_register_style( ‘underthesea-portlligatsans’, “$protocol://fonts.googleapis.com/css?family=Port+Lligat+Sans” );
      +    //</strong>wp_register_style( ‘underthesea-oswald’, “$protocol://fonts.googleapis.com/css?family=Oswald:400,700,300″ );
      +    //</strong>wp_register_style( ‘underthesea-pacifico’, “$protocol://fonts.googleapis.com/css?family=Pacifico” );
      +}
      +方法二:使用插件 + +

      使用插件Remove Open Sans font from WP core,非常给力。使用插件也有一定的好处,就是你下次更新wordpress 的时候不需要再重新更改functions.php代码。

      +

      以上两种方式均能明显改善博客打开的速度,有需要的朋友不妨试试。

      +]]>
      + + 最近添加 + +
      + + 国内外代理IP服务器列表 + /domestic-and-foreign-agents-ip-server-list.html + +不保证都能用,你可以挨个试试! + +

      ID 地址                 端口 类型  地区     验证时间                    响应
      1 177.19.245.62 3128 HTTP 巴西 Sooip.CN 05-16 14:29 0.998
      2 186.194.7.185 8080 HTTP 巴西 Sooip.CN 05-16 14:29 2.008
      3 89.102.106.33 3128 HTTP 捷克 Sooip.CN 05-16 14:29 1.996
      4 190.182.18.109 3128 HTTP 哥伦比亚 Sooip.CN 05-16 14:29 4.012
      5 207.219.7.136 80 HTTP 加拿大 Sooip.CN 05-16 14:29 6.009
      6 212.62.116.82 8080 HTTP 沙特阿拉伯 Sooip.CN 05-16 14:28 8.998
      7 190.206.50.100 3128 HTTP 委内瑞拉 Sooip.CN 05-16 14:28 2.004
      8 210.212.150.84 8080 HTTP 印度 Sooip.CN 05-16 14:28 2.001
      9 177.19.132.75 3128 HTTP 巴西 Sooip.CN 05-16 14:28 7.008
      10 112.65.219.72 80 HTTP 上海市 联通IDC机房 05-16 14:28 1.994
      11 120.35.31.101 8080 HTTP 福建省福州市 电信 05-16 14:28 1.012
      12 124.193.109.117 80 HTTP 北京市 电信通 05-16 14:28 0.997
      13 178.135.59.11 8080 HTTP 黎巴嫩 Sooip.CN 05-16 14:28 3.001
      14 184.154.55.239 80 HTTP 美国 芝加哥市SingleHop公司 05-16 14:28 1.001
      15 186.3.71.155 8080 HTTP 厄瓜多尔 Sooip.CN 05-16 14:28 3.997

      + +

      16 212.93.195.229 3128 HTTP 沙特阿拉伯 Sooip.CN 05-16 14:28 2.002
      17 213.197.81.53 3128 HTTP 匈牙利 Sooip.CN 05-16 14:28 2.001
      18 82.222.49.81 8080 HTTP 土耳其 Sabanci电信公司 05-16 14:28 1.008
      19 201.57.146.136 3128 HTTP 巴西 Sooip.CN 05-16 14:28 6.996
      20 211.76.97.152 80 HTTP 台湾省 台北市 05-16 14:28 4.007
      21 101.44.1.107 80 HTTP 上海市 鹏博士宽带 05-16 14:28 9.003
      22 218.6.13.35 80 HTTP 福建省莆田市 电信LAN 05-16 14:27 0.999
      23 217.112.212.74 3128 HTTP 乌克兰 Sooip.CN 05-16 14:27 0.995
      24 118.97.94.194 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:27 1.002
      25 122.72.2.186 80 HTTP 甘肃省 铁通 05-16 14:27 2.999
      26 190.220.250.34 8080 HTTP 阿根廷 Sooip.CN 05-16 14:27 4.005
      27 207.219.7.136 3128 HTTP 加拿大 Sooip.CN 05-16 14:27 3.004
      28 220.243.7.126 3128 HTTP 广东省广州市 视讯宽带 05-16 14:27 0.997
      29 61.157.217.31 80 HTTP 四川省雅安市 电信IDC机房 05-16 14:26 1.009
      30 177.86.20.59 8080 HTTP 巴西 Sooip.CN 05-16 14:26 2.004
      31 178.168.58.100 8081 HTTP 摩尔多瓦 Sooip.CN 05-16 14:26 2.013
      32 192.162.150.77 3128 HTTP 波兰 Sooip.CN 05-16 14:26 2.004
      33 118.96.153.181 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:26 6.999
      34 178.48.2.237 80 HTTP 匈牙利 Sooip.CN 05-16 14:26 1.004
      35 187.63.203.166 3128 HTTP 巴西 Sooip.CN 05-16 14:26 1.988
      36 88.41.153.22 80 HTTP 意大利 Sooip.CN 05-16 14:26 1.007
      37 122.72.12.88 80 HTTP 甘肃省 铁通 05-16 14:26 7.005
      38 125.162.170.42 3128 HTTP 印度尼西亚 PTTelekomunikasi网络 05-16 14:26 3.019
      39 202.51.113.81 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:26 1.003
      40 203.66.83.46 3128 HTTP 台湾省 中华电信 05-16 14:26 1.010
      41 109.205.114.2 8000 HTTP 伊拉克 Sooip.CN 05-16 14:26 1.006
      42 212.33.200.174 80 HTTP 伊朗 Sooip.CN 05-16 14:26 2.007
      43 188.127.230.133 3128 HTTP 俄罗斯 Sooip.CN 05-16 14:26 1.002
      44 103.22.248.99 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:26 9.001
      45 189.123.220.192 8080 HTTP 巴西 Sooip.CN 05-16 14:25 3.007
      46 212.80.21.219 8080 HTTP 伊朗 Sooip.CN 05-16 14:25 1.997
      47 85.114.132.49 3128 HTTP 德国 Sooip.CN 05-16 14:25 0.997
      48 118.97.209.218 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:25 1.005
      49 189.254.250.34 80 HTTP 墨西哥 Sooip.CN 05-16 14:25 10.004
      50 202.115.207.25 80 HTTP [C]四川省成都市 四川师范大学 05-16 14:25 1.015
      51 82.222.19.54 8080 HTTP 土耳其 Sabanci电信公司 05-16 14:25 0.993
      52 122.129.102.92 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:25 7.000
      53 190.0.41.78 80 HTTP 哥伦比亚 Sooip.CN 05-16 14:25 8.001
      54 123.234.215.230 81 HTTP 山东省青岛市莱西市 启晟网吧一分店 05-16 14:25 1.002
      55 125.93.180.234 8081 HTTP 广东省东莞市南城区 淘乐网吧(石鼓综合市场二楼) 05-16 14:25 0.997
      56 180.137.45.86 8080 HTTP 广西崇左市 电信 05-16 14:25 1.004
      57 180.139.91.27 8080 HTTP 广西南宁市 电信 05-16 14:25 11.006
      58 188.128.6.150 8080 HTTP 俄罗斯 Sooip.CN 05-16 14:24 2.002
      59 188.128.118.177 8080 HTTP 俄罗斯 Sooip.CN 05-16 14:24 3.999
      60 201.174.18.170 8080 HTTP 墨西哥 Sooip.CN 05-16 14:24 1.017
      61 202.43.173.21 3128 HTTP 印度尼西亚 Sooip.CN 05-16 14:24 4.000
      62 202.103.215.199 80 HTTP 广西北海市 电信 05-16 14:24 0.995
      63 189.74.129.10 8080 HTTP 巴西 Sooip.CN 05-16 14:24 1.005
      64 202.105.233.40 80 HTTP 广东省肇庆市 电信 05-16 14:24 0.997
      65 82.222.49.65 8080 HTTP 土耳其 Sabanci电信公司 05-16 14:24 0.994
      66 180.211.180.194 8080 HTTP 孟加拉 Sooip.CN 05-16 14:24 1.000
      67 213.217.58.25 80 HTTP 伊朗 Sooip.CN 05-16 14:24 3.003
      68 187.75.129.184 3128 HTTP 巴西 Sooip.CN 05-16 14:24 7.997
      69 122.226.240.233 80 HTTP 浙江省金华市 电信 05-16 14:24 1.008
      70 221.12.89.189 80 HTTP 浙江省金华市 /丽水市联通 05-16 14:24 0.995
      71 221.133.238.138 8080 HTTP 上海市 长城宽带 05-16 14:24 1.021
      72 221.224.20.210 8080 HTTP 江苏省苏州市常熟市 登胜流体动力有限公司 05-16 14:23 4.996
      73 222.73.25.121 6666 HTTP 上海市 电信(外高桥)IDC机房 05-16 14:23 0.997
      74 217.146.208.162 8080 HTTP 伊朗 Sooip.CN 05-16 14:23 2.994
      75 222.165.175.118 80 HTTP 斯里兰卡 电信公司 05-16 14:23 1.004
      76 118.212.129.175 80 HTTP 江西省 联通 05-16 14:23 5.004
      77 116.236.205.100 80 HTTP 上海市长宁区 /普陀区电信 05-16 14:23 1.006
      78 119.97.146.152 80 HTTP 湖北省武汉市 电信 05-16 14:23 3.000
      79 123.234.31.130 8090 HTTP 山东省青岛市 联通 05-16 14:23 0.999
      80 222.184.9.242 3128 HTTP 江苏省淮安市 (楚州区)电信ADSL 05-16 14:23 1.006
      81 122.226.240.235 80 HTTP 浙江省金华市 电信 05-16 14:23 4.994
      82 64.85.181.45 8080 HTTP 美国 加洲 05-16 14:23 1.006
      83 113.53.240.90 3128 HTTP 泰国 05-16 14:23 2.016
      84 222.165.175.118 3128 HTTP 斯里兰卡 电信公司 05-16 14:23 0.996
      85 79.120.107.6 80 HTTP 俄罗斯 Sooip.CN 05-16 14:23 0.996
      86 79.120.107.6 8080 HTTP 俄罗斯 Sooip.CN 05-16 14:23 5.003
      87 190.121.20.131 3128 HTTP 智利 05-16 14:23 8.010
      88 190.128.192.202 8080 HTTP 巴拉圭 05-16 14:22 1.007
      89 88.85.125.78 8080 HTTP 马其顿 05-16 14:22 2.002
      90 88.85.108.16 8080 HTTP 马其顿 05-16 14:22 3.008
      91 118.97.165.234 8080 HTTP 印度尼西亚 Sooip.CN 05-16 14:22 1.001
      92 190.249.188.186 8080 HTTP 哥伦比亚 Sooip.CN 05-16 14:22 5.999
      93 217.76.35.238 3128 HTTP 俄罗斯 Sooip.CN 05-16 14:22 1.010
      94 79.175.158.156 8080 HTTP 伊朗 Sooip.CN 05-16 14:22 3.005
      95 190.253.213.196 3128 HTTP 哥伦比亚 Sooip.CN 05-16 14:22 0.999
      96 92.60.227.17 8080 HTTP 塞尔维亚 Sooip.CN 05-16 14:22 1.005
      97 93.78.214.219 3128 HTTP 乌克兰 Sooip.CN 05-16 14:22 1.994
      98 109.224.50.162 80 HTTP 伊拉克 Sooip.CN 05-16 14:22 1.996
      99 201.54.230.75 3128 HTTP 巴西 05-16 14:22 5.996
      100 77.245.210.161 3128 HTTP 俄罗斯 05-16 14:22 5.001

      +]]>
      + + Technical + + + 代理 + Firefox + +
      + + 高效办公辅助工具Autohotkey + /efficient-office-support-tool-autohotkey.html + +

      序:工欲善其事,必先利其器。近期工作中要对公司的AFP软件进行汉化,由此也带来了大量的重复性工作,海量的字符串提取,组合,规整,键盘鼠标表示压力颇大~ 为此特别找回了大学玩魔兽对战用的改键插件Autohotkey,嘿嘿。

      AutoHotKey 软件可以实现很多有趣的功能,可以简化你的重复性工作。这里下载

      选择一个适合你的版本,办公环境稳定的可以选择安装版,需要便携要求的可以下载绿色版本,当然安装版的好处是:系统会自动关联 .ahk 文件。安装完成后打开Autohotkey软件,然后你会在系统托盘处看到一个H字样的小图标。现在右击托盘处图标,选择Edit this Script来设置。image

      在打开的配置文件中加入你需要的功能。例如:加入

      #w::Run wangheng.org
      + +

      然后选择Reload This Script,现在按win键(小旗标识那个键)+w,怎么样是不是直接在浏览器打开本博的主页呢?

      + +

      这里简单地解释一下那两行语句的意思:#号代表 Win 键;两个英文冒号作为热键和命令的分隔符使用;run是Autohotkey中常用的命令之一,它的后面是要运行的程序完整路径或网址(思考:如果要按win+q就打开QQ,该怎么写呢?)。当然如果你的程序或命令的所在目录是加到了系统的PATH中,则可以直接写执行程序的名字。例如

      + +
      #n::run notepad

      代码中只是写着“notepad”,没有写上完整路径但是却能打开,明白为什么了吧。(Tips:Autohotkey 能替换掉系统的默认快捷键)

      + +

      Ctrl 的符号是 ^

      + +

      Alt 的符号是 !

      + +

      Shift 的符号是 +

      + +

      如果你想按下Ctrl + Alt + Shift + N来启动 notepad的话,可以这样写:

      + +

      ^!+n::run notepad

      + +

      所以一法通,万法通,现在你可以完全定制自己的热键了。

      + +

      如果只是上面的这些技巧那么这篇博客就没有什么必要了,下面要介绍的是我如果利用visual studio中的Vim插件和Autohotkey来完成一些很费事的工作的。

      + +

      由于经常拼接类似这样的语句

      + +

      public const String A="A";

      + +

      每个源码文件中都可能有数十个这样的字符串,所以带来的工作量可想而知!~我是这样写的,首先将A字符串复制到剪切板。

      + +

      !d::send {esc}{o}public const String {esc}{p}{A}{=}{"}{esc}{p}{A}{"}{;}

      + +

      哈哈,现在随便在哪一行按alt+d,是不是直接在下一行打出了public const String A="A";这条语句呢?如果你的机器没有安装vim或者vim插件还可以这样写:(不过需要先手动换行,代码倒是少一些)

      + +

      !d::send public const String ^{v}="^{v}";

      + +

      很多浏览器或编辑工具都支持按Ctrl+Tab来切换标签,但总感觉Ctrl不如Alt好按,所以加了一条

      + +
      !a::send ^{tab}
      + +

      平时好多地方登录都要输入邮箱,所以加了这样一行:

      + +
      !u::send me@wangheng.org
      + +

      这样平时也能节省自己不少时间~分秒必争嘛~

      +
      +]]> + + Technical + Autohotkey + + + Windows + vim + visual studio + Win7 + Cron + +
      + + Globus Toolkit 安装与配置 + /globus-toolkit-install.html + +

      1. 安装前准备工作

      +准备工作包括软件的准备和环境变量的设置。操作系统选用ubuntu 11.10,Globus Toolkit的安装包为:gt4.0.8-all-source-installer.tar.gz(或者使用适用于ubuntu的gt4.0.8-x86_deb_3.1-installer.tar.gz)下载地址:http://globus.org/toolkit/downloads/,此外还需安装JDK、ANT 下载地址:http://ant.apache.org/bindownload.cgi、JUNIT最新版本。 + +

      图1表示了各软件之间的层级关系。

      +

      pic1

      +

      图1 各软件层级关系

      +

      图2为GT4的安装流程图。

      +

      pic2

      +

      图2 GT 安装流程图

      +

      辅助软件安装完成之后,需要设置系统环境变量。具体方法是修改系统变量配置文件 /etc/profile。

      +

      参考:

      +
      # /etc/profile: system-wide .profile file for the Bourne bash (sh(1))
      +# and Bourne compatible bashs (bash(1), ksh(1), ash(1), ...).
      +
      +if [ -d /etc/profile.d ]; then
      +for i in /etc/profile.d/*.sh; do
      +if [ -r $i ]; then
      +. $i
      +fi
      +done
      +unset i
      +#Add
      +unset pathmunge
      +export ANT_HOME=/usr/local/apache-ant-1.8.2
      +export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
      +export GLOBUS_LOCATION=/usr/local/globus
      +export GPT_LOCATION=/usr/local/globus
      +export CLASSPATH="./:JAVA_HOME/lib:JAVA_HOME/jre/lib"
      +export PATH=$PATH:$JAVA_HOME/bin:JAVA_HOME/jre/bin:$GLOBUS_LOCATION/bin:$GLOBUS_LOCATION/sbin:$ANT_HOME/bin:/bin:/usr/bin:/usr/sbin
      +export LD_LIBRARY_PATH=$/usr/local/globus/lib
      +
      +fi
      +
      +if [ "$PS1" ]; then
      +if [ "$BASH" ]; then
      +PS1='\u@\h:\w\$ '
      +if [ -f /etc/bash.bashrc ]; then
      +. /etc/bash.bashrc
      +fi
      +else
      +if [ "`id -u`" -eq 0 ]; then
      +PS1='# '
      +else
      +PS1='$ '
      +fi
      +fi
      +fi
      +umask 022
      +
      +
      关于安装需要注意以下几个问题:
      1 .要确认已安装C编译器gcc,及g++,否则GT4.0.8将无法 进行编译; + +

      2.确认GUN TAR在安装目录中.否则将无法进行解压缩.

      +

      3.注意设置自己的主机名,如果使用默认主机名Localhost则在进行服务器认证请求时会失败.

      关于用户需要注意以下几个问题:
      除了设置一个globus用户外,还应设置几个普通用户,并且要注意普通用户的权限设置,应能访问globus的安装目录.

      +

      如我就设置了4个普通用户,如feetoo,postgre,user01, user02。在进行用户认证时,常会因为用户权限问题失败,且此用户名不能重新认证,所以应多设几个普通用户。

      +

      必要用户:root,globus,普通用户(建议多个)

      2.基本环境的配置(主节点和子节点一样)

      2.1 Install JDK

      首先把JDK安装文件拷贝到/usr/local下面

      +
      [root@xx1 win]# cp jdk-6u1-linux-i586.bin /usr/local/
      +

      然后,我们查看权限

      +
      [root@xx1 local]# ls -la jdk-6u1-linux-i586.bin
      -rwxr-xr-x 1 root root 62772481 07-04 21:13 jdk-6u1-linux-i586.bin
      +

      root用户已经有执行权限,我们直接执行文件

      +
      [root@xx1 local]# ./jdk-6u1-linux-i586.bin
      +

      JDK解压完毕 ,我们查看一下,并建立符号链接

      +
      [root@xx1 local]# ln -s jdk1.6.0_01 jdk
      +

      我们查看链接是否正确

      +
      [root@xx1 local]# ls -la jdk
      lrwxrwxrwx 1 root root 11 07-04 21:18 jdk -> jdk1.6.0_01
      2.2 Install ANT
      +
        +
      1. ANT安装到/usr/local/文件夹下,并建立符号链接
      2. +
      3. 编辑/etc/profile文件,导出变量
        [root@xx1 local]# vi /etc/profile
      4. +
      +

      #编辑后,用tail命令查看

      [root@xx1 local]# tail /etc/profile
      done

      +

      unset i
      unset pathmunge

      +

      export ANT_HOME=/usr/local/ant
      export JAVA_HOME=/usr/local/jdk
      export GLOBUS_LOCATION=/usr/local/globus
      export GPT_LOCATION=/usr/local/globus
      export CLASSPATH="./:JAVA_HOME/lib:JAVA_HOME/jre/lib"
      export PATH=$JAVA_HOME/bin:JAVA_HOME/jre/bin: $GLOBUS_LOCATION/bin:$GLOBUS_LOCATION/sbin: $ANT_HOME/bin:$PATH
      export LD_LIBRARY_PATH=$/usr/local/globus /lib

      使变量生效
      [root@xx1 local]# source /etc/profile
      2.3    Install Globus
      添加一个globus用户,用来启动容器
      [root@xx1 local]# adduser globus -p myglobus

      在/usr/local下面建立globus文件

      +
      [root@xx1 local]# mkdir globus
      +

      更改属主

      +
      [root@xx1 local]# chown globus.globus globus
      +

      把网格的安装源文件拷贝过来,到globus文件夹下

      +
      [root@xx1 local]# cp /mnt/win/ gt4.0.8-all-source-installer.tar.gz ./globus
      +

      修改属主

      +
      [root@xx1 local]# cd globus/
      +[root@xx1 globus]# chown globus.globus gt4.0.8-all-source-installer.tar.gz
      +

      切换为globus用户

      +
      [root@xx1 globus]# su - globus
      +

      进入globus目录

      +
      [globus@xx1 ~]$ cd /usr/local/globus/
      +

      解压

      +
      [globus@xx1 globus]$ tar -zxvf  gt4.0.8-all-source-installer.tar.gz
      +

      已经成功解压了

      +
      [globus@xx1 globus]$ ls 
      +gt4.0.8-all-source-installer   gt4.0.8-all-source-installer.tar.gz
      +

      进入安装程序
      [globus@xx1 globus]$ cd gt4.0.8-all-source-installer

      +

      Configure一下[想要特殊配置看帮助或者文档]
      [globus@xx1 gt4.0.8-all-source-installer]$ ./configure –prefix=/usr/local/globus/
      checking for javac… /usr/local/jdk/bin/javac
      checking for ant… /usr/local/ant/bin/ant
      configure: creating ./config.status
      config.status: creating Makefile

      +

      开始make
      [globus@xx1 gt4.0.8-all-source-installer]$ make
      cd gpt && OBJECT_MODE=32 ./build_gpt
      build_gpt ====> installing GPT into /usr/local/globus/
      …………….
      …………….
      echo “Your build completed successfully. Please run make install.”
      Your build completed successfully. Please run make install.
      (make时经常出错,原因是系统缺少各种包,装个yum源,具体安装什么包应根据自己的系统而进行选择,大概有openssl、openssh、grid-packaging-tools-3.2-22.fc14.noarch.rpm、g++ glibc-static perl-ExtUtils-*等等。rm /usr/bin/env; cp /bin/env /usr/bin/env )
      安装一下
      [globus@xx1 gt4.0.8-all-source-installer]$ make install
      ln -sf /usr/local/globus//etc/gpt/packages /usr/local/globus//etc/globus_packages
      /usr/local/globus//sbin/gpt-postinstall
      …………….
      …………….
      find-fork-tools: WARNING: “Cannot locate mpiexec”
      find-fork-tools: WARNING: “Cannot locate mpirun”
      checking for mpiexec… no
      checking for mpirun… no
      find-fork-tools: creating ./config.status
      config.status: creating fork.pm
      ..Done

      +

      3 配置主节点
      我们是实验环境,所以用SimpleCA来进行加密认证。在这里,我采用了本机+虚拟机的安装方式,把本机作为主节点,虚拟机作为子节点。
      本机[xx1.com]:
      ip:192.168.1.107
      mask:255.255.255.0
      gateway:192.168.1.1

      +

      虚拟机[xx2.com]:
      ip:192.168.1.207
      mask:255.255.255.0
      gateway:192.168.1.1
      把/etc/hosts文件修改如下:
      [root@xx1 globus]# more /etc/hosts

      +

      127.0.0.1 localhost.localdomain localhost
      192.168.1.107 xx1.com xx1
      192.168.1.207 xx2.com xx2

      +

      然后,我在查看主机名称是不是正确
      [root@xx1 globus]# more /etc/sysconfig/network
      NETWORKING=yes
      NETWORKING_IPV6=yes
      HOSTNAME=xx1.com

      +

      修改主机名称之后,我们可以安装SimpleCA了

      +

      3.1 安装SimpleCA
      切换到如下目录
      [globus@xx1 globus]$ pwd
      /usr/local/globus-4.0.1/setup/globus

      +

      [globus@xx1 globus]$ sudo ./setup-simple-ca

      +

      C e r t i f i c a t e A u t h o r i t y S e t u p

      +

      This script will setup a Certificate Authority for signing Globus
      users certificates. It will also generate a simple CA package
      that can be distributed to the users of the CA.

      +

      The CA information about the certificates it distributes will
      be kept in:

      +

      /home/globus/.globus/simpleCA/

      +

      The unique subject name for this CA is:

      +

      cn=Globus Simple CA, ou=simpleCA-xx1.com, ou=GlobusTest, o=Grid

      +

      Do you want to keep this as the CA subject (y/n) [y]:

      +

      可以看到,本机作为主节点,ou=simpleCA-xx1.com,这就对应了上边让大家修改主机名称的作用。

      +

      直接回车键即可,然后又提示让电邮,这里可以随便填写,这是让别人向你索取证书的地址。

      +

      Enter the email of the CA (this is the email where certificate
      requests will be sent to be signed by the CA):

      +

      接着,就是证书过期日期,默认五年,直接回车:

      +

      The CA certificate has an expiration date. Keep in mind that
      once the CA certificate has expired, all the certificates
      signed by that CA become invalid. A CA should regenerate
      the CA certificate and start re-issuing ca-setup packages
      before the actual CA certificate expires. This can be done
      by re-running this setup script. Enter the number of DAYS
      the CA certificate should last before it expires.
      [default: 5 years (1825 days)]:

      +

      又提示给打开证书提供一个密码,并且确认
      Enter PEM pass phrase:
      Verifying - Enter PEM pass phrase:

      +

      接着,又是一堆输出,我们可以看到公钥和私玥放在什么地方了,还有分发包放在那里[分发包可以用来配置自节点]:

      The private key of the CA is stored in /home/globus/.globus/simpleCA//private/cakey.pem
      The public CA certificate is stored in /home/globus/.globus/simpleCA//cacert.pem

      +

      The distribution package built for this CA is stored in

      +

      /home/globus/.globus/simpleCA//globus_simple_ca_b62cb8c1_setup-0.19.tar.gz

      +

      This file must be distributed to any host wishing to request
      certificates from this CA.

      +

      CA setup complete.

      +

      The following commands will now be run to setup the security
      configuration files for this CA:

      +

      $GLOBUS_LOCATION/sbin/gpt-build /home/globus/.globus/simpleCA//globus_simple_ca_b62cb8c1_setup-0.19.tar.gz

      +

      $GLOBUS_LOCATION/sbin/gpt-postinstall

      最后,终于完成了,SimpleCA生成了,但是我们也得到提示,还有一步:
      Note: To complete setup of the GSI software you need to run the
      following script as root to configure your security configuration
      directory:

      +

      /usr/local/globus//setup/globus_simple_ca_b62cb8c1_setup/setup-gsi

      +

      For further information on using the setup-gsi script, use the -help
      option. The -default option sets this security configuration to be
      the default, and -nonroot can be used on systems where root access is
      not available.

      +
      +

      setup-ssl-utils: Complete

      +

      我们查看一下,是不是真的生成了分发包:
      [globus@xx1 globus]$ sudo ls ~/.globus/simpleCA/
      cacert.pem crl grid-ca-ssl.conf newcerts serial
      certs globus_simple_ca_b62cb8c1_setup-0.19.tar.gz index.txt private

      +

      接下来,我们要让我们的本机[xx1.com],信任我们的globus的证书,那么我们要切换到root

      +

      [globus@xx1 globus]$ su - root
      口令:

      +

      执行最后一步命令
      [root@xx1 ~]# /usr/local/globus/setup/globus_simple_ca_b62cb8c1_setup/setup-gsi -default
      setup-gsi: Configuring GSI security
      Making /etc/grid-security…
      mkdir /etc/grid-security
      Making trusted certs directory: /etc/grid-security/certificates/
      mkdir /etc/grid-security/certificates/
      Installing /etc/grid-security/certificates//grid-security.conf.b62cb8c1…
      Running grid-security-config…
      Installing Globus CA certificate into trusted CA certificate directory…
      Installing Globus CA signing policy into trusted CA certificate directory…
      setup-gsi: Complete
      (这步出现错误:
      ERROR: Setup package not found. Looking for:
      name=globus_simple_ca_11ad4bb3_setup,setup_name=, and setup version=
      就是因为环境变量没有设置好,把/etc/profile中的环境变量设置好就行了)
      根据上面的输出,我们看看相应的目录下面是不是多了什么。
      [root@xx1 ~]# ls /etc/grid-security/certificates/
      b62cb8c1.0 globus-host-ssl.conf.b62cb8c1 grid-security.conf.b62cb8c1
      b62cb8c1.signing_policy globus-user-ssl.conf.b62cb8c1

      +

      [root@xx1 ~]# ls /etc/grid-security/
      certificates globus-host-ssl.conf globus-user-ssl.conf grid-security.conf

      +

      这些都是SimpleCA的配置文件,它们的具体总用,可以参考相应的文档。

      +

      3.2           让本机请求证书并得到SimpleCA的认证。

      +[root@xx1 bin]# +./grid-cert-request -host xx1.com + +

      Generating a 1024
      bit RSA private key

      +

      .++++++

      +

      ……………………..++++++

      +

      writing new private
      key to ‘/etc/grid-security/hostkey.pem’

      +
      +

      You are about to be
      asked to enter information that will be incorporated

      +

      into your
      certificate request.

      +

      What you are about
      to enter is what is called a Distinguished Name or a DN.

      +

      There are quite a
      few fields but you can leave some blank

      +

      For some fields
      there will be a default value,

      +

      If you enter ‘.’,
      the field will be left blank.

      +
      +

      Level 0 Organization
      [Grid]:Level 0 Organizational Unit [GlobusTest]:Level 1 Organizational Unit
      [simpleCA-xx1.com]:Name (e.g., John M. Smith) []:

      +

       

      +

      A private host key
      and a certificate request has been generated

      +

      with the subject:

      +

       

      +

      /O=Grid/OU=GlobusTest/OU=simpleCA-xx1.com/CN=host/xx1.com

      +

       

      +
      +

       

      +

      The private key is
      stored in /etc/grid-security/hostkey.pem

      +

      The request is
      stored in /etc/grid-security/hostcert_request.pem

      +

       

      +

      Please e-mail the
      request to the Globus Simple CA cy_xiaoxiao@yahoo.com.cn

      +

      You may use a
      command similar to the following:

      +

       

      +

      cat /etc/grid-security/hostcert_request.pem |
      mail cy_xiaoxiao@yahoo.com.cn

      +

       

      +

      Only use the above
      if this machine can send AND receive e-mail. if not, please

      +

      mail using some
      other method.

      +

       

      +

      Your certificate
      will be mailed to you within two working days.

      +

      If you receive no
      response, contact Globus Simple CA at cy_xiaoxiao@yahoo.com.cn

      +

       

      +

      [root@xx1
      grid-security]# pwd

      +

      /etc/grid-security

      +

       

      +

      运行完成后会产生以下几个文件:

      +

      /etc/grid-security/hostkey.pem

      +

      /etc/grid-security/hostcert_request.pem

      +

      /etc/grid-security/hostcert.pem
      (空文件)

      +

       

      +

      下一步,我们要做的,就是转换为SimpleCA的角色,签署一下我们本机的认证请求。

      +

       

      +

      我们首先拷贝请求文件到/usr/local/globus/bin下

      +

      [root@xx1 ~]# cp
      /etc/grid-security/hostcert_request.pem /usr/local/globus/bin/

      +

       

      +

      转换到globus下,因为我们本机是用globus用户产生的SimpleCA

      +

      [root@xx1 ~]# su -
      globus

      +

       

      +

      [globus@xx1 ~]$ cd
      /usr/local/globus/bin

      +

       

      +

      签署证书

      +

      [globus@xx1 bin]$
      ./grid-ca-sign -in hostcert_request.pem -out hostcert.pem

      +

       

      +

      To sign the request

      +

      please enter the password
      for the CA key:

      +

       

      +

      The new signed
      certificate is at: /home/globus/.globus/simpleCA//newcerts/01.pem

      +

       

      +

      把签署过的证书复制回去,覆盖原来的空文件

      +

      [globus@xx1 bin]$ su

      +
        +
      • root
      • +
      +

      口令:

      +

       

      +

      [root@xx1 ~]# cp
      /usr/local/globus/bin/hostcert.pem /etc/grid-security/

      +

      cp:是否覆盖“/etc/grid-security/hostcert.pem”?
      yes

      +

       

      +

      这三个文件属主都是root,但是我们的gridftp要用到它们,并且我们要采用globus用户启动web容器,所以我们就得有

      +

      两套认证的证书,一套归root使用,另一套归globus

      +

      [root@xx1
      grid-security]# cp hostcert.pem containercert.pem

      +

       

      +

      [root@xx1
      grid-security]# cp hostkey.pem containerkey.pem

      +

       

      +

      [root@xx1 grid-security]#
      chown globus.globus container*.pem

      +]]>
      + + Technical + + + Globus Toolkit + Ubuntu + Ant + Openjdk + openssh + +
      + + WP博客的第一篇文章 + /hello-world.html + +

      纪念博客的成立!

      + +
      +]]> + + 最近添加 + + + first blog + started + +
      + + Hi 2014 + /hi-2014.html + + + +]]> + + 最近添加 + + + + HTML 页面跳转的几种方法 + /html-page-several-methods-of-jump.html + +1、使用Html实现 +
      
      +
      +

      <!—使用下面的方式只是刷新不跳转 –>

      + + + + + + +
      +2、使用javascript实现 + +
      +

      当然还有很多中实现的方法,写到博客仅仅是为了方便查询,欢迎各位高手指教!

      +
      +]]> + + Technical + + + html + javascript + 页面跳转 + +
      + + 是否该自称为程序员 + /if-i-am-an-programmer.html + +作者: 阮一峰 + +

      日期: 2011年10月31日

      +

      每年都有无数年轻程序员,加入软件行业。 他们在学校里学过编程,但是对这个行业的现实一无所知。 Patrick McKenzie是美国一家小软件公司的老板,他写了一篇长文,介绍这个行业的一些实际情况。我看了以后很感慨,有些地方很受启发。我选择了一部分,翻译如下。

      +

       一、90%的编程工作来自内部软件

      +

      (90% of programming jobs are in creating Line of Business software) 计算机专业的学生,可能有一种印象,觉得大部分程序员,都在编写公开出售的软件或者通用软件。 这种看法是不对的。大部分程序员,实际上编写的是不公开的企业内部软件,比如追踪费用的软件、优化装运成本的软件、帮助记账的软件、设计新部件的软件、计算保单价格的软件、识别恶意订单的软件等等。 各种各样的商业公司,开发内部软件,解决它们自己的问题。市场上对程序员的大部分需求来源于此,只有极少数程序员直接编写面向外部顾客的软件。 内部软件的开发,通常非常乏味,令人厌倦。因为它们的技术复杂性低、技术决策非常保守、预算很少、缺乏长远考虑。但是,世界上大部分编程工作都是这种。

      +

      二、别人雇你的目的,是让你创造利润,不是让你编程 (Engineers are hired to create business value, not to program things)

      +

      商业公司最关心的(或者说唯一在乎的)事情,就是增加收入、降低成本。因此,它们实际上需要的不是程序员,而是能够帮助它们增加收入、降低成本的人。 开发优美的软件,解决技术难题,编写没有bug的代码,这些都不是商业公司的目的。它们雇佣你,是为了让你帮它们完成某个可以增加收入、降低成本的项目,而不是因为你是geek。 你个人对于公司的唯一价值,就在于你能多大程度上为它们增加收入、降低成本。

      +

      三、不要自称为程序员 (Don’t call yourself a programmer)

      +

      很多公司的经理不懂计算机,在他们心目中,”程序员”就是一群高成本的劳动力,只会在一台复杂的机器上干一些难懂的事情。 如果你自称为”程序员”,当公司需要压缩成本的时候,某些经理首先就会想到解雇你。有一家公司叫Salesforce,口号是”没有软件”,意思就是如果经理们购买了他们的服务,就不再需要别的软件管理销售业务了,也就是说,不再需要自己雇佣程序员了。 正确的做法是,你应该把自己描述成与增加收入、降低成本有关系的人,比如”xx产品的开发者”或”改进者”。有一个Google Adsense程序员的自我介绍,是这样写的:”Google公司97%的收入,与我的代码有关。”

      +

      四、不要限定自己 (You are not defined by your chosen software stack)

      +

      年轻学生经常会问,应该选择哪种语言或平台?学会Java,是不是比学会.NET容易找工作? 过分强调某一种语言或平台,都是不必要的。如果你把自己限定为Java程序员或.NET程序员,你就已经输了,因为首先你不应该自称为程序员(理由见上一点),其次这种限定使得你自动被排除在世界上大多数编程工作之外。 现实生活中,学会一种新语言,只需要几个星期,然后再过半年到一年,你就会变成老手。那时,根本没人在乎你以前用什么语言。 天才程序员是很少的,可是需要天才程序员的工作机会却很多很多,大多数场合都是需求远远大于供给。这意味着,即使你不是天才程序员,只要你是一个优秀工程师,那些招聘公司也会立刻录用你,因为它们知道招聘到天才程序员的机会微乎其微。(重复一遍,所谓”优秀工程师”,就是你的履历上有一连串增加收入、降低成本的记录。) 某些公司的人事部门,会根据某个关键词(比如Java或.NET)过滤简历。虽然这样的公司根本不值得去,但是如果你真的想过这一关,也很容易:投入几个晚上和周末,在你当前的项目中设法用到这个关键词,然后再把它写进简历就行了。

      +

       五、如何提高求职时的谈判能力? (How do I become better at negotiation?)

      +

      (1)记住你不是在求职,不是在展示编程技巧,而是在推销某种商业需求(增加收入或降低成本)的解决方案。 (2)面试时,要有自信,要平等的对话。你要的是一个互利的录用合同,不要每次对方提出要求,你都说Yes。 (3)雇主可能会问”你的上一份工资是多少”,他们其实在说”给我一个理由,压低你的报酬”。你要想好如何适当地回答这个问题。 (4)要还价。这里不仅仅指钱,还指其它你关心的方面。如果你无法要求更高的薪水,那就试着要求更多的假期。 (5)在对方决定录用你以后,才开始讨论薪水。因为那时,他们已经在你身上,投入了大量的时间和金钱,产生了一定的成本,此时他们可能觉得一些小问题已经不值得再纠缠了,比如每年的工资增加几千元。

      +

      六、创业公司是否适合应届毕业生? (Are startups great for your career as a fresh graduate?)

      +

      如果你一毕业就加入创业公司,最可能的结果是,接下来几年你都工作得非常辛苦,然后公司悲惨地失败了,你失业了,不得不又去另一家创业公司工作。 如果你真的想去创业公司,应该首先找一家大公司干上两年,攒一点钱,积累一些经验,然后精心挑选后再去创业公司。 在创业公司工作,一般情况下,你遇到的都是创业者。他们大多数人没有能力在两年后雇佣你;而在大公司工作,你遇到的都是其他大公司的人,他们中很多人将来有能力雇用你或者帮你介绍工作。

      +

      七、在创业公司工作是否值得推荐? (So would you recommend working at a startup? )

      +

      选择创业公司,就是选择一条职业道路,而不是选择一种生活方式。可惜很多人把这两者颠倒了,他们推荐创业公司,实际上是在推荐一种你感兴趣的生活方式。 如果你确实喜欢这种生活方式,老实说,你在大公司里也可以得到它们。在许许多多大公司里,你都有机会钻研最新的技术,而且还能5点半准时回家照顾孩子。

      +

       八、沟通技能是最重要的职业技能 (Your most important professional skill is communication)

      +

      前面说过,工程师被雇佣,不是因为会编程,而是因为能够创造商业价值。所以,你让人们相信你能创造价值,这是帮助你找到工作的最重要的能力。这种能力与你真的能创造多少价值,实际上联系不是很紧密。 我认识的一些最优秀的程序员,往往拙于表达。因此,别人不是不想与他们一起工作,就是低估了他们的价值。相反地,如果你看上去很会编程,并且很善于表达,别人就会真的这样看待你。 (完)

      +

      原文网址:阮一峰的网络日志

      +]]>
      + + 乱七八糟 + + + coder + +
      + + 实现SSH无密码登录 + /implement-ssh-without-password.html + +好久没有写博客了,前一阵子工作实在是太忙,回来也没有了写博的激情。这几天给自己放了个假,出去玩了两天,状态好了不少。 + +

      一、在Linux中

      +

      有机器A[192.168.1.1],B[192.168.1.2]。现想A通过ssh免密码登录到B。
      第一步,在A机下生成公钥/私钥对。

      [root@A ~]$ ssh-keygen

      +

      image

      +

      直接三次回车,它将在~/下生成.ssh目录,.ssh下有id_rsa和id_rsa.pub。

      +

      第二步,把A机下的id_rsa.pub复制到B机下

      +

      完成后还需要将id_rsa.pub内容追加到B机的.ssh/authorized_keys文件里。

      +
      [root@A ~]$ scp ~/.ssh/id_rsa.pub root@192.168.1.2:~/id_rsa.pub
      
      +
      +

      由于还没有免密码登录的,所以这里还要输入密码。 输入B机器的登录密码后,文件就复制到了B机器的~/目录。

      +

      第三步、B机把从A机复制的id_rsa.pub添加到.ssh/authorzied_keys文件里。

      + + +
      [root@B ~]$ cat id_rsa.pub >> .ssh/authorized_keys 
      +[root@B ~]$ chmod 600 .ssh/authorized_keys
      authorized_keys的权限必须是600。(要保证.ssh和authorized_keys都只有用户自己有写权限。否则验证无效。) + +

      第四步、验证A机无密码登录B机。

      [root@A ~]$ ssh root@192.168.1.2

      第一次登录时如果询问是否将B机器加到A机器的list of known hosts,还需要你输入yes。现在A机可以无密码登录B机了。

      +

      小结:私钥文件也可以保存下来在别的机器上面使用,被登录的机子要有登录机子的公钥。这个公钥/私钥对一般在私钥宿主机产生。想让A,B机无密码互登录,B机器上重复以上步骤即可~

      +

      二、在Windows中

      +

      在Windows中要想实现无密码登录Linux主机也很简单。一般在Windows中远程ssh连接Linux主机大家都会使用putty 或者Tunnelier这样的工具,我一般使用Tunnelier比较多,因为它集成了sftp工具和其他一些很实用的功能。例如使用Tunnelier很容易实现Firefox+SSH+AutoProxy智能翻墙,想试试的同学可以翻翻我以前发过的文章。下面具体介绍Windows下使用putty无密码登录Linux

      +

      1、首先使用PUTTYGEN.EXE这个工具生成公钥/私钥对,点击Generate,并在空白处移动鼠标几次就行了,如下:

      +

      image

      +

      2、选择Save public key和Save private key可以分别保存公钥和私钥,然后将public key的内容追加到Linux主机中的.ssh/authorzied_keys文件里。

      +

      3、使用putty这个工具创建自动登录的session

      +

      首先在Session节点填写Host Name和你Linux VPS的ssh端口,然后在/Connection/SSH/Auth节点选择你Private key文件的保存位置,然后在/Connection/Data节点填写自动登录的用户名,最后在Session节点为Session起一个名字并保存,以后就可以直接双击保存的Session名字来自动无密码登录Linux主机了。

      +]]>
      + + Technical + + + ssh + putty + Tunnelier + Win7 + Linux + +
      + + IIS无法识别的属性targetFramework、错误模块ManagedPipelineHandler + /iis-identify-attributes-targetframework-managedpipelinehandler.html + +微软服务器与开发工具事业部 黄捷 原文地址 + +

      如果你创建寄宿在IIS中的WCF Service网站项目,(图1显示怎样创建这样的网站项目),或者你把你的WCF Web Application项目或者WCF Service网站项目发布或部署到IIS网站服务器上后,你可以用网页浏览器去访问你的网站。如果你在尝试打开这些网页时无法看到正确的页面显示,或者看到错误提示页面(图2是错误提示页面的一个例子: HTTP Error 500.21 – Internal Server Error Handler “svc-Integrated” has a bad module “ManagedPipelineHandler” in its module list),下面是最常见的问题和解决办法。

      +
      Image + +

      图1

      +

      image

      +

      图2


      常见问题与解决办法:

      +

      1. 检查IIS是否正确安装和运行

      +

      你需要保证你的IIS服务器已经正确安装并正常运行。这里我们不讨论IIS安装的方法(你可你根据你的Windows版本和需要的IIS版本去bing中搜索), 只给出简单的验证方法。如图2所示,在IE地址栏中输入http://localhost, 如果你看到如图所示的页面或者类似的其他版本IIS的默认页面。那么就说明IIS已经在正常运行了。

      +

      image
      图3

      +

      2. 正确注册安装ASP.net

      +

      打开Visual Studio命令行提示工具(Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt, 如果你的OS是Windows Vista及以后的版本,你需要以管理员身份打开),运行”aspnet_regiis.exe -i”。在命令运行完成后重新尝试你的网站。

      +

      3. 在IIS中配置正确的Application Pool

      +

      在IIS管理工具(IIS Manager)中找到你的Website, 选中。在右侧的面板中点击Basic Settings。 你将看到如图3所示的弹出窗口,其中有你正在使用的Application Pool的信息。 选择IIS管理工具中的Applications Pools节点。选中你在使用的Application Pool, 点击右侧的Basic Settings。 你将看到如图4所示的弹出窗口。确定其中的.NET Framework版本是v4.0.xxxxx。如果不是,这也许就是你看到错误页面的原因。尝试在图2中把它改成v4.0或者在图3中选择”Select…”, 更改成其他的使用.NET Framework v4.0的Application Pool。

      +

      image

      +

      图4

      +

      image
      图5

      +

      4. 安装注册WCF组件

      +

      WCF没有正确的在IIS中注册也许是导致看到错误页面的最常见原因。如果你在安装Visual Studio后才安装IIS, 那么你就很可能遇到这样的问题。打开Visual Studio命令行提示工具(Start->All Programs->Visual Studio->Visual Studio Tools->Visual Studio Command Prompt, 如果你的OS是Windows Vista及以后的版本,你需要以管理员身份打开),运行” ServiceModelReg.exe –ia”。 命令完成后再次访问你的WCF 网站。

      +]]>
      + + Technical + + + Windows + git + +
      + + C#实现Windows版Cron + /implementation-windows-version-the-the-the-cron.html + +由于用惯了Linux下面的Cron工具,平时在Windows下面工作却总是不适应Task Schedule,于是自己写了一个Cron for Windows。功能已经基本实现,不过可能有一些小bug。思路很简单,利用线程起一个Timer,然后每分钟去检查一下是不是有符合的规则,添加符合则执行crontab最后的command参数。源码托管在https://github.com/wujiwh/Cron,欢迎各位同学批评指正。 + +具体核心代码如下:(加到github项目托管) + +

      我把Cron作为了一个Windows Service并且把ServiceInstaller的StartType设置为了Automatic来保证每次重启系统后能自动启动服务。同时serviceProcessInstaller的Account属性设置成LocalSystem来保证服务对于的进程有较高的系统权限。

      +

      使用方法很简单,将cron.exe利用.net的installutil.exe安装到系统服务(需要.net4 framework),然后在c:\cron目录中新建一个crontab文件,对照cron说明写一条规则后启动服务,就OK了。服务执行的log文件也在c:\cron目录。这里是我写的一个安装/卸载脚本,想尝试一下Windows版Cron的同学可以直接下载,解压后执行setup.bat来安装服务。服务安装好默认是stop的,需要手动启动,请确保执行前写好你的crontab文件,启动可以在命令行执行sc start cron或者在任务管理器的服务标签右击cron来启动。

      +]]>
      + + Technical + Route + + + Windows + Win7 + coder + C# + Viki + +
      + + Linux编译安装Darwin Streaming Server 6.0.3 + /install-darwin-streaming-server-6-0-3-on-linux.html + +

          买回来VPS后就一直想在上面搭建一个流媒体服务,在网上搜索了很多资料,大部分都是介绍Linux中安装Darwin Streaming Server 5.5.5版本,因为这个版本提供了针对linux的安装脚本。但既然官网有了6.0.3版本,于是果断尝试安装最新的版本。

      1、什么是Darwin Streaming Server

          目前主流的流媒体服务器有微软的windows media server、RealNetworks的Helixserver和苹果公司的Darwin Streaming Server. 微软的windows media server只能在windows2000 server和windows 2003 server下使用,不在考虑之列。RealNetworks的Helixserver是一款跨平台的软件,功能也很强大,但并非免费软件。

          Darwin Streaming Server简称DSS。DSS是Apple公司提供的开源实时流媒体播放服务器程序。整个程序使用C++编写,在设计上遵循高性能,简单,模块化等程序设计原则,务求做到程序高效,可扩充性好。并且DSS是一个开放源代码的,基于标准的流媒体服务器,可以运行在Windows NT和Windows 2000,以及几个UNIX实现上,包括Mac OS X,Linux,FreeBSD,和Solaris操作系统上的。

      2、在Linux中编译安装Darwin Streaming Server

      首先需要进行一些必要的准备工作:

      apt-get install patch make gcc g++ 
      + +

      准备好软件暂存的目录,并从官网下载软件的源码:

      + +
      mkdir soft
      +cd soft
      +wget http://dss.macosforge.org/downloads/DarwinStreamingSrvr6.0.3-Source.tar
      + +

      源码下载完成后,需要解压tar包,

      + +
      tar xvf DarwinStreamingSrvr6.0.3-Source.tar
      + +

      给源码安装补丁文件,进入DarwinStreamingSrvr6.0.3-Source目录,并打补丁:

      cd DarwinStreamingSrvr6.0.3-Source
      +wget http://www.abrahamsson.com/dss-6.0.3.patch
      +patch -p1 < dss-6.0.3.patch  
      + +

      执行

      + +
      ./Buildit 
      + +

      编译完成后,我们来生成linux下的dss安装包

      + +
      执行 ./buildtarball 
      + +

      生成DarwinStreamingSrvr-Linux.tar.gz

      + +

      解压缩

      + +
      tar -zxvf DarwinStreamingSrvr-Linux.tar.gz 
      +cd DarwinStreamingSrvr-Linux 
      + +

      对Install文件做修改

      + +
      if [ $INSTALL_OS = "Linux" ]; then 
      +/usr/sbin/useradd -M qtss > /dev/null 2>&1 
      +else 
      +/usr/sbin/useradd qtss > /dev/null 2>&1 
      +fi
      + +

      将-M修改成-m

      + +

      clip_image001[4]

      + +
      执行./Install 
      + +

      Please enter a new administrator user name: 【新管理员】

      + +

      Please enter a new administrator Password: 【密码】

      + +

      查看是否安裝成功

      + +
      ps aux | grep Darwin(查看流媒体服务器的进程) 
      + +

      root ... ... ... /usr/local/sbin/DarwinStreamingServer +
      + +


      qtss … … … /usr/local/sbin/DarwinStreamingServer

      +
      netstat -ntulp | grep Darwin(查看流媒体服务器的端口)
      + +

       clip_image002[4]

      + +

      3、启动 Darwin Streaming Server

      + +
      sudo /usr/local/sbin/DarwinStreamingServer
      + +

      启动 Web 管理介面 (tcp port 1220)

      + +
      sudo /usr/local/sbin/streamingadminserver.pl
      + +

      ps. 以上两项在刚安装好的时候会自动启动,不需手动执行

      + +

      小技巧:自动启动流媒体服务器的方法:

      + +

      自动运行流媒体服务器序非常简单,把上述命令添加在/etc/rc.d/rc.local脚本中即可。

      + +

      最后在服务器输入 http://你的IP:1220/来访问web管理

      + +

      image

      + +

      默认的媒体文件存放在/usr/local/movies

      + +

      你可以在web管理面板修改这个路径。

      + +

      4、访问自己的流媒体服务

      + +

      可以使用VLC media player这个软件,输入

      + +

      rtsp://你的IP/sample_100kbit.mp4

      + +

      来播放默认的测试视频。如果你的网速够给力的话效果还不错 :)

      +
      +]]> + + Technical + + + Linux + 编译 + Darwin Streaming Server + 流媒体 + +
      + + 安装nvidia官方驱动 + /install-nvidia-official-drivers.html + +

      以前未发布的文章,现在一块贴出来吧。Ubuntu10.10 安装nvidia官方驱动

      1. 下载最新版的nVidia驱动,命名为NVIDIA.run。

      http://www.nvidia.com/page/drivers.html

      2.编辑blacklist.conf。

      sudo gedit /etc/modprobe.d/blacklist.conf

      添加以下部分并保存:

      blacklist vga16fb

      blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv

      3. 删除之前所安装的nVidia驱动。

      sudo apt-get –purge remove nvidia-* sudo apt-get --purge remove xserver-xorg-video-nouveau

      4. 重启电脑。

      5. 按Ctrl + Alt +F1到第一控制台。

      6. 输入用户名和密码后,登录后执行:

      sudo /etc/init.d/gdm stop

      7. 进入驱动所在的文件夹,安装驱动。

      sudo sh NVIDIA.run –k $(uname –r)

      8.启动GDM :

      sudo /etc/init.d/gdm start

      9.重启电脑。

      sudo reboot

      10.如果存在花屏等问题,执行:

      sudo nvidia-xconfig sudo nvidia-settings

      11.根据自己的电脑配置设置分辨率和刷新频率。

      +
      +]]> + + Technical + + + NVIDIA + 程序员 + +
      + + Centos 6.5 安装 Oracle 12C + /install-oracle12c-on-centos6-5.html + +Oracle已经发布Oracle 12C 一段时间了,Oracle此次发布只有64位版本,并无32位版本。我们的系统安装环境为CentOS 6.5 x86_64 。 +

      1、安装Oracle依赖包

      +修改yum配置,默认同时安装32位和64位rpm + +

      yum install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel libXext libXtst libX11 libXau libxcb libXi make sysstat

      +

       

      +

      2 、配置用户

      2.1.   创建相关用户和用户组
      +/usr/sbin/groupadd oinstall + +

      /usr/sbin/groupadd dba

      +

      /usr/sbin/useradd -g oinstall -G dba oracle

      +

      #如果已经创建过oracle 可以执行

      +

      /usr/sbin/usermod -g oinstall -G dba oracle

      +

       

      +
      2.2 修改系统内核参数
      +cp /etc/sysctl.conf /etc/sysctl.conf.bak + +

       

      +

      vim /etc/sysctl.conf

      +

      fs.aio-max-nr = 1048576

      +

      fs.file-max = 6815744

      +

      kernel.shmall =33554432

      +

      kernel.shmmax = 137438953472

      +

      kernel.shmmni = 4096

      +

      kernel.sem = 250 32000 100 128

      +

      net.ipv4.ip_local_port_range = 9000 65500

      +

      net.core.rmem_default = 262144

      +

      net.core.rmem_max = 4194304

      +

      net.core.wmem_default = 262144

      +

      net.core.wmem_max = 1048586

      +

       

      +

      查看oracle用户组的id

      +

      more /etc/passwd

      +

      oracle:x:500:501::/home/oracle:/bin/bash

      +

       

      +

      修改大内存限制

      +

      echo 500 > /proc/sys/vm/hugetlb_shm_group

      +

      vi /etc/sysctl.conf

      +

      vm.hugetlb_shm_group=500

      +

       

      +

      修改用户Limits

      +

      vi /etc/security/limits.conf

      +

      新增如下内容:

      +

      oracle soft nofile 65536

      +

      oracle hard nofile 65536

      +

      oracle soft nproc 16384

      +

      oracle hard nproc 16384

      +

      oracle stack nproc 16384

      +

       

      +
      2.3 创建目录
      +mkdir -p /u01/app/ + +

      chown -R oracle:oinstall /u01/app/

      +

      chmod -R 775 /u01/app/

      +

       

      +
      2.4 配置网络配置hosts
      +hostname + +

      Oracle12

      +

      vi /etc/hosts

      +

      127.0.0.1 Oracle12

      +

       

      +
      2.5   配置环境变量
      +su - oracle + +

      echo $SHELL

      +

      /bin/bash

      +

       

      +

      cd ~

      +

      vi .bash_profile

      +

       

      +

      TMP=/tmp

      +

      TMPDIR=/tmp

      +

      export TMP TMPDIR

      +

       

      +

      3正式开始安装Oracle

      3.1首先解压文件到oracle 用户目录,并进入database 目录。
      +xhost + + +

      cd ~

      +

      unzip unzip linuxamd64_12c_database_1of2.zip

      +

      unzip unzip linuxamd64_12c_database_2of2.zip

      +

      cd database

      +

      ./runInstaller

      +

      4 后续工作

      4.1. 配置环境变量
      +cd ~ + +

      vi .bash_profile

      +

       

      +

      ########## for Oracle ##########

      +

      ORACLE_BASE=/u01/app/oracle

      +

      export ORACLE_BASE

      +

      ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1

      +

      export ORACLE_HOME

      +

      ORACLE_SID=orcl.org

      +

      export ORACLE_SID

      +

      PATH=$PATH:.:$ORACLE_HOME/bin

      +

      export PATH

      +

      5 疑难问题:

      +在安装的过程中遇到了ORA-00845: MEMORY_TARGET not supported on this system + +

      这个问题是由于设置SGA的大小超过了操作系统/dev/shm的大小这个问题是由于设置SGA的大小超过了操作系统/dev/shm的大小

      +

      查看shm大小:

      +

      [oracle@localhost dbs]$ df -h /dev/shm

      +

      文件系统              容量  已用 可用 已用% 挂载点

      +

      tmpfs                 2.0G     0  2.0G   0% /dev/shm.

      +

      利用/etc/fstab文件来修改/dev/shm大小:

      +

      将tmps后面加上size=100G,然后将/dev/shm卸载后重新挂载.

      +

      umount /dev/shm

      +

      mount -all

      +

      如果/dev/shm 卸载不掉

      +

      umount /dev/shm

      umount: /dev/shm: device is busy.

      +

      用fuser处理

      +

      fuser -km /dev/shm

      此时再启动oracle,就没有问题了。

      +]]>
      + + 最近添加 + +
      + + 互联网常见Open API文档资源(转载) + /internet-common-open-api-resources.html + +所谓的开放API(OpenAPI)是服务型网站常见的一种应用,网站的服务商将自己的网站服务封装成一系列API(Application Programming Interface,应用编程接口)开放出去,供第三方开发者使用,这种行为就叫做开放网站的API,所开放的API就被称作OpenAPI(开放API)。 + +

      网站提供开放平台的API后,可以吸引一些第三方的开发人员在该平台上开发商业应用,平台提供商可以获得更多的流量与市场份额,第三方开发者不需要庞大的硬件与技术投资就可以轻松快捷的创业,从而达到双赢的目的,开放API是大平台发展、共享的途径,让开发者开发一个有价值应用,付出的成本更少,成功的机会更多。今天,OpenAPI作为互联网在线服务的发展基础,已经成为越来越多互联网企业发展服务的必然选择。下面我就列举一些常见网站服务的Open API文档资源索引。

      +

      SNS类网站API

      +

      Facebook - http://developers.facebook.com/

      +

      人人网开放平台 - http://dev.renren.com/

      +

      51.com开放平台 - http://developers.51.com/

      +

      MySpace开发者平台 - http://developer.myspace.cn/

      +

      Opensocial - http://wiki.opensocial.org/

      +

      Google Gadgets 小工具 API 开发人员指南 - http://www.google.com/intl/zh-TW/apis/gadgets/docs-home.html

      +

      Gadgets API 开发人员指南 - http://code.google.com/intl/zh-CN/apis/gadgets/docs/dev_guide.html

      +

      Gadgets API - http://code.google.com/intl/zh-CN/apis/gadgets/

      +

      电子商务类

      +

      Amazon API - http://aws.amazon.com/

      +

      eBay API - http://developer.ebay.com/

      +

      淘宝开放平台 - http://www.taobao.com/theme/tao_source/

      +

      微博API

      +

      Twitter API - http://apiwiki.twitter.com/Twitter-API-Documentation

      +

      Status.Net(Laconica) API - http://status.net/wiki/Twitter-compatible_API

      +

      新浪微博开发者平台 - http://open.t.sina.com.cn

      +

      注:需要授权的开发者才能访问,其API调用格式类似Twitter,但需要一个API Key用于认证管理。

      +

      搜狐博客开放平台 - http://ow.blog.sohu.com/

      +

      Follow5 API - http://www.follow5.com/f5/jsp/other/api/api.jsp

      +

      嘀咕API - http://code.google.com/p/digu-api/wiki/DiguApi

      +

      做啥API - http://code.google.com/p/zuosa-api/wiki/ZuosaApiDoc

      +

      人间网API - http://renjian.com/api.html

      +

      9911微博API - http://www.9911.com/api.php

      +

      Google Maps API

      +

      Google Maps API Developer Guide - http://code.google.com/intl/en/apis/maps/documentation/

      +

      Google Maps API Tutorial - http://econym.org.uk/gmap/extensions.htm

      +

      GMaps Utility Library - http://code.google.com/p/gmaps-utility-library-dev/wiki/Libraries

      +

      GMaps Utility Examples - http://gmaps-utility-library.googlecode.com/svn/trunk/labeledmarker/release/examples/

      +

      Saving User-Added Form Data - http://code.google.com/intl/zh-CN/apis/maps/articles/phpsqlinfo.html

      +

      Firefox类

      +

      Mozilla 开发者中心的扩展开发专题 - https://developer.mozilla.org/en/Extensions

      +

      XUL 1.0 规范 - http://www-archive.mozilla.org/projects/xul/xul.html

      +

      更多地了解这种基于 XML 的用户界面语言,它可以构建各种富跨平台应用程序。

      +

      Mozilla Development Center 的 XUL 教程 - http://developer.mozilla.org/en/docs/XUL_Tutorial

      +

      Getting started with extension development 编写一个最简单的Firefox扩展 - http://kb.mozillazine.org/Getting_started_with_extension_development

      +

      Setting up extension development environment - http://developer.mozilla.org/en/docs/Setting_up_extension_development_environment

      +

      实战 Firefox 扩展开发 - http://www.ibm.com/developerworks/cn/web/wa-lo-firefox-ext/

      +

      使用 XUL 实现浏览器扩展 (1) - http://www.ibm.com/developerworks/cn/web/wa-xul1/

      +

      使用 XUL 实现浏览器扩展 (2) - http://www.ibm.com/developerworks/cn/web/wa-xul2/

      +

      应用类

      +

      豆瓣API - http://www.douban.com/service/apidoc/

      +

      Flickr API - http://www.flickr.com/services/api/

      +

      Last.fm API - http://www.last.fm/api

      +

      Box.net API - http://developers.box.net/

      +

      Delicious API - http://delicious.com/help/api

      +

      API统计 - http://www.programmableweb.com/apis

      +]]>
      + + 乱七八糟 + +
      + + ipad2下的vim安装和配置 + /ipad2-by-vim-installation-and-configuration.html + +前面写了给ipad2配置gcc编译环境的过程,中间用到了vim这款文字编辑工具,默认安装的vim需要一些配置才能对语句正确着色和自动折行。 + +

      vim可以通过cydia中搜索安装,或者ssh到ipad,直接执行命令:

      +
      sudo apt-get install vim
      +

      来安装(apt命令需要安装Aptitude 及 APT 0.6 Transitional deb 包工具)

      +

      ipad中配置vim跟Linux中配置vim基本一致,使用mobile用户ssh到ipad,然后在mobile用户目录下增加.vimrc文件。

      +
      vim .vimrc
      +

      输入如下内容:

      +
      set nocompatible “取消vi兼容模式
      +syntax on “设置语法高亮
      +set cursorline
      +set number
      +set hlsearch
      +set foldmethod=syntax
      +set foldenable
      +set laststatus=2
      +set statusline=\ %
      +

      使用:wq或者ZZ保存并退出

      +image + +

      重新使用vim编辑文件,看看是不是有语法高亮了。: )

      +]]>
      + + Technical + + + ssh + iPad2 + vim + 语法高亮 + +
      + + Javascript编码解码方法 + /javascript-coding-decoding-method.html + +ASP(Server.UrlEncode)、PHP(urlencode())函数编码结果,或是经过asp、php等动态语言直接写入COOKIES的中文字符,用JS读取的时候,都会碰到一个编码的问题,那就是最终字符串被urlencode编码了,而又时有需要从JS在客户端去读取这些数据。而本文,就大概说说如何在js中通过系统自带的函数去解决这个问题。 + +

      而相信碰到过此问题的朋友应该都有所了解,目前网络上流行一些js下的自定义函数去解决这个问题,如说vbscript(URLDecode())、javascript(UrlDecode())等。而这两个函数,都无法很好的与asp(Server.UrlEncode)、php(urlencode())这两个函数相互通讯。

      +

      javascript(UrlDecodedecodeURIComponent())这个函数名称实在太常了,个人真的不太了解,毕竟js的系统函数很多,很容易遗漏。烦恼在偶然间发现了这个函数!
      编码函数:encodeURIComponent()
      解码函数:decodeURIComponent()
      decodeURIComponent()语法

      +

      decodeURIComponent(URIstring)
      参 数:(URIstring)必需。一个字符串,含有编码 URI 组件或其他要解码的文本。
      返回值:URIstring 的副本,其中的十六进制转义序列将被它们表示的字符替换。

      +

      示例:

      +
      <script type="text/javascript">
      +// <![CDATA[
      +var test1="烦恼";
      +
      +var test2="%E7%83%A6%E6%81%BC";
      +
      +document.write("编码(原="+test1+"):"+encodeURIComponent(test1));
      +
      +document.write("解码(原="+test2+"):"+decodeURIComponent(test2));
      +// ]]>
      +</script>
      +

      结果:

      +
      编码(原=烦恼):%E7%83%A6%E6%81%BC +解码(原=%E7%83%A6%E6%81%BC):烦恼
      +注意:在UTF-8编码环境下测试通过。 +
      +]]> + + Technical + + + javascript + node.js + +
      + + JavaScript中的鼠标滚轮事件 + /javascript-mouse-wheel-event.html + +Firefox使用DOMMouseScroll,其他的浏览器使用mousewheel。滚动事件触发时Firefox使用detail属性捕捉滚轮信息,其他的浏览器使用wheelDelta。不知道为何在该问题上其他厂商和微软的如此一致。Firefox可以使用addEventListener方法绑定DomMouseScroll事件。 +
      elem.addEventListener('DOMMouseScroll', func, false);
      +IE和其他的主流浏览器可以使用传统的事件绑定模型。但不要使用IE专有的attachEvent方法,其他主流浏览器并不识别微软的这个方法。下面先测试一下。 +
      120
      <script type="text/javascript">
      +    // <![CDATA[
      +    var mouseWheel = document.getElementById('mouseWheel');
      +    
      +    if (mouseWheel.addEventListener) {
      +        
      +        mouseWheel.addEventListener('DOMMouseScroll', function(event) {
      +            
      +            event.target.innerHTML = event.detail;
      +            event.stopPropagation();
      +            event.preventDefault();
      +            
      +        }, false);
      +    }
      +    mouseWheel.onmousewheel = function(event) {
      +        
      +        event = event || window.event;
      +        mouseWheel.innerHTML = event.wheelDelta;
      +        event.returnValue = false;
      +        
      +    }
      +    // ]]>
      +</script>
      +测试之后得到如下的结论。 +
          Firefox
      +    鼠标滚轮向上滚动是-3,向下滚动是3
      +
      +
      IE
      +鼠标滚轮向上滚动是120,向下滚动是-120
      +
      +Safari
      +鼠标滚轮向上滚动是360,向下滚动是-360
      +
      +Opera
      +鼠标滚轮向上滚动是120,向下滚动是-120
      +
      +Chrome
      +鼠标滚轮向上滚动是120,向下滚动是-120</pre>
      +
      +

      有人在Safari下做了一些测试:”只是滚动一圈的话,值为+-0.1,如果滚动地稍微快点的话(多滚动几圈),这个值也会变大。 这是因为Mac OS下有鼠标滚轮加速功能。滚动一次,浏览器滚动1像素,滚动3次,浏览器却滚动30像素”。同时他也对Camino(基于Gecko的内核引擎)进行研究:“与Safari相似(+- 0.3 to +-Infinity),虽然使用了与firefox相同的内核引擎,但结果这个delta值却只在+-2.666666里浮动,无论滚动速度如何。”

      +]]> + + Technical + + + html + javascript + + + + 金山快盘丢文件 + /kingsoft-disk-lost-files.html + +这几天金山快盘似乎在做服务器端的升级,今天打开快盘发现一些重要的东西都没了!话说你这个有点太扯了吧~ + +

      我用vim写了好久的wiki文件!~ 只给我剩下了一个!

      +

      还好快盘有个隐藏的缓存目录,折腾了半天终于算是把我的文件找回来了! 如下图:

      + + +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

      恶心的是它把每个文件的名字都改了~ 好吧,我们要手动改回来。

      +

      写了一段代码来实现改名~ 首先是把前面那一堆乱七八糟的字符串去掉,然后把它替换成空格的下划线替换回来~ 如下:

      +
      +static void Main()
      +        {
      +            string path = @"c:\wiki\";
      +            var files=Directory.GetFiles(path);
      +            foreach (var file in files)
      +            {
      +                string[] substr = file.Split('_');
      +                string newname = path + substr[3];
      +                newname = newname.Replace(' ', '_');
      +                File.Move(file, newname);
      +                Console.WriteLine(file+"is renamed to :"+newname);
      +            }
      +            Console.ReadKey();
      +        }
      +
      +
      +]]> + + Technical + Route + + + 金山快盘 + encode + +
      + + kuaipan_uploader开发分享 + /kuaipan-uploader-dev-share.html + +PS:将原来的一篇文章拆开了,上篇是安装使用讲解,这篇是开发过程讲解。 + +

      以前使用dropbox的linux客户端备份VPS上的文件和数据,但是近来dorpbox在国内越来越难访问,加上dropbox本身的容量只有几G,于是有了自己动刀写一个网盘的客户端,首先想到的是百度网盘,2T的巨大容量肯定是够用了!

      +

      没想到这个决定却是悲剧的开始,按照百度PCS的API文档写了半天,没想到PCS开通居然审核了一周多还不通过! 联系客服,没想到他们的PCS API已经不审核新的申请了!再次吐槽下,你不审核,申请的时候就不能给个提示么!!! 遂放弃!

      +

      然后就想到了还是用金山快盘吧,前段时间刚被迅雷收购,速度方面应该是没有问题。找到金山快盘的官方开放平台,看了看文档似乎是…有点麻烦啊。不过本着有难度才有挑战的原则,还是开搞了。下面介绍下开发过程中遇到的一些问题。

      +

      首先就是快盘的授权机制,本来是不太复杂,但是它的授权流程签名并不支持PLAINTEXT明文文本格式,只支持了一个HMAC-SHA1加密方式。为了处理这个签名倒是走了一些弯路。

      +

      拿到授权token的过程可以总结为三歩走:

      +
        +
      1. 获取未授权的临时 token;
      2. +
      3. 用户登陆并授权你的应用;
      4. +
      5. 根据临时 token换取真实的 access_token。
      + + +

      图示如下:

      +

      授权流程

      +

      在每次请求中,下面几个参数是必须的

      +
      NameRequiredType and LimitDescription
      oauth_consumer_keyYstring第1步的 consumer_key
      oauth_signatureYstring本次请求的签名,生成方法请参考附录-签名生成算法
      oauth_timestampYint时间戳,正整数,和标准时间不超过5分钟
      oauth_nonceYstring[ 0-9A-Za-z_ ]随机字符串,长度小于32字节。每次请求请使用不同的nonce
      +oauth_consumer_key可以在你创建应用的时候拿到,oauth_timestamp为标准的unix时间戳格式,oauth_nonce每次都生成一个随机数,这几个参数都非常好处理,主要就是oauth_signature这个费些周章。 + +

      官方的OAuth签名生成讲的比较具体,其实获取签名的方式也非常简单:

      +
        +
      • 计算串基
      • +
      • 根据串基按HMAC-SHA1获取签名并使用bash64和url_encode 转码
      +生成签名的时候,如果是申请request_token 那么HMAC_SHA1加密的key 就是你的consumer_secret+&,其他都是consumer_secret+&+oauth_token_secret! + +

      Linux shell中处理url_encode 没有太好的办法,我索性就写了一个函数用sed处理了,代码如下:

      +
      #url encode
      +function url_encode
      +{
      +
      +    url=$1
      +    echo -n $(echo -n "$url" | sed 's/\%/\%25/g'|sed 's/&/\%26/g' |sed 's/:/\%3A/g' |sed 's/\//\%2F/g'| sed 's/=/\%3D/g' |sed 's/ /\%20/g' |sed 's/@/\%40/g' |sed 's/+/\%2B/g' |sed 's/\*/\%2A/g')
      +    
      +}
      +

      拼接字符串基可归结为:请求方式&url_encode(请求URL)&(url_encode(参数1+参数2… ))

      +

      使用bash获取签名处理方法如下:

      +
      function get_signature
      +{
      +    method=$1
      +    url=$2
      +    data=$3
      +    token_secret=$4
      +    baseUrl="$1&$(url_encode "$2")&$(url_encode "$3")"
      +    signature=$(echo -n $baseUrl | openssl dgst -sha1 -binary -hmac "$APP_CONSUMER_SECRET&$token_secret" |base64)
      +    
      +    echo -n $(url_encode $signature)
      +}
      + +

      有了签名,一切都简单了。按照官方开发文档上参数列表把其他必选的参数拼好就行了。

      +

      请求使用的curl,命令格式如下:

      +

      Curl –s –S –L –d “参数” “请求的URL” –o “本地缓存文件”

      +

      整个脚本的源码如下:

      +
      #!/usr/bin/env bash
      +#
      +# KuaiPan Uploader
      +#
      +#===========================================================================
      +# Copyright (C) 2014-2015 wangheng <wujiwh@gmail.com>
      +#
      +# This file is part of Kuaipan Uploader source code.
      +#
      +# Kuaipan Uploader is free software; you can redistribute it
      +# and/or modify it under the terms of the GNU General Public License as
      +# published by the Free Software Foundation; either version 2 of the License,
      +# or (at your option) any later version.
      +#
      +# Kuaipan Uploader is distributed in the hope that it will be
      +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
      +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      +# GNU General Public License for more details.
      +#
      +# You should have received a copy of the GNU General Public License
      +# along with Foobar; if not, write to the Free Software
      +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
      +#===========================================================================
      +
      +#===========================================================================
      +#     FileName: kuaipan_uploader.sh
      +#         Desc: API Doc is: http://www.kuaipan.cn/developers/document.htm
      +#       Author: wangheng
      +#        Email: wujiwh@gmail.com
      +#     HomePage: http://wangheng.org
      +#      Version: 1.0.1
      +#   LastChange: 2015-05-09 09:34:59
      +#      History:
      +#===========================================================================
      +
      +#配置文件.
      +CONFIG_FILE=~/.kuaipan_upload.conf
      +
      +RESPONSE_FILE="/tmp/resp_kuaipan"
      +COOKIE_FILE="/tmp/kuaipan.cookie"
      +
      +Version="1.0.1"
      +
      +#使用整个快盘此处填"kuaipan",使用应用目录填"app_folder"
      +ROOT_DIR="app_folder"
      +
      +#这里改为你自己应用的consumer_key和consumer_secret_key
      +APP_CONSUMER_KEY="xc0kwh2EAKlTQqCd"
      +APP_CONSUMER_SECRET="6mnnfufVvWzPzOgb"
      +
      +#授权相关
      +API_REQUEST_TOKEN_URL="https://openapi.kuaipan.cn/open/requestToken"
      +API_USER_AUTH_URL="https://www.kuaipan.cn/api.php?ac=open&op=authorise&oauth_token="
      +API_AUTH_TOKEN_URL="https://openapi.kuaipan.cn/open/accessToken"
      +
      +#统计信息相关
      +API_ACCOUNT_INFO_URL="http://openapi.kuaipan.cn/1/account_info"
      +API_METADATA_URL="http://openapi.kuaipan.cn/1/metadata"
      +
      +#上传、下载、删除
      +API_UPLOAD_REQUEST_URL="http://api-content.dfs.kuaipan.cn/1/fileops/upload_locate"
      +API_DOWNLOAD_URL="http://api-content.dfs.kuaipan.cn/1/fileops/download_file"
      +API_DELETE_FILE_URL="http://openapi.kuaipan.cn/1/fileops/delete"
      +
      +
      +Dependents="curl sed awk basename date grep tr od openssl base64"
      +CURL="curl" 
      +
      +#检查程序的依赖项
      +for i in $Dependents; do
      +    which $i > /dev/null
      +    if [ $? -ne 0 ]; then
      +        echo -e "Error: $i Not Found"
      +        exit 1
      +    fi
      +done
      +
      +#清理环境
      +if [ -f "$RESPONSE_FILE" ]; then
      +    rm -f $RESPONSE_FILE
      +fi
      +
      +#==========通用方法========
      +
      +function get_json_value()
      +{
      +    KEY=$1
      +    echo $(cat $RESPONSE_FILE| sed 's/ //g'| sed -n 's/.*'$KEY'":"\([a-zA-Z0-9\.\-\/:]*\)".*/\1/p')
      +}
      +
      +#get unix timestamp
      +function unix_time
      +{
      +    echo $(date +%s)
      +}
      +
      +#url encode
      +function url_encode
      +{
      +    url=$1
      +    echo -n $(echo -n "$url" | sed 's/\%/\%25/g'|sed 's/&/\%26/g' |sed 's/:/\%3A/g' |sed 's/\//\%2F/g'| sed 's/=/\%3D/g' |sed 's/ /\%20/g' |sed 's/@/\%40/g' |sed 's/+/\%2B/g' |sed 's/\*/\%2A/g')
      +    #echo -ne $(echo $url |tr -d '\n' |od -An -tx1 |tr '[a-z]' '[A-Z]' |tr ' ' \%)
      +}
      +
      +#url decode
      +function url_decode
      +{
      +    url=$1
      +    echo -ne $(echo -n $url | sed 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g')"\n"
      +}
      +
      +function get_signature
      +{
      +    method=$1
      +    url=$2
      +    data=$3
      +    token_secret=$4
      +    baseUrl="$1&$(url_encode "$2")&$(url_encode "$3")"
      +    signature=$(echo -n $baseUrl | openssl dgst -sha1 -binary -hmac "$APP_CONSUMER_SECRET&$token_secret" |base64)
      +    
      +    echo -n $(url_encode $signature)
      +}
      +
      +function account_setup
      +{
      +    #1. 获取未授权的临时 token;
      +    DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_version=1.0"
      +    oauth_signature=$(get_signature 'GET' $API_REQUEST_TOKEN_URL "$DATA")
      +    $CURL -k -s -S --globoff -L -G -d "$DATA&oauth_signature=$oauth_signature" "$API_REQUEST_TOKEN_URL" -o "$RESPONSE_FILE" 
      +    
      +    tmp_oauth_token=$(get_json_value 'oauth_token')
      +    tmp_oauth_token_secret=$(get_json_value 'oauth_token_secret')
      +
      +
      +    #2. 浏览器访问URL获取授权
      +    echo -ne "\nVisit this URL from your Browser, and login with your kuaipan account\n"
      +    echo -ne "\n --> $API_USER_AUTH_URL$tmp_oauth_token \n"
      +    echo -ne "\nPress enter when done...\n"
      +    read
      +
      +    #3. 获取真实oauth_token
      +    DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$tmp_oauth_token"
      +    oauth_signature=$(get_signature 'GET' $API_AUTH_TOKEN_URL "$DATA" $tmp_oauth_token_secret)
      +    
      +    $CURL -k -s -S -L -G -d "$DATA&oauth_signature=$oauth_signature" $API_AUTH_TOKEN_URL -o "$RESPONSE_FILE"
      +
      +    OAUTH_TOKEN=$(get_json_value 'oauth_token')
      +    OAUTH_TOKEN_SECRET=$(get_json_value 'oauth_token_secret')
      +
      +    if [ -n "$OAUTH_TOKEN" -a -n "$OAUTH_TOKEN_SECRET" -a -n "$APP_CONSUMER_KEY" ]; then
      +            echo -ne "Congratulations!!! login succeed!\n"
      +            
      +            #Saving data
      +            echo "APP_CONSUMER_KEY:$APP_CONSUMER_KEY" > "$CONFIG_FILE"
      +            echo "APP_CONSUMER_SECRET:$APP_CONSUMER_SECRET" >> "$CONFIG_FILE"
      +            echo "OAUTH_TOKEN:$OAUTH_TOKEN" >> "$CONFIG_FILE"
      +            echo "OAUTH_TOKEN_SECRET:$OAUTH_TOKEN_SECRET" >> "$CONFIG_FILE"
      +            
      +            echo -ne "All saved as $CONFIG_FILE!\n\n"
      +        else
      +            echo -ne "Unfortunately!!! login failed! please retray or contact wujiwh@gmail.com for help! \n\n"
      +    fi
      +
      +}
      +
      +function account_relink
      +{
      +    echo -ne "Warrning: \nAre you sure? [y/n]y"
      +    read aw
      +    if [ "$aw" == "n" ];then
      +        echo -ne "Cancelled! \n"
      +    else
      +        rm -f "$CONFIG_FILE"
      +        account_setup
      +    fi
      +}
      +
      +#========== First Setup ========== 
      +#先检查本地是否存在配置文件
      +if [ -f "$CONFIG_FILE" ]; then
      +      
      +    APP_CONSUMER_KEY=$(sed -n 's/APP_CONSUMER_KEY:\([a-zA-Z0-9]*\)/\1/p' "$CONFIG_FILE")
      +    APP_CONSUMER_SECRET=$(sed -n 's/APP_CONSUMER_SECRET:\([a-zA-Z0-9]*\)/\1/p' "$CONFIG_FILE")
      +    OAUTH_TOKEN=$(sed -n 's/OAUTH_TOKEN:\([a-zA-Z0-9\.]*\)/\1/p' "$CONFIG_FILE")
      +    OAUTH_TOKEN_SECRET=$(sed -n 's/OAUTH_TOKEN_SECRET:\([a-zA-Z0-9\.]*\)/\1/p' "$CONFIG_FILE")
      +    
      +    if [ -z "$APP_CONSUMER_KEY" -o -z "$APP_CONSUMER_SECRET" -o -z "$OAUTH_TOKEN" -o -z "$OAUTH_TOKEN_SECRET" ]; then
      +        echo -ne "Cannot loading data from $CONFIG_FILE...\n"
      +        echo -ne "Please run [$0 relink] to retray! \n"
      +        exit 1
      +    fi
      +    
      +#新用户,获取Token并保存到配置文件
      +else
      +    account_setup
      +fi
      +
      +
      +#========= OAUTH API 功能实现 =========
      +
      +function get_common_oauthdata
      +{
      +    echo "oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$OAUTH_TOKEN"
      +}
      +
      +#获取用户信息
      +function account_info()
      +{
      +    OAUTH_DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$OAUTH_TOKEN"
      +    signature=$(get_signature 'GET' $API_ACCOUNT_INFO_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)
      +    
      +    $CURL -k -s -S -G -L -d "$OAUTH_DATA&oauth_signature=$signature" "$API_ACCOUNT_INFO_URL" -o "$RESPONSE_FILE"
      +    
      +    userName=$(sed -n 's/.*user_name":"\([a-zA-Z0-9\.\-\@]*\)".*/\1/p' $RESPONSE_FILE) 
      +    let quota_total=$(sed -n 's/.*quota_total":\([0-9]*\),.*/\1/p' $RESPONSE_FILE)/1024/1024/1024
      +    let quota_used=$(sed -n 's/.*quota_used":\([0-9]*\),.*/\1/p' $RESPONSE_FILE)/1024/1024/1024
      +    
      +    echo ""
      +    echo "User Name: $userName"
      +    echo "Total Quota: $quota_total GB"
      +    echo "Used Quota: $quota_used GB"
      +    echo ""
      +}
      +
      +#文件上传
      +function file_upload
      +{
      +    local overwrite=$1
      +    local file_Local=$2
      +    local file_Remote=$3
      +
      +    if [ -z "$file_Remote" ]; then
      +        file_Remote=$(basename "$file_Local")
      +    fi
      +
      +    OAUTH_DATA=$(get_common_oauthdata)
      +    signature=$(get_signature 'GET' $API_UPLOAD_REQUEST_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)
      +    $CURL -k -s -S -G -L -d "$OAUTH_DATA&oauth_signature=$signature" "$API_UPLOAD_REQUEST_URL" -o "$RESPONSE_FILE"
      +    
      +    upload_url=$(get_json_value "url")"1/fileops/upload_file"
      +    #echo $upload_url
      +
      +    OAUTH_DATA="oauth_consumer_key=$APP_CONSUMER_KEY&oauth_nonce=$RANDOM&oauth_signature_method=HMAC-SHA1&oauth_timestamp=$(unix_time)&oauth_token=$OAUTH_TOKEN&overwrite=$overwrite&path=$(url_encode $file_Remote)&root=app_folder"
      +    signature=$(get_signature 'POST' $upload_url "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)
      +    
      +    $CURL -k --progress-bar -i -o "$RESPONSE_FILE" -F "file=@$file_Local" "$upload_url?$OAUTH_DATA&oauth_signature=$signature" 
      +    
      +    grep "HTTP/1.1 200 OK" "$RESPONSE_FILE" > /dev/null
      +    if [ $? -eq 0 ]; then
      +        echo -ne "--Upload Success.\n"
      +    else
      +        echo -ne "--Upload Failed.\n"
      +        echo -ne "--Error occurred while uploading $file_Local.\n"
      +        exit 1
      +    fi   
      +    #cat $RESPONSE_FILE
      +}
      +
      +#下载文件
      +function file_download
      +{
      +    local file_Remote=$1
      +    local file_Local=$2
      +
      +    echo -ne "Begin to download $file_Remote...\n"
      +    OAUTH_DATA=$(get_common_oauthdata)"&path=$(url_encode $file_Remote)&root=$ROOT_DIR"
      +    signature=$(get_signature 'GET' $API_DOWNLOAD_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)
      +    #$CURL -S -L -v -G -d "$OAUTH_DATA&oauth_signature=$signature" "$API_DOWNLOAD_URL" -o "$file_Local"
      +    $CURL -L --compressed --progress-bar -G -D "$RESPONSE_FILE" -d "$OAUTH_DATA&oauth_signature=$signature" "$API_DOWNLOAD_URL" --cookie-jar "$COOKIE_FILE" -o "$file_Local"
      +    rm -f $COOKIE_FILE
      +
      +    grep "HTTP/1.1 200 OK" "$RESPONSE_FILE" > /dev/null
      +    if [ $? -eq 0 ]; then
      +        echo -ne "--Download Success.\n"
      +    else
      +        echo -ne "--Download Failed.\n"
      +        exit 1
      +    fi   
      +}
      +
      +#删除文件
      +function file_delete
      +{
      +    local file_Remote=$1
      +
      +    OAUTH_DATA=$(get_common_oauthdata)"&path=$file_Remote&root=$ROOT_DIR"
      +    signature=$(get_signature 'GET' $API_DELETE_FILE_URL "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)
      +    $CURL -k -s -S -i -S -L -G -d "$OAUTH_DATA&oauth_signature=$signature" "$API_DELETE_FILE_URL" -o "$RESPONSE_FILE"
      +    
      +    grep "HTTP/1.1 200 OK" "$RESPONSE_FILE" > /dev/null
      +    if [ $? -eq 0 ]; then
      +        echo -ne "\033[0;32;1m--Delete Success.\033[0m\n"
      +    else
      +        echo -ne "\033[0;31;1m--Delete Failed.\033[0m\n"
      +        exit 1
      +    fi   
      +    echo ""
      +}
      +
      +#显示文件夹信息,默认显示根目录
      +function show_list
      +{
      +    local remote_path=$1
      +
      +    local metaUrl="$API_METADATA_URL/$ROOT_DIR/$remote_path"
      +    OAUTH_DATA=$(get_common_oauthdata)
      +    signature=$(get_signature 'GET' $metaUrl "$OAUTH_DATA" $OAUTH_TOKEN_SECRET)
      +    $CURL -k -s -S -G -L -d "$OAUTH_DATA&oauth_signature=$signature" "$metaUrl" -o "$RESPONSE_FILE"
      +
      +    sed 's/,/\n/g' $RESPONSE_FILE|grep name|awk -F ':' '{print $2}'|tr -d '"'|tr "\n" "\t"|sed 's/$/\n/'
      +}
      +
      +#=====================================
      +
      +function usage() {
      +    echo -e "KuaiPan Uploader v$Version"
      +    echo -e "wangheng - wujiwh@gmail.com\n"
      +    echo -e "Usage: $0 COMMAND [PARAMETERS]..."
      +    echo -e "\nCommands:"
      +    
      +    echo -e "\t upload   [local file]  <remote file>"
      +    echo -e "\t download [remote file] <local file>"
      +    echo -e "\t delete   [remote file/remote dir]"
      +    echo -e "\t list     <remote dir>"
      +    echo -e "\t info"
      +    echo -e "\t relink"
      +    
      +    echo -en "\nFor more informations, please visit \033[0;32;1m http://wangheng.org.\033[0m \n\n"
      +    exit 1
      +}
      +
      +#===============Main =================
      +COMMAND=$1
      +
      +case $COMMAND in
      +
      +    upload)
      +
      +        file_Local=$2
      +        file_Remote=$3
      +
      +        #检查本地文件是否存在
      +        if [ ! -f "$file_Local" ]; then
      +            echo -e "Error: Please specify a valid source file!"
      +            exit 1
      +        fi
      +                
      +        
      +        file_upload "True" "$file_Local" "$file_Remote"
      +        
      +    ;;
      +
      +    download)
      +
      +        file_Remote=$2 
      +        file_Local=$3  
      +
      +        if [ -z "$file_Remote" ]; then
      +            echo -ne "Error: Please input a valid remote file.\n"
      +            exit 1
      +        fi
      +
      +        if [ -z "$file_Local" ]; then
      +            file_Local=$(basename "$file_Remote")
      +        fi
      +        
      +        file_download "$file_Remote" "$file_Local"
      +        
      +    ;;
      +
      +       
      +    info)
      +    
      +        account_info
      +    
      +    ;;
      +
      +    delete)
      +
      +        file_Remote=$2    
      +
      +        if [ -z "$file_Remote" ]; then
      +            echo -ne "Error: Please input a valid remote file.\n"
      +            exit 1
      +        fi
      +
      +        file_delete "$file_Remote"
      +
      +    ;;
      +
      +    list)
      +
      +        RemoteDir=$2
      +        if [ -z "$RemoteDir" ]; then
      +            RemoteDir="/"
      +        fi
      +        
      +        show_list "$RemoteDir"
      +
      +    ;;
      +        
      +    relink)
      +        account_relink    
      +    ;;
      +            
      +    *)
      +        usage
      +    ;;
      +
      +esac
      +

       

      +

      项目开源在我的Githubhttps://github.com/wujiwh/kuaipan_uploader

      +

      欢迎大家多多交流~~

      +]]>
      + + linux + + + Windows + Linux + 备份 + awk + curl + shell + 开源 + +
      + + Linux中dd命令详解 + /linux-dd-command-detailed.html + +一、dd命令 +dd:用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换。 +注意:指定数字的地方若以下列字符结尾,则乘以相应的数字:b=512;c=1;k=1024;w=2 +参数注释: +1. if=文件名:输入文件名,缺省为标准输入。即指定源文件。< if=input file > +2. of=文件名:输出文件名,缺省为标准输出。即指定目的文件。< of=output file > +3. ibs=bytes:一次读入bytes个字节,即指定一个块大小为bytes个字节。 +obs=bytes:一次输出bytes个字节,即指定一个块大小为bytes个字节。 +bs=bytes:同时设置读入/输出的块大小为bytes个字节。 +4. cbs=bytes:一次转换bytes个字节,即指定转换缓冲区大小。 +5. skip=blocks:从输入文件开头跳过blocks个块后再开始复制。 +6. seek=blocks:从输出文件开头跳过blocks个块后再开始复制。 +注意:通常只用当输出文件是磁盘或磁带时才有效,即备份到磁盘或磁带时才有效。 +7. count=blocks:仅拷贝blocks个块,块大小等于ibs指定的字节数。 +8. conv=conversion:用指定的参数转换文件。 +ascii:转换ebcdic为ascii +ebcdic:转换ascii为ebcdic +ibm:转换ascii为alternate ebcdic +block:把每一行转换为长度为cbs,不足部分用空格填充 +unblock:使每一行的长度都为cbs,不足部分用空格填充 +lcase:把大写字符转换为小写字符 +ucase:把小写字符转换为大写字符 +swab:交换输入的每对字节 +noerror:出错时不停止 +notrunc:不截短输出文件 +sync:将每个输入块填充到ibs个字节,不足部分用空(NUL)字符补齐。 +二、dd应用实例 + +
       
      +

      1.将本地的/dev/hdb整盘备份到/dev/hdd
      heng@me: dd if=/dev/hdb of=/dev/hdd

      +

      2.将/dev/hdb全盘数据备份到指定路径的image文件
      heng@me:dd if=/dev/hdb of=/root/image

      +

      3.将备份文件恢复到指定盘
      heng@me:dd if=/root/image of=/dev/hdb

      +

      4.备份/dev/hdb全盘数据,并利用gzip工具进行压缩,保存到指定路径
      heng@me:dd if=/dev/hdb | gzip > /root/image.gz

      +

      5.将压缩的备份文件恢复到指定盘
      heng@me:gzip -dc /root/image.gz | dd of=/dev/hdb

      +

      6.备份与恢复MBR
      备份磁盘开始的512个字节大小的MBR信息到指定文件:
      heng@me:dd if=/dev/hda of=/root/image count=1 bs=512
      count=1指仅拷贝一个块;bs=512指块大小为512个字节。
      恢复:
      heng@me:dd if=/root/image of=/dev/had
      将备份的MBR信息写到磁盘开始部分

      +

      7.备份软盘
      heng@me:dd if=/dev/fd0 of=disk.img count=1 bs=1440k (即块大小为1.44M)

      +

      8.拷贝内存内容到硬盘
      heng@me:dd if=/dev/mem of=/root/mem.bin bs=1024 (指定块大小为1k)

      +

      9.拷贝光盘内容到指定文件夹,并保存为cd.iso文件
      heng@me:dd if=/dev/cdrom(hdc) of=/root/cd.iso

      +

      10.增加swap分区文件大小
      第一步:创建一个大小为256M的文件:
      heng@me:dd if=/dev/zero of=/swapfile bs=1024 count=262144
      第二步:把这个文件变成swap文件:
      heng@me:mkswap /swapfile
      第三步:启用这个swap文件:
      heng@me:swapon /swapfile
      第四步:编辑/etc/fstab文件,使在每次开机时自动加载swap文件:
      /swapfile swap swap default 0 0

      +

      11.销毁磁盘数据
      heng@me:dd if=/dev/urandom of=/dev/hda1
      注意:利用随机的数据填充硬盘,在某些必要的场合可以用来销毁数据。

      +

      12.测试硬盘的读写速度
      heng@me:dd if=/dev/zero bs=1024 count=1000000 of=/root/1Gb.file
      heng@me:dd if=/root/1Gb.file bs=64k | dd of=/dev/null
      通过以上两个命令输出的命令执行时间,可以计算出硬盘的读、写速度。

      +

      13.确定硬盘的最佳块大小:
      heng@me:dd if=/dev/zero bs=1024 count=1000000 of=/root/1Gb.file
      heng@me:dd if=/dev/zero bs=2048 count=500000 of=/root/1Gb.file
      heng@me:dd if=/dev/zero bs=4096 count=250000 of=/root/1Gb.file
      heng@me:dd if=/dev/zero bs=8192 count=125000 of=/root/1Gb.file
      通过比较以上命令输出中所显示的命令执行时间,即可确定系统最佳的块大小。

      +

      14.修复硬盘:
      heng@me:dd if=/dev/sda of=/dev/sda 或dd if=/dev/hda of=/dev/hda
      当硬盘较长时间(一年以上)放置不使用后,磁盘上会产生magnetic flux point,当磁头读到这些区域时会遇到困难,并可能导致I/O错误。当这种情况影响到硬盘的第一个扇区时,可能导致硬盘报废。上边的命令有可能使这些数 据起死回生。并且这个过程是安全、高效的。

      +

      15.利用netcat远程备份
      heng@me:dd if=/dev/hda bs=16065b | netcat < targethost-IP > 1234
      在源主机上执行此命令备份/dev/hda
      heng@me:netcat -l -p 1234 | dd of=/dev/hdc bs=16065b
      在目的主机上执行此命令来接收数据并写入/dev/hdc
      heng@me:netcat -l -p 1234 | bzip2 > partition.img
      heng@me:netcat -l -p 1234 | gzip > partition.img

      +

      以上两条指令是目的主机指令的变化分别采用bzip2、gzip对数据进行压缩,并将备份文件保存在当前目录。
      将一个很大的视频文件中的第i个字节的值改成0x41(也就是大写字母A的ASCII值)
      echo A | dd of=bigfile seek=$i bs=1 count=1 conv=notrunc

      三、/dev/null和/dev/zero的区别
      /dev/null,外号叫无底洞,你可以向它输出任何数据,它通吃,并且不会撑着!
      /dev/zero,是一个输入设备,你可你用它来初始化文件。该设备无穷尽地提供0,可以使用任何你需要的数目——设备提供的要多的多。他可以用于向设备或文件写入字符串0。
      /dev/null——它是空设备,也称为位桶(bit bucket)。任何写入它的输出都会被抛弃。如果不想让消息以标准输出显示或写入文件,那么可以将消息重定向到位桶。

      +
      heng@me:if=/dev/zero of=./test.txt bs=1k count=1
      + heng@me:ls –l
      + total 4
      + -rw-r--r-- 1 oracle dba 1024 Jul 15 16:56 test.txt
      + heng@me:find / -name access_log 2>/dev/null
      3.1使用/dev/null +

      把/dev/null看作”黑洞”, 它等价于一个只写文件,所有写入它的内容都会永远丢失.,而尝试从它那儿读取内容则什么也读不到。然而, /dev/null对命令行和脚本都非常的有用

      +
      禁止标准输出
      + heng@me:cat $filename >/dev/null #文件内容丢失,而不会输出到标准输出.
      +禁止标准错误
      + heng@me:rm $badname 2>/dev/null #这样错误信息[标准错误]就被丢到太平洋去了
      +禁止标准输出和标准错误的输出
      + heng@me:cat $filename 2>/dev/null >/dev/null
      +

      如果”$filename”不存在,将不会有任何错误信息提示;如果”$filename”存在, 文件的内容不会打印到标准输出。
      因此,上面的代码根本不会输出任何信息。当只想测试命令的退出码而不想有任何输出时非常有用。

      +

      3.2使用/dev/zero
      像/dev/null一样, /dev/zero也是一个伪文件, 但它实际上产生连续不断的null的流(二进制的零流,而不是ASCII型的)。 写入它的输出会丢失不见, 而从/dev/zero读出一连串的null也比较困难, 虽然这也能通过od或一个十六进制编辑器来做到。 /dev/zero主要的用处是用来创建一个指定长度用于初始化的空文件,就像临时交换文件。

      +

      用/dev/zero创建一个交换临时文件

      #!/bin/bash

      +

      创建一个交换文件.

      ROOT_UID=0 # Root 用户的 $UID 是 0.
      E_WRONG_USER=65 # 不是 root?
      FILE=/swap
      BLOCKSIZE=1024
      MINBLOCKS=40
      SUCCESS=0

      +

      这个脚本必须用root来运行.

      if [ "$UID" -ne "$ROOT_UID" ]
      then
      echo; echo "You must be root to run this script."; echo
      exit $E_WRONG_USER
      fi
      blocks=${1:-$MINBLOCKS} # 如果命令行没有指定,
      #+ 则设置为默认的40块.

      +

      上面这句等同如:

      ————————————————–

      if [ -n "$1" ]

      then

      blocks=$1

      else

      blocks=$MINBLOCKS

      fi

      ————————————————–

      if [ "$blocks" -lt $MINBLOCKS ]
      then
      blocks=$MINBLOCKS # 最少要有 40 个块长.
      fi
      echo "Creating swap file of size $blocks blocks (KB)."
      dd if=/dev/zero of=$FILE bs=$BLOCKSIZE count=$blocks # 把零写入文件.
      mkswap $FILE $blocks # 将此文件建为交换文件(或称交换分区).
      swapon $FILE # 激活交换文件.
      echo "Swap file created and activated."
      exit $SUCCESS
      关于 /dev/zero 的另一个应用是为特定的目的而用零去填充一个指定大小的文件, 如挂载一个文件系统到环回设备 (loopback device)或"安全地" 删除一个文件

      例子创建ramdisk
      #!/bin/bash

      +

      ramdisk.sh

      "ramdisk"是系统RAM内存的一段,

      #+ 它可以被当成是一个文件系统来操作.

      +

      它的优点是存取速度非常快 (包括读和写).

      缺点: 易失性, 当计算机重启或关机时会丢失数据.

      #+ 会减少系统可用的RAM.

      +

      10 # 那么ramdisk有什么作用呢?

      保存一个较大的数据集在ramdisk, 比如一张表或字典,

      #+ 这样可以加速数据查询, 因为在内存里查找比在磁盘里查找快得多.
      E_NON_ROOT_USER=70 # 必须用root来运行.
      ROOTUSER_NAME=root
      MOUNTPT=/mnt/ramdisk
      SIZE=2000 # 2K 个块 (可以合适的做修改)
      BLOCKSIZE=1024 # 每块有1K (1024 byte) 的大小
      DEVICE=/dev/ram0 # 第一个 ram 设备
      username=id -nu
      if [ "$username" != "$ROOTUSER_NAME" ]
      then
      echo "Must be root to run &quot;basename $0&quot;."
      exit $E_NON_ROOT_USER
      fi
      if [ ! -d "$MOUNTPT" ] # 测试挂载点是否已经存在了,
      then #+ 如果这个脚本已经运行了好几次了就不会再建这个目录了
      mkdir $MOUNTPT #+ 因为前面已经建立了.
      fi
      dd if=/dev/zero of=$DEVICE count=$SIZE bs=$BLOCKSIZE

      +

      把RAM设备的内容用零填充.

      为何需要这么做?

      mke2fs $DEVICE # 在RAM设备上创建一个ext2文件系统.
      mount $DEVICE $MOUNTPT # 挂载设备.
      chmod 777 $MOUNTPT # 使普通用户也可以存取这个ramdisk.

      +

      但是, 只能由root来缷载它.

      echo "&quot;$MOUNTPT&quot; now available for use."

      +

      现在 ramdisk 即使普通用户也可以用来存取文件了.

      注意, ramdisk是易失的, 所以当计算机系统重启或关机时ramdisk里的内容会消失.

      拷贝所有你想保存文件到一个常规的磁盘目录下.

      重启之后, 运行这个脚本再次建立起一个 ramdisk.

      仅重新加载 /mnt/ramdisk 而没有其他的步骤将不会正确工作.

      如果加以改进, 这个脚本可以放在 /etc/rc.d/rc.local,

      #+ 以使系统启动时能自动设立一个ramdisk.

      +

      这样很合适速度要求高的数据库服务器.

      exit 0


      +]]> + + 最近添加 + +
      + + linux版快盘上传下载脚本 + /kuaipan-uploader.html + +PS:将脚本的开发过程移动到了这里。想了解下开发步骤的可以参考~~ + +

      安装使用

      +此脚本适用于大部分bash环境,已经在cygwin,ubuntu14.04,debian,centos6,mac-osx等环境通过测试。 + +

      1.依赖项
      使用此程序前请确认你的Linux或者Cygwin支持如下命令:

      +
      curl sed awk basename date grep tr od openssl base64
      2.配置 + +

      如果你想使用自己的app_key你需要首先注册一个金山快盘账号,然后到这里地址创建一个你自己的应用并把得到的 consumer_key、consumer_secret填写到脚本相应位置。
      当然此步骤可以略过,你可以直接使用脚本中填写好的consumer_key、consumer_secret,我创建的应用名称all4fun.

      +

      3.安装

      wget https://github.com/wujiwh/kuaipan_uploader/archive/master.zip
      unzip master.zip
      cd kuaipan_uploader-master
      #或者 :
      git clone https://github.com/wujiwh/kuaipan_uploader.git
      cd kuaipan_uploader
      #上面两种方式选择一种即可
      #赋予脚本执行权限并执行
      chmod a+x kuaipan_uploader.sh
      ./kuaipan_uploader.sh

      然后根据提示完成API的授权流程,得到授权Token。脚本会自动保存得到的授权信息到CONFIG_FILE 变量对应配置文件,默认为~/.kuaipan_upload.conf 

      +

      4.使用说明

      KuaiPan Uploader v1.1.0
      wangheng - wujiwh@gmail.com

      +

      Usage: /usr/bin/kuaipan COMMAND [PARAMETERS]…

      +

      Commands:
      upload [local file] <remote file>
      download [remote file] <local file>
      delete [remote file/remote dir]
      list <remote dir>
      info
      relink

      +

      For more informations, please visit http://wangheng.org.


      其中[XXX]内的为必填参数,<XXX>内的为可选参数

      +

      比如执行 ./kuaipan_uploader.sh upload a.txt

      +

      后面的<remote file>可以不填,不填写的话,默认上传到网盘根目录或者应用程序根目录的同名文件。 (跟你创建应用的时候选择的选项有关)

      +

      其他,下载和删除都是类似如上…

      +
        +
      • 注意:如果上传到远程某个目录内的话,请务必保证此目录已存在!
      +执行 ./kuaipan_uploader.sh info 可以查看网盘的用户名,总容量和可用容量。 + +

      执行 ./kuaipan_uploader.sh list 可以查看网盘内已经存在的文件以及目录(非结构化)。

      +

      执行 ./kuaipan_uploader.sh relink 可以删除网盘授权信息并重新授权

      +

      5、卸载

      +

      此工具为绿色软件,使用时候复制到执行目录并赋予执行权限即可。

      +

      如果想卸载删除此工具,请连带删除 CONFIG_FILE 变量后面的配置文件,默认为~/.kuaipan_upload.conf 

      +

      许可证

      +

      Kuaipan Uploader 基于GPL第二版或以后版本发布。详见LICENSE文件

      +

      项目开源在我的Githubhttps://github.com/wujiwh/kuaipan_uploader

      +]]>
      + + Technical + + + Linux + awk + curl + shell + 开源 + openssl + denyhost + server + +
      + + Linux中安装oray服务 + /linux-installed-in-oray-service.html + +

      +家里面的路由器ddns经常不能用,索性在系统中直接安了一个oray的客户端。具体安装步骤如下: + +

      1、首先安装必要的开发包

      +

      [root@wangheng.org ~] apt-get install gcc g++ automake autoconf

      +

      2、下载phddns-2.0.2.16556.tar.gz到某一个目录

      +

      [root@wangheng.org ~]# wget http://download.oray.com/peanuthull/phddns-2.0.2.16556.tar.gz

      +

      3、解压所有文件

      +

      [root@wangheng.org ~]# tar zxvf phddns-2.0.2.16556.tar.gz

      +

      4、进入目录并编译
      [root@wangheng.org ~]# cd phddns-2.0.2.16556
      [root@wangheng.org phddns-2.0.2.16556]# aclocal
      [root@wangheng.org phddns-2.0.2.16556]# autoconf
      [root@wangheng.org phddns-2.0.2.16556]# automake
      [root@wangheng.org phddns-2.0.2.16556]# ./configure
      [root@wangheng.org phddns-2.0.2.16556]# make
      [root@wangheng.org phddns-2.0.2.16556]# cd src
      [root@wangheng.org src]# ls -l phddns
      -rwxr-xr-x 1 root root 80968 Aug 2 11:18 phddns

      +

      5、执行编译好的程序并配置(默认使用/etc/phlinux.conf,如果不存在这个文件则自动进入交互配置)

      +

      [root@wangheng.org src]# ./phddns
      输入服务器地址,如无特殊情况可使用默认值
      Enter server address(press ENTER use phlinux3.oray.net):

      +

      输入您的Oray帐号名称
      Enter your Oray account:

      +

      对应的Oray帐号密码
      Password:

      +

      选择帮定的网卡,如无特殊,默认即可
      Network interface(s):
      eth0:192.168.141.18
      lo:127.0.0.1
      Choose one(default eth0):

      +

      选择日志保存到哪个文件
      Log to use(default /var/log/phddns.log):

      +

      保存配置文件,选择yes则直接保存到/etc/phlinux.conf,输入other可以指定文件
      Save to configuration file (/etc/phlinux.conf)?(yes/no/other):

      +

      接下来程序将已交互模式开始运行
      192.168.141.18
      NIC bind success
      OnStatusChanged okConnecting
      OnStatusChanged okDomainListed
      OnDomainRegistered skyvense22.gicp.net
      OnStatusChanged okDomainsRegistered
      UserType: 0
      看到上面这些就表示登录成功,这个时候可以按ctrl+c先退出程序

      +6、将phddns拷贝到你希望的位置 +

      [root@wangheng.org src]# cp phddns /usr/bin/

      +

      7、以后台模式启动花生壳并检查运行情况

      +

      [root@wangheng.org ~]# /usr/bin/phddns -c /etc/phlinux.conf -d
      phlinux started as daemon!
      [root@wangheng.org ~]# tail /var/log/phddns.log
      2011/08/02 11:28:58.256| ExecuteUpdate OK, BeginKeepAlive!
      2011/08/02 11:29:59.354| SendKeepAlive() 8208
      2011/08/02 11:30:00.355| RecvKeepaliveResponse() Data comes, OPCODE:8272
      2011/08/02 11:30:00.356| Keepalive response received, client ip: 116..123.96
      2011/08/02 11:31:00.447| SendKeepAlive() 8208
      2011/08/02 11:31:01.450| RecvKeepaliveResponse() Data comes, OPCODE:8272
      2011/08/02 11:31:01.450| Keepalive response received, client ip: 116.
      .123.96

      +

      8、退出花生壳

      +

      查看进程ID
      [root@wangheng.org ~]# ps -A | grep phddns
      13731 ? 00:00:00 phlinux
      让后台进程退出
      [root@wangheng.org ~]# kill -9 13731

      +

      9、将花生壳加到系统启动时运行
      [root@wangheng.org ~]# vi /etc/rc.local
      在文件的末尾加上一行:/usr/bin/phddns -c /etc/phlinux.conf -d

      +

      二、花生壳Linux版本命令行参数说明

      +

      [root@wangheng.org ~]# /usr/bin/phlinux -h
      Peanuthull Linux-core 2.0 by oray.com, copyright 2011
      Peanuthull Linux-core Help
      –first-run
      -f, run for the first time
      用于首次启动时配置参数

      +

      –interact
      -i, run as interactive mode
      program will request for necessary parameters.
      this mode will automatically enabled at first running,
      or your configuration file has been lost.
      启动交互模式

      +

      –daemon
      -d, run as a daemon
      program will quit after put itself to background,
      and continue running even you logout,
      you can use kill -9 <PID> to terminate.
      后台模式

      +

      –config
      -c, run with configuration file
      program will run with the file
      指定使用哪一个配置文件

      +

      –user
      -u, run as the user
      program will run as the user
      以指定用户启动后台进程

      +

      –help
      -h, print this screen.
      Please visit http://www.oray.com for detail.

      +

      +
      +]]> + + Technical + + + Linux + nginx + +
      + + Linux中设置代理服务器 + /linux-set-up-a-proxy-server.html + +

            由于单位限制网络使用,给分配的一个Linux服务器是没有外网权限的,这给我配置开发调试环境造成了很大的不便。但是这怎么能难道我们一个专业的程序猿呢。下面介绍在Linux中使用代理服务器的步骤:

      全局设置
      如果您在 /etc/yum.conf 中定义代理服务器,所有 用户在使用 yum 时都会应用这个代理服务器设置。
      为单个用户配置代理服务器
      要为一个特定的用户启用代理访问,只要将实例框中的文本行加入这个用户的 shell 配置中。对于默认的 bash shell,配置是在 ~/.bash_profile 中。这一设置使得 yum 使用代理服务器 192.168.1.47:808,连接端口号 808。
      # 这个帐号使用的代理服务器
      http_proxy=”http://192.168.1.47:808”
      export http_proxy

      配置设定,为使用代理服务器
      如果代理服务器需要用户名和密码,只要将它们加入 URL。要包含用户名 a,密码 a,添加设定:
      # 这个帐号使用的代理服务器和用户名/密码
      http_proxy="http://a:a@192.168.1.47:808"
      export http_proxy

      https_proxy="https://a:a@192.168.1.47:808"
      export https_proxy

      最后用wget试一下,成功!

      +
      +]]> + + Technical + + + 代理 + Linux + +
      + + Linux临时或永久修改DNS + /linux-temporarily-or-permanently-modify-the-dns.html + +最近给VPS重装了系统,因为服务商不提供DHCP,所以只好手动设置IP和DNS Server。悲催的是系统重装的时候忘记了输入DNS Server,最后导致进去系统后,各种域名无法解析。 + +

      Linux中修改DNS有两种方式,临时修改和永久修改,下面分别介绍。

      +

      1、临时修改网卡DNS地址

      sudo vim /etc/resolv.conf

      改为如下内容:

      +
      nameserver 8.8.8.8 #修改成你的主DNS
      +nameserver 8.8.4.4 #修改成你的备用DNS
      +search localhost #你的域名
      +

      我这里用了谷歌的DNS解析服务器,修改后:wq退出,配置会实时生效,但是重启系统后可能会丢失配置。其实编辑这个文件的时候,你也应该能看到文件头部“不要手动编辑”的注释。image

      +

      2、永久修改网卡DNS

      sudo –i
      cd /etc/resolvconf/resolv.conf.d
      vim base

      添加如下内容

      +
      nameserver 8.8.8.8
      +nameserver 8.8.4.4
      +

      :wq 保存退出,这样重启后设置就不会丢失了。

      +

      其实你cat head文件会找到图片中头部注释的那段话,不难推测resolv.conf文件就是根据/etc/resolvconf/resolv.conf.d目录中的这几个文件生成的。

      +]]>
      + + Technical + + + vim + Firefox + Linux + DNS + +
      + + Linux/Windows/Mac刷新DNS缓存 + /linux-windows-mac-refresh-dns.html + +有时候在网络环境比较糟糕的情况下,修改了域名的A记录执行,本地DNS却迟迟不主动更新。这个时候就需要我们去手动刷新一下本地的DNS记录缓存,方法记录如下: +Windows ( XP, ME, 2000, 98)系统: + +
        +
      1. 开始——>运行——>输入cmd并回车
      2. +
      3. 在打开的命令行窗口,输入ipconfig /flushdns
      4. +
      5. 完成!你的Windows DNS 缓存已经得到刷新。
      6. +
      +

      Windows Vista 或 Windows 7 系统:
      1、打开命令提示符,并选择以管理员身份运行
      2. 在打开的命令行窗口,输入ipconfig /flushdns
      你将会看到如下的确认信息: Windows IP 配置
      已成功刷新 DNS 解析缓存。

      +

      Linux系统:
      刷新 DNS 缓存需要重起 nscd daemon:

      +
        +
      1. 要重起nscd daemon,在命令行窗口(terminal)输入/etc/rc.d/init.d/nscd restart
      2. +
      3. 命令执行完毕,你的DNS缓存就被刷新了。
        如果是比较新的Linux版本,你可能需要使用下面的命令: /etc/init.d/nscd restart
      4. +
      +

      Mac OS X苹果系统:

      +
        +
      1. 在命令行窗口(terminal)输入lookupd -flushcache
        例如:bash$ lookupd -flushcache

        +
      2. +
      3. 命令执行完毕,你的DNS缓存就得到了更新。
        较新的苹果Mac OS X系统应该使用下面的命令: type  dscacheutil -flushcache

        +
      4. +
      +]]>
      + + 最近添加 + +
      + + 手动编译vim配置 + /manually-compile-vim-configuration.html + +
      下载vim源码
      http://www.vim.org/sources.php + +

      设置编译选项, 我的配置是:

      +
      ./configure  --prefix=/usr/local/vim \
      +--enable-multibyte \
      +--enable-fontset \
      +--enable-xim  \
      +--enable-gui=auto \
      +--enable-pythoninterp=dynamic \
      +--enable-pythoninterp \
      +--enable-python3interp=dynamic \
      +--enable-rubyinterp=dynamic \
      +--enable-rubyinterp \
      +--enable-perlinterp \
      +--enable-cscope \
      +--enable-sniff \
      +--with-x  \
      +--with-compiledby=erocpil  \
      +--with-features=huge \
      +--enable-luainterp=dynamic  \
      +--with-python-config-dir=/usr/lib/python2.7/config \
      +--with-python3-config-dir=/usr/lib/python3.2/config
      +

      其他选项参见 ./configure –help

      +

      补充说明:

      +

      在CentOS上编译时不支持“–enable-multibyte”

      +

      在debian上编译时不支持“–enable-fontset”

      +]]>
      + + linux + + + vim + Linux + 编译 + +
      + + 手动制作VPN登录器 + /manually-produced-vpn-login.html + +

      1、新建一个文本文件,重命名,文件名可以随便取但是后缀必须为.pbk。

      输入如下内容:

      + +
      [要显示的拨号名称]
      + Encoding=1
      + PBVersion=1
      + Type=2
      + AutoLogon=0
      + UseRasCredentials=1NETCOMPONENTS=
      + ms_msclient=1
      + ms_server=1MEDIA=rastapi
      + Port=VPN1-0
      + Device=WAN Miniport (IKEv2)
      + DEVICE=vpn
      + PhoneNumber=服务器的IP或域名
      + AreaCode=
      + CountryCode=0
      + CountryID=0
      + UseDialingRules=0
      + Comment=
      + FriendlyName=
      + LastSelectedPhone=0
      + PromoteAlternates=0
      + TryNextAlternateOnFail=1
      + +

      [ XXX] 部分是需要你修改的内容,请分别修改为你要显示的名称和你Vpn服务器的地址。最后,注意将后缀名改成.pbk,如果你看到不后缀名,请打开:控制面板->文件夹选项->查看,将隐藏已知文件扩展名前面的对号点去。

      +

      + +

      2、打开你新建的.pbk文件,你上面设置的名字是不是显示了出来?点击连接并输入你的用户名密码来建立连接。连接前,可以选择保存用户名密码,以后就只需要点击连接了,当你有很多的vpn账号时,此方法可以很方便的用来管理。

      + +

      3、重复添加这段代码可以加入多个vpn拨号到列表中,如图

      + +

      image

      + +

      此方法只是建立了一个vpn拨号的列表,所以可以很安全的作为一个登录列表发给别人,用户名和密码需要在拨号的时候另外输入。

      + +

      注:登录器可在XP、Windows 2003、Windows 7等系统上使用。

      + +
      +
      +]]> + + Technical + Route + + + Windows + Win7 + VPN + +
      + + 从wordpress迁移到hexo填坑 + /migrating-from-wordpress-to-hexo.html + 前记

      用了好久的wordpress,说起来上次更新还是三年前。今天本想整理总结下最近的学习,却总也打不开wp-admin后台了,看了下是vps的php进程有报错 :( 想了想wordpress这套框架虽然很好,然而好多功能对我来说并不是必要的,于是动了心思从wordpress 迁移到静态化的博客框架 hexo。当然另外一个好处就是可以用 Markdown 语法写日志了 :)

      +

      迁移过程遇到一些坑,这里做下备忘…

      +

      开始迁移

      安装hexo

      网上安装hexo的文章已经很多了,这里不再冗述,大概流程就是

      +
        +
      • 1、安装nodejs
      • +
      • 2、配置环境变量
      • +
      • 3、npm install -g hexo-cli
      • +
      • 4、初始化站点 hexo init blog_dir
      • +
      • 5、修改_config.yml
      • +
      +

      导出wordpress文章

      因为无法打开博客的后台管理,只能在本地临时又搭建了一套wordpress 环境,这里再次坚定了迁移的决心(弄php+mysql+nginx这一套只用来写博客,太麻烦了)
      访问后台 – 工具 – 导出,下载导出的文件,你将得到一个 .XML 文件,这个XML文件包含全部文章、页面、评论、自定义栏目、分类目录和标签。

      +

      导入文章到hexo

      首先安装 hexo-migrator-wordpress 插件:

      +
      安装
      cd blog_dir
      npm install hexo-migrator-wordpress --save
      + +

      插件安装完成后,执行下列命令来迁移所有文章。source 可以是 WordPress 导出的文件路径或网址。

      +
      导入
      hexo migrate wordpress <source>
      + +
      这个插件并不完美,好多文章和页面生成的md文件都很杂乱,而且页面排版也有很多问题,所以后来我又写了一个py脚本来处理历史数据
      + +

      使用主题 next

      解决标签和分类Not foud问题

      在配置文件中增加了tag 和categories ,但是在首页点开却得到了一个not found 的错误。官方的issues 有朋友提到并提供了解决方案(参考tag和categories无内容)。

      +

      首先在next的配置文件_config.yml 中打开如下配置

      +
      menu:
      home: /
      categories: /categories
      #about: /about
      archives: /archives
      tags: /tags
      #commonweal: /404.html
      + +

      然后执行 hexo new page tags,在生成的文件/source/tags/index.md,增加type

      +
      ---
      title: 标签
      date: 2018-10-21 10:35:32
      type: "tags"
      ---
      + +

      分类页面也类似执行 hexo new page categories,在生成的文件 source/categories/index.md,修改如下

      +
      ---
      title: 分类
      type: "categories"
      date: 2018-10-21 10:35:50
      ---
      + +

      使用python 脚本解决文章错乱问题

      使用 hexo-migrator-wordpress 插件导入的文章有很多的问题,错行,样式杂乱,内容错误。

      +

      最无法忍受的是之前文章中因为有代码高亮,<pre><code> 标签内的文字导过来全错了,多了很多\ 以及其他转义符号,所以自己写了一个脚本来处理这个问题,代码可以参考如下:

      +
      导出wordpress文章
      #!/usr/bin/env python3
      # author: http://wangheng.org
      # fileName: import_wordpress_content.py
      # date: 2018-10-21

      import pymysql
      import re

      HOST = "your wordpress db host"
      DB = "your wordpress db"
      USER = "your db user"
      PASSWORD = "your db passwd"
      EXP_PATH = "wp_exp" # path to export .md files
      conn = pymysql.connect(
      host=HOST, database=DB, user=USER, password=PASSWORD, charset='utf8mb4')


      def getData(query):
      cur = conn.cursor()
      cur.execute(query)
      data = cur.fetchall()
      return data


      def getPostTags(post_id, tag_type):
      tags = getData('''
      SELECT wpt.`name`, wpt.slug, wptt.taxonomy
      FROM
      wp_terms wpt
      LEFT JOIN wp_term_relationships wptr ON wpt.term_id = wptr.term_taxonomy_id
      LEFT JOIN wp_term_taxonomy wptt ON wptt.term_taxonomy_id = wptr.term_taxonomy_id
      WHERE
      wptr.object_id = %d
      and wptt.taxonomy="%s"
      ''' % (post_id, tag_type))
      res = ""
      for tag in tags:
      res += " - %s\n" % tag[0]
      return res


      def main():
      posts = getData(
      "SELECT post_name,post_content,post_date,post_title,ID FROM `wp_posts` where post_type='post' and post_status='publish' "
      )
      for post in posts:
      content = post[1]
      content = content.replace('http://wangheng.org/wp-content/uploads',
      'uploads')
      content = content.replace('>\n<', '><')
      content = content.replace('>\r<', '><')
      content = content.replace('>\r\n<', '><')
      blog = '''
      ---
      title: %s
      tags:
      %s
      url: %s.html
      id: %d
      categories:
      %s
      date: %s
      ---

      <content>
      %s
      </content>
      ''' % (post[3], getPostTags(post[4], "post_tag"), post[0], post[4],
      getPostTags(post[4], "category"), post[2], content)
      print(blog)
      file = open("wp_exp/%s.md" % post[0], 'wb')
      file.write(blog.encode("utf-8"))
      file.flush()


      if __name__ == '__main__':
      main()

      + +
      解决非常多空行的问题

      这里还遇到了个非常奇葩的问题,如果写到md 文件的两个html 标签不在同一行,那么md 再生成的文章会多出很多的 <br> 换行符。。。

      +
      参考代码
      content = content.replace('>\n<', '><')
      content = content.replace('>\r<', '><')
      content = content.replace('>\r\n<', '><')
      + +
      解决迁移后图片以及附件问题

      迁移后图片和附件的地址无法再使用wordpress 目录了,因此需要将文章内的链接修改下

      +
      content = content.replace('http://wangheng.org/wp-content/uploads', 'uploads')
      + +

      然后将vps 中的wp-content 文件夹copy到hexo目录,设置配置文件

      +
      #指定目录以及子目录文件跳过渲染
      skip_render: uploads/**
      + +

      代码高亮

      使用脚本导出的.md 文件相当于把之前wordpress 中的文章富文本直接copy 到了md 文件中,因此文章结构几乎没怎么变化,也利于博客站的SEO

      +

      另外保持了原来代码高亮的结构,只要在主题的配置文件设置一下开启代码高亮,效果还可以~

      +
      # Code Highlight theme
      # Available values: normal | night | night eighties | night blue | night bright
      # https://github.com/chriskempson/tomorrow-theme
      highlight_theme: night eighties
      + +

      其他

      todo 暂时整理这些,其他待补充…

      +]]>
      + + wordpress + hexo + migrating + +
      + + 推荐几款visual studio配色方案和字体 + /modify-font-and-color.html + +

      以前经常用Live Writer写博客,最近发现文章发布不上去了,google了一下发现原来GFW才是罪魁祸首。前几天把笔记本的硬盘换了,发现上次写的两篇博文还没发布,真悲剧。只好凭记忆重写一遍了…

      年假前连续三天都加班到了晚上十二点,长时间的工作导致对着电脑code时,越来越反感白色背景配色。为了缓解眼睛的刺痛,还是决定换个舒服的配色方案。经过一翻搜寻,找到了几款很不错的配色!

      1、son of obsidian(推荐)

      son of obsidian

      这是http://studiostyl.es/上最热门的一款的配色方案,也是我目前正在使用的配色,只是感觉选中文字时的底色太不明显,于是将底色改成了蓝色。用了一段时间后确实看着很舒服,看来用的人多总是有一定道理的。

      2、Bespin

      image

      很喜欢这款Bespin的配色方案,清新,温和,用着也很舒服。唯一的问题是使用 vim 查找字符时,高亮后看不到光标的位置,懒得去改,所以也就没用这款配色。

      3、wekeroad-ink

      wekeroad-ink

      也是款不错的配色方案,喜欢的朋友也可以试一下。但是背景是纯黑的,个人感觉看时间长了还是不舒服。 :)

      点击下载:配置文件

      其实配色都没有好坏之分,只要找到自己最喜欢最适合的那它就是最好的!

      编辑器的字体我选择的是系统自带的幼圆,它也是等宽字体,字形瘦长好看并且支持 ClearType,综合效果都很好!所以完全没有必要费力气再去网上下载其他的字体。

      +
      +]]> + + Technical + + + visual studio + 配色 + Font + 字体 + +
      + + 修改openssh-server 的默认端口号 + /modify-openssh-server-port-number.html + +买来的一个VPS默认的SSH端口号是22,为了安全,防止别人恶意枚举密码,可以自己修改成别的端口号。 + +

      1、首先,编辑sshd_config文件

      $ sudo nano /etc/ssh/sshd_config
      王恒上传

      +

      将Port 修改成自己定义的端口号,我这里改成了8080

      + +2、重启sshd服务
      $ sudo service sshd restart
      +如果没什么错误,就可以使用新的端口连接了 +
      +]]> + + Technical + + + ssh + openssh + 端口 + +
      + + nginx设置目录浏览及中文乱码问题解决 + /nginx-set-directory-browsing-and-solve-the-problem-of-chinese-garbled.html + +在Nginx下默认是不允许列出整个目录的。如需此功能, +先打开nginx.conf文件,在location server 或 http段中加入 + +

      autoindex on;
      另外两个参数最好也加上去:

      +

      autoindex_exact_size off;
      默认为on,显示出文件的确切大小,单位是bytes。
      改为off后,显示出文件的大概大小,单位是kB或者MB或者GB

      +

      autoindex_localtime on;
      默认为off,显示的文件时间为GMT时间。
      注意:改为on后,显示的文件时间为文件的服务器时间

      + + + + +

      但是如果有中文目录的话会出现乱码问题,所以还需要在下面添加这一句:

      +

      charset utf-8,gbk;

      +]]>
      + + Technical + + + 中文乱码 + air video + +
      + + (转)告诉你一个真实的北京 + /r-to-tell-you-a-true-beijing.html + +纯转发 + +

      clip_image001clip_image002
      近日网上盛传一篇题为“大量内幕:告诉你一个真实的北京”的文章。文章称,北京真是一个神奇的城市,吸引了全国各地的“人才”(从只有小学学历的到海龟博士后)。但真是不知道为什么全国各地那么多人非要削尖了脑袋扎进北京?
      北京挺好 跟你有多大关系?
      作者说,客观的说,北京挺好。不论悠久的历史文化、快速发展的经济、还是宏伟大气的城市风貌,异常丰富的教育资源,全国顶尖的医疗条件….这个城市都堪称绝对的国际化大都市。
      具体点儿:
      故宫、长城、颐和园、圆明园、后海儿….这是帝都!(如果这儿的历史文化你都看不上,那中国也没啥你能看上的地儿了。)
      清华、北大、北邮、北航、人大….这是中国的教育中心!(如果这儿都教育不好你,那你基本也是没法教育好的料儿了。)
      协和、301、武总、空总、阜外、中日友好….这是中国顶尖的医疗高地。(如果这儿都治不好你的病,基本你就只有见阎王的份儿了。)
      中石油、中石化、五矿、神化、中行、建行、农行、中xx….中央企业总部的集散地!(如果这儿的工作你都看不上,那你只能上外星找工作了。)
      川、苏、鲁、粤、闽、湘、徽、淮扬,海鲜、烧烤、火锅、西餐,民间小吃、国宴大菜….全国美食集大成之地!(如果这儿的菜你都不爱吃,基本地球也没你能吃的东西了。)
      奔驰、宝马、迈巴赫、劳斯莱斯、宾利、布加迪….世界名车的展览会!(如果这儿的车你都看不上,你只能坐着“天宫”奔上月球找嫦娥了。)
      党中央、国务院、中纪委、发改委、国资委、各部委,全国行政指挥部!(如果这儿都解决不了你的事,那你只能冲进白宫去问奥巴马了。)
      北京真好,确实好,但有你的啥?
      故宫长城都说好,天天爆棚挤死你!清华北大门儿开着,就怕你高考分不够!协和、武总、301,先别说治病,早晨5点排队就要你命!石油石化玩垄断,工资一月发八回,没人你进得去吗?川苏鲁粤、奔驰宝马,没钱都是纯扯淡!言归正传。
      本文旨在给各位看官展示真实的北京生活。北京是好,但未必适合所有人,未必适合人的生活,千万不要被表面的繁华和虚荣所迷惑,还要谨慎的选择。普通人的生活无非就是几件事,吃饭、住房、教育、医疗、交通,支撑这些事的支柱就是–工作。有份好工作就解决了。没错,但也不绝对。
      一、咱们先探讨探讨工作和收入吧
      作者说,大学生毕业,包括研究生,刚毕业找份月薪5000(实际到手)的工作算不算好工作?我觉得应该算。至少我知道的985,211工程大学的学生刚毕业在北京头两年也就是这个数左右。那么,我告诉你,5000刚够一个外地人在北京的基本生活。算笔账:房租1500(合租一个单元的一个房间,四环外,10-15平米,如果想降低租金,ok,5环外到6环),房租外分摊煤气水电费200,交通费200,吃饭1000(一天30,基本算是最低了吧),日用品支出(牙膏、香皂、洗发水、内裤、袜子、卫生巾等)均到每月算200,自己改善伙食+应酬吃饭每月500(这就算两顿饭,现在随便两人下次馆子也得200。你在北京没个朋友同学吗?人家请你,你不得回请?外地同学朋友来北京玩,找你你不去?),电话费100,宽带费100。每年可能的其他开销平均到月500不多吧?(换手机、笔记本电脑、买鞋、衣服、假期回家来回的火车票飞机票、人情世故婚丧嫁娶随礼、给家里买点特产)。这已经4300了。还剩几百机动。所以月光很正常。
      有人该说了,北京的好工作有的是。赚个万八千的很正常,低于5000的很少。我很客观的告诉你,那都是听说,道听途说。你一个毕业生,不管本科生研究生,过来赚个我看看。5000到手的工资,基本就是税前7000,单位还要给你缴纳个人所得税、五险一金或六险二金。你想想你刚毕业能给单位做什么正事,凭什么给你高薪?
      接着给你分析分析北京的工作结构。北京好工作,从数量和质量上,比其他城市确实要多和好一些。
      第一类,就是中央公务员和地方公务员,绝对的光鲜,好工作。外交部、铁道部、农业部,不错吧?如果你有朋友在这些地方,问问吧。科员基本月收入到手现金都在5000以内,处长8000以内,司长1万以内,待遇很好每年能多发点购物卡、水果啥的,好的部委能分保障性住房,3000到5000一平方,但怎么需要个5年以上。部委的工资都是国家规定的,就是这样。就是这样的工资,还砸破头呢。因为这样的工作是铁饭碗,社会地位高,体面,稳定。要考公务员,甚至还需要背景,也就是所谓的“拼爹”。
      第二类,中央企业(含二级子公司驻京单位),所谓的石油石化能源电力金融等,普通员工主流年薪基本在8万到20万之间,很少有再高的。(金融投资类要高很多,30万50万都有,但入门门槛也很高,专业性极强)待遇也不错。没人能说这样的工作还不好吧?你知道这工作好,是人就知道,大伙都知道。也是砸破头,没关系基本别想。没关系的就是特有实力的或者有点运气成分的。再有就是这样单位招的打杂的,但工资和待遇也就差远了,打杂的一般还都要北京本地有户口的。
      第三类,央企下属的三级以下企业或合资企业,其他北京地方国有企业。这个很复杂,不了解。有的薪金待遇比央企还好,有的就差一些,要看企业自身情况。
      第四类,科研院所、大学等事业单位。这类单位是需要高学历的,最低硕士。如果你不是师出名门名校,学历只是本科,那基本也就没戏了。工资待遇类似国家部委,有高有低。但科研院所的学科带头人,高级工程师有项目的,收入颇丰。一年百八十万的也是有的。
      以上是户口基本都能解决的。当年解决不了,过几年也有希望解决。但以上单位每年招人都不会太多,因为业务基本稳定。
      第五类,外资企业。这类也很复杂,好的外企很多,IBM、google、马士基啥的,工资确实挺好2,30万很正常,就怕您不是那人才,清华、北大海归回来的都得层层面试。你要觉得你能把他们搞定,可以来试试。烂的也不少,一个月3,5千,用人还用的贼狠,经常加班。比如所谓的“四大”,听着工资挺高,天天干活儿如山,夜夜加班,性价比太低。你20岁时,老板30岁;你30岁时,老板和你同岁;你40岁时,老板比你小10岁。不管你怎么奋,老板都是30多的老外。
      第六类,私营企业。少数很好,多数剥削为主。但也是北京人才市场需求量最大的一块。少数的包括著名的大连万达(总部在北京),soho中国,中关村的大IT企业华为,中兴,sina,sohu,baidu等,比国企还正规,待遇也很好;但多数都是聚居在各大型写字楼的小公司,干什么的都有。月薪3000-5000,没有五险一金。私企的特点是,你赚的每一分钱都是从老板口袋掏出去的,所以你拿的每分钱都会有你的付出。除了工资,很难再想其他的待遇。年终多给你一个月工资已经算老板开恩了。
      第七类,自己创业当老板。有个好项目可能你就发了。但多数还是淹没在茫茫商海之中了。
      那北京那么多有钱人哪来的啊?我告诉你,有钱人都不是靠这样正规工作打工的。正规工作打工的基本没有啥有钱人。北京的有钱人不是私营企业的大老板暴发户,就是政商,官商,红二代,外企中国区总裁,影视明星,作家,画家,收藏家….。跟你有个毛关系?你自己觉得有多大几率成为有钱人?如果你认为有钱人的定义是在北京买两套房,那我告诉你你太可悲了。如果你成不了有钱人,就只能过普通人的日子。
      这还是对有学历的人来说。那些没学历在北京饭店里打工的姑娘小伙们,请问你们图啥?一个月1500-2000的收入,真能让你看到光明和希望吗?可能一万个能有三两个混出来的,那剩下那9000多人找谁说理去?

      + + +

      二、说说吃饭吧
      作者说,说实话,在北京混口饭吃还是挺简单的。北京的吃真的不算贵。当然你不能天天去北平会、顺峰、厉家菜等宰人的大饭店。平常老百姓居家过日子,吃肉吃菜还是挺经济的,北京是首都,国家首先要保北京的市场供应,所以物价一直都比较稳定。不像很多刚来北京的外地人说北京的东西真贵,你天天到超市买小包装的蔬菜,肉类能不贵吗?住的时间长了,你肯定能在家附近发现很多便宜的菜市场。
      北京的美食聚集度在全国应该排个第一。全国甚至全世界你听到过的风味基本都能吃到。光是全国各地开设的驻京办的饭店就够你吃一阵的,特色餐馆非常之多,价位比一般大城市略贵,不天天吃,还是可以接受的。
      clip_image003三、说到住房就沉重了
      作者说,在提到房价之前,我首先要问你“你有资格买房吗?”如果你没有北京户口,也拿不出来在北京连续五年缴税的证明,那你没资格买房了。不管你家境多么殷实,有钱也没法买。
      再说说房价,北京的房价可以让绝大多数人绝望,尤其是在对比了一套100平方的普通住房和自己的年收入之后,就会立刻产生痛不欲生的感觉。北京五环内的二手房价格基本在2万5到3万之间,新房普遍都是3万大几,4万。一百平二手房意味着250-300万,新房意味着将近400万。年薪20万,也要15到20年不吃不喝白干。大学毕业22到60退休,一共才38年工龄。那么如果你年薪不到20万,甚至10万,那意味着你一辈子就是为这套房。(当然不能这么算,有的人赚钱是几何式上升的,但多数人还是线性增长的。)再说,你能不吃不喝不养孩子吗。
      那么请问,你来北京干什么?就为了买套房吗?
      四、说到教育就更沉重了
      作者说,有人说,北京教育有啥沉重的?那么多好学校,北京人考大学分那么低,多轻松啊。那我只能恕你外地人不知情无罪了。教育是个笼统的概念,不只是大学教育,从幼儿园到大学都是教育。你在北京安家立户,就要娶妻生子。如果你遇到了一位贤妻,肯在你无房无地之时就嫁给你,并为你生儿育女,那你是幸运的。但接下来的子女教育,你可能就是不幸的了。
      儿女在北京受教育的前提是你的儿女有北京户口。请问有吗?儿女有户口的前提是你或你的配偶有北京户口。请问有吗?如果你和你的爱人进入的是私营企业和小型外资企业的话,又不是北京户籍政策的照顾对象,那多数情况,户口是拿不到的了。这就意味着你的儿女不能在北京接受教育,或不能无偿的在北京接受教育。
      这种情况下就有三条路可走,一条就是把孩子送回原籍上学;另一条就是把孩子送到贵族学校,国际学校;再一条就是花大价钱托人进普通中小学借读,费用也不比贵族国际学校低多少。送回原籍,万万不妥,让乡里乡亲的怎么看?贵族学校一年动辄15到20万的学费不是一般人交的起的。借读托人就是一笔,还有每年2,3万的借读费。何去何从?我不知道。(我家亲戚就遇到了这种情况,他们夫妻都是大型私企高管,家庭年薪百万,但没有北京户口,孩子应该是去私立学校了,从幼儿园到高中都可能如此。)
      有北京户口没事?幼儿园就要你命!
      有北京户口,你就别以为没事了。一个幼儿园就要你命!没听说新闻吗?2号早晨9点xx重点幼儿园开始报名,1号夜里11点,幼儿园门口已经排起了长队。爷爷奶奶爸爸妈妈分头来排队,就怕报名满员。这不是危言耸听,这是真事。北京很多幼儿园都出现了这样的胜景。排上队报上名,事又来了,孩子要面试。看看孩子智商怎么样,不合格的不录取。更有甚者,学前班不是在我们幼儿园上的坚决不予录取。还有孩子面试要父母简历的,看看父母是什么学历、工作。
      好,即使全过了,事又来了。请交钱吧,赞助费、园区建设费、师资队伍建设费3万。每月还得交2000多。进去了,事又来了。幼儿园3点半下课,请家长来接孩子吧。家长都是上班族,谁能3点半接孩子?不接?好,上兴趣班吧。一天一节,3点半到5点半,一节50,一周五天250,一个月1000。过节过年,家长都得给老师塞红包,不然你孩子拉屎,不一定有老师给你孩子擦屁股;你孩子吃饭慢,就得挨饿。你说公立幼儿园不行,那去私立吧。一个月5000起步。
      小学,初中,高中,以此类推,没有不抢的。没有少花钱的。有的学校,家里有钱学习好的孩子都不一定能进,没关系肯定进不去。因为这班里孩子有的爷爷是中央办公厅的,爸爸是军委办公厅的,大爷是北京市教委的,妈是区教育局的。你说有你事吗?
      五、说到医疗 更牛逼了
      作者说,北京大医院的数量和质量那是全国之最。哪个学科都有顶尖的老中医老西医。你说我工作正规,有医保,怕什么?呵呵,这事和医保真就一点关系都没有。北京的医疗资源之紧张,也是全国第一。全国的病患都到北京求医问药,能好的了吗?
      协和医院的一个专家号,不论哪个科室的,你按照医院门诊的开门时间去挂号,100%没号。门口的黄牛党票贩子大声叫卖着各个科室的专家号。医院卖一个专家号7块到15块。到黄牛那少了要300,多了得500。就这还抢呢,你拿钱还不一定就能拿上当天的号。早晨5点医院门口就排起长队。
      如果得了大病,废了,没人基本等于等死。住院排队,做手术更要排队。等轮到你手术了,基本人都凉了。301医院是中央军委首长的特护医院,你觉得专家治病轮的上你吗?
      知道为什么那么多国家领导人都死这儿?
      有次,我头疼,到著名的中日友好医院看病。中日友好医院,不用多言,很多国家领导人都是在这病逝的。还没进医院大门,挂号的时候我脑袋都大了,各色人等各色口音跟打架似的,再加上挂号大夫的冷言冷语,没病的都得气出病来。看病时候更牛了,拿了号,没专家的,都挂完了,普通号排了半个小时,大夫告你照ct吧。照ct半个小时,再排半个小时队,让大夫看看ct片子,拿药,走人。排了2小时队,大夫一共说了4,5句话。我算知道为什么那么多国家领导人都死这儿了。
      六、轮到交通了 那是绝对绝对绝逼了
      作者说,北京是名副其实的“首堵”,不错。但想体验“首堵”的感觉,我还得问你一句,你有资格吗?买车现在已经不是钱的事了。两年前,你有钱没钱,买个QQ,夏利,3万5万的,不是个事。现在你手里握着百八十万等着买奔驰宝马,那也只能碰碰运气了。这个月的买车摇号概率已经降到了2.5%。也就是100个人里有两个半人能摇上号。还是那句话,如果没有北京户口,又不能提供连续五年在北京纳税的证明,你连参与摇号都没资格。有这个资格,你就得烧高香拜菩萨,保佑你成为那两个半人。
      当你有了户口或者纳税证明,准备好了钱,烧高香摇到了号,买了车。还得有停车位。一个车位最少15到20万。租车位一年4000到6000块钱。临时停车三环以内,第一个小时10块,第二个小时15。上班如果单位没有停车位,你上一天班就为了停一天的车。这不是开玩笑,是真的。当这一切都ok了。那准备起步,体会首堵风采吧。从早晨7点到9点,五环以内基本不会让你有持续1分钟以上开到50km/h的机会。 起步停车,起步停车…。下班更别提了,17公里的路,我最夸张一次开了2小时20分钟。我的车是自动挡的,下车后,我右腿都瘸了。手动挡的基本就瘫痪了。
      那些没钱买车,没户口没资格摇号的该在旁边偷笑了。“让你们有钱,让你们得瑟,让你们买车!还是我们坐地铁、公交的省心吧?”别笑。你们还不如开车的呢。开车的再堵,也是在自己的小车里,风吹日晒、雨打风吹跟我都没多大关系,最多就是烦点、腿累点。
      再看看坐地铁的吧。天天早晨地铁5号线,从始发站出去三站以后,人就都不是走上地铁的了。都是被后面人挤上车,或者被工作人员推上车的。地铁车门一关,你后背就贴在门上了。夏天不管空调怎么开,你在地铁上也是一身臭汗,还得忍受旁边人的狐臭,汗臭。小偷儿是别想下手了,连手都抬不起来。女士更得小心了,故意和无意的性骚扰是难免的了。
      公交就三不沾了。晚了一趟车就晚了半小时。和地铁一样遭罪,时间还没法保证,该堵车堵车,刮蹭了全车人都得下车,不管三伏三九。如果上下班来回坐公交的话,每天至少怎么得2,3个小时在路上晃。那每天除了工作,在工作和回家的路上,还剩下什么时间了?
      在北京生活的人多数不幸福
      文章说,以上所言全是个人真实的感受。“我感觉在北京生活的人多数都并不幸福,或者已经不知道什么是幸福了。至少不如在其他大城市生活幸福。那人都不幸福了,怎么还不离开北京呢?”
      混在北京的人多数都有一个梦,希望自己有朝一日能够发达、光宗耀祖,在北京有房有地,出人头地。还有一部份人处于矛盾之中,to be or not to be,离开了怕别人说自己混不下去了才走,不走吧,生活状态只有自己知道。还有一部份人确实是热爱北京大城市的文化和生活,再辛苦也觉得比在自己老家强。再有一部份人,就是习惯了,麻木了,生活就如此,到哪都一样。
      就像《北京人在纽约》,还应该有一部小说《外地人在北京》。If you love him,bring him to Beijing, for its heaven; if you hate him, bring him to Beijing, for its hell.

      +]]>
      + + 最近添加 + + + 开始?结束 + 文件丢失 + +
      + + raspi+DHT11+yeelink监控家里温湿度 + /raspberry-dht11-yeekink.html + +wiring Pi 是专门为树莓派打造的类似于arduino下的wiring驱动库,安装好这个库后可以直接调用函数配置和控制GPIO功能。 + +

      我买的树莓派B+版本,如图:

      +

      raspberry_b+_version

      +

      可见共有个40pin的扩展 gpio,电源IO包含3.3v  5v  ,接口定义如下图所示:

      +

      gpio_detail

      一、首先我们先安装开发环境
      #首先安装依赖包
      + sudo apt-get install libi2c-dev
      + sudo apt-get install git-core
      +#获取安装包
      + git clone git://git.drogon.net/wiringPi
      + cd wiringPi
      + git pull origin
      +#切换到编译目录
      + cd wiringPi/
      +#编译并安装
      + ./build
      +#检查安装
      + gpio -v
      + gpio readall
      +
      +


      执行完 gpio readall 会显示当前板子的接口定义!如下图:

      + + +

      wiringPi_readall

      +

      比如 12 | 1 | IN   | GPIO. 1 | 1   | 18

      +

      表示你用wiring库中的函数操作gpio1,其实是操作BCM格式的gpio18端口,物理的12针脚。

      +

      二、模块准备

      +

      DHT11是比较常用的一块传感器,物美价廉,同时可以获取到环境的温度和湿度。由于比较简单,我就没有买那种焊接好的模块,只是一个DHT11的传感器,回来自己简单焊接封装了一下。

      +

      DHT11的针脚说明如下:

      +

      dht11_pin_define

      +

      从左至右分别是1、2、3、4针脚,使用的时候我们需要加装一个上拉电阻,简单地说就是在第一第二针脚之间接一个10K左右的电阻。

      +

      接线比较简单,就不过多介绍了。

      +

      三、获取传感器数据

      +

      由于树莓派比起Arduino还是强大的太多,所以无论是用c还是python都可以很方便的按照模块的时序图编写驱动。网上各种各样的版本也是太多,思路就是严格按照手册规范来,数据校验失败的作为垃圾数据扔掉。参照比较正统的做法,自己整理了一份代码,需要的朋友也可以顺手拿走。

      +

      代码很短,参考如下:

      +
      #include <wiringPi.h>
      +#include <stdio.h>
      +#include <stdlib.h>
      +
      +typedef unsigned char uint8;
      +typedef unsigned int  uint16;
      +typedef unsigned long uint32;
      +
      +#define HIGH_TIME 32
      +
      +int gpioPin =4;  
      +uint32 databuf;
      +
      +
      +
      +uint8 readSensorData(void)
      +{
      +    uint8 crc; 
      +    uint8 i;
      +
      +    pinMode(gpioPin,OUTPUT); 
      +    digitalWrite(gpioPin, 0); 
      +    delay(25);
      +    digitalWrite(gpioPin, 1); 
      +    pinMode(gpioPin, INPUT); 
      +    pullUpDnControl(gpioPin,PUD_UP);
      +
      +    delayMicroseconds(27);
      +    if(digitalRead(gpioPin)==0) 
      +    {
      +        while(!digitalRead(gpioPin)); 
      +
      +        for(i=0;i<32;i++)
      +        {
      +            while(digitalRead(gpioPin)); 
      +            while(!digitalRead(gpioPin)); 
      +            delayMicroseconds(HIGH_TIME);
      +            databuf*=2;
      +            if(digitalRead(gpioPin)==1) 
      +            {
      +                databuf++;
      +            }
      +        }
      +
      +        for(i=0;i<8;i++)
      +        {
      +            while(digitalRead(gpioPin)); 
      +            while(!digitalRead(gpioPin)); 
      +            delayMicroseconds(HIGH_TIME);
      +            crc*=2;  
      +            if(digitalRead(gpioPin)==1) 
      +            {
      +                crc++;
      +            }
      +        }
      +        return 1;
      +    }
      +    else
      +    {
      +        return 0;
      +    }
      +}
      +
      +int main (int argc, char **argv)
      +{
      +
      +    if (argc != 2) {
      +        printf("usage: %s GPIOpin#\n", argv[0]);
      +        printf("example: %s 1 - Read from wiringPi GPIO #1\n", argv[0]);
      +        return 2;
      +    }
      +
      +    gpioPin = atoi(argv[1]);
      +
      +    if (gpioPin <= 0) {
      +        printf("Please select a valid GPIO pin #\n");
      +        return 3;
      +    }
      +
      +
      +    printf("Use GPIO%d to read data!\n",gpioPin);
      +
      +    if (-1 == wiringPiSetup()) {
      +        printf("Setup wiringPi failed!");
      +        return 1;
      +    }
      +
      +    pinMode(gpioPin, OUTPUT); 
      +    digitalWrite(gpioPin, 1); 
      +
      +    while(1) {
      +        pinMode(gpioPin,OUTPUT); 
      +        digitalWrite(gpioPin, 1); 
      +        delay(3000);
      +        if(readSensorData())
      +        {
      +            printf("Success! Sensor data read ok!\n");
      +            printf("Hum=%d.%d\%\n",(databuf>>24)&0xff,(databuf>>16)&0xff); 
      +            printf("Temp=%d.%dC\n",(databuf>>8)&0xff,databuf&0xff);
      +            databuf=0;
      +            break;
      +        }
      +        else
      +        {
      +            
      +            databuf=0;
      +        }
      +    }
      +    return 0;
      +}
      +

      完整的代码放在了我的github共享:https://github.com/wujiwh/DHT11_yeelink/

      +

       

      +

      使用方式:

      +

      1、首先编译,切换到工作目录

      +

      make

      +

      2、执行 ./dht11 GPIO端口号

      +

      看看是不是有数据显示了!

      +

      四、上传传感器数据到yeelink

      +

      数据上传就更简单了,这已经基本跟硬件没多少关系了,众多的物联网平台里面yeelink算是做的不错的,各方面的文档也很容易搜到。官网是:http://www.yeelink.net/ 你需要注册一个账号来获取你的apikey,有了这个apikey我们才能发布我们的数据到物联网平台。网上有很详细的介绍,我就不冗述了。

      +

      1、linux下面发送POST请求,最简单的莫过于直接使用crul了!我写了一个简陋的脚本来发送温度数据到yeelink平台,湿度类似。

      +

      代码如下:

      +
      #!/bin/sh
      +#=============================================================================
      +# FileName: dht11_curl.sh
      +# Desc:
      +# Author: wangheng
      +# Email: wujiwh@gmail.com
      +# HomePage: http://wangheng.org
      +# Version: 0.0.1
      +# LastChange: 2015-01-28 00:30:11
      +# History:
      +#=============================================================================
      +#填入yeelink的API KEY
      + yeelink_ApiKey='XXX'
      + yeelink_URL='http://api.yeelink.net/v1.1/device/XXX/sensor/XXX/datapoints'
      + temp=$(./dht11 1 |awk '/Hum/' |awk -F '=' '{print $2}'|sed 's/%//')
      + echo $temp
      +curl_cmd="curl --request POST --data '{\"value\":$temp}' --header U-ApiKey:$yeelink_ApiKey --verbose $yeelink_URL"
      +echo $curl_cmd|sh
      +
      +
      +
      +
      +

      PS:awk用的还不是很熟,写的比较啰嗦,有更专业的朋友看到,欢迎拍砖。

      +

       

      +

       

      +

      2、使用python似乎也是一个非常不错的选择,python漂亮的语法,写起来也很简单。

      +

      代码如下:

      +
      #!/usr/bin/python
      +'''
      +#=============================================================================
      +#     FileName: dht11_post.py
      +#         Desc: 
      +#       Author: wangheng
      +#        Email: wujiwh@gmail.com
      +#     HomePage: http://wangheng.org
      +#      Version: 0.0.1
      +#   LastChange: 2015-01-27 22:40:37
      +#      History:
      +#=============================================================================
      +'''
      +
      +import subprocess
      +import re
      +import json
      +import sys
      +import time
      +import datetime
      +import requests
      +
      +API_Headers = {'U-ApiKey': 'XXX', 'content-type': 'application/json'}  
      +API_URL="http://api.yeelink.net/v1.1/device/%s/sensor/%s/datapoints"
      +
      +device_id="XXX"
      +hum_sensor_id="XXX"
      +temp_sensor_id="XXX"
      +
      +hum_url = API_URL % (device_id, hum_sensor_id)
      +temp_url = API_URL % (device_id, temp_sensor_id)
      +
      +# Continuously append data
      +while(True):
      +  #to get the humidity and temperature readings!
      +  output = subprocess.check_output(["./dht11", "1"]);
      +  #print output
      +  matches = re.search("Temp=([0-9.]+)C", output)
      +  if (not matches):
      +    time.sleep(3)
      +    continue
      +  temp = float(matches.group(1))
      +  
      +  # search for humidity printout
      +  matches = re.search("Hum=([0-9.]+)\%", output)
      +  if (not matches):
      +    time.sleep(3)
      +    continue
      +  humidity = float(matches.group(1))
      +
      +  print "Temperature: %.1f C" % temp
      +  print "Humidity:    %.1f %%" % humidity
      + 
      +  try:
      +
      +    #Post temp data
      +    post_data = {'value': temp}  
      +    r = requests.post(temp_url, headers=API_Headers, data=json.dumps(post_data))  
      +    #Post Humidity data
      +    post_data = {'value': humidity}  
      +    r = requests.post(hum_url, headers=API_Headers, data=json.dumps(post_data))  
      +
      +    print "Post to yeelink success!"
      +  except:
      +    print "Unable to post data.  Check your connection?"
      +    sys.exit()
      +
      +  # Wait seconds before continuing
      +  time.sleep(15)
      +

       

      +

       

      +

       

      +

       

      +]]>
      + + 最近添加 + +
      + + 树莓派Wifi小车(一) + /raspberry-wifi-car-1.html + +到年末了,最近也有了一些自己的时间。回到了原来的技术处,晚上终于不用疯狂加班了,下班回家也终于有功夫折腾自己以前想玩的玩具了: ) + +

      树莓派刚发布的时候就一直想搞一台,但是淘宝上面的价格也是一直居高不下,想想家里已经N多PC,NAS和笔记本了,一直找不到入手的理由。圣诞节附近随便一刷淘宝,发现新版本B+ 已经降到了170块,果断买下。

      +

      回家折腾了几天,性能果然弱的跟价格成正比。。。百兆的小网卡实在看不上眼。算了,从小玩意玩起吧,先装一个wifi小车。

      +

      有了想法,开始组装! 由于之前折腾了几天Arduino对于各种驱动板已经基本熟悉,所以接线非常简单。底盘随便找了块塑料板,轮子直接双面胶+热熔胶固定,总之是很丑,好吧。。。

      + + +

      不怕见笑,Beta版完成图如下:

      +

      +

       

      +

      驱动板有两种,一种是L298N

      +

      主控芯片

      L298N

      包装形式

      盒装出货

      逻辑电压

      5V

      驱动电压

      5V-35V

      逻辑电流

      0mA-36mA

      驱动电流

      2A(MAX单桥)

      存储温度

      -20℃ 到 +135℃

      最大功率

      25W

      +另一种是L9110S芯片的驱动板,参数如下: 模块供电电压:2.5-12V

      电机工作电压2.5v-12V之间,

      最大工作电流0.8A

      考虑到我们的小车不需那么大功率,直接用一个L9110S驱动板,单侧的轮子并联为一组,这样相当于驱动板驱动两路直流电机组。

      代码部分,小车的server端用python写的,用了个把小时(网页css多年没写过了,折腾死)。网页版控制页面如下:

      +刚开始用的图标太丑,在同事的提醒下,改了个按钮图标现在看起来顺眼多了,感谢@Jane同学。 + +

      运行效果:

      +

      +

      核心代码:

      '''
      #=============================================================================

      +

      FileName: views.py

      Desc:

      Author: wangheng

      Email: wujiwh@gmail.com

      HomePage: http://wangheng.org

      Version: 0.0.1

      LastChange: 2015-01-14 13:46:29

      History:

      #=============================================================================
      '''
      from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
      from contextlib import closing
      from pi_car import app
      import re
      import RPi.GPIO as GPIO
      @app.route('/')
      def show_index():
      return render_template('home.html')

      +

      @app.route("/login", methods=["GET", "POST"])
      def login():
      if request.method=="GET":
      return "get"+request.form["user"]
      elif request.method=="POST":
      return "post"

      +

      @app.route('/ctl',methods=['GET','POST'])
      def ctrl_id():
      if request.method == 'POST':
      id=request.form['id']
      GPIO.setmode(GPIO.BOARD)
      GPIO.setwarnings(False)
      GPIO.setup(11,GPIO.OUT)
      GPIO.setup(12,GPIO.OUT)
      GPIO.setup(15,GPIO.OUT)
      GPIO.setup(16,GPIO.OUT)

      +
          if id == &#039;t_left&#039;:
      +        t_left()
      +        return &quot;left&quot;
      +    elif id == &#039;t_right&#039;:
      +        t_right()
      +        return &quot;right&quot;
      +    elif id == &#039;t_up&#039;:
      +        t_up()
      +        return &quot;up&quot;
      +    elif id == &#039;t_down&#039;:
      +        t_down()
      +        return &quot;down&quot;
      +    elif id == &#039;t_stop&#039;:
      +        t_stop()
      +        return &quot;stop&quot;
      +
      +return redirect(url_for(&#039;show_index&#039;))
      +
      +

      def t_stop():
      GPIO.output(11, False)
      GPIO.output(12, False)
      GPIO.output(15, False)
      GPIO.output(16, False)

      +

      def t_up():
      GPIO.output(11, True)
      GPIO.output(12, False)
      GPIO.output(15, True)
      GPIO.output(16, False)

      +

      def t_down():
      GPIO.output(11, False)
      GPIO.output(12, True)
      GPIO.output(15, False)
      GPIO.output(16, True)

      +

      def t_left():
      GPIO.output(11, False)
      GPIO.output(12, True)
      GPIO.output(15, True)
      GPIO.output(16, False)

      +

      def t_right():
      GPIO.output(11, True)
      GPIO.output(12, False)
      GPIO.output(15, False)
      GPIO.output(16, True)

      启动网页服务:

      +

      使用root用户ssh登陆到树莓派,切换到piCar的目录,执行python server.py 打开你的浏览器,输入树莓派IP:2000 就能看到你的控制页面了。 :)

      +

      程序的完整源码放到了  https://github.com/wujiwh/piCar/tree/master/server 需要的朋友可以参考一下。

      +]]>
      + + 最近添加 + +
      + + 树莓派Wifi小车(二) + /raspberry-wifi-car-2.html + +上篇文章 之后,继续折腾我的小车,又用C#和Android 写了两个控制客户端。 + +

      思路比较直接,使用POST请求去发送小车转向参数,然后就动起来了。C#不说了,很熟练写起来也非常简单,使用钩子捕获全局键盘,这样及时程序不在前台也能控制小车。

      +

      核心代码如下:

      +
      using System;
      +using System.Collections.Generic;
      +using System.ComponentModel;
      +using System.Data;
      +using System.Diagnostics;
      +using System.Drawing;
      +using System.IO;
      +using System.Linq;
      +using System.Net;
      +using System.Net.Security;
      +using System.Runtime.InteropServices;
      +using System.Text;
      +using System.Windows.Forms;
      +
      +namespace WangHeng.Org.PiCar
      +{
      +    public partial class MainFrm : Form
      +    {
      +        public MainFrm()
      +        {
      +            InitializeComponent();
      +            InitControl();
      +            KeyHookUtils.Hook_Start();
      +        }
      +
      +        private void InitControl()
      +        {
      +            this.StartPosition = FormStartPosition.CenterScreen;
      +            this.Text = "PiCar Control  v" + this.ProductVersion;
      +            this.MaximizeBox = false;
      +            this.MinimizeBox = true;
      +            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
      +
      +            this.btnDown.Tag = "t_down";
      +            this.btnLeft.Tag = "t_left";
      +            this.btnRight.Tag = "t_right";
      +            this.btnUp.Tag = "t_up";
      +            this.btnStop.Tag = "t_stop";
      +            this.statusStrip1.SizingGrip = false;
      +            this.lblPostResultInfo.Text = "启动成功!";
      +        }
      +        protected override bool ProcessDialogKey(Keys keyData)
      +        {
      +            if (keyData == Keys.Left)
      +            {
      +                lblPostResultInfo.Text = "left";
      +            }
      +            return base.ProcessDialogKey(keyData);
      +        }
      +
      +        private void ctlButton_Click(object sender, EventArgs e)
      +        {
      +            var btn = sender as Button;
      +            var result = CarCtl.TurnFunc(btn.Tag.ToString());
      +            this.lblPostResultInfo.Text = "请求成功 - " + result;
      +        }
      +
      +
      +    }
      +
      +    public static class CarCtl
      +    {
      +        public enum CarStatus
      +        {
      +            Left,
      +            Right,
      +            Up,
      +            Down,
      +            Stop,
      +            Unknown
      +        }
      +
      +        public static CarStatus CurrentStatus = CarStatus.Unknown;
      +        public static string TurnFunc(string direcID)
      +        {
      +            try
      +            {
      +                var requestUrl = "http://192.168.1.171:2000/ctl";
      +                var requestData = new Dictionary<string, string>() { { "id", direcID } };
      +                var requestUserAgent = "WangHeng PiCar/v1.0";
      +                var requestEncoding = Encoding.Default;
      +                var result = HttpUtility.CreatePostHttpResponse(
      +                        requestUrl,
      +                        requestData,
      +                        5000,
      +                        requestUserAgent,
      +                        requestEncoding,
      +                        null);
      +
      +                using (var sr = new StreamReader(result.GetResponseStream(), requestEncoding))
      +                {
      +                    return sr.ReadToEnd();
      +                }
      +            }
      +            catch (Exception ex)
      +            {
      +                return null;
      +            }
      +        }
      +    }
      +
      +
      +    public class KeyHookUtils
      +    {
      +        [StructLayout(LayoutKind.Sequential)]
      +        public class KeyBoardHookStruct
      +        {
      +            public int vkCode;
      +            public int scanCode;
      +            public int flags;
      +            public int time;
      +            public int dwExtraInfo;
      +        }
      +        //委托 
      +        public delegate int HookProc(int nCode, int wParam, IntPtr lParam);
      +        static int hHook = 0;
      +        public const int WH_KEYBOARD_LL = 13;
      +        //LowLevel键盘截获,如果是WH_KEYBOARD=2,并不能对系统键盘截取,Acrobat Reader会在你截取之前获得键盘。 
      +        static HookProc KeyBoardHookProcedure;
      +
      +        //设置钩子 
      +        [DllImport("user32.dll")]
      +        public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId);
      +
      +        //抽掉钩子 
      +        [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
      +        public static extern bool UnhookWindowsHookEx(int idHook);
      +
      +        //调用下一个钩子 
      +        [DllImport("user32.dll")]
      +        public static extern int CallNextHookEx(int idHook, int nCode, int wParam, IntPtr lParam);
      +
      +        [DllImport("kernel32.dll")]
      +        public static extern int GetCurrentThreadId();
      +
      +        [DllImport("kernel32.dll")]
      +        public static extern IntPtr GetModuleHandle(string name);
      +
      +        public static void Hook_Start()
      +        {
      +            if (hHook == 0)
      +            {
      +                KeyBoardHookProcedure = new HookProc(KeyBoardHookProc);
      +                hHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyBoardHookProcedure,
      +                        GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName), 0);
      +                //如果设置钩子失败. 
      +                if (hHook == 0)
      +                {
      +                    Hook_Clear();
      +                }
      +            }
      +        }
      +
      +        /// <summary>
      +        /// 取消钩子事件
      +        /// </summary>
      +        public static void Hook_Clear()
      +        {
      +            bool retKeyboard = true;
      +            if (hHook != 0)
      +            {
      +                retKeyboard = UnhookWindowsHookEx(hHook);
      +                hHook = 0;
      +            }
      +        }
      +
      +        public static int KeyBoardHookProc(int nCode, int wParam, IntPtr lParam)
      +        {
      +            if (nCode >= 0)
      +            {
      +                KeyBoardHookStruct kbh = (KeyBoardHookStruct)Marshal.PtrToStructure(lParam, typeof(KeyBoardHookStruct));
      +                Keys k = (Keys)Enum.Parse(typeof(Keys), kbh.vkCode.ToString());
      +                switch (k)
      +                {
      +                    case Keys.Left:
      +                        if (kbh.flags == 1)
      +                        {
      +                            // 这里写按下后做什么事
      +                            if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)
      +                            {
      +                                CarCtl.TurnFunc("t_left");
      +                                CarCtl.CurrentStatus = CarCtl.CarStatus.Up;
      +                            }
      +                        }
      +                        else if (kbh.flags == 129)
      +                        {
      +                            //放开后做什么事
      +                            CarCtl.TurnFunc("t_stop");
      +                            CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;
      +                        }
      +                        return 1;
      +                    case Keys.Up:
      +                        if (kbh.flags == 1)
      +                        {
      +                            // 这里写按下后做什么事
      +                            if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)
      +                            {
      +                                CarCtl.TurnFunc("t_up");
      +                                CarCtl.CurrentStatus = CarCtl.CarStatus.Up;
      +                            }
      +                        }
      +                        else if (kbh.flags == 129)
      +                        {
      +                            //放开后做什么事
      +                            CarCtl.TurnFunc("t_stop");
      +                            CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;
      +                        }
      +                        return 1;
      +                    case Keys.Right:
      +                        if (kbh.flags == 1)
      +                        {
      +                            if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)
      +                            {
      +                                CarCtl.TurnFunc("t_right");
      +                                CarCtl.CurrentStatus = CarCtl.CarStatus.Up;
      +                            }
      +                        }
      +                        else if (kbh.flags == 129)
      +                        {
      +                            //放开后做什么事
      +                            CarCtl.TurnFunc("t_stop");
      +                            CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;
      +                        }
      +                        return 1;
      +                    case Keys.Down:
      +                        if (kbh.flags == 1)
      +                        {
      +                            if (CarCtl.CurrentStatus != CarCtl.CarStatus.Up)
      +                            {
      +                                CarCtl.TurnFunc("t_down");
      +                                CarCtl.CurrentStatus = CarCtl.CarStatus.Up;
      +                            }
      +                        }
      +                        else if (kbh.flags == 129)
      +                        {
      +                            //放开后做什么事
      +                            CarCtl.TurnFunc("t_stop");
      +                            CarCtl.CurrentStatus = CarCtl.CarStatus.Stop;
      +                        }
      +                        return 1;
      +                    default:
      +                        break;
      +                }
      +            }
      +            return CallNextHookEx(hHook, nCode, wParam, lParam);
      +        }
      +    }
      +}
      +
      +
      +

      这里主要说一下Android 的客户端

      +

      Android之前虽没怎么接触过,但凭着自己一些基础,还是慢慢摸索到了门路。唯一比较坑的是,在获取Wifi权限的时候,照着网上的介绍改了AndroidManifest.xml 加入

      +
          <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
      +    <uses-permission android:name="android.permission.INTERNET"/>
      +    <uses-permission android:name="android.permission.WAKE_LOCK"/>
      +    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
      +    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
      +

      依然没有访问网络的权限 :(

      +

      为此还特意加了几个Android的开发群,但是群里一个个爱答不理,趾高气扬的态度,我就呵呵了。果断退群,还是得靠自己,扶梯子上Google,一顿搜搜搜,果然有同病相怜的朋友。

      +

      原因竟然是一个小问题目标SDK版本不对。。。好吧,果然弱爆了。

      +

      android_target_sdk_version_error

      +

       

      +

       

      +

       

      +

      按上图将Target SDK Version 从18改成19,运行,测试,这次果然可以了。如下:

      +

      piCar截图

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

      代码也比较简单,核心代码如下:

      +
      package com.apiof.picar;
      +
      +import java.io.BufferedReader;
      +import java.io.IOException;
      +import java.io.InputStreamReader;
      +import java.net.HttpURLConnection;
      +import java.net.InetAddress;
      +import java.net.MalformedURLException;
      +import java.net.NetworkInterface;
      +import java.net.SocketException;
      +import java.net.URL;
      +import java.util.Enumeration;
      +import java.util.HashMap;
      +import java.util.Map;
      +
      +import android.net.wifi.WifiInfo;
      +import android.net.wifi.WifiManager;
      +import android.os.Bundle;
      +import android.os.StrictMode;
      +import android.app.Activity;
      +import android.app.AlertDialog;
      +import android.content.Context;
      +import android.content.DialogInterface;
      +import android.util.Log;
      +import android.view.KeyEvent;
      +import android.view.Menu;
      +import android.view.View;
      +import android.view.WindowManager;
      +import android.widget.Button;
      +import android.widget.TextView;
      +import android.widget.Toast;
      +import android.view.View.OnClickListener;
      +
      +public class MainActivity extends Activity {
      +
      +    @Override
      +    protected void onCreate(Bundle savedInstanceState) {
      +        super.onCreate(savedInstanceState);
      +        setContentView(R.layout.activity_main);
      +        // 禁止屏幕锁屏,也可以用View.setKeepScreenOn(boolean)来实现
      +        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
      +        InitHandler();
      +
      +        TestNetWork();
      +    }
      +
      +    public void DisplayToast(String str)
      +    {
      +        Toast.makeText(this, str, Toast.LENGTH_SHORT).show();
      +    }
      +
      +    public boolean onKeyDown(int KeyCode, KeyEvent event) {
      +        switch (KeyCode) {
      +        case KeyEvent.KEYCODE_0:
      +            DisplayToast("按下数字0");
      +            break;
      +        }
      +        return super.onKeyDown(KeyCode, event);
      +    }
      +
      +    @Override
      +    public boolean onKeyUp(int keyCode,KeyEvent event){
      +        switch(keyCode){
      +        case KeyEvent.KEYCODE_0:
      +            DisplayToast("松开数字0");
      +            break;
      +        }
      +        return super.onKeyUp(keyCode, event);
      +    }
      +
      +    public void TestNetWork() {
      +
      +        String strUrl = "http://nas.apiof.com:2000";
      +        StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
      +                .detectDiskReads().detectDiskWrites().detectNetwork()
      +                .penaltyLog().build());
      +        URL url = null;
      +        try {
      +            url = new URL(strUrl);
      +            System.out.println(url.getPort());
      +            HttpURLConnection urlConn = (HttpURLConnection) url
      +                    .openConnection();
      +            InputStreamReader in = new InputStreamReader(
      +                    urlConn.getInputStream());
      +            BufferedReader br = new BufferedReader(in);
      +            String result = "";
      +            String readerLine = null;
      +            while ((readerLine = br.readLine()) != null) {
      +                result += readerLine;
      +            }
      +            in.close();
      +            urlConn.disconnect();
      +
      +            System.out.println("r:" + result);
      +            TextView textView = (TextView) this.findViewById(R.id.textView2);
      +            textView.setText(result);
      +        } catch (MalformedURLException e) {
      +            // TODO Auto-generated catch block
      +            e.printStackTrace();
      +        } catch (IOException e) {
      +            // TODO Auto-generated catch block
      +            e.printStackTrace();
      +        }
      +    }
      +
      +    @Override
      +    public void onBackPressed() {
      +        new AlertDialog.Builder(this).setTitle("确认退出吗?")
      +                .setIcon(android.R.drawable.ic_dialog_info)
      +                .setPositiveButton("确定", new DialogInterface.OnClickListener() {
      +
      +                    @Override
      +                    public void onClick(DialogInterface dialog, int which) {
      +                        // 点击“确认”后的操作
      +                        MainActivity.this.finish();
      +                    }
      +                })
      +                .setNegativeButton("返回", new DialogInterface.OnClickListener() {
      +
      +                    @Override
      +                    public void onClick(DialogInterface dialog, int which) {
      +                        // 点击“返回”后的操作,这里不设置没有任何操作
      +                    }
      +                }).show();
      +    }
      +
      +    @Override
      +    public boolean onCreateOptionsMenu(Menu menu) {
      +        // Inflate the menu; this adds items to the action bar if it is present.
      +        getMenuInflater().inflate(R.menu.main, menu);
      +        return true;
      +    }
      +
      +    private String intToIp(int i) {
      +
      +        return (i & 0xFF) + "." + ((i >> 8) & 0xFF) + "." + ((i >> 16) & 0xFF)
      +                + "." + (i >> 24 & 0xFF);
      +    }
      +
      +    public String getLocalIpAddress() {
      +        try {
      +            for (Enumeration<NetworkInterface> en = NetworkInterface
      +                    .getNetworkInterfaces(); en.hasMoreElements();) {
      +                NetworkInterface intf = en.nextElement();
      +                for (Enumeration<InetAddress> enumIpAddr = intf
      +                        .getInetAddresses(); enumIpAddr.hasMoreElements();) {
      +                    InetAddress inetAddress = enumIpAddr.nextElement();
      +                    if (!inetAddress.isLoopbackAddress()) {
      +                        return inetAddress.getHostAddress().toString();
      +                    }
      +                }
      +            }
      +        } catch (SocketException ex) {
      +            Log.e("WifiPreference IpAddress", ex.toString());
      +        }
      +        return null;
      +    }
      +
      +    public void InitHandler() {
      +        // 获取wifi服务
      +        WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
      +        // 判断wifi是否开启
      +        if (!wifiManager.isWifiEnabled()) {
      +            wifiManager.setWifiEnabled(true);
      +        }
      +        WifiInfo wifiInfo = wifiManager.getConnectionInfo();
      +        int ipAddress = wifiInfo.getIpAddress();
      +        String ip = intToIp(ipAddress);
      +        TextView txt1 = (TextView) findViewById(R.id.textView1);
      +        txt1.setText(txt1.getText() + "\r\nLocal IP: " + ip);
      +
      +
      +        ((Button)findViewById(R.id.btnStop)).setOnClickListener(stopHandler);
      +        ((Button)findViewById(R.id.btnForward)).setOnClickListener(upHandler);
      +        ((Button)findViewById(R.id.btnBackward)).setOnClickListener(downHandler);
      +        ((Button)findViewById(R.id.btnTurnLeft)).setOnClickListener(leftHandler);
      +        ((Button)findViewById(R.id.btnTurnRight)).setOnClickListener(rightHandler);
      +    }
      +
      +    private void Trun(String id) {
      +        TextView txt = (TextView) findViewById(R.id.textView2);
      +        try {
      +            String requestUrl = "http://192.168.1.171:2000/ctl";
      +            Map<String, String> requestParams = new HashMap<String, String>();
      +            requestParams.put("id", id);
      +            String result = HttpUtils.submitPostData(requestUrl,
      +                    requestParams, "utf-8");
      +
      +            txt.setText("turn to: "+result);
      +        } catch (Throwable e) {
      +            e.printStackTrace();
      +        }
      +    }
      +    
      +    private OnClickListener stopHandler=new OnClickListener() {
      +        public void onClick(View v) {
      +            Trun("t_stop");
      +        }
      +    };
      +    private OnClickListener leftHandler=new OnClickListener() {
      +        public void onClick(View v) {
      +            Trun("t_left");
      +        }
      +    };
      +    private OnClickListener rightHandler=new OnClickListener() {
      +        public void onClick(View v) {
      +            Trun("t_right");
      +        }
      +    };
      +    private OnClickListener upHandler=new OnClickListener() {
      +        public void onClick(View v) {
      +            Trun("t_up");
      +        }
      +    };
      +    private OnClickListener downHandler=new OnClickListener() {
      +        public void onClick(View v) {
      +            Trun("t_down");
      +        }
      +    };
      +
      +}
      +

      完整的代码放到了我的Github 共享,需要的朋友可以参考下载:

      +

      https://github.com/wujiwh/piCar/tree/master/client/android

      +]]>
      + + 最近添加 + +
      + + 树莓派Wifi小车(三) + /raspberry-wifi-car-3.html + +前面1,2中我们的小车能跑了,现在在加一些有意思的功能,那就是网络摄像头,这样我们的小车就变成了一个巡逻小车啦! + +

      首先当然你需要有一个USB摄像头,现在市面上的大部门的UVC摄像头都能直接被Linux驱动,当然raspberry也是可以的,比起windows那乱七八糟的驱动程序是不是方便很多。

      +

      如果你不确定你的摄像头能不能直接被你的树莓派识别,你可以首先执行

      +

      lsusb 看看你的摄像头vid在不在UVC协议的官方支持列表。支持列表可查看:http://linux-uvc.berlios.de/

      +

      确定好了摄像头的驱动问题,下面就是安装网络摄像头监控软件了。

      +

      常用的有motion以及mjpg-streamer这两款软件

      +

      我之前一直用的是motion 这款软件,在openwrt和NAS的软件源里面都能很容易的安装,raspberry也不例外。我们先试试motion的效果!

      + + +

      一、motion安装以及使用

      #首先更新系统软件源
      sudo apt-get update
      #升级系统软件包
      sudo apt-get upgrade
      #安装motion软件包
      sudo apt-get install motion
      #配置motion
      #首先备份默认配置
      cp /etc/motion/motion.conf /etc/motion/motion.conf.bak
      #修改参数设置
      #启用daemon
      daemon on
      #取消只绑定到本地,这样局域网其他机器才能访问到摄像头图像
      webcam_localhost off
      #监测到动作的时候不保存图片,否则会保存大量的图片占用SD卡
      output_normal off
      #启动motion后天服务,下面执行一下
      motion

      接下来使用firefox访问IP:8081 应该就能看到移动的图像了。

      +

      我们修改一下小车控制页面,将图像监视显示出来,效果如下:

      +

      带摄像头移动小车

      +

      是不是还不错! : )

      +

       

      +

      二、mjpg-streamer安装以及使用

      +

      1、安装依赖软件包

      +
      sudo apt-get install libv4l-dev libjpeg8-dev  imagemagick
      +

      2、下载mjpg-streamer软件源码包

      +
      wget http://downloads.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz
      +

      3、处理videodev.h丢失问题

      +

      编译过程会报错,错误的原因是Linux 2.4以上的内核里面都没有包含videodev.h这个文件了。在include/linux/下面有videodev2.h这个文件,但是在源文件中部分包含了videodev.h这个头文件。导致报错。解决的办法是:

      +
      sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h
      +

      4、解压安装

      +
      tar xvf mjpg-streamer-r63.tar.gz
      +cd mjpg-streamer-r63/
      +make USE_LIBV4L2=true clean all
      +./start.sh
      +

      打开 IP:8080看看效果吧!

      +

       

      +]]>
      + + 最近添加 + +
      + + Linux系统中安装Razer驱动 + /razer-drivers-installed-linux-system.html + + 最近无线网卡出了点小问题,所以回来基本是用Linux了。可惜使用的razer鼠标却没有官方的Linux驱动,高DPI的鼠标在Linux用着感觉很是飘,于是忍不住折腾一番。经过一阵子的搜索终于看到了希望,喜欢razer的朋友有福音了,国外一位牛人搞出了Linux下的razer驱动以及配置工具razercfg。目前最新的版本是razercfg-0.17.tar.bz2,支持的Razer鼠标有: +Razer DeathAdder Classic mouse +Razer DeathAdder 3500 DPI mouse +Razer DeathAdder Black Edition mouse +Razer Krait mouse +Razer Lachesis mouse +Razer Lachesis 5600 DPI mouse +Razer Copperhead mouse +Razer Naga mouse wired +Razer Boomslang CE mouse +Any wireless Razer mouse +平时使用Linux系统,却又喜欢Razer鼠标的朋友不妨试试! + 下面介绍一下驱动的安装过程 +1、安装必须的依赖项:
      +sudo -i
      +apt-get install python
      +apt-get install libusb-1.0-0-dev
      +apt-get install python-qt4
      +apt-get install cmake
      +
      + + + +

      2、下载razercfg-0.17.tar.bz2压缩包,并解压文件


      wget http://bues.ch/razercfg/razercfg-0.17.tar.bz2
      tar xjvf razercfg-0.17.tar.bz2
      cd razercfg-0.17

      +

      3、开始安装
      首先生成Makefile文件,然后编译并安装,别漏掉第一条命令后面的小点

      +
      +sudo -i
      +cmake .
      +make
      +make install 
      +
      +

      为了在系统启动时自动加载razerd守护程序,你需要运行init-script脚本文件,执行如下命令:

      +
      +  sudo -i    # become root
      +  cp ./razerd.initscript /etc/init.d/razerd
      +  ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd
      +  ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd
      +  ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd
      +  ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd
      +
      4、razer的图形配置工具 +

      首先确保razerd已经运行,如果配置好了第三步,可以重启电脑或者在终端输入命令
      razerd 来启动。
      命令行配置工具有qrazercfg,或者使用更酷的图形配置工具qrazercfg,在终端输入qrazercfg来启动这个小工具,运行界面如图:






      它提供的配置是不是很丰富呢,基本上windows上面的配置选项在这里都可以找到。

      +
      +]]> + + Technical + +
      + + Razer Krait 鼠标换微动 + /razer-krait-mouse-change-budge.html + +08年底买的Razer 鼠标已经越来越不好用了,左键经常单击变双击。拿到公司用了几天很是郁闷,根本做不了开发工作,于是动了自己修理鼠标的想法。从网上搜索得知鼠标用的微动是欧姆龙的D2FC-F-7N,于是动身前往中关村买微动。刚开始去了淘宝的一家实体店,买来的型号是D2F-01L 据称是日产的高档微动,外加买了一套电烙铁。路上仔细用手点了点刚买的微动,感觉手感一般。想起网上说的一款德产的DG2 ,0.74N 的力度和适中的键程堪称游戏利器,经过一番搜索找到了中关村4楼的一家游戏装备店,没买到DG2,却被介绍了另一款手感很好的日产灰点D2F-01F,而且老板那还有Razer原厂的D2FC-F-7N,经过一番讨价以10块RMB买来一个D2FC-F-7N 和D2F-01F。 + +

      image

      +

      回家拆开鼠标,赞一下,Razer的做工真的很棒,换微动的时候更是应了老板的那句“Razer的微动很不好拆”,经过一番折腾,终于成功的换上了新的微动!至此,我的Razer 金环蛇成功复活!

      +]]>
      + + Technical + + + Razer + Krait + mouse + DIY + 微动 + 鼠标 + +
      + + 卸载grub2重新装回grub legacy + /reinstall-grub.html + +还是习惯用grub,grub2虽然好用,但是最近安装xen时却频频出现问题。于是果断卸载,重新装回了grub。 + +

      步骤很简单:

      +

      首先执行:

      +
       apt-get --purge remove grub-pc 
      + +

      这时会有让你确认是否删除的提示信息,当然是选择yes

      +

      然后删掉原来grub2的所有配置文件,并重建grub目录:

      +
      +rm -r /boot/grub/
      +mkdir /boot/grub
      +
      + +

      重新安装grub, 安装完需要 update-grub 提示 if you want create a menu.lst ? 输入y同意。

      +
      +apt-get install grub
      +update-grub
      +
      + +

      最后可以选择将将grub loader写入物理MBR。(这里注意你是否是单硬盘,是否是多系统,请依据具体情况填写)

      +
      grub-install /dev/sda 
      + +

      现在终于可以方便的修改menu.lst了!

      +]]>
      + + Technical + + + grub2 + grub legacy + +
      + + 按对象的某个属性值来排序 + /reorder-objects-by-certain-attribute.html + +需求可以抽象为一个小例子,比如现在一个学生是一个对象,它具有学号这个属性,要求按照学号排序。 + +

      首先写一个比较器,很简单:

      +
      public class StudentComparer : IComparer
      +{
      +    //实现按xuehao排序
      +    public int Compare(Student x, Student y)
      +    {
      +        return (x.xuehao.CompareTo(y.xuehao));
      +    }
      +}
      +

      使用也很简单:

      +
      +List stu = new List();
      +
      +…………………
      +
      +stu.Sort(new StudentComparer());
      +
      +
      +]]> + + Technical + + + Sort + 对象 + 属性 + 排序 + +
      + + 解决插件调用google字体巨慢的问题 + /resolve-syntaxhighlighter-google-fonts-pop-issue.html + +写博客免不了贴代码,但是每次使用syntaxhighlighter 贴代码弹出的窗体总是慢的要死,加上wordpress本来也不快,卡上加卡终于无法忍受。 + +

      wordpress现在越来越臃肿常常打扰我的思路,这也是我平时经常随手将一些笔记直接扔到了vimwiki中的缘由。

      +

      查看了一下网络请求,果然又是google font的问题。好吧,活在我大天朝,只好逆来顺受了。

      +

      难道每次贴个代码都要等四五十秒。。。还是自己开刀改一下网站插件吧,祭出神器chrome网页debug工具,一顿调试之后找到原来是在tiny_mce_popup.js 这个文件的65行出现请求超时,跟进去找到对应的css 是这个

      +
      +wp-includes/js/tinymce/plugins/compat3x/css/dialog.css
      +
      +

      编辑器打开,果然啊,第一行就是:

      +
      +@import url(//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin);
      +
      +/* Generic */
      +body {
      +font-family: "Open Sans", sans-serif;
      +font-size:13px;
      +background:#fcfcfc;
      +padding:0;
      +margin:8px 8px 0 8px;
      +}
      +

      找到问题就好办了,删掉第一行,将Sans字体改成Consolas,这下次终于顺畅了!

      + + +

      google_fonts2consolas

      +]]>
      + + 最近添加 + +
      + + SAE中使用TmpFS功能 + /sae-used-tmpfs-function.html + +

              前一段时间做的项目需要提供导出CSV报表的功能,我用php直接拼出csv的文件流输出到页面,以提供csv文件的下载,功能在wamp环境中运行很正常,但是到了SAE平台却怎么都不好使。不管是改请求的响应头content-type 还是修改输出的文件格式,每次SAE都是把内容直接输出在了页面。因为SAE不支持通用方式的本地IO,于是想到了使用SAE提供的tmpFS功能。

      TmpFS

      因为平台安全性的考虑,SAE限制了用户对于本地IO的使用,但这样对于一些传统的PHP项目,也许带来了很多不便,因为它们都或多或少的有对本地 IO的操作,像Smarty的编译模板。为了解决这个问题,SAE提供了TmpFS功能。TmpFS允许开发者通过标准的IO函数临时读写本地IO,这样 方便了很多非SAE项目的移植。 + +

      特别注意:

      +

      临时文件的生存周期等同于PHP请求,也就是当该PHP请求完成执行时,所有写入TmpFS的临时文件都会被销毁
      TmpFS是本地临时文件,不是共享存储,而SAE是全分布式环境,所以不同请求之间无法通过TmpFS共享操作文件
      TmpFS操作的文件限于SAETMPPATH目录内,而不同App的SAETMPPATH是不同的
      TmpFS的文件为纯内存存储

      +

      应用场景

      +

      用户的可持久化存储,请使用Storage或者MySQL存储,而缓存存储请使用Memcache服务存储,TmpFS是满足用户的一个请求的临时 文件的读写需求。比如抓取一个URL的图片,判断一下大小,再决定是否写入Storage。需要在本地生成文件的情况大致分以下几种:

      +

      缓存
      配置文件
      静态文件
      临时文件

      +

      例子:

      +

      appname: saetest
      appversion: 1

      +

      在一个php文件中:


      file_put_contents( SAE_TMP_PATH . '/mycode.txt' , 'dummy test' );
      echo file_get_contents( SAE_TMP_PATH . '/mycode.txt' ); // will echo dummy test;

      如果是两个独立的php文件:
      a.php


      file_put_contents( SAE_TMP_PATH . '/mycode.txt' , 'dummy test' );

      b.php


      echo file_get_contents( SAE_TMP_PATH . '/mycode.txt' ); // 出错啦,文件已经不存在了...

      说到这里,大家应该明白了, tmpFS中的文件在后台PHP代码执行完后就已经不存在了,囧。最后只好用了个折中的办法,临时把文件放在了SAE的永久化存储的Storage里面。不知看到这里的朋友有无更好的办法解决SAE中导出文件的问题,欢迎联系告知~


      +]]> + + 最近添加 + +
      + + 设置Win7无线网络共享 + /set-win7-wireless-share.html + +有时候难免碰到多个人需要上网却只有一根网线的情况,其实WIN7系统里还有很多有意思的东西我们没有用过,例如,方便设置WIN7的无线网卡,来实现共享WIFI上网。如果你电脑上同时有无线和有线网卡不妨试试,下面就来说一下设置过程: + +

      方法一:

      +

      1、首先以管理员身份运行命令提示符

      +

      开始->搜索框输入cmd,出来的cmd.exe上右键管理员身份运行,或者win+R打开运行提示框,输入cmd并回车。

      +

      2、设置“虚拟Wifi网卡”模式

      +

      敲入命令:

      +

      netsh wlan set hostednetwork mode=allow ssid=Master_Share key=1234567890

      +
      image + +

      其中:


      Mode:是否启用虚拟Wifi网卡,改为disallow则为禁用

      +

      Ssid:设定无线网络的名称

      +

      Key:设定无线网络的密码。

      +

      执行完以后我们会在网络适配器里面看到一个“无线网络连接4“的虚拟网卡(一般情况是无线网络连接2,因为我机器曾接入多块无线网卡故为无线连接4)Smile

      +

      image

      +

      3、启用“Internet连接共享”

      +

      打开控制面板找到并打开“网络和共享中心”窗口,右键单击已连接到Internet的网络连接,选择“属性”,切换到“共享”选项卡,选中其中的复选框,并选择允许其共享Internet的网络连接在这里即我们的虚拟Wifi网卡。

      + + +

      image

      +

      确定之后,提供共享的网卡图标旁边会出现“已共享”标志

      +

      在命令提示符中运行以下命令:

      +

      netsh wlan start hostednetwork

      +

      开启我们之前设置好的无线网络(将start改为stop即可关闭该无线网)。

      +

      用你的手机搜索一下无线,找到名称为Master_Share的网络,点击连接并输入你设置的密码,

      +

      是否能够上网了呢?

      +

      方法二:(推荐)

      +

      更酷的玩法:

      +

      其实配置无线有更简单方便的方法 Smile

      +

      1、首先确保所有的网卡都没有设置Internet连接共享,如果设置过,请取消共享。

      +

      打开控制面板->网络和共享中心->设置新的连接或网络

      +

      选择“设置无线临时(计算机到计算机)网络”并点击下一步

      +

      image

      +

      出现的窗口中输入你的无线网络名称和密码,注意安全类型选择WEP以方便设置(其实平时也不会总开着无线共享,所以也没必要非要wap2)。

      +

      image

      +

      下一步继续,出现的窗口中选择启用Internet连接共享,(后面还可能让你选择已经接入网络的网卡,请正确选择)

      +

      image

      +

      image

      +

      成功后无线状态显示为正“等待用户”~~

      +

      image

      +

      用手机搜索一下无线信号,输入正确的密码来使用共享的无线网络。

      +

      疑难解答:

      +

      如果你前面的步骤不成功。

      +

      1、请检查你提供共享的无线网卡(虚拟WIFI或方法二的无线网络2)的IP设置,确保配置如图所示:(DNS可以不用填)

      +

      image

      +

      2、手机或者其他终端如果自动获取的IP跟上面图的IP地址不在一个网段(不是192.168.137.X),请在终端选择手动设置IP,设置如下:

      +

      IP地址:192.168.137.2

      +

      子网掩码:255.255.255.0

      +

      默认网关:192.168.137.1

      +

      方法拓展:

      +

      其实前面的方法道理都是一样的,都用的是ICS(Internet连接共享)这个服务,所以你可以通过这种方法来实现:

      +

      1、无线共享给无线(给手机或平板提供无线连接,毕竟笔记本的网卡比这些终端要好很多)

      +

      2、有线共享给无线

      +

      3、无线共享给有线(哈哈,这个给力吧,曾经大二的时候就通过这种方法跟同学一起联网上浩方,好怀念!)

      +

      好了,其实Windows系统还是很强大的!有任何问题的朋友可以留言共同学习~!

      +]]>
      + + Technical + + + Windows + Win7 + 虚拟WIFI + 网络 + +
      + + Ubuntu 搭建 Vpn 服务 + /setup-vpn-the-server.html + +最近通过优惠券买了一个美国的VPS,虽然配置低了点,但是用来做平时网站的备份,或者临时当作离线下载服务器都是很不错的主意!因为国内周知的原因,访问一些国外的网站很受限制,所以想起了用自己的VPS来搭建一个VPN的想法。具体实现如下: + +
        +
      1. 安装pptpd,这是个VPN服务器端软件
        sudo apt-get install pptpd
      2. +
      3. 修改文件 /etc/pptpd.conf
        sudo vi /etc/pptpd.conf
        +找到# TAG: localip一行,在后面添加以下2行:
        localip 192.168.0.1
        remoteip 192.168.0.234-238,192.168.0.245
      4. +
      5. 修改文件 /etc/ppp/pptpd-options
        sudo vi /etc/ppp/pptpd-options
        +找到 #ms-dns这行,去掉前面的#号,修改成google提供的DNS server或其他DNS:
        ms-dns 8.8.8.8
        ms-dns 8.8.4.4
      6. +
      7. 修改文件 /etc/ppp/chap-secrets,按一行四列添加账号、服务器名、密码和IP限制。服务器名(默认 写pptpd 即可,务必与 pptpd-options 文件的name一行一样)。如创建一个名为user,密码为userpasswd,不限制登录IP的VPN账号:
        user pptpd userpasswd *
      8. +
      9. 修改文件 /etc/sysctl.conf,去掉这一行 #net.ipv4.ip_forward=1 的#号,开启ipv4 forward,然后运行命令:
        sudo sysctl –p
        +运行后会显示 net.ipv4.ip_forward = 1,就表示修改生效了。
      10. +
      11. 使用iptables建立一个NAT
        sudo apt-get install iptables
        +iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
        +上面的24表示子网掩码,代表24个1.
        eth0是网卡名字,可以通过命令 ifconfig 查看
      12. +
      +

      为防止重启服务器后iptables丢失,先运行

      +
      iptables-save > /etc/iptables.rule
      +

      然后修改文件 /etc/network/interfaces ,在eth0/eth1.. 下面加入
      pre-up iptables-restore < /etc/iptables.rule
      7. 现在应该就搞定了,最后重启 pptpd

      +
      sudo /etc/init.d/pptpd restart
      +
        +
      1. 在client端设置连接VPN进行测试,client是Ubuntu的话请看这里
        测试是否可以连接到VPN server:
        ping server_IP
        +不能的话,问题应该出在前4步。
        测试是否可以连接到外网:(任何其他外网IP都行)
        ping 8.8.8.8
        +不能的话,问题应该出在第5-6步,看看是否正确设置了 ipv4 forward
        测试是否可以解析DNS:
        nslookup google.com
        +
      2. +
      +]]>
      + + Technical + + + VPS + 代理 + Ubuntu + VPN + 翻墙 + +
      + + 分享iPad2越狱工具 + /share-ipad2-jailbreak-tool.html + +过年在家看书学习之余,也有了闲工夫折腾一下ipad。虽然个人不提倡盗版,并且平时用到的工具ipad上也都装了。但越狱可不仅仅是为了装盗版,呵呵。顶着越狱后系统可能出现各种问题的压力,为了以后更方便的各种折腾,果断越了! + +

      附图:

      +

      越狱后

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

       

      +

      工具是傻瓜式的一键越狱,跟除夕时候放出的命令行越狱工具没太大本质区别,不过GUI工具却是修复了一些小bug,所以对需要的朋友还是推荐使用GUI工具。 :)

      +

      下面是工具的下载地址:

      +

      点击下载

      +]]>
      + + Technical + + + iPad2 + 越狱 + 分享 + 工具 + +
      + + 分享个人wiki部署脚本 + /share-personal-wiki-deployment-script.html + +上一篇介绍了如何使用vimwiki组建个人wiki,但是如何同步自己的vimwiki 到线上却成了很多人的困扰。丘迟的维基世界介绍了同步 vimwiki 到线上的各种方法,如果你的桌面是使用linux的话,当然问题不大,很轻松就能写出一个同步的脚本。但是还是有很多人平时工作在windows的系统环境中,这里我自己写了一个vim的小插件用来一键同步vimwiki到线上。 + +

      首先分析一下这个同步需求:


      1. 需要自动同步 vimwiki_html 的所有文件

      2. 有变更的文件才同步上去

      3. 被删掉的文件也要能同步删掉

      4. 由于文件修改频繁,不需要一旦修改就马上同步

      5. 有需要时可以手动同步

      6. 最好能排除一些不用放在线上的文件

      7. 不能占用太多系统资源

      这里我将vimwiki生成的html托管在了自己的github上面,此vim脚本的运行需要依赖你gvim对应版本的python,或者自己在windows下编译一个gvim。(好吧,这个实在够蛋疼。。。)

      +

      安装并配置你的github

      +

      首先关闭360安全卫士等流氓软件!切记!

      +

      从github下载github for window,链接如下:

      +

      http://github-windows.s3.amazonaws.com/GitHubSetup.exe

      +

      安装完成后,用你的账号登录,然后在tools/options中设置默认的shell为cmd,如下图:

      +

      image

      +

      完成后双击桌面上的git shell图标,打开git shell 后执行如下命令

      +

      echo %path% >>c:\path.txt

      +

      打开c:\path.txt 将里面的内容全部复制,粘贴到系统的path变量中(覆盖原来的path)。完成此步骤后,cmd中会使用github生成的配置进行ssh的key-agent验证登录,故实现了git命令免密码的效果。完成后,运行cmd,输入git,能识别这个命令表示成功。然后就可以使用我写的这个脚本了(汗,脚本依赖有点高~~)

      +

      脚本的代码如下:

      +
      "=========================================================
      +

      " FileName: vimwiki_sync.vim
      " Desc:
      " Author: WangHeng
      " Email: me@wangheng.org
      " HomePage: http://wangheng.org
      " Version: 1.1
      " LastChange: 2012-07-19 22:32:39
      " History: 1、2012-07-20 暂时注释VimwikiGet('path_html')
      " 不好用原因待研究
      "=========================================================

      +

      " let s:wiki_html_path=VimwikiGet('path_html')这条命令有时候不好用,故暂时注释掉
      if !has('python')
      echo "Git Auto Upload Error:\nRequired vim compiled with +python"
      finish
      endif

      +

      function! s:Vimwiki_Upload()

      +

      python <<EOF
      import os
      import time

      +

      dt = time.strftime("%Y-%m-%d %H:%M", time.localtime())

      +

      #Edit the html_path to your html files path.
      html_path='XXX\html' #替换成你的public_html所在路径

      +

      html_path=vim.eval('s:wiki_html_path')

      os.chdir(html_path)
      path=os.getcwd()
      print "Now, will sync files in "+path+" at "+dt
      os.system('git add .&&git commit -a -m "auto commited at %s "&&git push' % (dt))

      +

      print "All done~!"
      EOF

      +

      endfunction

      +

      command! -range VimwikiUpload :call s:Vimwiki_Upload()

      +

      nnoremap <F11> :VimwikiUpload<cr>


      或者直接点击这里下载。

      +

      使用方法是在vim的普通模式下按F11,另外你还可以将中间的那段python代码提出来作为一个单独的python脚本,这样你就可以将它加到计划任务定时执行了,有需求的朋友可以试试~~任何问题欢迎留言交流~

      +]]>
      + + Technical + Route + + + vim + 备份 + vim插件 + 部署 + github + python + symfony + +
      + + 使用parted创建GPT分区 + /shi-yong-parted-chuang-jian-gpt-fen-qu.html + +操作环境: + +

      CentOS Linux 6.5

      +

      硬盘:

      +

      /dev/sda 大小500G,为4*15K HDD做的硬Raid10,用来部署系统分区以及Oracle应用分区。

      +

      /dev/sdb 大小4.1T 为6*10K HDD做的硬Raid5,用来做Oracle的数据文件分区

      +

      /dev/sdc 大小4.1T 为6*10K HDD做的硬Raid5,用来做Oracle的数据索引

      +

      平时在Linux下使用的硬盘都没超过2T的单盘,所以刚开始用fdisk分区出来发现只有2T,还有点疑惑,一查才知道原来是因为fdisk不支持创建GPT分区,GPT支持大于2TB分区,MBR只能支持2TB的分区。下面是两种分区格式的具体区别:

      +
      MBR分区表:(MBR含义:主引导记录) +所支持的最大卷:2T (T; terabytes,1TB=1024GB) +对分区的设限:最多4个主分区或3个主分区加一个扩展分区。 +GPT分区表:(GPT含义:GUID分区表) +支持最大卷:18EB,(E:exabytes,1EB=1024TB) +每个磁盘最多支持128个分区
      Linux下的parted工具的使用也很简单,具体操作如下: + +

      root@me:/mnt# parted /dev/sda
      Using /dev/sda
      Welcome to GNU Parted! Type ‘help’ to view a list of commands.

      +

      (parted) mklabel gpt
      Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk
      will be lost. Do you want to continue?
      Yes/No? yes

      +

      (parted) print
      Model: DELL PERC 6/i Adapter (scsi)
      Disk /dev/sda: 500GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number  Start  End  Size  File system  Name  Flags

      +

      (parted)mkpart primary 0GB 500GB
      Warning: You requested a partition from 0.00B to 500GB.
      The closest location we can manage is 17.4kB to 500GB.
      Is this still acceptable to you?
      Yes/No? yes
      Warning: The resulting partition is not properly aligned for best performance.
      Ignore/Cancel? Ignore

      +

      (parted) print
      Model: DELL PERC 6/i Adapter (scsi)
      Disk /dev/sda: 500GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number  Start   End    Size   File system  Name     Flags
      1      17.4kB  500GB  500GB               primary

      +

      (parted)quit
      Information: You may need to update /etc/fstab.
      root@me:/#mkfs.ext4 /dev/sda1
      mke2fs 1.41.12 (17-May-2010)
      文件系统标签=
      操作系统:Linux
      块大小=4096 (log=2)
      分块大小=4096 (log=2)
      Stride=0 blocks, Stripe width=0 blocks
      30490624 inodes, 121962487 blocks
      6098124 blocks (5.00%) reserved for the super user
      第一个数据块=0
      Maximum filesystem blocks=4294967296
      3722 block groups
      32768 blocks per group, 32768 fragments per group
      8192 inodes per group
      Superblock backups stored on blocks:
      32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
      4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
      102400000
      正在写入inode表: 完成
      Creating journal (32768 blocks): 完成
      Writing superblocks and filesystem accounting information: 完成
      This filesystem will be automatically checked every 24 mounts or
      180 days, whichever comes first.  Use tune2fs -c or -i to override.

      +

      这样我们就完成了分区的创建以及格式化,其他分区步骤类似,全部完成并装好系统我们可以编辑/etc/fstab 文件以实现开机自动挂载分区。

      +]]>
      + + 最近添加 + +
      + + 备份网站到FTP和Dropbox脚本 + /site-backup-to-ftp-and-dropbox.html + +发一个一键备份脚本,可以将网站文件和数据库备份到FTP和Dropbox,可以从这里下载autobackup. +1、配置dropbox_Uploader.sh
      运行dropbox_sync.sh,根据提示完成dropbox的授权。
      2、自动备份脚本autobackup.sh内容
      #!/bin/bash
      +#你要修改的地方从这里开始
      +MYSQL_USER= #mysql用户名
      +MYSQL_PASS= #mysql密码
      +MAIL_TO= #数据库发送到的邮箱
      +FTP_USER= #ftp用户名
      +FTP_PASS= #ftp密码
      +FTP_IP= #ftp地址
      +FTP_backup= #ftp上存放备份文件的目录,这个要自己得ftp上面建的
      +WEB_DATA= #要备份的网站数据根目录
      +#你要修改的地方从这里结束
      +#定义数据库的名字和旧数据库的名字
      +DataBakName=Data_$(date +"%Y%m%d").tar.gz
      +WebBakName=Web_$(date +%Y%m%d).tar.gz
      +OldData=Data_$(date -d -10day +"%Y%m%d").tar.gz
      +OldWeb=Web_$(date -d -10day +"%Y%m%d").tar.gz
      +#删除本地3天前的数据
      +cd /home/backup
      +rm -rf Data_$(date -d -3day +"%Y%m%d").tar.gz Web_$(date -d -3day +"%Y%m%d").tar.gz
      +#导出数据库,一个数据库一个压缩文件
      +for db in `/usr/local/mysql/bin/mysql -u$MYSQL_USER -p$MYSQL_PASS -B -N -e 'SHOW DATABASES' | xargs`; do
      + (/usr/local/mysql/bin/mysqldump -u$MYSQL_USER -p$MYSQL_PASS ${db} | gzip -9 - > ${db}.sql.gz)
      +done
      +#压缩数据库文件为一个文件
      +tar zcf $DataBakName *.sql.gz
      +rm -rf *.sql.gz
      +#发送数据库到Email,如果数据库压缩后太大,请注释这行
      +#echo "主题:数据库备份" | mutt -a $DataBakName -s "内容:数据库备份" $MAIL_TO
      +#压缩网站数据
      +tar zcf $WebBakName $WEB_DATA
      +#上传到FTP空间,删除FTP空间5天前的数据
      +ftp -v -n $FTP_IP << END
      +user $FTP_USER $FTP_PASS
      +type binary
      +cd $FTP_backup
      +delete $OldData
      +delete $OldWeb
      +put $DataBakName
      +put $WebBakName
      +bye
      +END
      +echo =====================Ftp backup finished at [$(date +%Y-%m-%d-%H-%M)]==============================
      +#备份到dropbox空间
      +/root/bin/dropbox_sync.sh upload $DataBakName $FTP_backup/$DataBakName
      +/root/bin/dropbox_sync.sh upload $WebBakName $FTP_backup/$WebBakName
      +#Delete Old Data
      +/root/bin/dropbox_sync.sh delete $FTP_backup/$OldData
      +/root/bin/dropbox_sync.sh delete $FTP_backup/$OldWeb
      +echo =====================dropbox backup finished at [$(date +%Y-%m-%d-%H-%M)]==========================
      + +

      3、给系统添加定时任务
      如果需要将数据库文件发送到邮箱,首先需要安装sendmail和mutt,安装方法请自行google

      +

      给脚本添加执行权限:

      +
      +chmod +x /root/bin/autobackup.sh
      +利用系统crontab实现每天自动运行:
      +crontab -e
      +输入以下内容:
      +00 00 * * * /root/bin/autobackup.sh
      +
      其中00 00为时间分/小时,可自行修改,例如:30 12 ***,就是每天12.30运行这个脚本。
      +
      +]]> + + Technical + + + 备份 + Dropbox + 脚本 + IIS + +
      + + 解决MySQL远程连接丢失问题 + /solve-the-mysql-remote-connection-is-lost.html + +最近服务器很不稳定,于是重装了mysql 和php 服务,但是接着却遇到了很头疼的麻烦。 +远程连接mysql是总是提示: +Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 + +

      很明显这是连接初始化阶段就丢失了连接的错误。

      +

      google半天大多是说的注释掉配置文件中 bind-address = 127.0.0.1 这一句。
      但是我的配置文件并没有配置这一句,各种搜索均未果。今天偶然在网上看到一个遇到同样问题的人贴出的配置,发现他多了一句配置 skip-name-resolve,抱着试试看的态度改了一下并重启了mysql服务,果然远程一下子就连接上了,真是无语。

      +

      其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配置文件即可。
      具体的解决步骤如下,希望能帮助遇到同样问题的同学们:
      找到并修改my.cnf文件。在不同的Linux系统下,my.cnf放在不同的位置。这里以Ubuntu Server做示例,其他系统请根据情况自行找到my.cnf的路径。一般只会存放在/etc/my.cnf或者/etc/mysql/my.cnf下。

      +

      首先用vim打开my.cnf:

      +
      vim /etc/mysql/my.cnf
      +

      看看是否有绑定本地回环地址的配置,如果有,注释掉下面这段文字:(在文字之前加上#号即可)

      +
      bind-address = 127.0.0.1
      +

      然后找到[mysqld]部分的参数,在配置后面建立一个新行,添加下面这个参数:

      +

      skip-name-resolve
      保存文件并重启MySQL:

      +
      /etc/init.d/mysql restart
      +

      这样就会发现,问题已经解决了!远程连接不会丢失了。

      +]]>
      + + Technical + + + 日志 + Linux + +
      + + Apache2配置多域名 + /the-apache2-configure-multi-the-domain.html + +

      几经周折买回来的VPS终于能用了!  Smile打算试用一段时间后,如果服务器足够稳定就将自己的博客完全转入新的VPS。搭建好LAMP环境 后需要对服务器进行一些配置以支持多个域名的独立管理。没有自己顶级域名的朋友可以试试 www.co.cc的免费二级域名,之前在大学期间一直用的是他们的免费域名去绑定一些不好记住的ip服务,解析速度也挺快的,再次感谢!为你的域名(例如:xxx.co.cc)新建一个文本文件并编辑xxx.co.cc的站点配置文件 xxx.co.cc

      
      +ServerName xxx.co.cc
      +ServerAlias xxx.co.cc
      +DocumentRoot /var/www/test/
      + 
      +
      + +

      将这xxx.co.cc文件上传到 /etc/apache2/sites-enabled/ 目录并重启apache服务以使配置生效。使用putty登录vps执行如下命令

      + +
      +/etc/init.d/apache2 restart
      +
      + +

      上传探针文件到/var/www/test/

      +
      +cd /var/www/test
      +wget wangheng.org/tools/tz.zip
      +unzip tz.zip
      +
      + +

      如果上传文件的所有者为 root ,Apache 无法正常写入,需要设置上传文件的宿主为 www-data。设置 /var/www下的所有文件的宿主都是 www-data,这样apache2就可以正常读写:

      + +
      +chown -R www-data:www-data /var/www/test/*
      +
      + +

      好了现在输入“你的域名”/tz.php,这里是xxx.co.cc,是不是配置成功了呢?Smile

      +
      +]]> + + Technical + + + 环境搭建 + Ubuntu + Apache2 + 多域名 + +
      + + LNMP环境WordPress出现No Input File Specified的解决方案 + /the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html + +前阵子一直用的是LAMP的平台,最近换成LNMP环境,wordpress出现这个问题,在进入后台后,添加新文章或者进行其他操作时提示,后台经常提示“No Input File Specified”,经过一番股勾摆渡终于找到了原因,原来是路径后面少了一个”/”引起的。可以修改LNMP配置的重写规则文件来解决这个问题,下面是解决方案: + +

      修改lnmp下的wordpress.conf配置

      location / {
      if (-f $request_filename/index.html){
      rewrite (.) $1/index.html break;
      }
      if (-f $request_filename/index.php){
      rewrite (.
      ) $1/index.php;
      }
      if (!-f $request_filename){
      rewrite (.*) /index.php;
      }
      rewrite /wp-admin$ $scheme://$host$uri/ permanent;
      }

      +]]> + + Technical + + + Linux + LAMP + IP + +
      + + Windows下的git工具msysGit + /the-git-tools-msysgit-under-the-windows.html + +下载请移步百度或者谷歌搜索:msysGit,安装完成后配置如下 + +

      需要的配置:

      +

      1、C:\Program Files\Git\etc\git-completion.bash:

      alias ls='ls --show-control-chars --color=auto'

      说明:使得在 Git Bash 中输入 ls 命令,可以正常显示中文文件名。

      +

      2、C:\Program Files\Git\etc\inputrc:

      set output-meta on
      set convert-meta off

      说明:使得在 Git Bash 中可以正常输入中文,比如中文的 commit log。

      +

      3、C:\Program Files\Git\etc\profile:

      export LESSCHARSET=utf-8

      说明:$ git log 命令不像其它 vcs 一样,n 条 log 从头滚到底,它会恰当地停在第一页,按 space 键再往后翻页。这是通过将 log 送给 less 处理实现的。以上即是设置 less 的字符编码,使得 $ git log 可以正常显示中文。其实,它的值不一定要设置为 utf-8,比如 latin1 也可以……。还有个办法是 $ git –no-pager log,在选项里禁止分页,则无需设置上面的选项。

      +

      4、C:\Program Files\Git\etc\gitconfig:

      [alias]
      go = "! bash -c &quot;git pull && git add .; if [ \&quot;$*\&quot; == \&quot;\&quot; ]; then git commit -a; else git commit -am \&quot;$*\&quot;; fi; git push origin master:your-id;&quot;"

      说明:强大的 alias,有了这个,我们 90% 的情况下只需要输入 $ git go 这一个命令,免去了先拉后提交再推的繁琐步骤。

      +

      $ git go

      +

      命令后带修订说明时,会直接提交。需要注意的是,在“修订说明”之前,有还个“aaa”,这是个 bug,参数中的第一个会被忽略,所以随便写一个凑数的……。

      +

      若命令行里没有提供修订说明,则会自动弹出一个编辑器,等待输入。默认的编辑器是 Vim。Vim 的使用是很简单的,首先要明白它有两个模式,一个是命令模式、一个是输入模式。Vim 启动的时候默认的是命令模式,需要先按’i’键,进入输入模式;然后就正常编辑;编辑完成之后,将输入法切换回英文状态,按 Esc 重新进入命令模式;此时按 ‘(Shift):wq‘ 并回车,w 表示写入保存、q 表示退出。完毕!

      +

      若实在不习惯 Vim,也可以设置为其它编辑器:

      +
      $ git config --global core.editor "notepad"
      +

      其中 notepad 可以替换为更好用的 wordpad、notepad++ 等(不过它们在命令行里无法直接访问,得先设置 PATH 变量)。

      +

      以上 alias 是为 Windows 定制的,Linux 下可以写得更优雅,不过鉴于使用上没分别,就保持一致吧~。

      +

      [gui]

      +

      encoding = utf-8

      +

      说明:我们的代码库是统一用的 utf-8,这样设置可以在 git gui 中正常显示代码中的中文。

      +

      [i18n]

      +

      commitencoding = GB2312

      +

      说明:如果没有这一条,虽然我们在本地用 $ git log 看自己的中文修订没问题,但,一、我们的 log 推到服务器后会变成乱码;二、别人在 Linux 下推的中文 log 我们 pull 过来之后看起来也是乱码。这是因为,我们的 commit log 会被先存放在项目的 .git/COMMIT_EDITMSG 文件中;在中文 Windows 里,新建文件用的是 GB2312 的编码;但是 Git 不知道,当成默认的 utf-8 的送出去了,所以就乱码了。有了这条之后,Git 会先将其转换成 utf-8,再发出去,于是就没问题了。

      +

      不过仍然有 3 个问题:

      +

      1、上面的 alias $ git go 有 bug,代码修订说明之前要输入一串字符凑数;

      +

      2、$ git diff,如果代码里有中文,会显示乱码;

      +

      3、$ git checkout 有时候需要修改/增删很多文件,如果某些文件被占用,会被 Windows 拒绝,导致失败,甚至可能造成版本库出现无法修复的问题。

      +

      具体操作可以参考《Windows 下 git 配置与使用》 执行。

      +]]>
      + + Route + + + Windows + post-format-image + +
      + + 简单配置PHP + /the-simple-to-configure-php.html + +为了修改PHP的配置,我们需要编辑/etc/php5/apache2/php.ini文件,在改动之前,请先将该配置文件做个备份,以便在出错的时候可以恢复。 + +

      修改成内存的大小限制:

      +
      +memory_limit = 32M
      +
      +

      修改上传文件的大小限制:

      +
      +upload_max_filesize = 16M
      +
      +

      dl()函数支持(enable_dl):

      +
      +enable_dl = On
      +
      +

      设置数据反斜杠转义,自动字符串转义:

      +
      +magic_quotes_gpc
      +Default Value: On
      +Development Value: Off
      +Production Value: Off
      +
      + + + +

      报告内存泄漏(report_memleaks):

      +
      +report_memleaks = On
      +
      +

      最后记得重启apache2服务器

      +
      +/etc/init.d/apache2 restart
      +
      +
      +]]> + + Technical + + + PHP + 配置 + +
      + + Route设置脚本,实现国内网不经VPN + /the-route-setup-script-realize-domestic-network-by-the-vpn.html + +

            使用vpn拨入后,所有的网络请求默认经vpn通道,故vpn拨号后不需要设置任何参数就可以直接访问国际网。但是这个时候访问国内的网络也要走vpn,所以导致了国内的部分网站打开速度很慢。这个问题可以修改本机的路由表来解决。

      步骤:

      首先断开机器的vpn连接

      1、新建一个route_vpn.bat文件,右键编辑,将下面的代码复制进去

      @echo off
      +rem Create by wangheng
      +ipconfig /flushdns
      +route.exe add 114.196.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 114.208.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 114.224.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 115.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.28.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 115.32.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.44.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.48.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 115.84.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 115.84.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 115.85.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 115.100.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.104.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.120.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.124.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 115.148.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.152.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 115.168.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 115.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 115.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 115.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 116.1.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.2.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.8.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.13.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 116.52.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.56.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.58.128.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.58.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.66.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 116.69.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.70.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 116.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.89.144.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.90.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.90.184.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 116.95.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.116.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.128.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 116.192.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.193.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.193.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 116.194.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.196.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.198.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.199.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 116.199.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 116.204.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.207.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.208.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.212.160.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.213.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 116.213.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 116.214.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 116.214.64.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 116.214.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 116.215.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 116.216.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 116.242.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 116.248.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.252.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 116.254.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 116.255.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 117.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 117.21.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 117.22.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 117.24.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 117.32.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 117.40.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 117.44.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 117.48.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 117.53.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 117.53.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 117.57.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 117.58.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 117.59.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 117.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 117.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 117.72.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 117.74.64.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 117.74.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 117.75.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 117.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 117.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 117.100.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 117.103.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 117.103.128.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 117.106.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 117.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 117.120.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 117.120.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 117.121.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 117.121.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 117.121.192.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 117.122.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 117.124.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 117.128.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 118.24.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 118.64.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 118.66.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.67.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 118.72.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 118.80.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 118.84.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 118.88.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 118.88.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 118.88.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 118.89.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.91.240.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 118.102.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 118.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 118.120.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 118.124.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 118.126.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.132.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 118.144.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 118.178.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 118.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 118.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 118.212.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 118.224.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 118.228.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 118.230.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.239.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.242.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 118.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 118.248.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 119.0.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.2.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 119.2.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 119.3.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.8.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.10.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 119.15.136.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 119.16.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.18.192.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 119.18.208.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 119.18.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 119.19.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.20.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.27.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 119.27.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 119.27.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 119.28.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.30.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 119.31.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 119.32.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 119.40.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 119.40.64.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 119.40.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 119.41.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.42.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 119.42.136.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 119.42.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 119.44.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.48.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 119.57.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.58.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.59.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 119.60.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.62.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.63.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 119.75.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 119.78.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.80.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.84.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 119.108.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.112.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 119.128.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 119.144.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.148.160.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 119.161.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 119.162.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.164.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.176.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 119.232.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 119.235.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 119.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 119.253.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 119.254.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 120.0.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 120.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 120.30.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 120.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 120.48.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 120.52.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 120.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 120.72.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 120.72.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 120.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 120.80.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 120.88.8.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 120.90.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 120.92.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 120.94.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 120.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 120.136.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 120.137.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 120.192.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 121.0.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 121.4.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 121.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 121.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 121.32.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 121.40.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 121.46.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 121.48.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 121.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 121.52.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 121.52.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 121.52.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 121.55.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 121.56.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 121.58.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 121.58.144.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 121.59.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 121.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 121.68.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 121.76.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 121.79.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 121.89.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 121.100.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 121.101.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 121.192.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 121.201.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 121.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 121.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 121.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 121.255.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 122.0.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 122.0.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 122.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 122.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 122.48.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 122.49.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 122.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 122.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 122.96.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 122.102.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 122.102.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 122.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 122.119.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 122.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 122.144.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 122.152.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 122.156.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 122.192.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 122.198.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 122.200.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 122.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 122.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 122.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 122.248.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 123.0.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 123.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 123.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 123.49.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 123.52.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 123.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 123.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 123.96.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 123.98.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 123.99.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 123.100.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 123.101.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 123.103.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 123.108.128.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 123.108.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 123.112.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 123.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 123.136.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 123.137.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 123.138.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 123.144.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 123.160.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 123.176.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 123.177.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 123.178.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 123.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 123.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 123.196.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 123.199.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 123.206.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 123.232.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 123.242.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 123.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 123.249.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 123.253.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.6.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.14.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 124.16.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 124.20.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 124.28.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.29.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 124.31.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.40.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 1.12.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 1.24.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 1.45.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 1.48.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 1.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 1.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 1.68.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 1.116.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 1.180.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 1.184.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 1.188.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 1.192.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 1.202.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 1.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 110.6.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.16.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 110.40.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 110.48.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 110.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 110.52.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 110.64.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.72.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.75.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 110.76.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 110.76.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 110.77.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 110.80.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 110.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 110.94.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.96.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 110.152.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 110.156.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.165.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 110.166.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.172.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 110.173.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 110.173.32.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 110.173.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 110.173.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 110.176.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 110.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 110.228.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 110.232.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 110.236.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 110.240.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 111.0.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 111.66.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 111.67.192.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 111.68.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 111.72.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 111.85.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 111.91.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 111.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 111.116.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 111.119.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 111.119.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 111.120.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 111.124.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 111.126.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 111.128.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 111.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 111.170.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 111.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 111.176.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 111.186.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 111.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 111.208.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 111.221.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 111.222.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 111.223.240.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 111.223.248.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 111.224.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 111.235.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 111.235.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 112.0.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 112.64.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 112.73.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 112.74.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 112.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 112.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 112.109.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 112.111.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 112.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 112.116.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 112.122.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 112.124.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 112.128.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 112.132.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 112.192.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 112.224.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 113.0.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 113.8.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.11.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 113.12.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.16.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.18.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 113.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.31.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 113.44.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.48.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.52.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 113.54.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.56.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.58.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 113.59.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 113.62.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.64.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 113.128.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.130.96.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 113.130.112.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 113.132.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 113.194.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.200.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.202.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 113.204.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.208.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 113.208.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 113.209.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 113.212.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 113.213.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 113.214.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.218.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 113.220.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 113.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 113.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 113.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 114.28.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 114.54.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 114.60.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 114.64.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 114.68.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 114.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 114.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 114.104.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 114.110.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 114.110.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 114.110.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 114.111.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 114.111.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 114.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 114.132.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 114.135.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 114.138.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 114.141.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.40.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.42.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.47.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.64.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 124.66.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 124.67.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.68.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 124.72.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 124.88.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 124.108.8.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 124.108.40.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 124.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 124.126.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 124.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 124.147.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 124.151.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.156.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 124.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 124.192.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 124.196.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 124.220.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 124.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 124.240.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 124.240.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.242.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.243.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 124.248.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 124.249.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 124.250.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 124.254.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 125.31.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 125.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 125.58.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 125.61.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 125.62.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 125.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 125.96.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 125.98.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 125.104.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 125.112.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 125.169.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 125.171.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 125.208.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 125.210.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 125.213.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 125.214.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 125.215.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 125.216.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 125.254.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 134.196.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 159.226.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 161.207.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 162.105.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 166.111.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 167.139.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 168.160.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 175.0.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 175.16.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 175.24.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 175.30.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 175.42.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 175.44.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 175.46.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 175.48.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 175.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 175.102.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 175.106.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 175.146.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 175.148.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 175.152.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 175.160.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 175.178.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 175.184.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 175.185.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 175.186.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 175.188.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 180.76.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 180.84.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 180.86.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 180.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 180.94.56.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 180.94.96.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 180.95.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 180.96.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 180.129.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 180.130.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 180.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 180.148.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 180.149.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 180.150.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 180.152.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 180.160.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 180.178.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 180.184.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 180.188.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 180.189.148.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 180.200.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 180.201.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 180.202.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 180.208.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 180.210.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 180.212.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 180.222.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 180.223.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 180.233.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 180.233.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 180.235.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 182.16.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 182.18.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 182.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 182.48.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 182.49.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 182.50.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 182.50.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 182.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 182.54.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 182.61.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 182.80.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 182.88.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 182.92.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 182.96.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 182.128.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 182.144.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 182.157.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 182.160.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 182.174.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 182.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 182.236.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 182.238.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 182.239.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 182.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 182.254.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 183.0.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 183.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 183.81.180.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 183.84.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 183.91.128.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 183.91.144.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 183.92.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 183.128.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 183.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 183.168.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 183.170.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 183.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 183.182.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 183.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 183.192.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 192.83.122.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 192.83.169.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 192.124.154.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 192.188.170.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 198.17.7.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.0.110.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.0.176.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.4.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.4.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.8.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.10.64.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.14.88.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.14.235.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.14.236.0 mask 255.255.254.0 172.16.19.254 metric 5
      +route.exe add 202.14.238.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.20.120.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.22.248.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.38.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.38.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 202.38.128.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.38.136.0 mask 255.255.254.0 172.16.19.254 metric 5
      +route.exe add 202.38.138.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.38.140.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.38.144.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.38.149.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.38.150.0 mask 255.255.254.0 172.16.19.254 metric 5
      +route.exe add 202.38.152.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.38.156.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.38.158.0 mask 255.255.254.0 172.16.19.254 metric 5
      +route.exe add 202.38.160.0 mask 255.255.254.0 172.16.19.254 metric 5
      +route.exe add 202.38.164.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.38.168.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.38.176.0 mask 255.255.254.0 172.16.19.254 metric 5
      +route.exe add 202.38.184.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.38.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 202.41.152.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.41.240.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.43.76.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.43.144.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.46.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.46.224.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.60.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.63.248.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.69.4.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.69.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.70.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.74.8.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.75.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.85.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.90.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.90.224.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.90.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.91.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.91.128.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.91.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.91.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.92.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.92.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.93.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.93.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.94.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.95.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.95.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.96.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 202.112.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 202.120.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 202.122.0.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.122.32.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.122.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.122.112.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.122.128.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.123.96.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.124.24.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.125.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.127.0.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.127.12.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.127.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.127.40.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.127.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.127.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.127.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.127.160.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.127.192.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.127.208.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.127.216.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.127.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.130.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.130.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.131.16.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.131.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.131.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.136.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.136.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.136.224.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.136.252.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 202.141.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.142.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.143.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.148.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.149.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.149.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.150.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.152.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.153.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.158.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.160.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.164.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.164.25.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 202.165.96.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.165.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.165.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.168.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.170.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.170.216.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.173.8.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 202.173.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.179.240.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.180.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 202.181.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.189.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 202.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 203.18.50.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 203.78.48.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.79.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.80.144.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.81.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.83.56.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.86.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.86.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.88.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.88.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.89.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.90.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.90.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.90.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.91.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.91.96.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.91.120.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.92.0.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.92.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.93.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 203.94.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.95.0.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.95.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.99.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.99.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.100.32.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.100.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.100.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.100.192.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.110.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.114.244.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.118.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.118.248.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.119.24.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.119.32.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.119.80.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.128.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.128.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.128.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.130.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.132.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.134.240.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.135.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.135.160.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.142.219.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 203.148.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.152.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.156.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.158.16.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.161.180.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 203.161.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.166.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.171.224.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.174.7.0 mask 255.255.255.0 172.16.19.254 metric 5
      +route.exe add 203.174.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.175.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.175.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.176.168.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.184.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.187.160.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.190.96.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.191.16.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.191.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.191.144.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.192.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.196.0.0 mask 255.255.248.0 172.16.19.254 metric 5
      +route.exe add 203.207.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 203.207.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 203.208.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.208.16.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 203.208.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.209.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 203.212.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.212.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.222.192.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 203.223.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 210.2.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.5.0.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.5.128.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.12.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 210.14.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.14.112.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 210.14.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 210.15.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 210.15.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 210.16.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 210.21.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 210.22.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 210.23.32.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.25.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 210.26.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 210.28.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 210.32.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 210.51.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 210.52.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 210.56.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.72.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 210.76.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 210.78.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 210.79.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 210.79.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.82.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 210.87.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 210.185.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 210.192.96.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 210.211.0.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 221.208.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 221.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 222.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 222.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 222.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 222.125.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 222.126.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 222.128.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 222.160.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 222.168.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 222.176.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 222.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 222.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 222.248.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 223.2.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 223.4.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 223.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 223.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 223.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 223.64.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 223.128.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 223.160.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 223.166.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 223.202.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 223.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 27.8.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 27.16.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 27.36.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 27.40.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 27.50.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 27.54.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 27.98.208.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 27.98.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 27.100.36.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 27.103.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 27.106.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 27.112.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 27.112.80.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 27.113.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 27.115.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 27.128.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 211.64.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 211.80.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 211.96.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 211.136.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 211.144.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 211.160.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 218.0.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 218.56.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 218.64.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 218.96.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 218.104.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 218.108.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 218.185.192.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 218.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 218.240.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 218.249.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 219.72.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 219.82.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 219.128.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 219.216.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 219.224.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 219.242.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 219.244.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 220.101.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 220.112.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 220.152.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 220.154.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 220.160.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 220.192.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 220.231.0.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 220.231.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 220.232.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 220.234.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 220.242.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 220.248.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 220.252.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 221.0.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 221.8.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 221.12.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 221.12.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 221.13.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 221.14.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 221.122.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 221.129.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 221.130.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 221.133.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 221.136.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 221.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 221.176.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 221.192.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 221.196.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 221.198.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 221.199.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 221.199.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 221.199.192.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 221.199.224.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 221.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 27.131.220.0 mask 255.255.252.0 172.16.19.254 metric 5
      +route.exe add 27.144.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 27.148.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 27.152.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 27.184.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 27.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 27.224.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 58.14.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.16.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 58.24.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.30.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 58.66.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.68.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 58.82.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.87.64.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 58.99.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 58.100.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.116.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 58.128.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 58.144.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 58.154.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 58.192.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 58.240.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 59.32.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 59.64.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 59.80.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 59.107.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 59.108.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 59.151.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 59.155.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 59.172.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 59.191.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 59.191.240.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 59.192.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 60.0.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 60.55.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 60.63.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 60.160.0.0 mask 255.224.0.0 172.16.19.254 metric 5
      +route.exe add 60.194.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 60.200.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 60.208.0.0 mask 255.240.0.0 172.16.19.254 metric 5
      +route.exe add 60.232.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 60.235.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 60.245.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 60.247.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 60.252.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 60.253.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 60.255.0.0 mask 255.255.0.0 172.16.19.254 metric 5
      +route.exe add 61.4.64.0 mask 255.255.224.0 172.16.19.254 metric 5
      +route.exe add 61.4.176.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 61.8.160.0 mask 255.255.240.0 172.16.19.254 metric 5
      +route.exe add 61.28.0.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 61.29.128.0 mask 255.255.128.0 172.16.19.254 metric 5
      +route.exe add 61.45.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 61.47.128.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 61.48.0.0 mask 255.248.0.0 172.16.19.254 metric 5
      +route.exe add 61.87.192.0 mask 255.255.192.0 172.16.19.254 metric 5
      +route.exe add 61.128.0.0 mask 255.192.0.0 172.16.19.254 metric 5
      +route.exe add 61.232.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +route.exe add 61.236.0.0 mask 255.254.0.0 172.16.19.254 metric 5
      +route.exe add 61.240.0.0 mask 255.252.0.0 172.16.19.254 metric 5
      +echo All done! Enjoy~
      +pause
      + +

      2、将所有的172.16.19.254换成你原来的默认网关地址(vpn拨号前的默认网关),然后保存文件。

      + +

      3、现在连接上你的vpn,然后执行这个脚本文件,成功后就可以实现国内的网站不走VPN通道,国外的网站走VPN的效果。现在访问国内的网站是不是快了很多呢?

      + +

      Tips:机器重启后路由表会重置,故重启后再次vpn拨号需要再次执行脚本文件。

      +
      +]]> + + Technical + + + VPN + FTP + +
      + + 社交网络营销的最佳时间点 + /the-time-social-network-marketing-is.html + +

      随着社交网络在人们生活占据的时间越来越大,商家们已经开始尝试用各种手段在社交网络上推广自己的产品。内容有趣固然重要,营销的时间如果选的正确,则可以让你的内容获得最大程度的曝光,事半功倍。

      邮件营销

      我们还是先从最传统的邮件营销说起,一周7天,一天24小时里,哪天,那个时间段是人们打开邮件的高峰期呢?请看图:

      clip_image001

      clip_image002

      pic via: sign-up.to

      从打开邮件的数量来看,可以说明邮件营销的黄金时间是周二至周四,10:00 – 17:00。不过这个调查的受众人群是英国人,可能和国人还有一些差别,但我相信人类的行为方面还是具有有一致性的。

      博客

      人们又习惯在什么时候阅读博客呢:

      clip_image003

      答案是早上,博主最喜欢的事情之一就是吃着早餐,打开Google Reader看自己喜欢的博客。

      Facebook

      Facebook营销的最佳时间是上午和晚上,大约是7:00 – 12:00以及19:00 – 21:00点

      clip_image004

      调查还显示,大家在周五至周日间会更容易参与社交的活动。不过博主认为,国内的新浪微博等社交网络还是工作日的中午最为活跃。

      Twitter

      Twitter营销的最佳时间是12:00 – 20:00点,周三至周五。

      clip_image005

      clip_image006

      移动营销

      智能手机用户使用手机频率最高的时间点是12:00 – 20:00之间,所以在这个时间段做移动营销的效果可能最好。

      clip_image007

      原文地址:http://www.williamlong.info/archives/3076.html

      +
      +]]> + + linux + +
      + + 使用ScribeFire离线编写博客 + /to-use-scribefire-offline-writing-a-blog.html + +

      以前都是通过windows live writer在写博客,在windows中使用确实很不错。最近转做web开发后,对windows的依赖也越来越小了,刚好回家可以在自己喜欢的linux环境中谢谢代码。没有了游戏的诱惑,感觉专注了不少。 linux系统中live writer肯定是没戏了,不想面对wordpress蛋疼的在线编辑工具,所以最近写博客的频率也有点低。还好最近发现了ScribeFire这款插件,支持多种博客类型,也有FireFox和Chrome的版本,强烈推荐大家使用! 用ScribFire写博客,最大的好处当然是速度的优势,不用每次都登录自己博客的后台。 以下以Firefox浏览器上使用为例 1、在附加组建搜索并安装ScribeFire,有两个版本classic 和next,classic我这里安上报错,next版本正常,懒得折腾,直接用了next版本,装好重启firefox; 2、在firefox工具选项卡找到Scribeire,点击后会出现一个编辑界面; 3、按照Wizard的提示创建一个帐号,如图;

      4、输入博客地址,ScribeFire会自动选择API接口。 5、输入用户名和密码,完成帐户创建过程。 6、在主编辑界面撰写文章内容,左边栏选择文章的分类,以及文章的标签等,很方便。 7、点击右下角的发布,来发表文章到你的博客; 8、文章发表完成。 ScribeFire编辑器本身自带大量的功能,并且同样支持插入标签、文章归类等等操作,强烈推荐给各位博友使用。 FireFox的ScribFire下载:https://addons.mozilla.org/en-US/firefox/addon/1730/ Chrome的ScribFire下载:http://code.google.com/p/scribefire-chrome/downloads/detail?name=scribefire-0.1.0.0.crx&can=2&q=#makechanges

       

      +
      +]]> + + Technical + Route + + + Linux + IP + blog + AutoProxy + +
      + + 性能调优备忘 + /tuning-memo-reproduced.html + +1. 当性能遇到问题时,如果能在应用层进行计算和处理,那就把它从数据库层拿出来。排序和分组就是典型的例子。在应用层做性能提升总是要比在数据库层容易的多。就像对于MySQL,sqlite更容易掌控。 + +
        +
      1. 关于并行计算,如果能避免就尽量避免。如果无法避免,记住,能力越大,责任越大。如果有可能,尽量避免直接对线程操作。尽可能在更高的抽象层上操作。例 如,在iOS中,GCD,分发和队列操作是你的好朋友。人类的大脑没有被设计成用来分析那些无穷临时状态——这是我的惨痛教训所得。

        +
      2. +
      3. 尽可能简化状态,尽可能局部本地化。适用至上。

        +
      4. +
      5. 短小可组合的方法是你的好朋友。

        +
      6. +
      7. 代码注释是危险的,因为它们很容易更新不及时或给人误导,但这不能成为不写注释的理由。不要注释鸡毛蒜皮的事情,但如果需要,在某些特殊地方,战略性的长篇注释是需要的。你的记忆会背叛你,也许会在明天早上,也许会在一杯咖啡后。

        +
      8. +
      9. 如果你认为一个用例场景也许“不会有问题吧”,它也许就是一个月后让你在发布的产品中遭受惨痛失败的地方。做一个怀疑主义者,测试,验证。

        +
      10. +
      11. 有疑问时,和团队中所有相关人交流。

        +
      12. +
      13. 做正确的事情——你通常会知道这指的是什么。

        +
      14. +
      15. 你的用户并不傻,他们只是没有耐心理解你的捷径。

        +
      16. +
      17. 如果一个开发人员没有被安排长期的维护你们开发的系统,对他保持警惕。80%的血、汗、泪水都是在软件发布后的时间里流的——那时你会变成一个厌世者,但也是更聪明的“行家”。

        +
      18. +
      19. 任务清单是你的好朋友。

        +
      20. +
      21. 主动让你的工作更有乐趣,有时这需要你付出努力。

        +
      22. +
      23. 悄无声息的崩溃,我仍然会为此从噩梦中惊醒。监控,日志,警报。清楚各种的假警报和不可避免的感觉钝化。保持你的系统对故障的敏感和及时警报。

        +
      24. +
      25. 复杂是大敌。

        +
      26. +
      +

      从自己以前记录的word中摘抄过来的,忘记从哪看到的了,找不到原始链接。如作者看到,请留言认领! :)

      +]]>
      + + 乱七八糟 + +
      + + Ubuntu 10.10 更新源总结 + /ubuntu-10-10-update-source.html + +
      1.首先备份你的sources 文件
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bksudo gedit /etc/apt/sources.list
      +编辑你的源列表,将原来的内容全部删除,添加下面列表中最适合你的源(注意不要全部添加),选择一个最合适你的即可,复制到你的列表中,然后保存列表。 + +

      2.使用sudo apt-get update 更新源列表信息
      可以在运行“sudo apt-get update ”时查看一下错误信息,把不能连接的源删除再重新运行“sudo apt-get update ”。

      +

      3.使用sudo apt-get upgrade 升级
      或者用ubuntu自带的更新管理器升级也可

      +

      Ubuntu 10.10源列表:

      +

      台湾源
      代码:
      deb http://tw.archive.ubuntu.com/ubuntu/ maverick main universe restricted multiverse
      deb-src http://tw.archive.ubuntu.com/ubuntu/ maverick main universe restricted multiverse
      deb http://tw.archive.ubuntu.com/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://tw.archive.ubuntu.com/ubuntu/ maverick-security universe main multiverse restricted
      deb http://tw.archive.ubuntu.com/ubuntu/ maverick-updates universe main multiverse restricted
      deb-src http://tw.archive.ubuntu.com/ubuntu/ maverick-updates universe main multiverse restricted

      +

      SRT Sources
      代码:

      +

      deb http://ubuntu.srt.cn/ubuntu/ maverick main restricted universe multiverse
      deb http://ubuntu.srt.cn/ubuntu/ maverick-security main restricted universe multiverse
      deb http://ubuntu.srt.cn/ubuntu/ maverick-updates main restricted universe multiverse
      deb http://ubuntu.srt.cn/ubuntu/ maverick-proposed main restricted universe multiverse
      deb http://ubuntu.srt.cn/ubuntu/ maverick-backports main restricted universe multiverse
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick main restricted universe multiverse
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-security main restricted universe multiverse
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-updates main restricted universe multiverse
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-proposed main restricted universe multiverse
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-backports main restricted universe multiverse

      +

      网易 Ubuntu 10.10 源(速度很快)
      代码:

      +

      deb http://mirrors.163.com/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirrors.163.com/ubuntu/ maverick main universe restricted multiverse
      deb http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted

      +

      ubuntu 10.10 上海 源,提供 Kernel,Hiweed,ubuntu
      代码:

      +

      deb http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiverse
      deb http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricted

      +

      搜狐 Ubuntu 10.10 源
      代码:

      +

      deb http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiverse
      deb http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricted

      +

      骨头源,骨头源是bones7456架设的一个Ubuntu源 ,提供ubuntu,deepin
      代码:
      deb http://ubuntu.srt.cn/ubuntu/ maverick main universe restricted multiverse
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick main universe restricted multiverse
      deb http://ubuntu.srt.cn/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-security universe main multiverse restricted
      deb http://ubuntu.srt.cn/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://ubuntu.srt.cn/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://ubuntu.srt.cn/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://ubuntu.srt.cn/ubuntu/ maverick-updates universe main multiverse restricted

      +

      lupaworld 源,提供 ArchLinux,Everest,FreeBSD,Fedora,LFS,Magiclinux,Mandriva,OpenOffice,openSUSE,Puppy,Red Hat,Slitaz,Turbolinux,Ubuntu,中标普华

      +

      代码:

      +

      deb http://mirror.lupaworld.com/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirror.lupaworld.com/ubuntu/ maverick main universe restricted multiverse
      deb http://mirror.lupaworld.com/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirror.lupaworld.com/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirror.lupaworld.com/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirror.lupaworld.com/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirror.lupaworld.com/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirror.lupaworld.com/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirror.lupaworld.com/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirror.lupaworld.com/ubuntu/ maverick-updates universe main multiverse restricted

      +

      rootguide源,ubuntu官方上海源,提供 Kernel,Hiweed,ubuntu

      +

      代码:
      deb http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirror.rootguide.org/ubuntu/ maverick main universe restricted multiverse
      deb http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirror.rootguide.org/ubuntu/ maverick-updates universe main multiverse restricted

      +

      网易开源镜像站,提供FreeBSD,OpenBSD,archlinux,centos,cygwin,debian,fedora,gentoo,kernel,openSUSE,slackware,ubuntu

      +

      代码:
      deb http://mirrors.163.com/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirrors.163.com/ubuntu/ maverick main universe restricted multiverse
      deb http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.163.com/ubuntu/ maverick-updates universe main multiverse restricted

      +

      搜 狐开源镜像站,提供 CPAN,FreeBSD,NetBSD,OpenBSD,apache,archlinux,centos,cygwin,dag,debian,fedora,gentoo,kernel,lfs,mysql,nginx,openSUSE,php,rpmfusion,slackware,ubuntu

      +

      代码:

      +

      deb http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiverse
      deb-src http://mirrors.shlug.org/ubuntu/ maverick main universe restricted multiverse
      deb http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-security universe main multiverse restricted
      deb http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricted
      deb http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-proposed universe main multiverse restricted
      deb http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-backports universe main multiverse restricted
      deb-src http://mirrors.shlug.org/ubuntu/ maverick-updates universe main multiverse restricted

      +
      +  +
      +]]> + + Technical + + + Ubuntu + 10.1 + 更新源 + source + +
      + + ubuntu 12.04更新源 + /ubuntu-12-04-source-list.html + +1、首先备份Ubuntu 11.10源列表
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)
      2、修改更新源
      sudo gedit /etc/apt/sources.list
      +#台湾源 +
      deb http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse 
      +deb-src http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse 
      +deb http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted 
      +deb-src http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted 
      +deb http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted 
      +deb-src http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted
      +#网易源(速度很快)
      deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse 
      +deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse 
      +deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted 
      +deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted 
      +deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted 
      +deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted 
      +deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted 
      +deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted 
      +deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted 
      +deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
      +#电子科技大学 +
      deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse 
      +deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse 
      +deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse 
      +deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse 
      +deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse 
      +deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse 
      +deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse 
      +deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse 
      +deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse 
      +deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
      +#北京理工大学(真羡慕刘毅同学) +
      deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe 
      +deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe 
      +deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe 
      +deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe 
      +deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe 
      +deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe 
      +deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe 
      +deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe 
      +deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe 
      +deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
      3、保存后就是
      sudo apt-get update
      +sudo apt-get upgrade
      +经过6个月的开发周期,ubuntu 12.04 LTS (Precise Pangolin)终于发布了,这个版本是一个长期支持版本。官方正式版下载地址公布: http://releases.ubuntu.com/precise/ 完成同步的国内镜像站点(已经可以下载正式版本): 中科大地址(同步完毕,可下载):http://mirrors.ustc.edu.cn/ubuntu-releases/12.04/ 顺便提一下,其实unity用习惯了还是不错的 +
      +]]> + + linux + + + Ubuntu + 更新源 + +
      + + ubuntu 安装配置denyhosts + /ubuntu-14-04-install-configure-denyhosts.html + +DenyHosts是使用Python语言写的一个程序,它会分析sshd的日志文件(/var/log/auth.log*),当发现大量重复的攻击时会记录IP到/etc/hosts.deny文件,从而达到自动屏攻击者IP的功能。 + +

      目前官网最新版本是2.10,记得以前的ubuntu版本(<=12.04LTS)中好像直接apt-get install denyhosts 就可以了,在最新的发行版不知为何不见了。

      +

      安装

      +

      你可以前往官网http://sourceforge.net/projects/denyhost/ 选择一个你喜欢的版本下载,或者直接运行下面的命令下载。

      +
      cd /tmp/ && wget http://jaist.dl.sourceforge.net/project/denyhost/denyhost-2.10/denyhosts-2.10.tar.gz
      +#解压
      +tar xzvf denyhosts-2.10.tar.gz
      +#切换到目录
      +cd denyhosts
      +#安装
      +sudo python setup.py install
      + +

      配置

      +

      经过上面这几步,基本已经完成了denyhosts 的安装,下面我们还需要进行一些配置。

      +
      #复制daemon文件到init.d 目录
      +sudo cp /usr/local/bin/daemon-control-dist /etc/init.d/denyhosts
      +sudo vim /etc/init.d/denyhosts
      +#A:将打开的文件里面的DENYHOSTS_BIN 修改为你自己denyhosts的目录,一般应该是/usr/local/bin/denyhosts.py
      +#B:或者是建立一个软连接
      +ln -s /usr/local/bin/denyhosts.py /usr/sbin/denyhosts
      +
      +#注意:A或者B只需要执行一个就行了!</span></span>
      现在denyhosts 就已经安装配置好了,我们可以先把我们自己的IP加到系统的白名单里面
      #编辑白名单
      +
      +

      sudo vim /etc/hosts.allow 

      +

      #按下面的样例添加你的IP

      +

      /etc/hosts.allow: list of hosts that are allowed to access the system.

      See the manual pages hosts_access(5) and hosts_options(5).

      Example: ALL: LOCAL @wangheng.org

      ALL: .wangheng.org EXCEPT terminalserver.wangheng.org

      If you’re going to protect the portmapper use the name “rpcbind” for the

      daemon name. See rpcbind(8) and rpc.mountd(8) for further information.

      sshd: 123.123.123.123

      编辑保存后,我们需要重启一下服务:

      sudo /etc/init.d/denyhosts restart


      +]]> + + linux + + + Ubuntu + Linux + 快盘 + tr + +
      + + ubuntu中安装air video server + /ubuntu-install-air-video-server.html + +AirVideo 是IOS上很好用的一个媒体播放器。可以由局域网内的电脑完成实时转码,不用再做任何转换操作,就可以让你通过无线网络在iphone和ipad观看存在电脑上的视频,而不需要把视频拷贝过来。 + +

      官方提供了MAC和Windows下的服务端程序,但因为服务端是基于FFmpeg和Java的,都是开源项目,所以也可以通过自行编译的方式,在Linux下安装服务端。前段日子自己组装了一台htpc,但要通过 iPad看里面的电影颇为麻烦。今天刚好看到有一份教程,简单的几个APT命令就可以完成安装了,具体步骤如下:

      +

      1.打开终端

      +

      2.安装python-software-properties

      +
      sudo apt-get install python-software-properties
      + +

      3.添加AirVideo的源

      +
      sudo add-apt-repository ppa:rubiojr/airvideo
      + +

      4.更新包的索引

      +
      sudo apt-get update
      + +

      5.安装AirVideo Server

      +
      sudo apt-get install airvideo-server
      + +

      6.编辑所要添加的媒体文件夹配置文件

      +
      sudo nano /opt/airvideo-server/AirVideoServerLinux.properties
      + +

      7.编辑完成后,启动服务器

      +
      sudo airvideo-server
      + +
      参阅:
      http://inmethod.com/air-video/index.html
      http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux
      http://www.inmethod.com/forum/posts/list/1856.page
      https://launchpad.net/~rubiojr/+archive/airvideo
      +
      +]]> + + Technical + + + Ubuntu + 流媒体 + thinkphp + +
      + + ubuntu搭建LAMP环境 + /ubuntu-install-lamp.html + +首先安装apache2服务,在终端中使用命令: +
      sudo apt-get install apache2 php5 libapache2-mod-php5  libapache2-mod-auth-mysql
      +如果希望开启Apache2 伪静态 rewrite 支持,输入如下命令安装 +
      sudo a2enmod rewrite
      +安装mysql-server +
      sudo apt-get install mysql-server
      +安装php环境 +执行如下命令安装apache2的php5扩展和php的mysql扩展 +
      apt-get install libapache2-mod-php5 php5-gd php5-mysql php5-curl
      +安装数据库管理工具,使用命令: +
      sudo apt-get install phpmyadmin
      +重新启动apache2, 输入命令: +
      /etc/init.d/apache2 start
      +安装 php 探针 +
      cd /var/www #如果没有此目录可以手动创建 mkdir /var/www
      +wget http://wangheng.org/tools/tz.zip
      +unzip tz.zip
      +执行完重启apache2后,浏览器查看http://localhost/tz.php正常打开说明环境搭建成功了,并且可以通过此页面查看服务器的一些状态 +
      +]]> + + Technical + + + 环境搭建 + Ubuntu + LAMP + +
      + + Ubuntu下添加开机启动脚本 + /ubuntu-to-add-boot-script.html + +1、方法一,编辑rc.loacl脚本  + +

      Ubuntu开机之后会执行/etc/rc.local文件中的脚本,

      +

      所以我们可以直接在/etc/rc.local中添加启动脚本。

      +

      当然要添加到语句:exit 0 前面才行。

      +

      如:

      +

      sudo vi /etc/rc.local

      +

      然后在 exit 0 前面添加好脚本代码。

      +

       2、方法二,添加一个Ubuntu的开机启动服务。

      +

      如果要添加为开机启动执行的脚本文件,

      +

      可先将脚本复制或者软连接/etc/init.d/目录下,

      +

      然后用:update-rc.d xxx defaults NN命令(NN为启动顺序),

      +

      将脚本添加到初始化执行的队列中去。

      +

      注意如果脚本需要用到网络,则NN需设置一个比较大的数字,如99。

      +
      1) 将你的启动脚本复制到 /etc/init.d目录下
       以下假设你的脚本文件名为 test。
      2) 设置脚本文件的权限
       $ sudo chmod 755 /etc/init.d/test
      3) 执行如下命令将脚本放到启动脚本中去:
       $ cd /etc/init.d
       $ sudo update-rc.d test defaults 95
       注:其中数字95是脚本启动的顺序号,按照自己的需要相应修改即可。在你有多个启动脚本,而它们之间又有先后启动的依赖关系时你就知道这个数字的具体作用了。该命令的输出信息参考如下:
      update-rc.d: warning: /etc/init.d/test missing LSB information
      +update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
      +  Adding system startup for /etc/init.d/test ...
      +    /etc/rc0.d/K95test -> ../init.d/test
      +    /etc/rc1.d/K95test -> ../init.d/test
      +    /etc/rc6.d/K95test -> ../init.d/test
      +    /etc/rc2.d/S95test -> ../init.d/test
      +    /etc/rc3.d/S95test -> ../init.d/test
      +    /etc/rc4.d/S95test -> ../init.d/test
      +    /etc/rc5.d/S95test -> ../init.d/test
      卸载启动脚本的方法:
       $ cd /etc/init.d
      $ sudo update-rc.d -f test remove
      命令输出的信息参考如下:
      Removing any system startup links for /etc/init.d/test ...
      +    /etc/rc0.d/K95test
      +    /etc/rc1.d/K95test
      +    /etc/rc2.d/S95test
      +    /etc/rc3.d/S95test
      +    /etc/rc4.d/S95test
      +    /etc/rc5.d/S95test
      +    /etc/rc6.d/K95test
      +
      +]]> + + linux + +
      + + Ubuntu下的 VPN 连接 + /ubuntu-vpn-connection.html + +

      ubuntu的桌面版中,以前使用系统自带的网络管理工具总是连不上VPN , 最近自己试着搭一个VPN,发现可以用命令行连接上VPN。

      命令很简单:

      +
      apt-get install pptpd
      +apt-get install pptp-linux
      +
      +然后执行: +
      +sudo pptpsetup –create test –encrypt –server HOST_NAME –username USER_NAME  –password PSW –start
      +
      +

      注:

      +

      –create是创建的连接名称 +
      –server是vpn的ip地址; +
      –username是用户名 +
      –password是密码,也可以没这个参数,命令稍后会自动询问。这样可以保证账号安全 +
      –encrypt 是表示需要加密,不必指定加密方式,命令会读取配置文件中的加密方式 +
      –start是表示创建连接完后马上连接 +
      (如果不写这个–start参数要连接刚才定义好的vpn只能用 sudo pon lsavpn,断开用sudo poff) +

      +
      +]]> + + Technical + + + Ubuntu + VPN + +
      + + Windows下安装PHP Pear + /under-windows-install-php-pear.html + +
      PEAR简介
      PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR之于PHP就像是CPAN(Comprehensive Perl Archive Network)之于Perl。

      PEAR的基本目标是发展成为PHP扩展和库代码的知识库,而这个项目最有雄心的目标则是试图定义一种标准,这种标准将帮助开发者编写可移植、可重用的代码。

      在WAMP集成环境中安装PEAR

      1、首先下载一个go-pear.phar文件。

      点击这里下载~

      2、进入到php的运行目录安装

      我这里使用了一个wamp的集成开发环境,版本是wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b,我本地的安装路径是C:\wamp\bin\php\php5.4.3>

      执行如下的命令:

      php.exe -d phar.require_hash=0 go-pear.phar

      image

      到这一步可以修改PEAR安装的$prefix路径,我选择了默认,一路回车进行安装。

      3、修改include_path选项

      最后PEAR默认扩展包安装后,提示是否需要配置php.ini文件中的include_path选项指向pear的安装目录

      image

      当然需要配置,否则无法使用,Y并回车,安装包会自动修改include_path选项。提示我们环境变量没有设置,所以下面我们还需要设置一下系统的环境变量。

      新建一个环境变量名,如下图

      image

      然后在PATH变量中加入%php_home%就完成啦~。

      PEAR常用命令

      在命令行方式下,运用PEAR的相关命令可以安装自己需要的PEAR安装包。

      pear help  列出pear的所有命令,类似于pear的命令帮助命令。

      pear help <command>  列出某个pear命令的具体信息

      pear help shortcuts  列出所有pear命令的简写

      +
      +]]> + + Technical + + + Windows + PHP + Apache + +
      + + 北京联通DNS劫持! + /unicom-dns-hijacking.html + +2011年8月31日凌晨上网时候访问自己的域名,发现被联通劫持到了http://202.106.33.158/DNS/这个页面!连续试了几次都是如此,太过分了!如截图所示 + +

      image

      +

      截图为证

      +]]>
      + + 乱七八糟 + + + DNS + 劫持 + 联通 + +
      + + Unix编程艺术&mdash;&mdash;Unix哲学(转载) + /unix-programming-art-unix-philosophy.html + +Unix编程艺术主要介绍了Unix系统领域中的设计和开发哲学、思想文化体系、原则与经验。此文大致摘录了Unix的哲学。 + +

      web程序员也应该看看此书,软件开发和web开发很多地方都是相通的。看完之后,我甚至觉得Unix哲学对于做人也有很大的参考价值。

      +
      模块原则 (使用简洁的接口拼合简单的部件)
      +计算机编程的本质就是控制复杂度 + +

      要编写复杂软件而又不至于一败涂地的唯一方法就是降低其整体复杂度——用清晰的接口把若干简单的模块组合成一个复杂的软件。如此一来,多数问题只会局限于某个局部,那么就还有希望对局部进行改进而不至牵动全身。

      +
      清晰原则 (清晰胜于技巧)
      +维护成本是高昂的,在写程序时,要想到你不是写给执行代码的计算机看的,而是给人——将来阅读维护源码的人,包括你自己看的。 + +

      在Unix传统中,这个建议不仅意味着代码注释。良好的Unix实践同样信奉在选择算法和实现时就应该考虑到将来的可扩展性。为了取得程序一丁点性能的提升就大幅增加技术的复杂性和晦涩性,这个买卖做不得——这不仅仅是因为复杂的代码容易滋生bug,也因为它会使日后的阅读和维护工作更加艰难。

      +
      组合原则 (设计时考虑拼接组合)
      +如果程序彼此之间不能有效通信,那么软件就难免会陷入复杂度的泥淖。 + +

      在输入方面,Unix传统极力提倡采用简单、文本化、面向流、设备无关的格式。在经典的Unix下,多数程序都尽可能采用简单过滤器的形式,即将一个简单的文本输入流处理为一个简单的文本流输出。

      +

      Unix程序员偏爱这种做法并不是因为它们仇视视图界面,而是因为如果程序不采用简单的文本输入输出流,它们就极难衔接。

      +

      要想让程序具有组合性,就要使程序彼此独立。在文本流这一端的程序应该尽可能不要考虑到文本流另一端的程序。

      + + +
      分离原则 (策略同机制分离,接口同引擎分离)
      +把策略同机制揉成一团有两个负面影响:一来会使策略变得死板,难以适应用户需求的改变,二来也意味着任何策略的改变都可能会动摇机制。 + +

      可以将应用程序分成可以协作的前端和后端进程,通过socket专用应用协议进行通讯。这种双端设计方法大大降低了整体复杂度,bug有望减少。

      +
      简洁原则 (设计要简洁,复杂度能低就低)
      +来自多方面的压力常常会让程序变得复杂(bug更多),其中一种压力就是来自技术上的虚荣心理。Unix程序员相互比的是谁能够做到"简洁而漂亮"并以此为荣。 + +

      更为常见的是,过度的复杂性往往来自于项目的需求,要避免这种状况,就需要鼓励一种软件文化,以简洁为美,人人对庞大复杂的东西群起而攻之。

      +
      吝啬原则 (除非确无它法,不要编写庞大的程序)
      +"大"有两重含义:体积大,复杂程度高。程序大了,维护起来就困难。由于人们对花费了大量精力才做出来的东西难以割舍,结果导致在庞大的程序中把投资浪费的注定要失败或者并非最佳的方案上。 +
      透明原则 (设计要可见,以便审查和调试)
      +软件系统的透明性是指你一眼就能够看出软件是在做什么以及怎样做的。显示性是指程序带有监视和显示内部状态的功能。 + +

      设计时如果充分考虑到这些要求会给整个项目全过程都带来好处。至少,调试选项的设置应该尽量不要在事后,而应该在设计之初便考虑进去。这是考虑到程序不但应该能够展示其正确性,也应该能够把原开发者解决问题的思维模型告诉后来者。

      +

      程序如果要展示其正确性,应该使用足够简单的输入输出格式,这样才能保证很容易地检验有效输入和正确输出之间的关系是否正确。

      +

      出于充分考虑透明性和显见性的目的,还应该提倡接口简洁,以方便其他程序对它进行操作。

      +
      健壮原则 (健壮源于透明与简洁)
      +软件的健壮性指软件不仅能在正常情况下运行良好,而且在超出设计者设想的意外条件下也能够运行良好。 + +

      大多数软件禁不起磕碰,毛病很多,就是因为过于复杂,很难通盘考虑。如果不能够正确理解一个程序的逻辑,就不能确信其是否正确,也就不能在出错时修复它。

      +

      这也就带来了让程序健壮的方法,就是让程序的内部逻辑更易于理解。要做到这一点主要有两种方法:透明化和简洁化。

      +

      上面曾说过,软件的透明性就是指一眼就能够看出是怎么回事,即人们不需要绞尽脑汁就能够推断出所有可能的情况,那么这个程序就是简洁的。程序越简洁,越透明,也就越健壮。

      +
      表示原则 (把知识代入数据以求逻辑质朴而健壮)
      +数据要比程序逻辑更容易驾驭。所以如果要在复杂数据和复杂代码中选择一个,宁愿选择前者。更进一步:在设计中,应该主动将代码的复杂度转移到数据中去。 +
      通俗原则 (接口避免标新立异)
      +最易用的程序就是用户需要学习新东西最少的程序,换句话说最易用的程序就是最切合用户已有知识的程序。 +
      缄默原则 (无话可说?那就沉默)
      +行为良好的程序应该默默工作,绝不唠唠叨叨,碍手碍脚。沉默是金。 + +

      简洁是Unix程序的核心风格。一旦程序的输出成为另一个程序的输入,就要很容易把需要的数据挑出来。站在人的角度上来说,重要的信息不应该混杂在冗长的程序内部行为信息中。

      +
      补救原则 (出现异常时,马上退出并给出足够错误信息)
      +软件在发生错误时也应该与在正常操作的情况下一样,有透明的逻辑。最理想的情况当然是软件能够适应和应付非正常操作;而如果补救措施明明没有成功,却悄无声息地埋下崩溃的隐患,这就是最坏的情况了。 + +

      宽容地收,谨慎地发。就算输入的数据很不规范,一个设计良好的程序也会尽量领会其中的意义,以尽量与别的程序协作。然后要么抛出异常,要么为工作链的下一环程序输出一个严谨干净正确的数据。

      +
      经济原则 (宁花机器一分,不花程序员一秒)
      +随着技术的发展,开发公司和大多数用户都能得到廉价的机器,所以这一准则的合理性就显然不用多说了。 + +

      如果我们在软件开发中严格遵循这条原则的话,大多数的应用场合应该使用高级语言,如Perl,Python,Java,Php,甚至Shell——这些语言可以将程序员从自行管理内存的负担中释放出来。

      +
      生成原则 (避免手工hack,尽量编写程序去生成程序)
      +人类很不善于干辛苦的细节工作。因此程序中任何手工hacking都是滋生错误和延误的温床。程序规格越简单越抽象,设计者就越容易做对。 +
      优化原则 (过早优化是万恶之源)
      +还不知道瓶颈所在就匆忙进行优化,这可能是唯一一个比乱加功能更加损害设计的错误。从畸形的代码到杂乱无章的数据布局,牺牲透明性和简洁性而片面追求速度、内存或者磁盘使用的后果随处可见。 + +

      先制作原型,再精雕细琢。优化之前先确保能用。”极限编程”宗师Kent Beck从另一种不同的文化将这点有效地扩展为:先求运行,再求正确,最后求快。

      +

      借助原型化找出哪些功能不必实现,有助于对性能进行优化;那些不用写的代码显然无须优化。

      +
      多样原则 (绝不相信所谓"不二法门"的断言)
      +Unix传统有一点很好,即从不相信任何所谓的"不二法门"。Unix奉行的是广泛采用多种语言、开放的可扩展系统和用户定制机制。 +
      扩展原则 (设计着眼未来,未来总比预想来得快)
      +要为数据格式和代码留下扩展的空间,否则就会发现自己常常被原先不明智选择捆住了手脚,因为你无法既要改变它们又要维持对原来的兼容性。 + +

      设计协议或是文本格式时,应使其具有充分的自描述性以便可以扩展。要么包含进一个版本号,要么采用独立、自描述的语句、按照可以随时插入新的而不会搞乱格式读取代码的方法组织格式。

      +
      Unix哲学一言以蔽之
      + +

      –EOF–

      +]]>
      + + linux + + + Unix + 编程艺术 + +
      + + 使用apt-get 安装NVIDIA官方驱动 + /use-apt-get-installation-official-nvidia-drivers.html + +1. 首先需要添加apt-get源: + +
      +sudo add-apt-repository ppa:ubuntu-x-swat/x-update
      +
      + +
        +
      1. 在线安装驱动命令:
        +sudo apt-get update
        +sudo apt-get install nvidia-current nvidia-current-modaliases nvidia-settings
        +
      2. +
      3. 添加cuda和openCL库的支持(可选):
      4. +
      +
      +sudo apt-get install nvidia-current-dev
      +
      +
      +]]> + + linux + + + Ubuntu + NVIDIA + apt-get + 官方驱动 + +
      + + C#使用委托与多线程,解决界面假死 + /use-multiple-threads-resolve-interface-feign-death.html + +
      .NET Framework 为我们提供了一个处理控件闪烁的方案-双缓冲,我们可以直接调用它。
        +
      • 首先自己封装一个Windows组件 MyListView.cs,并让它继承自Listview。
      • +
      • 在控件中添加打开双缓冲的代码如下:
      +public MyListView()
      +{
      +// 打开控件的双缓冲
      +SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
      +}
      +
      +
    • 使用我们封装的MyListview 实例化一个对象,命名为ImageListView, 执行下面的方法来实现异步数据加载
    • +private void button1_Click(object sender, EventArgs e)
      +{
      +    Thread ImageThread = new Thread((ThreadStart)(delegate()
      +    {
      +        for (int i = 0; i<100000; i++)
      +        {
      +        // 此处应该警惕值类型装箱造成的"性能陷阱"
      +        ImageListView.Invoke((MethodInvoker)delegate()
      +        {
      +        ImageListView.Items.Add(new ListViewItem(……) );
      +        });
      +        }
      +    }));
      +
      +
      ImageThread.Start();
      +
      +

      }


      使用这种方法可以有效的解决加载大量数据的时候造成的界面假死。

      +]]> + + Technical + + + C# + 委托 + 多线程 + 界面假死 + +
      + + 使用vimwiki组建个人wiki + /use-vimwiki-set-up-a-personal-wiki.html + +

      为什么用vimwiki?

      +博客平台可以记录自己学习的总结,适合较多的知识积累才能写出一篇较好的博文。但是平时学到用到的很多零碎的小知识点却常常不知道该放在哪里。而且博客的组织结构也不能很好的把一些相关知识点总结在一起,种种原因吧。还好遇到了vimwiki这款插件,从此后便一发不可收拾的喜欢上了在vim中写自己的个人wiki。 + +

      维基语法的作用有三点。

      +
        +
      1. 使条目更规范。通过一定转换,wiki 能输出为拥有约定俗成格式的HTML;

        +
      2. +
      3. 节约编辑时间。 显然,你不用写出完整的HTML标签,也不用在可视化编辑器中点来点去;

        +
      4. +
      5. 充分的可读性。使用维基语法书写的文档,即使未被转为HTML,内容的语义也是一目了然,甚至表格也能清晰地阅读。

        +
      6. +
      + + +

      安装

      +

      vimwiki的安装可以参考这里

      +
      开始使用 vimwiki
      +使用快捷键 <leader>ww 开始编辑您的第一个 vimwiki 吧! 首次使用 vimwiki 时, 它默认会在操作系统用户目录(即 ~/ )建立一个 vimwiki 文件夹,保存所有你的 wiki 条目。如果你调用 :!Vimwiki2HTML 命令把 wiki 条目转为 html 页面,它会创建一个名为 vimwiki_html 的文件夹保存所有生成的 html 文件。 +
      进阶技巧
      这里记录了一些vimwiki中用的比较多的命令和小技巧。 +
      为vimwiki添加语法高亮
      +为vimwiki实现语法高亮可以参考vimwiki语法高亮。 +
      +]]> + + Technical + + + vim + vim插件 + 部署 + +
      + + 使用SSH实现iPhone自动代理 + /using-ssh-for-the-iphone-automatic-proxy.html + +对于绝大部分国内网站,正常上网,对于twitter等,自动走SSH代理,无需手工切换,这即是所谓的“自动翻墙”,好处就是不影响国内网站的访问速度,不用来回切换网络。 + +

      IOS中最方便的翻墙方式是使用VPN,速度尚可,但PPTP和L2TP是不能像OpenVPN一样定义路由的,打开VPN后,所有流量均走VPN线路,浏览国内网站很慢,需要来回切换。windows下可以用脚本定义静态路由,使用Route设置脚本,实现国内网不经VPN搞定,但IOS下在cydia找了半天也没找到iptable这个命令包,所以还是用ssh吧。下面是具体使用方法:

      +

      1、越狱,并配置好ios的环境

      +

      如何越狱就不用我说了吧,随便一搜网上一大堆,越狱后如果你不知道如何ssh连接到你的ios设备可以参考我以前的一篇文章:为ipad2安装和配置gcc编译环境,当然这里没必要安装gcc环境,所以进行到第二步就OK了。

      +

      2、安装一些必须的软件包

      +

      如果你确定第一步你已经没有问题了,我们下面要继续安装一些必须的软件包。ssh连接到你的iPhone或者iPad后执行下面的命令:

      +
      sudo -i 
      +

      apt-get install screen


      然后你的ios设备上面将会安装好screen这个软件包,不知道screen是什么的同学可以参考这里

      +

      执行下面的命令:

      +
      screen –S autossh 
      +ssh -D 1987 [用户名]@[ip地址] 
      +#如果你自定义了ssh的端口号,记得使用-p 加你的端口号,如下: 
      +ssh -D 1987 –p [端口号] [用户名]@[ip地址]
      3、配置PAC,用来实现自动切换。 +

      可以使用我的pac文件,http://wangheng.org/tools/autossh.pac。在iPhone的设置->WIFI->HTTP代理->自动->URL 里把它填上就可以了。
      内容不多,如下:

      +
      function FindProxyForURL(url,host)
      +{
      +url = url.toLowerCase();
      +if(
      +shExpMatch(url, “*facebook.com*”) ||
      +shExpMatch(url, “*googlecode.com*”) ||
      +shExpMatch(url, “*twitter.com*”) ||
      +shExpMatch(url, “*youtube.com*”) ||
      +shExpMatch(url, “*wordpress.com*”) ||
      +shExpMatch(url, “*appspot.com*”) ||
      +shExpMatch(url, “*.google.com*”)
      +)
      +{
      +return “SOCKS 127.0.0.1:1987″;
      +}
      +return “DIRECT”;
      +}
      +return “DIRECT”;
      +}
      +

      好了,大功告成,享受你的无国界自由网络吧~

      +]]>
      + + Technical + + + ssh + iPad2 + Proxy + iPhone + Pear + +
      + + 使用Vim和Viki来写文章 + /vim-and-viki-to-write-articles.html + +已经改用vim中的vimwiki插件来实现!具体请参考使用vimwiki组建个人wiki分享个人wiki部署脚本 + +

      ViKi,就是 VIM WiKi 的缩写。WiKi 是一种非常方便快捷地组织信息的方式,而 ViKi也可以作为个人的Wiki管理工具。利用deplate来编译vim中写好的viki文件,可以快速的依据你自己的模板来生成带样式的html文件。这里是利用viki创建出来的测试html,效果还是很不错的,至少我很喜欢这种简约的风格。另外,我还写了bat脚本来配合自动部署html到web,所以我要得到一个viki页面流程很简单:

      +

      1、gvim mypage.viki

      +

      2、viki.bat mypage.viki

      +

      这样在web就得到了刚刚写好的viki页面,很方便不是。

      +

      安装配置viki

      +

      因为需要deplate来编译写好的viki文件,所以首先需要配置好deplate。可以从这里下载,将解压出来的deplate.exe文件放到Windows目录,然后在你的工作目录建立一个html的模板文件。我使用的模板和css文件可以从这里下载。(请自行替换css文件地址)

      +

      vim中的viki插件可以从官网搜索下载,安上后gvim 针对ViKi 提供了许多键绑定,编写工作会变得非常简单。现在假设你安装好了所有的插件和工具,建立test.viki文件并使用vim编辑,输入如下内容:

      + + +

      #TITLE: Viki 测试

      +
        +
      • 一级标题测试
      • +
        • +
        • 二级标题测试
        • +
        +
      • +
      • ** 三级标题测试
        正文内容。
      • +
      +

      Viki你好!
      今天是六月九号,用viki写文章真方便!

      +

      使用命令生成html到当前目录的html文件夹:

      +

      deplate test.viki -m utf8 -m code-vim73 -t .\template\bright.html -d html

      +

      现在打开你的test.html,是不是跟这个 一样呢?

      +

      当然功能远远不止这些,鉴于我也是刚尝试,并且只是用它来记一些简单的文字,有空会在去慢慢摸索啦~

      +]]>
      + + Technical + Route + + + vim + 工具 + deplate + mysql + +
      + + vim复制粘贴格式错乱 + /vim-copy-and-paste-format-disorder.html + +
      + +

      使用vim的过程中,用SSH打开的终端中复制代码,常常出现格式错乱的情况,解决办法如下:

      +

      运行如下命令,进入 paste 模式:

      +
      :set paste
      +

      进入 paste 模式后,按 i 键进入插入模式,然后再Shift+Ins进行粘贴,文本格式就不会错乱了。

      +

      粘帖完成后想结束 paste 模式可以执行:

      +

      :set nopaste

      +
      +
      +]]> + + 最近添加 + +
      + + wamp配置多域名虚拟目录 + /wamp-to-configure-a-multi-domain-virtual-directory.html + +

            安装完成wamp后默认的www目录是在我本地的C:\wamp\www,这个目录下我放了一些自己测试php写的一些小例子。但是我工作的项目都是在其他的D盘、E盘,反复的设置apache的DocumentRoot 路径实在不是一个好的解决方案。当然这点小问题还是很好解决的,跟VPS中设置多域名类似,使用Apache的虚拟主机扩展Vhost可以轻松解决这个问题。

      现在先来配置虚拟主机:
      1、首先打开apache的配置文件httpd.conf

      我这里是C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf,打开后去掉#Include conf/extra/httpd-vhosts.conf前面的#注释标记。
      2、打开配置文件httpd-vhosts.conf

      我这里的文件路径是C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf 。在httpd-vhosts.conf文件的末尾添加上:
        <VirtualHost *:8080
              DocumentRoot 你的项目所在的路径 #例如E:\src\myproject\web
              ServerName d.com  #取一个自己容易记忆的名字我使用的是d.com
              <Directory "你的项目所在的路径">
                  Options Indexes FollowSymLinks
                  AllowOverride None
                  Order allow,deny
                  Allow from all
              </Directory>
        </VirtualHost>

      但是使用Vhost配置后,localhost访问则出现了问题,所以需要同样为localhost配置成一个虚拟主机目录,如下:

      <VirtualHost *:8080>
      DocumentRoot c:/wamp/www
      ServerName localhost
      <Directory "c:/wamp/www">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
      </Directory>
      </VirtualHost>

      红色部分需要自己手动修改成你对于的目录,我这里设置的Apache的监听端口是8080,修改时请改为你自己的端口号。修改后,如图所示:

      image


      3、设置系统hosts文件

      打开在C:/WINDOWS/system32/drivers/etc中的hosts文件中加上如下的内容
          127.0.0.1    d.com
      完成上面的步骤后,这样我们就配置好了我们的虚拟主机,重启一下Apache服务。

      在浏览器输入http://localhost:8080 访问到的是c:/wamp/www目录下的内容了!

      同样输入http://d.com:8080 访问到的是你自定义的E盘的那个路径,是不是很方便~

      +
      +]]> + + Technical + Route + + + 多域名 + WAMP + 虚拟主机 + wiki + +
      + + 为Vim 添加vimgdb支持 + /wei-vim-tian-jia-vimgdb-zhi-chi.html + +1、    下载最新的vim74的源码包 +wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 +2、下载vimgdb-for-vim7.4源码 +wget https://github.com/larrupingpig/vimgdb-for-vim7.4/archive/master.zip -O vimgdb-for-vim74.zip +3、解压所有文件,并应用补丁文件 +
       tar xjvf vim-7.4.tar.bz2 -C /tmp
      +    unzip vimgdb-for-vim74.zip -d /tmp
      +    cd /tmp
      +    patch -p0 < vimgdb-for-vim7.4-master/vim74.patch
      +    cd vim74/src
      +    ./configure --enable-gdb --prefix=/usr/local/vim74 \
      +                --enable-multibyte \
      +                --enable-fontset \
      +                --enable-xim  \
      +                --enable-gui=auto \
      +                --enable-pythoninterp=dynamic \
      +                --enable-pythoninterp \
      +                --enable-python3interp=dynamic \
      +                --enable-rubyinterp=dynamic \
      +                --enable-rubyinterp \
      +                --enable-perlinterp \
      +                --enable-cscope \
      +                --enable-sniff \
      +                --with-x  \
      +                --with-compiledby=erocpil  \
      +                --with-features=huge \
      +                --enable-luainterp=dynamic  \
      +                --with-python-config-dir=/usr/lib/python2.7/config
      +    make
      +    sudo make install
      +4、安装vimGdb运行文件: + +

      将解压缩出来的vimgdb_runtime文件夹中的文件复制到你的$VIMRUNTIME目录,通常是$HOME/.vim 目录。如果你不确定你本机的具体目录可以在打开的vim中执行
      :set runtimepath?
      来查看你自己机器环境中的具体目录。

      +
      cp -rf /tmp/vimgdb-for-vim7.4-master/vimgdb_runtime/* ~/.vim
      +

      切换到cd ~/.vim/doc/目录并执行 “:helptags .” 命令来在vim中创建帮助文档。
      cd ~/.vim/doc/
      vim
      :helptags .
      以后想查看关于vimgdb的使用说明可以在vim中执行”:help vimgdb” 命令来获取帮助。

      +

      具体的使用方法以及可选配置,在官方帮助文档里面已经详细的介绍,请不了解的同学自行查阅,这里就不冗述了。

      +]]>
      + + 最近添加 + +
      + + win7修改网卡MAC地址 + /win7-modify-the-network-card-mac-address.html + +Win7操作系统下修改MAC时不能随机生成MAC地址,修改时要注意如下规则: +从左往右第二个字符必须为2、6、A、E其中之一, +例如: +02:00:00:00:00:00 —— 有效 +06:00:00:00:00:00 —— 有效 +0A:00:00:00:00:00 —— 有效 +0E:00:00:00:00:00 —— 有效 + +

      至于用来修改的软件很多,例如:

      +Mac MakeUp (Mac makeup可以改外置usb网卡)。 +

      下载地址:http://www.gorlani.com/portal/projects/mac-makeup-the-original

      +

      使用方法:

      +
        +
      1. 选择需要修改的网卡,带无线网卡的电脑一般会有两个网卡,在这里选择你连接网络的那块网卡。可以在系统托盘的网络连接状态里看到你目前所使用的网卡名称。

        +
      2. +
      3. 新 MAC 地址,用 10 来随机生产。4 可选择网卡生产商,就是说你可以把你的 Intel 的网卡伪装成 3com 的。

        +
      4. +
      5. Change,即可生效

        +
      6. +
      +

      PS:公司网络各种限制各种监控,被监控的感觉很不爽,真想天天挂着代理或者联着自己的VPN上网~

      +
      +]]> + + Route + + + Windows + Win7 + +
      + + windows下用pear安装symfony + /windows-with-pear-install-symfony.html + +介绍 + +

      Symfony是一个基于MVC模式的面向对象的PHP5框架。Symfony允许在一个web应用中分离事务控制,服务逻辑和表示层。同时,它还包含了很多工具和类用以缩短开发复杂的网络应用的时间。

      +

      安装准备

      +

      首先需要你在windows中安装好pear,没有安装的同学可以参考一下Windows下安装Pear。成功安装好pear并配置好环境变量后,就可以使用pear安装symfony了。

      +

      开始安装

      +

      首先确定你要使用的symfony的版本,下面依次介绍1.4版本和2.0版本的安装

      +

      1、安装1.4版本的symfony

      +

      按照symfony官方文档执行安装命令即可,依次执行:

      +

      pear upgrade PEAR

      +

      pear channel-discover pear.symfony-project.com

      +

      pear install symfony/symfony

      +

      pear install http://phing.info/pear/phing-current.tgz

      +

      最后 symfony -V 确认一下版本

      + + +

      2、安装2.0版本的symfony2

      +

      注册channel执行:

      +
      pear channel-discover pear.symfony.com
      +

      查看可用的包,执行:

      +
      pear remote-list -c symfony2
      +

      安装包:

      +
      pear install symfony2/package_name
      不需要两个版本都安装,请根据你实际的项目需要自行选择1或者2安装~
      
      +
      +]]> + + Technical + Route + + + Windows + Apache + 苦逼生活 + +
      + + 写给.NET程序员,不要困在自己建造的盒子里 + /wrote-net-programmer-and-not-get-bogged-down-in-the-box-built.html + +

      原文地址:http://blog.jobbole.com/19001/       作者:@敲代码的张洋

      此文章的主旨是希望过于专注.NET程序员在做好工作、写好.NET程序的同时,能分拨出一点时间接触一下.NET之外的东西(例如10%-20%的时间),而不是鼓动大家什么都去学最后什么都学不精,更不是说.NET不行或劝大家放弃.NET。恕我愚钝,此主旨在文中表达不够清楚,看评论中很多朋友误解了,特此说明。

      另外,本文中的观点并不全部是我个人的想法,相当一部分来自我以前聊过天的某些大牛,他们很多来自微软、百度、腾讯等知名企业,并且很多已经成为技术骨干,我曾经从他们那里受益匪浅,于是我把他们的指教结合自身的经验和理解写成此文。这就是此文的来源。

      —————————————–华丽的分割线—————————————–

      在给这篇文章起标题的时候,我斟酌了很久,因为我个人是反对使用“.NET程序员”、“C++程序员”或“PHP程序员”这类简单粗暴的方式为程序员做划分的。但是客观确实存在一个现象,就是很多程序员会为自己设置一个无形的界限,将自己与某种语言或平台硬绑定到一起,例如我这里所指的“.NET程序员”。请注意这与“术业有专攻”是不同概念的,有自己专攻的平台或领域这很正常,但是有很多人偏执地将自己与某个语言或平台紧紧捆绑,而忘记了自己首先是一名程序员,然后才使用某种语言,他们偏执于平台并陶醉于自己建立的盒子里,而不愿主动去接触一些盒子外的事物,最终使得自己无法进步。

      张洋:写给.NET程序员,不要困在自己建造的盒子里

      从我个人的观点看,本文中“.NET程序员”是指具有如下特点的程序员群体:

      ● 学习、工作的技术范围均局限于.NET平台及衍生,对.NET之外的技术没有主动接触或学习的欲望。

      ● 不断学习各种.NET平台上的库或框架,如ADO.NET,ASP.NET MVC,WPF,Silverlight,WCF,WP,EF,NHibernate……

      ● 工作无法脱离Visual Studio,习惯于图形化的工作环境。

      ● 时常抱怨微软的技术更新太快,微软开发平台包办太多以至于自己身价贬值。

      ● 对面向对象、设计模式、软件架构等东西具有极大的热情,宁可花大量时间编造各种“设计模式小故事”也不愿花点时间了解一点新鲜的东西(如Unix下的IPC)。

      ● 对Java颇有微词,觉得C我根本用不到,至于PHP?它能做到的.NET都能做到,认为用Linux的大多在装逼,而Lisp、Lua、Eiffel神马的都是浮云,我管它们干什么。

      ● 认为面向对象语言就是程序设计语言的代名词,命令式编程深入骨髓,不太了解函数式语言或契约式语言是什么。

      ● 用.NET很多年了,但感觉自己没什么突破,没什么进步,成天就搞些增删改查的劳什子。

      ● 经常讨论或思考.NET或Java或C或其它语言哪个好,搞哪个更挣钱这种问题。

      如果您有超过3项符合上述特征,我想我们可以聊一聊,因为据我的观察,感觉博客园上这类朋友还是挺多的。

      希望我能做到旁观者清

      有一个事实我想先和大家澄清一下,其实.NET只是我的业余爱好。由于博客园主要偏重于.NET平台,且园子里的朋友对面向对象、架构之类的颇感兴趣,所以我写了很多关于.NET及架构方面的文章(如果您注意观察,会发现我博客里这类文章正减少并趋于消失),其实相对于设计、架构这类东西,我个人更感兴趣的是具体的科学与技术,例如各种编程语言的原理、应用及实现扩展,操作系统原理,网络编程,通信协议,算法与数据结构,数据挖掘,机器学习,分布式等等;语言方面我比较喜欢的是PHP、Python、Lisp等;而编程方面我更推崇Unix下的编程哲学和编程方法;我爱vim胜过VS无数倍。

      因此,.NET和C#我一直是作为业余爱好来发展的,希望这没有让任何人觉得沮丧。很多朋友加我QQ或MSN问我关于.NET的问题,我经常答不上来,很多人或许觉得我不近人情,但我其实是真的答不上来。例如我在博客中写过一系列关于ASP.NET MVC的文章,很多人是冲那系列文章加我的,但是其实ASP.NET MVC我只在beta版时摆弄过两个星期,然后就再也没有碰过,所以后来很多朋友问我想关问题我是真的答不上来。

      所以,在博客园这个以.NET和架构之类为主的社区,我算是半个旁观者吧,我看到园子里很多朋友都把自己禁锢在自己创造的盒子里,所以我希望以旁观者的身份,给这些朋友提几个建议。

      每半年接触并学习一门语言

      有许多人通常觉得只要把一门语言学会学精就行,这个想法我觉得对了一半。一个程序员应该有一门精通的语言,但是还要不断学习新的语言(当然不能太频繁),倒不是为了以防哪天万一用到这门语言,而是接触学习不同的语言会拓展程序员的视野。

      如果你一直用C#,试试Lisp,你会惊叹于还有这样写程序的方式,嗯?看来我得去学学Lamda演算;试试Python,你会惊讶于还有如此小巧优美的东西;试试Lua,你会发现原来语言还能嵌入其它语言,要不要为WOW写个外挂试试?试试Eiffel,你会发现还有契约式编程这种方法,嗯?什么?Java上有iContract,那我要不要为.NET实现一个?随着这种学习过程,你的思维自然就被拓展开了,而不是满脑子的Class、Object、MVC、OO……

      其实学习语言不一定是学习没听说过的,许多您听到耳朵长茧却从来没有深入学习的“老朋友”,如C、PHP,如果您细心学下来,也会得到许多意外的收获。

      例如在学C的过程中,你会发现不可能脱离Unix环境而把C学好,你会接触POSIX和System V,你会主动深入学习进程、线程、信号、I/O、IPC,你会接触TCP/IP协议。你会发现要学好C还要理解计算机组成原理,你还会发现原来还有大小端这个东西。

      深入学习PHP,你会发现PHP远不仅仅是一个做Web的脚本语言那么简单,你会了解到它SAPI、PHP Compiler和Zend Engine的优美结构,你会发现有opcode,你会发现PHP浑身都是扩展点,你可以扩展功能,扩展Compiler和Zend Engine,甚至可以完全实现自己的编译和运行逻辑。你会了解APC是如何缓存opcode,APD是如何跟踪PHP的运行。

      每次学习一门语言,你会发现这不是一门语言,而是一个崭新的新大陆,里面有太多让人兴奋和新奇的东西,而如果你执意禁锢在“.NET盒子”里,你就永远不会知道这些。

      主动突破自己 接受更多挑战

      如果什么东西都是用到才学,代码都是有用才写,那我只能非常抱歉的说你还不是个程序员,而只是个代码工人。程序员应该有主动出击的意识,应该对自己未接触的领域有无限向往。幸运的是,互联网上的财富实在太多了,你应该尽其所能去接触学习未知的东西,而不要总想我学习这个东西能不能换来钱给孩子买尿布和奶粉。你可以有很多借口,但是我想说,借口想找总是有的,时间想找也总是有的,还是看自己到底要什么。不要一边躺在盒子里一边又抱怨自己没有进步。

      例如Google Publication,这里有世界最优秀的Google工程师们理论和实践的总结,来读读这些伟大的论文吧,看看这个伟大的公司和一群伟大的人都干了些什么,了解一下Map Reduce是怎么回事,如果了解了你自然想去试试Hadoop,还有Bigtable和GFS,哦!太震撼了,原来存储数据也有这么多讲究,不是放硬盘里或通过Insert插入数据库就行了。也许这些英文论文读起来很困难,但是我想一周一篇的要求并不高(我现在仍然保持着一周读两篇论文的习惯)。要知道,最新、最严谨的东西都在论文里,如果你只是通过书本或社区学习,那么你永远不会知道今天在计算机科学与技术的领域又发生了哪些令人震撼的事情,出现了哪些新奇的东西。

      不要太懒惰,你写增删改查写累了吗?Come on!有没有想过自己写一个小型的httpd?当然你需要先去学习HTTP协议(rfc2612),试试能不能写一个PHP的SAPI扩展令你的httpd处理PHP脚本。有没有想过自己用lex和yacc实现一个自己的小语言,也不是完全没用,也许你已经对你的领域业务逻辑烂熟于胸,那么去实现一个自己的领域语言吧。啊!我要去学习编译原理、形式语言与自动机……咦,这东西还挺有意思的,去看看计算理论去……如果到了这里,你已经开始接触计算机的数学本质了,而你的层次将会得到升华。

      学习就是这样,主动突破自己,给自己一些挑战性的任务,生活才有趣。成天困在.NET的盒子里,我们还有脸称自己为程序员吗?

      脱离IDE 玩玩纯文本与shell

      从没用过IDE的程序员可能是悲剧,但从没脱离过IDE的程序员绝对是悲剧!

      你有没有觉得自己越来越不像个“编程序”的而越来越像“堆程序”的。好的,即使在工作时你离不开IDE,那么业余时间让你的IDE滚蛋,等等,你改用Notepad?气死我了你!试试vimEmacs,体验一下用纯文本写程序,用gcc编译连接的乐趣。你会发现“yyp”比“选中一行,Ctrl+C,点击下一行起始位置,Ctrl+V”简单的多,你会发现按一下“0”比按20次“左箭头”省事的多。等源程序多了,也许你会想去学习Makefile的写法。你会莫名其妙地发现自己更懂编译和连接过程了。

      相信我,用纯文本和shell写程序比用IDE酷多了,想吸引女孩子吗?你去问问你们班或你们公司最漂亮的女生,她也会这么想。重要的是,这种酷不是“装B”的酷,而是有效率的酷。什么?你已经受不了IDE了……

      接受更多的编程哲学与学习方式

      注意我是用的“接受”而不是用“改变”,你不需要改变什么,写.NET程序很好,不过你可以适当吸取一下其它领域的编程哲学与学习方式。可以说Windows(特别是.NET)程序员和Unix程序员思考问题的方式大不相同,如果现在需要一辆汽车,Windows程序员会建立一个从冶铁到装配的“All in one”汽车制造基地;而Unix程序员会去分别建立采矿场、冶铁厂、设计公司、材料制造厂、机械制造厂和装配厂。我不想讨论他们各自的优缺点(因为很容易陷入无谓的宗教纷争),但是对于你来说,了解一些其它的编程哲学对你没有坏处。

      另外就是学习方式,例如你要学习PHP,请千万不要去书店购买各种《21天精通PHP》或《PHP编程宝典》,你应该首先打开Google,找到PHP官网,然后去官方文档哪里寻找学习资源。网上还有各种wiki,mailing lists和社区,请不要放弃这些资源。然后同时你可以去Amazon看书评,然后小心而谨慎地选择一本相关的书籍(影印版最优,翻译版其次)。

      一个人想突破自己不容易,关键在于自己有没有突破的意愿。衷心希望有一天,您的脑中不再被ASP.NET,ASP.NET MVC,WCF,WPF,ADO.NET,Silverlight,EF……而占满,如果到了那一天,你会发现,咦?!我.NET的水平也大幅提升了!

      —————————————–华丽的分割线—————————————–

      精彩评论】

      Jacky Song:真正的程序员肯定不会限定在.net平台,程序员就是为了解放生产力,提高工作效率而生的,其实除.net以外,还有其他很好玩的技术或工具,比如你所说的编辑器之神vim,无论是windows平台还是linux平台,都是其它编辑器无法比拟的(谁用谁知道)。脚本的话python, php, 以及各平台的shell, 这些都是可以大大的提高工作效率。总之,计算机就是一门艺术,越往里面研究越觉得它是划时代的奇迹,这玩意太神奇了!!

      toEverybody:我认为改变一下公司的技术会眼界很宽,如学C#, 再学一下Delphi, 再了解一下C++, 再了解一下PHP…..

      微生物:其实本质上还是要问这样一个问题,你真的是一个合格的程序员吗?你真的打算一直做程序员吗?

      FlyDragon:思想的认识升华到你这个层次需要时间和好的引导。真正埋头于技术,而不参与社区交流的人很难走出自己的瓶颈!

      朝_夕:博主的观点正好描述了我目前的状态,作为一个以.net 技术来混烦吃的技术人员来说,当我掌握的.net 技术越高深,在工作中体现的价值就越大,获得的报酬就越多,使我不得不专注于.net 的技术;但微软的技术更新得那么快、那么多,对于我这个资质比较普通的脑袋来说,实在是有心无力……目前趁着工作任务比较少,学习了下python, 和用下Linux,释放下满脑都是.net的大脑。

      JaiHo:很高兴我已经和VS无关了,曾经一次装VS快一个小时后,我就不再用了,以前用VS学C++和C,后来发现很多问题,就用gcc编译器了。我已经脱离IDE了,工作以来还未用IDE,感觉纯文本编译器vim很好。

      llzhzhbb:执拗于一个平台和刻意使用多个平台其实本质上没差别,都是认为镰刀的意义大于麦子。

      午后的小睡:相比微软,当苹果程序员吧。苹果对框架的推出和更改非常谨慎,修改语法更是谨慎,所以苹果的系统基本上都是增添API,不会像.net那样,微软今天一个框架,明天又一个,没完没了的往C#里添加各种语言特性,让你把本来应该学习先进的开发算法和方法的时间全浪费在语言和框架的钻研里了。

      hogface:技术眼界不断的扩张是必须的,我倒是认为我们做技术的不应该总在技术层面晃,可以多多了解其他行业的运作规则。我们会获取很多信息,有助于我们的程序设计。中国多数的程序员的归宿在哪里呢?当你30岁了还在写代码,而对其他行业不了解,那你的职业寿命到头了。简单适用的技术应用于行业运作才是我们程序员的价值提现,也是能够生存下来的关键。看看开心网,优酷,凡客诚品等。都是成功的案例,一味谈技术在中国多数人是没希望,没饭碗的。

      Keven Wang:有时候现实和我们的愿望还是有很大的差距的。不过我很支持楼主的观点。毕竟我们不可能一辈子做程序员。在应用中学习,在学习中应用。带着任务性的学习是最快的。

      Jeffrey Zhao:

      引用

      午后的小睡:相比微软,当苹果程序员吧。苹果对框架的推出和更改非常谨慎,修改语法更是谨慎,所以苹果的系统基本上都是增添API,不会像.net那样,微软今天一个框架,明天又一个,没完没了的往C#里添加各种语言特性,让你把本来应该学习先进的开发算法和方法的时间全浪费在语言和框架的钻研里了。

      你搞笑,obj-c的年年加新特性。苹果系统增加API,微软就不是了?

      苹果出一个GCD,你们嗷嗷叫好。微软加一个TPL,你们就说冗余。两个tmd是一种东西好不好。

      要说学习先进的开发方法和算法和理论,学C#绝对比obj-c有价值,如今obj-c的兴起完全是iPhone等等在商业上的成功。

      你谈比赚钱倒也罢,你比“长进”,这不是扯蛋么。

      午后的小睡:

      @Jeffrey Zhao

      您不是个C/C++程序员,不知道微软的开发工具是多么郁闷的东西,我这里不是怪微软,因为微软的镇山之宝是Windows,如果允许程序员在Windows下写的程序可以随便移植到别的平台上,对微软来说那是致命的。所以当初IE擅自修改HTML的支持搞得Web开发人员晕头转向,它不去支持OpenGL,却去搞D3D,它擅自修改Java,JDC不高兴它才搞的C#,不光是开源软件,任何平台中立的标准微软都一定要单开一套,所谓Mono的跨平台也是个笑话,我问过很多用过的人都不建议使用它,都是说不到万不得已,用.net还是迁移到Windows平台上好。

      我以前写Cygwin/Mingw/Linux的程序,想用个IDE提高效率,用了下VS,一看它生成的模板程序就放弃了,微软连STD C++都不放过,你对C++生成托管代码或者什么框架我无所谓,如果在语法级标准支持的有差异,甚至另立新语法挖空心思逼迫程序员转用微软独有的东西那就没法忍受了。

      Obj-C不过是C/C++的扩展,它不像微软从语法级变更了C/C++,你可以使用所有既有的库和标准代码,实际上除了图形界面相关的部分,根本没必要写Obj-C的代码,苹果的新Obj-C前端CLang也没有对C/C++在语法级做变更,而是强调遵从标准。苹果修改Objc-C从来只修改它扩展的那部分,从来不会对C/C++本身动手术,这就是区别。

      总之,追踪微软的东西是最累人的,到处是Windows粘合陷阱,稍不留神写的东西就变成了Windows依赖,哪怕是某些明明是逻辑公共的部分,当然,如果发誓只给Windows平台写程序是另一回事。

      Jeffrey Zhao:

      @午后的小睡

      说obj-c是c++扩展?无语啊,只是c扩展而已。VC++不支持C++标准?求证。

      IE的标准问题,那是Web标准看IE不爽故意定成不一样的,请分清先后顺序。

      微软现在一直拥抱标准,请更新您的思路,还D3D,Java呢,什么年代的事情。

      扩展之类的谁都再做,IE有扩展,Opera有扩展,Mozilla有扩展,WebKit有扩展。而且你不也说,obj-c是c的扩展么,呵呵。

      至于说mono是笑话的人,要么本来就看和.NET有关的东西不爽,要么是不知道mono现在是多牛。

      午后的小睡:

      @Jeffery Zhao

      obj-C还包括obj-C++,它不过是C/C++语法上加了Smaltalk类语法扩展(所有用@符号开始的部分),我爱用C++和STL,天天在用。XCode目前用的是gcc和g++前端,将来CLang对C++标准支持达标了,将会替代gcc前端,参见www.llvm.org。

      VC++对标准支持的烂,这个所有用过VC++的人都知道,据说到了2008比较好了,但是到了2010就是另一番天地了。你现在用VS2010生成一段C++ HelloWorld,你去给C++程序员看,他肯定说,这是什么C++?这是.net代码吧。

      SnowDreamist:

      @午后的小睡

      OpenGL本身就有问题,他更适合于工业级别的渲染但对于计算机游戏的支持并不到位。Mono现在做的很强,我想你才是没有用过mono的人,不得不说,在SL5推出之前,MoonLight的硬件加速要比SL4,微软官方的性能要好,你都视而不见吗?Cygwin我装了一个小时没有完成果断杀掉进程了。虽然我也很喜欢Linux的命令行和那些漂亮的小工具,工作效率很高,但是这并不足以成为谋生手段。至于C++标准,简直就是笑话。我在学习编译原理的时候,老师就说C++是为编译器作者创造的一门语言,而不是编程人员。C++用的很多,但不能说明C++就是一门优秀的语言,他太复杂了,让机器自动生成吧。Gcc的作者同样抛弃了#pragma开关,这也是对标准的篡改,也没好到哪儿去。

      ocean:

      有些跑题了。

      真正的主题应该是专注于一项技术,培养自己的特长,增加自己的核心竞争力。而不应该每样技术都去学,最后搞得没有一样精通,也没有核心竞争力。多学一些,多看一些,多关注一些是好事,但是不要颠倒次序,一定要专注。

      至于语言哪个好如个不好,这个争论起来就大了,就像你用VS写程序,却非要在Linux上跑,这就是蛋疼的事情,你选择了.NET,当然应该基于微软的平台。你选择了iphone平台,那你完全可以用object-c,什么样的平台上有什么样的技术,选对平台,选对技术也是一种能耐。用linux,不用php而用asp.net就是蛋疼,用windows,不用.NET而用java也很蛋疼。

      虽说跨平台是好事,我这么多年见过这么多大企业,还真没见过有企业把自己的应用从一个平台迁移到另外一个平台的,别说从linux迁移到windows,就是从同样在unix/linux下将websphere迁移到到weblogic的都没看到。一个大型应用一旦运用起来,再去迁移基础平台本身而是蛋疼。

      Jeffrey Zhao:

      @午后的小睡

      嗯嗯,obj-c对c语言的扩展,WebKit,Firefox,Opera对标准的扩展都是先进生产力。IE的扩展就是邪恶。苹果对obj-c每年都加新特性就是发展生产力,C#两三年一次就是追逐新技术。我懂的。

      话说我不写C++,但我身边写C++的人太多了,从VS 2008转到VS 2010的人也很多。而且太多C++项目在Windows下是使用VC++编译器,在*nix下面用gcc,按你的说法,我实在理解不了这种情况是怎么回事。

      你不妨先说说,有空我也问问那些C++程序员。

      引用

      迂腐啊迂腐:
      2.为什么.net能轻易实现的东西,您要去用php做,您是在炫技术么?

      不说别的,今天我还真听说了公司里某个项目是这个情况,嘿嘿。

      ocean:

      用VC++6.0确实能让一些不太符合C++标准的代码编译通过,不过这也要看程序员了,如果程序员比较遵循标准,也同样可以用VC++6.0写出完全规范的代码来,这点还是用 VC++ 2010吧,VC++ 2010支持最新的C++标准,不过这样也带来了升级的一个问题,原来一些在VC++6.0下写的不太规范的代码,在VC++ 2010上就编译不过去了。

      至于IE的扩展,更多的基于历史问题,因为标准的定制太慢,导致IE不得已自己定了很多东西。同时在10几年前,网页编辑器,特别是所见即所得的编辑器,很多都不符合标准,所以导致做出来的网页大多不符合标准。毕竟做网页的不是程序员,并不懂什么标准,甚至很多html里面都有错误,比如漏掉反标签,或者反标签错位等等。为了更好的容错性,IE可以很完美的将这些页面显示出来,这实际上是程序健壮性的一种表现。我们在计算机课程上都学过,程序健壮性是很重要的,就是在用户录入错误的时候能够有正确的提示或者修正,举个例子,比如我们现在写程序,会经常将用户输入的全角的数字替换成半角的数字,因为如果你提示用户不能用全角输入数字,那用户可能并不清楚什么是半角什么是全角,健壮性在于我能够很好的修正用户输入的这些错误。对于html这么复杂的东西,如果没有自动修正就等于很多网页都看不了,所以在早期,这种做法是可取的。很多东西要从历史的角度去看,问题产生都和起产生的背景相关。

      午后的小睡:

      争哪种技术好很无聊。厂商玩垄断也好,玩革新也好,那是厂商的事情,我很简单,我为钱工作,虽然我也喜欢钻研技术。我不会为了反微软而反微软,应该明白一件事情,反微软的平台垄断,是为了赚钱!因为,市面上平台越多,越混乱,搞开发的人才好赚钱,才意味着更多的机会,平台间竞争越多,大厂商才会为了吸引我们这些小开发者进行让利,一旦谁获得了统治地位,开发人员必然会同质化,开发人员的价值就低了,至于什么节省社会资源,哪种技术更优秀之类的P话,能比进你钱包里的钱实在?蛋糕就那么大,厂商占的多了,咱们开发人员自然占的就少了,博主的意思可以这么理解,一旦发现某块蛋糕自己能分的越来越少了,必须能立刻跳到另一块蛋糕上去!

      szse:

      W3C就是个笑话。至于OpenGL和D3D之争,游戏业同时做过两种东西的人怕是还真没有站在OpenGL这边的。标准的不等于就是好的,标准协会归根结底还不是一群大头抢话语权?

      Hunts.C:

      可惜很多人都不是真正的程序员,所以你善意的提醒,受众不多。很大一部分软件开发从业人员并没有给自己加上程序员的社会属性,并以此出发,作为未来数年甚至是数十年的努力方向。仅仅是年少无知时被忽悠学了这个学科,或是一些非主观的原因最终从事了这个行业的工作,如今难以脱离。在这片神奇的土地上,做真正的自己是不容易的,你懂得。所以请不要失望,继续分享你认为有意义的观点。

      chenkai:

      最近很忙都没有时间写博。说到一门技术专业程度上来,个人认为大部分程序员都局限在企业的选择之上。当然这也无可厚非,但是我曾经无数次强调过一个程序员职业修养来说,开放是很重要的。这也是我考察其他程序员一个”另类”的标准, 技术范围、编程思想、视野的开放等等,这也无疑也成就不同程序员各自的夜郎之国。不得不说这是一个很现实也很悲哀的事情。但愿你的提醒能唤醒更多的程序员同行….

      Qinw:

      很好,和我的学习方向一致,这就是大师的学习方式,金字塔学习法。我现在也一直在学习其他语言,像ruby,python C/c++, 汇编等,发现这个世界原来是那么大,那么精彩,最主要的是让我激情源源不,但现在脱离IDE我的技术还不行,玩过,但我经常崩溃而死。

      东风31:

      非常棒的文章。也许,在国内,只有这种兴趣,这种孜孜不倦的探索与追求,才能在技术领域 make a difference.

      一杰:

      对于本文的理解,不对的请指点:其主要宗旨是多接触行业内的事物,开拓思维,才能深入其本质,不只是从微观的角度分析与理解自有的语言(不仅是.NET程序员);只有宏观的看待事物才能更好的把握住好的方向;

      学习或使用语言也是一种投资;从投资学的角度说:就是所有的鸡蛋放在一个篮子里,风险很高,因为谁也不能保证你的篮子是永久存在的或品质优良;多关注周围的篮子,就可以发现自有篮子的不足,才可以修补当前篮子的不足;当然也可以换一只更加优秀的篮子来投资,谁会害怕有更好的收益呢?

      空明流转:

      @午后的小睡

      MSVC从2002开始,就开始对标准有很好的兼容性了。你懂不懂为什么VC6对标准兼容不好啊?因为VC6在标准之前推出的。用的是当时标准的草案。VS2010?你看看GCC 4.5的Feature list,再看看C++1x的标准草案,你就懂了。

      老坏猫:

      实际上,感觉这里很多喜欢不喜欢.NET的人其实并不了解.NET。一个真正的.NET高手要了解计算机体系的绝大部分知识,并能权衡利弊,妥善运用。大部分还不熟练.NET的人企图浅尝辄止学其他语言,不仅起不到楼主所谓集思广益的效果,反而狗熊掰包谷一样一事无成。

      李晓强:

      引用

      Jacky Song:真正的程序员肯定不会限定在.net平台,程序员就是为了解放生产力,提高工作效率而生的。其实除.net以外,还有其他很好玩的技术或工具,比如你所说的编辑器之神vim, 无论是windows平台还是linux平台, 都是其它编辑器无法比拟的(谁用谁知道)。脚本的话python, php, 以及各平台的shell, 这些都是可以大大的提高工作效率。总之,计算机就是一门艺术,越往里面研究越觉得它是划时代的奇迹,这玩意太神奇了!!

      额,这个所谓的神器VIM不知道有没有如下功能:

      1) 脚本智能提示,那种简单的关键字提示的就别说了。(别说我菜,大多数情况下我还是记得API的,但是一个回车就能节约输入的情况下,我觉得还是值的,而且作为一个Web开发人员,很无奈至少我需要同时使用CSS,HTML,JS�用CSS,HTML,JS,C#,VB.NET).

      2) 格式化代码,我是个很懒的人,比如写XHTML属性懒得写引号,写C#,js之流的代码不想手工用Tab键格式化代码,所以我需要一种一个快捷键就能按照我设定的规则来格式化我的代码的工具。(Ctrl+E,D VS中轻松搞定)

      3) 项目管理,额,现代的程序员,通常都是把自己的代码分成各个项目来开发的。

      4) 版本控制和团队协作工具(BUG管理,任务分配之类的)。

      如果没有,请记住这句话:VIM和VS不具有可比性,一个只是文本编辑器,另一个是IDE;一个是播种机,一个是联合收割机…

      另外VS的快捷键用起来比VIM有效率多了,我用VS基本上不用鼠标的。

      思考-总结:

      楼主,顶你,我觉得说的很有道理的。

      举个例子说明下,很多人用nhibernate ,里面的实体类,要么继承于接口,要么是virtual的。但是java下,好像就没有这个限制? 为什么呢?其实深究下,能明白,java下都是virtual call, 而在.net, 为了提升效率,有call 和 virtual call 之分。 之后再看看 ioc 的实现原理,大概也能明白一些了。

      其实很多技术是相通,你在看别的技术的时候,可以带着自己所熟悉的平台的问题, 去学习和去看,一是开阔了眼界,另外对你理解自己熟悉的平台有更深入的理解。

      读书也是,很多人基本上看书和资料,都是走马观花,基本上看完就忘, 如果能做到带着问题去看,或者看的时候能想着自己曾经遇到过的同类的问题,吸收新的知识,会更快更牢更扎实。

      李晓强:

      哎,发现很多人骂微软技术更新快的。这个IT本来就是个快速发展的行业,发展快总比发展慢要好吧,我觉得微软发展的还是有点慢了。knect之类的技术要是早出现几年多好啊,啥时候才能达到让计算机扩展人的大脑的思维能力啊…比如我一个想法能够查询全中国的资料文献。

      Jacky Song:

      @李晓强

      vs本身是集开发,编译为一体的,但论文本编辑功能,vs能实现的,没有vim搞不定的,vs搞不定的,vim同样能搞定(智能提示,自动完成,列操作,语法高亮….) 都可以自己配,网上n多vim的牛比插件,你试用以后就知道他的强悍,vim在文本编辑器领域当之无愧是No.1。

      EricZhang(T2噬菌体) :

      @李晓强

      呵呵,说起来还是Windows程序员和*nix程序员在思考问题方式上的不同。您作为Windows程序员,习惯使用大而全的东西。而*nix程序员习惯把小而灵巧的东西组合起来使用,例如您说到的版本控制,vim本身当然不会有,因为vim对*nix程序员来说就是编辑器,版本控制我们有svn和git啊,我们也可以通过配置(vim或emacs的可配置性和可扩展性超乎你的想象)将snv或git更方便地集成到vim中。至于代码格式化,VS给你提供了有限的功能,而vim或emacs提供了无限的可能,只要有需要,自己写扩展脚本就行了,例如你在emacs下输入“M-x sort lines”看看效果。至于您提到的智能提示啥的在vim中更是小菜一碟,插件遍地飞。最后,我绝不是说IDE不好,只是说习惯了IDE的朋友抽点宝贵时间适当脱离IDE玩玩vim和shell会更好。

      李晓强:

      额,这个各种编辑器啥的没少玩,就是觉得忒麻烦了,生产力太低。在了解VS做了什么的情况下,我觉得嘛,有奔驰,完全没必要骑自行车。呵呵,个人意见。大家引入计算机就是为了降低难度,省点脑细胞,你要说我用个Emacs,VIM还得自己写写脚本扩展(何况格式化源代码之类的扩展不是一两百行代码就能搞定的事儿),那还是有点不合适吧。

      @Jacky Song

      呵呵,自动完成,列操作,语法高亮这种就不说了,大家都有,没啥好比较的。智能提示就不一样了,VS的智能提示有类型推断而且针对.NET 平台和JS的智能提示更是编译性的,何况VIM那么多扩展插件良莠不齐…WIN下使用VIM装插件后,崩溃的不是一次两次啊。不说了,个人意见,不过最牛的是VS可以在装了一些插件后切换成VIM模式,完全可以满足您的要求。

      Jeffery Zhao:

      其实吧,VIM的确是好东西,但是举例子的时候一定要靠谱,比如文章里写的东西,直接ctrl+c,ctrl+v,和yyp是一个效果,不用选中该行的。光标到行首,也是一个home键搞定。VS也有快捷键,也可以扩展,用起来也可以不碰鼠标。VS连VIM插件都有,也有不少人用,我也在用,既可以VIM又有智能提示。说到智能提示啊重构啊,在VIM要做到VS,NetBeans这种程度也是很难的,插件找不到好的(你说你不需要则是另一回事情了)。

      徐少侠:

      本质是同意楼主的说法的。问题是楼主的打击面太大。尤其是那个IDE的说法。不过其实楼主说的很清楚,是在工作之余去耍耍。耍过了,尤其是经历了编译的全流程。会学到和领悟到更多的。而工作的时候,快捷键的优势足以将vi搞下去了。不用IDE,不是仅仅不用它,而是为了去体会平时更多我们不去体会的东西。

      llzhzhbb:

      我觉得程序员应该把自己经常考虑的问题作一下分析,哪些是和语言及平台相关的,哪些是和语言无关的。比如数据结构、通信、图形、外接设备等,绝大部分都和语言无关;嵌入式系统、驱动等,和语言及平台的关系较大,不过更多的还是与操作系统的知识有关。把问题的这些层面剥离之后,真正和语言相关的其实并不多。语言不过是提供了一个门,人们可以从这个门进去观看大厅里的东西,或者语言是一种交流的工具,人们只是采用了这一种语言和某个庞然大物对话,而这些真正的交流对象,不会天然的歧视你从哪个门进入或者采用何种语言。

      gussing:

      引用

      午后的小睡:
      VC++对标准支持的烂,这个所有用过VC++的人都知道,据说到了2008比较好了,但是到了2010就是另一番天地了。你现在用VS2010生成一段C++ HelloWorld,你去给C++程序员看,他肯定说,这是什么C++?这是.net代码吧。

      有的人就是分不清c++和c++/cli之间的区别。。。不过这个真怪微软,搞c++/cli这么废的东西。。
      vs2010对c++标准的支持是最好的,没有之一,具体请自行google

      午后的小睡:

      @gussing

      我确实没仔细看,我也知道不去理会那个自动模板可以写纯C++,可能我真的是在FUD吧,不过我没太理会编译出来的代码到底是CLI还是Native Code。不过, VS2010确实在某些方面和GCC4解释的不太一样,我记得在声明会抛异常的函数时,是否需要列举异常这个方面,两个编译器有一个就会吐警告,另一个不会,我当时懒得再去翻看标准文档里是怎么叙述这一段了。VS2010就用了一下,印象是对C++语法进行了扩充,还提供了很多替代标准库的东西进去,我记得很多年前Windows号称posix标准完全兼容,那个时候我水平差,怎么也没能顺利的使用posix标准库,最后程序与系统打交道的部分全使用的是Windwos API。还是那句话,不论是什么,微软一定会通过再发明一遍轮子的方法尽量让你写微软工具粘合的东西。

      小鱼仔:

      (╯▽╰)╭,.NET平台不够好吗?为什么这年头总有些人明明很简单的东西(用C#实现)要用那些很复杂而且效率低下的语言或工具去实现呢?显拽吗?同为做一个项目,我用.NET一个星期,你用汇编做了两年,我会认为你很牛逼吗?谁说.NET的程序员就菜,Microsoft Press的英文原版书你看过多少(像《CLR via C#》),研究过多少高级编程?技术没有好坏之分,只有适不适合之分。每一种技术都有它最擅长发挥重要的地方,你没看到人家卓越网那么大的也是aspx堆出来的代码,可咱们学校的教务网站也是ASP.NET写的,但是超过一千人网上选课就崩溃了!那些做网站的老师还在抱怨C#太烂,还没有某某…好呢?那你用记事本写HTML去堆吧,我会觉得你真的很牛逼!你何不说我就在一台裸机上连续按0和1,一个上午一个操作系统就出来了,那你更牛逼了!学.NET没有错,它本身就是一把锋利的刀,不要再去像其它语言一样去磨了,但是你不能因为它已经够锋利了而放低对自己的要求,只满足于拖拖控件,那才是真正的让人鄙视。真正的.NET庞大着呢。

      Ivony…:

      引用

      EricZhang(T2噬菌体):“呵呵,说起来还是 Windows程序员和*nix程序员在思考问题方式上的不同。您作为Windows程序员,习惯使用大而全的东西。而*nix程序员习惯把小而灵巧的东西组合起来使用,例如您说到的版本控制,vim本身当然不会有,因为vim对*nix程序员来说就是编辑器,版本控制我们有svn和git啊,我们也可以通过配置(vim或emacs的可配置性和可扩展性超乎你的想象)将snv或git更方便地集成到vim中。至于代码格式化,VS给你提供了有限的功能,而vim或emacs提供了无限的可能,只要有需要,自己写扩展脚本就行了,例如你在emacs下输入“M-x sort lines”看看效果。至于您提到的智能提示啥的在vim中更是小菜一碟,插件遍地飞。”

      LZ再一次的把程序员人为的划分阵营,这个习惯不好,必须指出。

      那么来讨论问题。
      就说那个无聊的yyp,事实上VS也有很多插件,也能整个Zhuangbility插件来解决yyp的问题,那是不是VS也就成为神器了?
      开拓眼界是好的,不同平台的用户习惯不同也是对的。但外国的月亮就是圆的这就不对了。
      顺带说yyp,一般一个标准的Windows用户(我)是这样做的:
      HomeShift + ↓ + Del + Ins + Ins。

      这不见得比yyp要繁琐(事实上先要搞清楚自己在编辑状态还是命令状态和学习适应就要花掉一段时间),也不觉得会慢零点多少秒,其次,这个方法在VS、记事本、Word、或是现在这个博客园的输入框里面都能用。请问那个神器要怎么才能搞定?

      huhuc:

      不要这么急着发表自己看法,像yyp这样的功能通过宏就可以实现,而且很多编辑器就自带复制当前行功能,就算没有,很多编辑器都可以写插件的,就算还没有,还可以像SQL Assistant那样Hook窗口过程,或者通过发送Windows消息读写文本。设计模式这种书,千万不要看,浮躁且肤浅。我买过一本2手,看了下目录,和其它书一起论斤卖了。

      inhesoft:

      vim和vs不是一个级别的东西,不能相比,单纯从编辑器的角度来看,vim是很好,个人感觉,vim并不太适合windows下编程,而是适合unix下编程,unix下编程,函数名都很短,一般推荐都用小写,而windows下的.net和win32 api函数我都很长,还要分出大小写,用起来就累了,各有各的长处。顺带说一句,vim的o相当与vs的下的shift+enter,不是有些同志说的ctrl+c。

      curer:

      你的本意是好的,但是在这篇文章中却隐隐有把自己的观点强加到所有.net开发者上。这种强盗逻辑是不是又掉入另一个盒子中了?每个人都有自己不同的经历,把MS,Google大牛的例子生生的加在每个人身上合适么?换句话,加在自己身上就肯定合适么?呵呵,送T2一句话“求同存异”。 不管是大牛,还是菜鸟。都有我们值得学习的地方。和大牛对话能够给出醍醐灌顶的畅快,和菜鸟对话则可以给我们发掘自己知识体系中的漏洞。和菜鸟对话,因为那是一种全新的角度。甚至在我看来比大牛对话更有收获。因为不仅能够收获自己,还能和更多地人分享。

      你发现别人总是不能理解自己的意思,为什么不反过来思考一些,这么多人反对,是不是自己有不足?因为这篇文章的漏洞太多了,是不是应该抓紧机会重新回顾下?这种经验类文章,本没有对错。只是我们大部分都是典型的理科生,在隐隐的数学思维习惯支配下,你文章中只要有漏洞,那么你推出的结论就是大家不能接受的。更不说,这篇文章漏洞百出。

      可以准确的说,从这篇文章的本意来看,并不算是一篇有价值的。但是你却可以反过来获得更多的知识。想要成为大牛,关键是能不能包容别人的不同观点,并从中吸收经验。而不是消极的说“手贱,不该写”这类消极的语言。呵呵,其实有这么多人纠你的错误,自己反而应该感到幸福。真的,我已经很羡慕你了。

      fxs:

      作为一个已经使用4年的 Linux人,我之前一值是使用Ubuntu,在公司的时候,电脑也是装的Ubuntu,里面跑Virtualbox的xp做一些photoshop切图的事情,后来烦Ubuntu不停更新,而且系统比较耗资源,换成debian一直用着。我用Linux不是为了装B,而是习惯了,因为Xp经常中毒,而我又没有钱买高配置的电脑,也忍受不了杀毒软件占据的资源,用了这么久的Linux做过的PHP网站也很多了,并没有像你说的那样神乎其神,告诉你Linux其实一点都不好用,shell?这个玩意垃圾的要死,我这几天写个脚本来自动压缩所有的js代码,当然先是shell遍历js文件,然后调用YUI的compressor,你以为shell多好用?连个子字符串查找功能都没有,要剔除一些文件,还得借助awk,不要鼓吹vim,我在服务器上改东西必须用vim(难道指望用nano?),但是平常开发还是用Netbeans,别的不说,光是按Esc键都能让你发火,因为早期的键盘是ESC键在现在的Tab键位置,所以很好按到,但现在你基本买不到这样的键盘了。你鼓吹VIM,可见你并不熟练使用VIM。

      Linux/UNIX界的东西混乱的不是你能想像到的,我们公司服务器有Debian, Freebsd, CentOS这三个系统,光是apache的配置文件路径,Freebsd, CentOS, Debian这三个系统都放置的不一样,程序的安装路径更是乱七八糟,你真正整天跟这些个系统打交道,就能把你烦死。也只有你不懂,或者只懂个皮毛的时候,才会觉得Linux/UNIX有多么高明,对于.NET不想多说,我之前写过两年的.NET,不喜欢那些懂点Linux/Unix的人在.NET界鼓吹Linux/Unix,并嘲笑.NET程序员,打鱼的嘲笑种田的,实在是没有什么意思!

      你以为你懂那么多语言术语就很牛了?程序员应该专一,而不是像你那样博而不专,你跟我很像,你提到过的术语我都了解,还有很多你没提到的我也了解,Haskell,Ocaml,你用过没?Perl/Ruby/TCL脚本写过没?GTK+写过没?每半年学一种语言,到最后你就成了什么都不会了,专一 一点吧!

      还有推荐你看一本书《UNIX痛恨者手册》,UNIX界不是你想像中的那么美好。

      省油的灯:

      先赞一个,这么年轻就有如此见的,英雄出少年,了不起!每个人都困在盒子里,是每个人思维的界限。不仅仅是自己建造的,也是企业文化和社会文化建造的。如果要批判的是一个群体,我认为关注国内程序员(其实C++程序员也是同样的现状)生存的土壤(哲学上又叫唯物史观):粗制滥造的设计,高耦合度成为主流,低水平的重复开发。有的程序员周末都没时间来看你的大作,还在加班做低水平的维护,这将耗尽他们的青春,你会不会觉得他们是闰土?试问这样的土壤怎么能生长出参天大树(林)?当然,这样的现状背后有它的原因的原因(哲学上又叫第一因)。

      curer:

      事实上,我觉得,如果你还有精力或是有不服输的精神,更应该再写一篇更加严谨的文章来解释自己的想法。没办法,谁让大家都是理科生呢。要知道我们可不是抱着看穿越小说的心态来看的。

      +
      +]]> + + 最近添加 + + + C# + wordpress + .NET + +
      + diff --git a/set-win7-wireless-share.html b/set-win7-wireless-share.html index 96359ff1..e4b2e752 100644 --- a/set-win7-wireless-share.html +++ b/set-win7-wireless-share.html @@ -1,168 +1,156 @@ -设置Win7无线网络共享 | all4fun blog +设置Win7无线网络共享 | 王恒's Blog - + - + - - + + -

      设置Win7无线网络共享

      + })(window)

      设置Win7无线网络共享

      有时候难免碰到多个人需要上网却只有一根网线的情况,其实WIN7系统里还有很多有意思的东西我们没有用过,例如,方便设置WIN7的无线网卡,来实现共享WIFI上网。如果你电脑上同时有无线和有线网卡不妨试试,下面就来说一下设置过程:

      方法一:

      @@ -171,20 +159,18 @@

      2、设置“虚拟Wifi网卡”模式

      敲入命令:

      netsh wlan set hostednetwork mode=allow ssid=Master_Share key=1234567890

      -
      image +
      image

      其中:


      Mode:是否启用虚拟Wifi网卡,改为disallow则为禁用

      Ssid:设定无线网络的名称

      Key:设定无线网络的密码。

      -

      执行完以后我们会在网络适配器里面看到一个“无线网络连接4“的虚拟网卡(一般情况是无线网络连接2,因为我机器曾接入多块无线网卡故为无线连接4)Smile

      -image - +

      执行完以后我们会在网络适配器里面看到一个“无线网络连接4“的虚拟网卡(一般情况是无线网络连接2,因为我机器曾接入多块无线网卡故为无线连接4)Smile

      +

      image

      3、启用“Internet连接共享”

      打开控制面板找到并打开“网络和共享中心”窗口,右键单击已连接到Internet的网络连接,选择“属性”,切换到“共享”选项卡,选中其中的复选框,并选择允许其共享Internet的网络连接在这里即我们的虚拟Wifi网卡。

      -image - +

      image

      确定之后,提供共享的网卡图标旁边会出现“已共享”标志

      在命令提示符中运行以下命令:

      netsh wlan start hostednetwork

      @@ -193,29 +179,23 @@

      是否能够上网了呢?

      方法二:(推荐)

      更酷的玩法:

      -

      其实配置无线有更简单方便的方法 Smile

      +

      其实配置无线有更简单方便的方法 Smile

      1、首先确保所有的网卡都没有设置Internet连接共享,如果设置过,请取消共享。

      打开控制面板->网络和共享中心->设置新的连接或网络

      选择“设置无线临时(计算机到计算机)网络”并点击下一步

      -image - +

      image

      出现的窗口中输入你的无线网络名称和密码,注意安全类型选择WEP以方便设置(其实平时也不会总开着无线共享,所以也没必要非要wap2)。

      -image - +

      image

      下一步继续,出现的窗口中选择启用Internet连接共享,(后面还可能让你选择已经接入网络的网卡,请正确选择)

      -image - -image - +

      image

      +

      image

      成功后无线状态显示为正“等待用户”~~

      -image - +

      image

      用手机搜索一下无线信号,输入正确的密码来使用共享的无线网络。

      疑难解答:

      如果你前面的步骤不成功。

      1、请检查你提供共享的无线网卡(虚拟WIFI或方法二的无线网络2)的IP设置,确保配置如图所示:(DNS可以不用填)

      -image - +

      image

      2、手机或者其他终端如果自动获取的IP跟上面图的IP地址不在一个网段(不是192.168.137.X),请在终端选择手动设置IP,设置如下:

      IP地址:192.168.137.2

      子网掩码:255.255.255.0

      @@ -226,61 +206,37 @@

      2、有线共享给无线

      3、无线共享给有线(哈哈,这个给力吧,曾经大二的时候就通过这种方法跟同学一起联网上浩方,好怀念!)

      好了,其实Windows系统还是很强大的!有任何问题的朋友可以留言共同学习~!

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/set-win7-wireless-share.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/setup-vpn-the-server.html b/setup-vpn-the-server.html index 8d1621ec..2666afce 100644 --- a/setup-vpn-the-server.html +++ b/setup-vpn-the-server.html @@ -1,169 +1,157 @@ -Ubuntu 搭建 Vpn 服务 | all4fun blog +Ubuntu 搭建 Vpn 服务 | 王恒's Blog - + - + - - + + - + -

      Ubuntu 搭建 Vpn 服务

      + })(window)

      Ubuntu 搭建 Vpn 服务

      最近通过优惠券买了一个美国的VPS,虽然配置低了点,但是用来做平时网站的备份,或者临时当作离线下载服务器都是很不错的主意!因为国内周知的原因,访问一些国外的网站很受限制,所以想起了用自己的VPS来搭建一个VPN的想法。具体实现如下:
        @@ -189,61 +177,37 @@ 不能的话,问题应该出在第5-6步,看看是否正确设置了 ipv4 forward
        测试是否可以解析DNS:
        nslookup google.com
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/setup-vpn-the-server.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/share-ipad2-jailbreak-tool.html b/share-ipad2-jailbreak-tool.html index cdef3914..77b621c9 100644 --- a/share-ipad2-jailbreak-tool.html +++ b/share-ipad2-jailbreak-tool.html @@ -1,173 +1,160 @@ -分享iPad2越狱工具 | all4fun blog +分享iPad2越狱工具 | 王恒's Blog - - + + - + - - + + -

      分享iPad2越狱工具

      + })(window)

      分享iPad2越狱工具

      过年在家看书学习之余,也有了闲工夫折腾一下ipad。虽然个人不提倡盗版,并且平时用到的工具ipad上也都装了。但越狱可不仅仅是为了装盗版,呵呵。顶着越狱后系统可能出现各种问题的压力,为了以后更方便的各种折腾,果断越了!

      附图:

      -越狱后 - +

      越狱后

       

       

       

      @@ -180,61 +167,37 @@

      工具是傻瓜式的一键越狱,跟除夕时候放出的命令行越狱工具没太大本质区别,不过GUI工具却是修复了一些小bug,所以对需要的朋友还是推荐使用GUI工具。 :)

      下面是工具的下载地址:

      点击下载

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/share-ipad2-jailbreak-tool.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/share-personal-wiki-deployment-script.html b/share-personal-wiki-deployment-script.html index 2bd6245c..968d75d4 100644 --- a/share-personal-wiki-deployment-script.html +++ b/share-personal-wiki-deployment-script.html @@ -1,14 +1,14 @@ -分享个人wiki部署脚本 | all4fun blog +分享个人wiki部署脚本 | 王恒's Blog - + - + - - + + @@ -17,169 +17,158 @@ -

      分享个人wiki部署脚本

      -上一篇介绍了如何使用vimwiki组建个人wiki,但是如何同步自己的vimwiki 到线上却成了很多人的困扰。丘迟的维基世界介绍了同步 vimwiki 到线上的各种方法,如果你的桌面是使用linux的话,当然问题不大,很轻松就能写出一个同步的脚本。但是还是有很多人平时工作在windows的系统环境中,这里我自己写了一个vim的小插件用来一键同步vimwiki到线上。 + })(window)

      分享个人wiki部署脚本

      +上一篇介绍了如何使用vimwiki组建个人wiki,但是如何同步自己的vimwiki 到线上却成了很多人的困扰。丘迟的维基世界介绍了同步 vimwiki 到线上的各种方法,如果你的桌面是使用linux的话,当然问题不大,很轻松就能写出一个同步的脚本。但是还是有很多人平时工作在windows的系统环境中,这里我自己写了一个vim的小插件用来一键同步vimwiki到线上。

      首先分析一下这个同步需求:


      1. 需要自动同步 vimwiki_html 的所有文件

      2. 有变更的文件才同步上去

      3. 被删掉的文件也要能同步删掉

      4. 由于文件修改频繁,不需要一旦修改就马上同步

      5. 有需要时可以手动同步

      6. 最好能排除一些不用放在线上的文件

      7. 不能占用太多系统资源

      这里我将vimwiki生成的html托管在了自己的github上面,此vim脚本的运行需要依赖你gvim对应版本的python,或者自己在windows下编译一个gvim。(好吧,这个实在够蛋疼。。。)

      安装并配置你的github

      首先关闭360安全卫士等流氓软件!切记!

      从github下载github for window,链接如下:

      http://github-windows.s3.amazonaws.com/GitHubSetup.exe

      -

      安装完成后,用你的账号登录,然后在tools/options中设置默认的shell为cmd,如下图:
      image

      +

      安装完成后,用你的账号登录,然后在tools/options中设置默认的shell为cmd,如下图:

      +

      image

      完成后双击桌面上的git shell图标,打开git shell 后执行如下命令

      echo %path% >>c:\path.txt

      打开c:\path.txt 将里面的内容全部复制,粘贴到系统的path变量中(覆盖原来的path)。完成此步骤后,cmd中会使用github生成的配置进行ssh的key-agent验证登录,故实现了git命令免密码的效果。完成后,运行cmd,输入git,能识别这个命令表示成功。然后就可以使用我写的这个脚本了(汗,脚本依赖有点高~~)

      脚本的代码如下:

      "=========================================================
      -

      " FileName: vimwiki_sync.vim
      " Desc:
      " Author: WangHeng
      " Email: me@wangheng.org
      " HomePage: http://wangheng.org
      " Version: 1.1
      " LastChange: 2012-07-19 22:32:39
      " History: 1、2012-07-20 暂时注释VimwikiGet('path_html')
      " 不好用原因待研究
      "=========================================================

      +

      " FileName: vimwiki_sync.vim
      " Desc:
      " Author: WangHeng
      " Email: me@wangheng.org
      " HomePage: http://wangheng.org
      " Version: 1.1
      " LastChange: 2012-07-19 22:32:39
      " History: 1、2012-07-20 暂时注释VimwikiGet('path_html')
      " 不好用原因待研究
      "=========================================================

      " let s:wiki_html_path=VimwikiGet('path_html')这条命令有时候不好用,故暂时注释掉
      if !has('python')
      echo "Git Auto Upload Error:\nRequired vim compiled with +python"
      finish
      endif

      function! s:Vimwiki_Upload()

      python <<EOF
      import os
      import time

      @@ -191,61 +180,37 @@

      点击这里下载。

      使用方法是在vim的普通模式下按F11,另外你还可以将中间的那段python代码提出来作为一个单独的python脚本,这样你就可以将它加到计划任务定时执行了,有需求的朋友可以试试~~任何问题欢迎留言交流~

      -

      文章作者: all4fun
      文章链接: http://wangheng.org/share-personal-wiki-deployment-script.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      \ No newline at end of file +} + \ No newline at end of file diff --git a/shi-yong-parted-chuang-jian-gpt-fen-qu.html b/shi-yong-parted-chuang-jian-gpt-fen-qu.html index 6e699e0b..3912a60f 100644 --- a/shi-yong-parted-chuang-jian-gpt-fen-qu.html +++ b/shi-yong-parted-chuang-jian-gpt-fen-qu.html @@ -1,165 +1,153 @@ -使用parted创建GPT分区 | all4fun blog +使用parted创建GPT分区 | 王恒's Blog - + - + - - + + -

      使用parted创建GPT分区

      + })(window)

      使用parted创建GPT分区

      操作环境:

      CentOS Linux 6.5

      @@ -182,61 +170,37 @@

      (parted) print
      Model: DELL PERC 6/i Adapter (scsi)
      Disk /dev/sda: 500GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Number  Start   End    Size   File system  Name     Flags
      1      17.4kB  500GB  500GB               primary

      (parted)quit
      Information: You may need to update /etc/fstab.
      root@me:/#mkfs.ext4 /dev/sda1
      mke2fs 1.41.12 (17-May-2010)
      文件系统标签=
      操作系统:Linux
      块大小=4096 (log=2)
      分块大小=4096 (log=2)
      Stride=0 blocks, Stripe width=0 blocks
      30490624 inodes, 121962487 blocks
      6098124 blocks (5.00%) reserved for the super user
      第一个数据块=0
      Maximum filesystem blocks=4294967296
      3722 block groups
      32768 blocks per group, 32768 fragments per group
      8192 inodes per group
      Superblock backups stored on blocks:
      32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
      4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
      102400000
      正在写入inode表: 完成
      Creating journal (32768 blocks): 完成
      Writing superblocks and filesystem accounting information: 完成
      This filesystem will be automatically checked every 24 mounts or
      180 days, whichever comes first.  Use tune2fs -c or -i to override.

      这样我们就完成了分区的创建以及格式化,其他分区步骤类似,全部完成并装好系统我们可以编辑/etc/fstab 文件以实现开机自动挂载分区。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/shi-yong-parted-chuang-jian-gpt-fen-qu.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/site-backup-to-ftp-and-dropbox.html b/site-backup-to-ftp-and-dropbox.html index 353abc8b..f4176d98 100644 --- a/site-backup-to-ftp-and-dropbox.html +++ b/site-backup-to-ftp-and-dropbox.html @@ -1,168 +1,156 @@ -备份网站到FTP和Dropbox脚本 | all4fun blog +备份网站到FTP和Dropbox脚本 | 王恒's Blog - + - + - - + + -

      备份网站到FTP和Dropbox脚本

      + })(window)

      备份网站到FTP和Dropbox脚本

      发一个一键备份脚本,可以将网站文件和数据库备份到FTP和Dropbox,可以从这里下载autobackup. 1、配置dropbox_Uploader.sh
      运行dropbox_sync.sh,根据提示完成dropbox的授权。
      2、自动备份脚本autobackup.sh内容
      #!/bin/bash
       #你要修改的地方从这里开始
      @@ -224,61 +212,37 @@
       00 00 * * * /root/bin/autobackup.sh
       
      其中00 00为时间分/小时,可自行修改,例如:30 12 ***,就是每天12.30运行这个脚本。
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/site-backup-to-ftp-and-dropbox.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/solve-the-mysql-remote-connection-is-lost.html b/solve-the-mysql-remote-connection-is-lost.html index 71e50404..4999e67a 100644 --- a/solve-the-mysql-remote-connection-is-lost.html +++ b/solve-the-mysql-remote-connection-is-lost.html @@ -1,166 +1,154 @@ -解决MySQL远程连接丢失问题 | all4fun blog +解决MySQL远程连接丢失问题 | 王恒's Blog - + - + - - + + -

      解决MySQL远程连接丢失问题

      + })(window)

      解决MySQL远程连接丢失问题

      最近服务器很不稳定,于是重装了mysql 和php 服务,但是接着却遇到了很头疼的麻烦。 远程连接mysql是总是提示: Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 @@ -176,61 +164,37 @@

      skip-name-resolve
      保存文件并重启MySQL:

      /etc/init.d/mysql restart

      这样就会发现,问题已经解决了!远程连接不会丢失了。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/solve-the-mysql-remote-connection-is-lost.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/tags/10-1/index.html b/tags/10-1/index.html index f3632e02..05b82c88 100644 --- a/tags/10-1/index.html +++ b/tags/10-1/index.html @@ -1,145 +1,148 @@ -标签: 10.1 | all4fun blog +标签: 10.1 | 王恒's Blog - + - + - + -
      标签 - 10.1
      2011
      Ubuntu 10.10 更新源总结
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Ant/index.html b/tags/Ant/index.html index cfd169f1..192a0a9b 100644 --- a/tags/Ant/index.html +++ b/tags/Ant/index.html @@ -1,145 +1,148 @@ -标签: Ant | all4fun blog +标签: Ant | 王恒's Blog - + - + - + -
      标签 - Ant
      2011
      Globus Toolkit 安装与配置
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Apache/index.html b/tags/Apache/index.html index 08228d0e..3429d4f3 100644 --- a/tags/Apache/index.html +++ b/tags/Apache/index.html @@ -1,145 +1,148 @@ -标签: Apache | all4fun blog +标签: Apache | 王恒's Blog - + - + - + -
      标签 - Apache
      2012
      windows下用pear安装symfony
      Windows下安装PHP Pear
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Apache2/index.html b/tags/Apache2/index.html index a5e622f9..6a32eef5 100644 --- a/tags/Apache2/index.html +++ b/tags/Apache2/index.html @@ -1,145 +1,148 @@ -标签: Apache2 | all4fun blog +标签: Apache2 | 王恒's Blog - + - + - + -
      标签 - Apache2
      2012
      Apache2配置多域名
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Apple/index.html b/tags/Apple/index.html index 840a2212..7ed4cc1c 100644 --- a/tags/Apple/index.html +++ b/tags/Apple/index.html @@ -1,145 +1,148 @@ -标签: Apple | all4fun blog +标签: Apple | 王恒's Blog - + - + - + -
      标签 - Apple
      2012
      apple keyboard helper苹果键盘tools
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/AutoProxy/index.html b/tags/AutoProxy/index.html index 1e8bf866..b4db0a0f 100644 --- a/tags/AutoProxy/index.html +++ b/tags/AutoProxy/index.html @@ -1,145 +1,148 @@ -标签: AutoProxy | all4fun blog +标签: AutoProxy | 王恒's Blog - + - + - + -
      标签 - AutoProxy
      2012
      使用ScribeFire离线编写博客
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/C/index.html b/tags/C/index.html index 6fee5c1f..f309dba6 100644 --- a/tags/C/index.html +++ b/tags/C/index.html @@ -1,145 +1,148 @@ -标签: C# | all4fun blog +标签: C# | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Cron/index.html b/tags/Cron/index.html index cc743bab..5dfb555a 100644 --- a/tags/Cron/index.html +++ b/tags/Cron/index.html @@ -1,145 +1,148 @@ -标签: Cron | all4fun blog +标签: Cron | 王恒's Blog - + - + - + -
      标签 - Cron
      2012
      高效办公辅助工具Autohotkey
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/DIY/index.html b/tags/DIY/index.html index 52b237fc..475531ba 100644 --- a/tags/DIY/index.html +++ b/tags/DIY/index.html @@ -1,145 +1,148 @@ -标签: DIY | all4fun blog +标签: DIY | 王恒's Blog - + - + - + -
      标签 - DIY
      2011
      Razer Krait 鼠标换微动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/DNS/index.html b/tags/DNS/index.html index c77e8ceb..e7cf496d 100644 --- a/tags/DNS/index.html +++ b/tags/DNS/index.html @@ -1,145 +1,148 @@ -标签: DNS | all4fun blog +标签: DNS | 王恒's Blog - + - + - + -
      标签 - DNS
      2012
      Linux临时或永久修改DNS
      2011
      北京联通DNS劫持!
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Darwin-Streaming-Server/index.html b/tags/Darwin-Streaming-Server/index.html index cd11f461..611101db 100644 --- a/tags/Darwin-Streaming-Server/index.html +++ b/tags/Darwin-Streaming-Server/index.html @@ -1,145 +1,148 @@ -标签: Darwin Streaming Server | all4fun blog +标签: Darwin Streaming Server | 王恒's Blog - + - + - + -
      标签 - Darwin Streaming Server
      2012
      Linux编译安装Darwin Streaming Server 6.0.3
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Dropbox/index.html b/tags/Dropbox/index.html index bccda324..91e7a1b8 100644 --- a/tags/Dropbox/index.html +++ b/tags/Dropbox/index.html @@ -1,145 +1,148 @@ -标签: Dropbox | all4fun blog +标签: Dropbox | 王恒's Blog - + - + - + -
      标签 - Dropbox
      2012
      备份网站到FTP和Dropbox脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/FTP/index.html b/tags/FTP/index.html index 295028a7..44e9f22d 100644 --- a/tags/FTP/index.html +++ b/tags/FTP/index.html @@ -1,145 +1,148 @@ -标签: FTP | all4fun blog +标签: FTP | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Firefox/index.html b/tags/Firefox/index.html index aa0edcdd..40fd0699 100644 --- a/tags/Firefox/index.html +++ b/tags/Firefox/index.html @@ -1,145 +1,148 @@ -标签: Firefox | all4fun blog +标签: Firefox | 王恒's Blog - + - + - + -
      标签 - Firefox
      2012
      Linux临时或永久修改DNS
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Font/index.html b/tags/Font/index.html index 18fd63b4..d0580800 100644 --- a/tags/Font/index.html +++ b/tags/Font/index.html @@ -1,145 +1,148 @@ -标签: Font | all4fun blog +标签: Font | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/GCC/index.html b/tags/GCC/index.html index eec2a1ab..29332e4f 100644 --- a/tags/GCC/index.html +++ b/tags/GCC/index.html @@ -1,145 +1,148 @@ -标签: GCC | all4fun blog +标签: GCC | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Globus-Toolkit/index.html b/tags/Globus-Toolkit/index.html index f7a0d046..eb194c7b 100644 --- a/tags/Globus-Toolkit/index.html +++ b/tags/Globus-Toolkit/index.html @@ -1,145 +1,148 @@ -标签: Globus Toolkit | all4fun blog +标签: Globus Toolkit | 王恒's Blog - + - + - + -
      标签 - Globus Toolkit
      2011
      Globus Toolkit 安装与配置
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/IIS/index.html b/tags/IIS/index.html index 2f41eafb..6efebcc6 100644 --- a/tags/IIS/index.html +++ b/tags/IIS/index.html @@ -1,145 +1,148 @@ -标签: IIS | all4fun blog +标签: IIS | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/IOS/index.html b/tags/IOS/index.html index 5a3bad68..5d36a45f 100644 --- a/tags/IOS/index.html +++ b/tags/IOS/index.html @@ -1,145 +1,148 @@ -标签: IOS | all4fun blog +标签: IOS | 王恒's Blog - + - + - + -
      标签 - IOS
      2012
      清除mysql的log-bin日志
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/IP/index.html b/tags/IP/index.html index 5d2b6ea9..427031a0 100644 --- a/tags/IP/index.html +++ b/tags/IP/index.html @@ -1,145 +1,148 @@ -标签: IP | all4fun blog +标签: IP | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Krait/index.html b/tags/Krait/index.html index 41d0fc8c..6f8518f9 100644 --- a/tags/Krait/index.html +++ b/tags/Krait/index.html @@ -1,145 +1,148 @@ -标签: Krait | all4fun blog +标签: Krait | 王恒's Blog - + - + - + -
      标签 - Krait
      2011
      Razer Krait 鼠标换微动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/LAMP/index.html b/tags/LAMP/index.html index 07b4120b..425c2173 100644 --- a/tags/LAMP/index.html +++ b/tags/LAMP/index.html @@ -1,145 +1,148 @@ -标签: LAMP | all4fun blog +标签: LAMP | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Linux/index.html b/tags/Linux/index.html index 1eab95ac..8baa7879 100644 --- a/tags/Linux/index.html +++ b/tags/Linux/index.html @@ -1,145 +1,148 @@ -标签: Linux | all4fun blog +标签: Linux | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Linux/page/2/index.html b/tags/Linux/page/2/index.html index 45dcc4dc..fa8636b5 100644 --- a/tags/Linux/page/2/index.html +++ b/tags/Linux/page/2/index.html @@ -1,145 +1,148 @@ -标签: Linux | all4fun blog +标签: Linux | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/NET/index.html b/tags/NET/index.html new file mode 100644 index 00000000..d23d76b1 --- /dev/null +++ b/tags/NET/index.html @@ -0,0 +1,148 @@ +标签: .NET | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git a/tags/NVIDIA/index.html b/tags/NVIDIA/index.html index fdc843f0..5f3724c7 100644 --- a/tags/NVIDIA/index.html +++ b/tags/NVIDIA/index.html @@ -1,145 +1,148 @@ -标签: NVIDIA | all4fun blog +标签: NVIDIA | 王恒's Blog - + - + - + -
      标签 - NVIDIA
      2012
      安装nvidia官方驱动
      2011
      使用apt-get 安装NVIDIA官方驱动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Openjdk/index.html b/tags/Openjdk/index.html index 54cf9e10..bd61ffa1 100644 --- a/tags/Openjdk/index.html +++ b/tags/Openjdk/index.html @@ -1,145 +1,148 @@ -标签: Openjdk | all4fun blog +标签: Openjdk | 王恒's Blog - + - + - + -
      标签 - Openjdk
      2011
      Globus Toolkit 安装与配置
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Oracle/index.html b/tags/Oracle/index.html index 1aca7187..4718d006 100644 --- a/tags/Oracle/index.html +++ b/tags/Oracle/index.html @@ -1,145 +1,148 @@ -标签: Oracle | all4fun blog +标签: Oracle | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/PHP/index.html b/tags/PHP/index.html index 575993de..af5d6236 100644 --- a/tags/PHP/index.html +++ b/tags/PHP/index.html @@ -1,145 +1,148 @@ -标签: PHP | all4fun blog +标签: PHP | 王恒's Blog - + - + - + -
      标签 - PHP
      2012
      Windows下安装PHP Pear
      简单配置PHP
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Pear/index.html b/tags/Pear/index.html index 4dc4e258..08aaa104 100644 --- a/tags/Pear/index.html +++ b/tags/Pear/index.html @@ -1,145 +1,148 @@ -标签: Pear | all4fun blog +标签: Pear | 王恒's Blog - + - + - + -
      标签 - Pear
      2012
      使用SSH实现iPhone自动代理
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Proxy/index.html b/tags/Proxy/index.html index 46e9a38c..ba7cf4cd 100644 --- a/tags/Proxy/index.html +++ b/tags/Proxy/index.html @@ -1,145 +1,148 @@ -标签: Proxy | all4fun blog +标签: Proxy | 王恒's Blog - + - + - + -
      标签 - Proxy
      2012
      使用SSH实现iPhone自动代理
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Razer/index.html b/tags/Razer/index.html index 720132e8..8aed1de8 100644 --- a/tags/Razer/index.html +++ b/tags/Razer/index.html @@ -1,145 +1,148 @@ -标签: Razer | all4fun blog +标签: Razer | 王恒's Blog - + - + - + -
      标签 - Razer
      2011
      Razer Krait 鼠标换微动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Sort/index.html b/tags/Sort/index.html new file mode 100644 index 00000000..d668d2e4 --- /dev/null +++ b/tags/Sort/index.html @@ -0,0 +1,148 @@ +标签: Sort | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git a/tags/Tunnelier/index.html b/tags/Tunnelier/index.html index bfa5f01b..1eb25171 100644 --- a/tags/Tunnelier/index.html +++ b/tags/Tunnelier/index.html @@ -1,145 +1,148 @@ -标签: Tunnelier | all4fun blog +标签: Tunnelier | 王恒's Blog - + - + - + -
      标签 - Tunnelier
      2012
      实现SSH无密码登录
      为ipad2安装和配置gcc编译环境
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Ubuntu/index.html b/tags/Ubuntu/index.html index a303b4bd..1a40399a 100644 --- a/tags/Ubuntu/index.html +++ b/tags/Ubuntu/index.html @@ -1,145 +1,148 @@ -标签: Ubuntu | all4fun blog +标签: Ubuntu | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Unix/index.html b/tags/Unix/index.html new file mode 100644 index 00000000..f3ba3d04 --- /dev/null +++ b/tags/Unix/index.html @@ -0,0 +1,148 @@ +标签: Unix | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git a/tags/VPN/index.html b/tags/VPN/index.html index a92f3379..f4712f0a 100644 --- a/tags/VPN/index.html +++ b/tags/VPN/index.html @@ -1,145 +1,148 @@ -标签: VPN | all4fun blog +标签: VPN | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/VPS/index.html b/tags/VPS/index.html index 479bb605..bdc060c5 100644 --- a/tags/VPS/index.html +++ b/tags/VPS/index.html @@ -1,145 +1,148 @@ -标签: VPS | all4fun blog +标签: VPS | 王恒's Blog - + - + - + -
      标签 - VPS
      2012
      清除mysql的log-bin日志
      2011
      Ubuntu 搭建 Vpn 服务
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Viki/index.html b/tags/Viki/index.html index f4437622..ccdfc427 100644 --- a/tags/Viki/index.html +++ b/tags/Viki/index.html @@ -1,145 +1,148 @@ -标签: Viki | all4fun blog +标签: Viki | 王恒's Blog - + - + - + -
      标签 - Viki
      2012
      C#实现Windows版Cron
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/WAMP/index.html b/tags/WAMP/index.html index a705ffaa..25cb0307 100644 --- a/tags/WAMP/index.html +++ b/tags/WAMP/index.html @@ -1,145 +1,148 @@ -标签: WAMP | all4fun blog +标签: WAMP | 王恒's Blog - + - + - + -
      标签 - WAMP
      2012
      wamp配置多域名虚拟目录
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Win7/index.html b/tags/Win7/index.html index 32526222..66342a44 100644 --- a/tags/Win7/index.html +++ b/tags/Win7/index.html @@ -1,145 +1,148 @@ -标签: Win7 | all4fun blog +标签: Win7 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Windows/index.html b/tags/Windows/index.html index 8c453fb8..f9bdd168 100644 --- a/tags/Windows/index.html +++ b/tags/Windows/index.html @@ -1,145 +1,148 @@ -标签: Windows | all4fun blog +标签: Windows | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/Windows/page/2/index.html b/tags/Windows/page/2/index.html index 1ded1cab..ba4eb0c9 100644 --- a/tags/Windows/page/2/index.html +++ b/tags/Windows/page/2/index.html @@ -1,145 +1,148 @@ -标签: Windows | all4fun blog +标签: Windows | 王恒's Blog - + - + - + -
      标签 - Windows
      2012
      设置Win7无线网络共享
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/air-video/index.html b/tags/air-video/index.html index c51a3642..4efcfd2b 100644 --- a/tags/air-video/index.html +++ b/tags/air-video/index.html @@ -1,145 +1,148 @@ -标签: air video | all4fun blog +标签: air video | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/apt-get/index.html b/tags/apt-get/index.html index fb86e7ba..c24a1f14 100644 --- a/tags/apt-get/index.html +++ b/tags/apt-get/index.html @@ -1,145 +1,148 @@ -标签: apt-get | all4fun blog +标签: apt-get | 王恒's Blog - + - + - + -
      标签 - apt-get
      2011
      使用apt-get 安装NVIDIA官方驱动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/awk/index.html b/tags/awk/index.html index e837b67d..153aefe2 100644 --- a/tags/awk/index.html +++ b/tags/awk/index.html @@ -1,145 +1,148 @@ -标签: awk | all4fun blog +标签: awk | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/blog/index.html b/tags/blog/index.html index 39d6a624..d941d30b 100644 --- a/tags/blog/index.html +++ b/tags/blog/index.html @@ -1,145 +1,148 @@ -标签: blog | all4fun blog +标签: blog | 王恒's Blog - + - + - + -
      标签 - blog
      2012
      使用ScribeFire离线编写博客
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/coder/index.html b/tags/coder/index.html index b800e7f1..1ef1ee31 100644 --- a/tags/coder/index.html +++ b/tags/coder/index.html @@ -1,145 +1,148 @@ -标签: coder | all4fun blog +标签: coder | 王恒's Blog - + - + - + -
      标签 - coder
      2012
      C#实现Windows版Cron
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/curl/index.html b/tags/curl/index.html index 33d0e4ad..605208e1 100644 --- a/tags/curl/index.html +++ b/tags/curl/index.html @@ -1,145 +1,148 @@ -标签: curl | all4fun blog +标签: curl | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/denyhost/index.html b/tags/denyhost/index.html index 9b91d81e..18c5a82a 100644 --- a/tags/denyhost/index.html +++ b/tags/denyhost/index.html @@ -1,145 +1,148 @@ -标签: denyhost | all4fun blog +标签: denyhost | 王恒's Blog - + - + - + -
      标签 - denyhost
      2015
      linux版快盘上传下载脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/deplate/index.html b/tags/deplate/index.html index 855aa9a1..14a6591c 100644 --- a/tags/deplate/index.html +++ b/tags/deplate/index.html @@ -1,145 +1,148 @@ -标签: deplate | all4fun blog +标签: deplate | 王恒's Blog - + - + - + -
      标签 - deplate
      2012
      使用Vim和Viki来写文章
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/encode/index.html b/tags/encode/index.html index eea32e5b..db4fd574 100644 --- a/tags/encode/index.html +++ b/tags/encode/index.html @@ -1,145 +1,148 @@ -标签: encode | all4fun blog +标签: encode | 王恒's Blog - + - + - + -
      标签 - encode
      2012
      金山快盘丢文件
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/first-blog/index.html b/tags/first-blog/index.html new file mode 100644 index 00000000..b8f4b92c --- /dev/null +++ b/tags/first-blog/index.html @@ -0,0 +1,148 @@ +标签: first blog | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git a/tags/git/index.html b/tags/git/index.html index c31751fa..f934b082 100644 --- a/tags/git/index.html +++ b/tags/git/index.html @@ -1,145 +1,148 @@ -标签: git | all4fun blog +标签: git | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/github/index.html b/tags/github/index.html index 8233ebb5..d25046ae 100644 --- a/tags/github/index.html +++ b/tags/github/index.html @@ -1,145 +1,148 @@ -标签: github | all4fun blog +标签: github | 王恒's Blog - + - + - + -
      标签 - github
      2012
      分享个人wiki部署脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/grub-legacy/index.html b/tags/grub-legacy/index.html index 9120d145..86724737 100644 --- a/tags/grub-legacy/index.html +++ b/tags/grub-legacy/index.html @@ -1,145 +1,148 @@ -标签: grub legacy | all4fun blog +标签: grub legacy | 王恒's Blog - + - + - + -
      标签 - grub legacy
      2011
      卸载grub2重新装回grub legacy
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/grub2/index.html b/tags/grub2/index.html index 8f0a1544..37558615 100644 --- a/tags/grub2/index.html +++ b/tags/grub2/index.html @@ -1,145 +1,148 @@ -标签: grub2 | all4fun blog +标签: grub2 | 王恒's Blog - + - + - + -
      标签 - grub2
      2011
      卸载grub2重新装回grub legacy
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/hexo/index.html b/tags/hexo/index.html index a7e496aa..98547340 100644 --- a/tags/hexo/index.html +++ b/tags/hexo/index.html @@ -1,145 +1,148 @@ -标签: hexo | all4fun blog +标签: hexo | 王恒's Blog - + - + - + -
      标签 - hexo
      2018
      从wordpress迁移到hexo填坑
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/html/index.html b/tags/html/index.html index 86799860..4fa578da 100644 --- a/tags/html/index.html +++ b/tags/html/index.html @@ -1,145 +1,148 @@ -标签: html | all4fun blog +标签: html | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/iPad2/index.html b/tags/iPad2/index.html index 78326f0e..3df13d3e 100644 --- a/tags/iPad2/index.html +++ b/tags/iPad2/index.html @@ -1,145 +1,148 @@ -标签: iPad2 | all4fun blog +标签: iPad2 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/iPhone/index.html b/tags/iPhone/index.html index 6feb236d..e3508fd6 100644 --- a/tags/iPhone/index.html +++ b/tags/iPhone/index.html @@ -1,145 +1,148 @@ -标签: iPhone | all4fun blog +标签: iPhone | 王恒's Blog - + - + - + -
      标签 - iPhone
      2012
      使用SSH实现iPhone自动代理
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/index.html b/tags/index.html index f59a9db3..6c78c1d3 100644 --- a/tags/index.html +++ b/tags/index.html @@ -1,218 +1,150 @@ -标签 | all4fun blog +标签 | 王恒's Blog - + - + - - + + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/javascript/index.html b/tags/javascript/index.html index bee1a461..53eba7fb 100644 --- a/tags/javascript/index.html +++ b/tags/javascript/index.html @@ -1,145 +1,148 @@ -标签: javascript | all4fun blog +标签: javascript | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/migrating/index.html b/tags/migrating/index.html index 0240251a..54c811e1 100644 --- a/tags/migrating/index.html +++ b/tags/migrating/index.html @@ -1,145 +1,148 @@ -标签: migrating | all4fun blog +标签: migrating | 王恒's Blog - + - + - + -
      标签 - migrating
      2018
      从wordpress迁移到hexo填坑
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/mouse/index.html b/tags/mouse/index.html index ac80c801..370a5ea9 100644 --- a/tags/mouse/index.html +++ b/tags/mouse/index.html @@ -1,145 +1,148 @@ -标签: mouse | all4fun blog +标签: mouse | 王恒's Blog - + - + - + -
      标签 - mouse
      2011
      Razer Krait 鼠标换微动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/mysql/index.html b/tags/mysql/index.html index d0c8ecfc..62dac97a 100644 --- a/tags/mysql/index.html +++ b/tags/mysql/index.html @@ -1,145 +1,148 @@ -标签: mysql | all4fun blog +标签: mysql | 王恒's Blog - + - + - + -
      标签 - mysql
      2012
      使用Vim和Viki来写文章
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/nginx/index.html b/tags/nginx/index.html new file mode 100644 index 00000000..4824c810 --- /dev/null +++ b/tags/nginx/index.html @@ -0,0 +1,148 @@ +标签: nginx | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git a/tags/node-js/index.html b/tags/node-js/index.html index 6a7e225a..1009e6c1 100644 --- a/tags/node-js/index.html +++ b/tags/node-js/index.html @@ -1,145 +1,148 @@ -标签: node.js | all4fun blog +标签: node.js | 王恒's Blog - + - + - + -
      标签 - node.js
      2012
      Javascript编码解码方法
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/openssh/index.html b/tags/openssh/index.html index c310cde0..e6589a14 100644 --- a/tags/openssh/index.html +++ b/tags/openssh/index.html @@ -1,145 +1,148 @@ -标签: openssh | all4fun blog +标签: openssh | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/openssl/index.html b/tags/openssl/index.html index f10a81f9..9d5e794e 100644 --- a/tags/openssl/index.html +++ b/tags/openssl/index.html @@ -1,145 +1,148 @@ -标签: openssl | all4fun blog +标签: openssl | 王恒's Blog - + - + - + -
      标签 - openssl
      2015
      linux版快盘上传下载脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/post-format-image/index.html b/tags/post-format-image/index.html index c219280b..6c47ba45 100644 --- a/tags/post-format-image/index.html +++ b/tags/post-format-image/index.html @@ -1,145 +1,148 @@ -标签: post-format-image | all4fun blog +标签: post-format-image | 王恒's Blog - + - + - + -
      标签 - post-format-image
      2012
      Windows下的git工具msysGit
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/putty/index.html b/tags/putty/index.html index 90b0e6bd..e63bfa0f 100644 --- a/tags/putty/index.html +++ b/tags/putty/index.html @@ -1,145 +1,148 @@ -标签: putty | all4fun blog +标签: putty | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/python/index.html b/tags/python/index.html index a0a83a65..5c171d85 100644 --- a/tags/python/index.html +++ b/tags/python/index.html @@ -1,145 +1,148 @@ -标签: python | all4fun blog +标签: python | 王恒's Blog - + - + - + -
      标签 - python
      2012
      分享个人wiki部署脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/server/index.html b/tags/server/index.html index c8552945..384c3b5e 100644 --- a/tags/server/index.html +++ b/tags/server/index.html @@ -1,145 +1,148 @@ -标签: server | all4fun blog +标签: server | 王恒's Blog - + - + - + -
      标签 - server
      2015
      linux版快盘上传下载脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/shell/index.html b/tags/shell/index.html index 40293bf3..023c2b8c 100644 --- a/tags/shell/index.html +++ b/tags/shell/index.html @@ -1,145 +1,148 @@ -标签: shell | all4fun blog +标签: shell | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/source/index.html b/tags/source/index.html index 01d3ed03..9ca97a8e 100644 --- a/tags/source/index.html +++ b/tags/source/index.html @@ -1,145 +1,148 @@ -标签: source | all4fun blog +标签: source | 王恒's Blog - + - + - + -
      标签 - source
      2011
      Ubuntu 10.10 更新源总结
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/ssh/index.html b/tags/ssh/index.html index 302a5ca3..44d4418f 100644 --- a/tags/ssh/index.html +++ b/tags/ssh/index.html @@ -1,145 +1,148 @@ -标签: ssh | all4fun blog +标签: ssh | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/started/index.html b/tags/started/index.html new file mode 100644 index 00000000..1d70294b --- /dev/null +++ b/tags/started/index.html @@ -0,0 +1,148 @@ +标签: started | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git a/tags/symfony/index.html b/tags/symfony/index.html index 0333bccf..d00eb471 100644 --- a/tags/symfony/index.html +++ b/tags/symfony/index.html @@ -1,145 +1,148 @@ -标签: symfony | all4fun blog +标签: symfony | 王恒's Blog - + - + - + -
      标签 - symfony
      2012
      分享个人wiki部署脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/thinkphp/index.html b/tags/thinkphp/index.html index b68661fb..e17f7a04 100644 --- a/tags/thinkphp/index.html +++ b/tags/thinkphp/index.html @@ -1,145 +1,148 @@ -标签: thinkphp | all4fun blog +标签: thinkphp | 王恒's Blog - + - + - + -
      标签 - thinkphp
      2012
      ubuntu中安装air video server
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/tr/index.html b/tags/tr/index.html index 8e1fa8ef..857b05ce 100644 --- a/tags/tr/index.html +++ b/tags/tr/index.html @@ -1,145 +1,148 @@ -标签: tr | all4fun blog +标签: tr | 王恒's Blog - + - + - + -
      标签 - tr
      2015
      ubuntu 安装配置denyhosts
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/vi/index.html b/tags/vi/index.html index 2c5d114e..fdf426c7 100644 --- a/tags/vi/index.html +++ b/tags/vi/index.html @@ -1,145 +1,148 @@ -标签: vi | all4fun blog +标签: vi | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/vim/index.html b/tags/vim/index.html index 809048a5..81542016 100644 --- a/tags/vim/index.html +++ b/tags/vim/index.html @@ -1,145 +1,148 @@ -标签: vim | all4fun blog +标签: vim | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/vim\346\217\222\344\273\266/index.html" "b/tags/vim\346\217\222\344\273\266/index.html" index 973987f4..f1591e60 100644 --- "a/tags/vim\346\217\222\344\273\266/index.html" +++ "b/tags/vim\346\217\222\344\273\266/index.html" @@ -1,145 +1,148 @@ -标签: vim插件 | all4fun blog +标签: vim插件 | 王恒's Blog - + - + - + -
      标签 - vim插件
      2012
      分享个人wiki部署脚本
      使用vimwiki组建个人wiki
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/visual-studio/index.html b/tags/visual-studio/index.html index 3f4c0721..43ea040d 100644 --- a/tags/visual-studio/index.html +++ b/tags/visual-studio/index.html @@ -1,145 +1,148 @@ -标签: visual studio | all4fun blog +标签: visual studio | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/visudo/index.html b/tags/visudo/index.html index d064feae..0bcc70c8 100644 --- a/tags/visudo/index.html +++ b/tags/visudo/index.html @@ -1,145 +1,148 @@ -标签: visudo | all4fun blog +标签: visudo | 王恒's Blog - + - + - + -
      标签 - visudo
      2012
      为ipad2安装和配置gcc编译环境
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/wiki/index.html b/tags/wiki/index.html index 79a64a28..dd86e8c2 100644 --- a/tags/wiki/index.html +++ b/tags/wiki/index.html @@ -1,145 +1,148 @@ -标签: wiki | all4fun blog +标签: wiki | 王恒's Blog - + - + - + -
      标签 - wiki
      2012
      wamp配置多域名虚拟目录
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/winscp/index.html b/tags/winscp/index.html index 0a126402..db6ed425 100644 --- a/tags/winscp/index.html +++ b/tags/winscp/index.html @@ -1,145 +1,148 @@ -标签: winscp | all4fun blog +标签: winscp | 王恒's Blog - + - + - + -
      标签 - winscp
      2012
      为ipad2安装和配置gcc编译环境
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/tags/wordpress/index.html b/tags/wordpress/index.html index 0f88f725..ea3e424f 100644 --- a/tags/wordpress/index.html +++ b/tags/wordpress/index.html @@ -1,145 +1,148 @@ -标签: wordpress | all4fun blog +标签: wordpress | 王恒's Blog - + - + - + -
      标签 - wordpress
      2018
      从wordpress迁移到hexo填坑
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\344\270\255\346\226\207\344\271\261\347\240\201/index.html" "b/tags/\344\270\255\346\226\207\344\271\261\347\240\201/index.html" index 67b2343f..16a8615e 100644 --- "a/tags/\344\270\255\346\226\207\344\271\261\347\240\201/index.html" +++ "b/tags/\344\270\255\346\226\207\344\271\261\347\240\201/index.html" @@ -1,145 +1,148 @@ -标签: 中文乱码 | all4fun blog +标签: 中文乱码 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\344\273\243\347\220\206/index.html" "b/tags/\344\273\243\347\220\206/index.html" index 1ac013fc..5079fcc6 100644 --- "a/tags/\344\273\243\347\220\206/index.html" +++ "b/tags/\344\273\243\347\220\206/index.html" @@ -1,145 +1,148 @@ -标签: 代理 | all4fun blog +标签: 代理 | 王恒's Blog - + - + - + -
      标签 - 代理
      2013
      Linux中设置代理服务器
      2011
      Ubuntu 搭建 Vpn 服务
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\210\206\344\272\253/index.html" "b/tags/\345\210\206\344\272\253/index.html" index 73d4e88d..24b02953 100644 --- "a/tags/\345\210\206\344\272\253/index.html" +++ "b/tags/\345\210\206\344\272\253/index.html" @@ -1,145 +1,148 @@ -标签: 分享 | all4fun blog +标签: 分享 | 王恒's Blog - + - + - + -
      标签 - 分享
      2012
      分享iPad2越狱工具
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\212\253\346\214\201/index.html" "b/tags/\345\212\253\346\214\201/index.html" index e9e9f303..0c9adefb 100644 --- "a/tags/\345\212\253\346\214\201/index.html" +++ "b/tags/\345\212\253\346\214\201/index.html" @@ -1,145 +1,148 @@ -标签: 劫持 | all4fun blog +标签: 劫持 | 王恒's Blog - + - + - + -
      标签 - 劫持
      2011
      北京联通DNS劫持!
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\221\275\344\273\244\350\241\214/index.html" "b/tags/\345\221\275\344\273\244\350\241\214/index.html" index 3fe1e855..66e1d3bb 100644 --- "a/tags/\345\221\275\344\273\244\350\241\214/index.html" +++ "b/tags/\345\221\275\344\273\244\350\241\214/index.html" @@ -1,145 +1,148 @@ -标签: 命令行 | all4fun blog +标签: 命令行 | 王恒's Blog - + - + - + -
      标签 - 命令行
      2012
      CMD窗口属性设置
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\244\207\344\273\275/index.html" "b/tags/\345\244\207\344\273\275/index.html" index d98e794a..6da592ec 100644 --- "a/tags/\345\244\207\344\273\275/index.html" +++ "b/tags/\345\244\207\344\273\275/index.html" @@ -1,145 +1,148 @@ -标签: 备份 | all4fun blog +标签: 备份 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\244\232\345\237\237\345\220\215/index.html" "b/tags/\345\244\232\345\237\237\345\220\215/index.html" index 030cd10c..1ea1fd65 100644 --- "a/tags/\345\244\232\345\237\237\345\220\215/index.html" +++ "b/tags/\345\244\232\345\237\237\345\220\215/index.html" @@ -1,145 +1,148 @@ -标签: 多域名 | all4fun blog +标签: 多域名 | 王恒's Blog - + - + - + -
      标签 - 多域名
      2012
      wamp配置多域名虚拟目录
      Apache2配置多域名
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\244\232\347\272\277\347\250\213/index.html" "b/tags/\345\244\232\347\272\277\347\250\213/index.html" index 04506f73..005ada6c 100644 --- "a/tags/\345\244\232\347\272\277\347\250\213/index.html" +++ "b/tags/\345\244\232\347\272\277\347\250\213/index.html" @@ -1,145 +1,148 @@ -标签: 多线程 | all4fun blog +标签: 多线程 | 王恒's Blog - + - + - + -
      标签 - 多线程
      2011
      C#使用委托与多线程,解决界面假死
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\247\224\346\211\230/index.html" "b/tags/\345\247\224\346\211\230/index.html" index 780e6e5f..d0221da3 100644 --- "a/tags/\345\247\224\346\211\230/index.html" +++ "b/tags/\345\247\224\346\211\230/index.html" @@ -1,145 +1,148 @@ -标签: 委托 | all4fun blog +标签: 委托 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\255\227\344\275\223/index.html" "b/tags/\345\255\227\344\275\223/index.html" index 59081cf3..bedf9d13 100644 --- "a/tags/\345\255\227\344\275\223/index.html" +++ "b/tags/\345\255\227\344\275\223/index.html" @@ -1,145 +1,148 @@ -标签: 字体 | all4fun blog +标签: 字体 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\256\230\346\226\271\351\251\261\345\212\250/index.html" "b/tags/\345\256\230\346\226\271\351\251\261\345\212\250/index.html" index 75ae72b5..b5a5deca 100644 --- "a/tags/\345\256\230\346\226\271\351\251\261\345\212\250/index.html" +++ "b/tags/\345\256\230\346\226\271\351\251\261\345\212\250/index.html" @@ -1,145 +1,148 @@ -标签: 官方驱动 | all4fun blog +标签: 官方驱动 | 王恒's Blog - + - + - + -
      标签 - 官方驱动
      2011
      使用apt-get 安装NVIDIA官方驱动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\256\266\345\272\255/index.html" "b/tags/\345\256\266\345\272\255/index.html" index e685a315..e06fddea 100644 --- "a/tags/\345\256\266\345\272\255/index.html" +++ "b/tags/\345\256\266\345\272\255/index.html" @@ -1,145 +1,148 @@ -标签: 家庭 | all4fun blog +标签: 家庭 | 王恒's Blog - + - + - + -
      标签 - 家庭
      2012
      CMD窗口属性设置
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\257\271\350\261\241/index.html" "b/tags/\345\257\271\350\261\241/index.html" new file mode 100644 index 00000000..2a3260af --- /dev/null +++ "b/tags/\345\257\271\350\261\241/index.html" @@ -0,0 +1,148 @@ +标签: 对象 | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git "a/tags/\345\261\236\346\200\247/index.html" "b/tags/\345\261\236\346\200\247/index.html" new file mode 100644 index 00000000..5c6f1d48 --- /dev/null +++ "b/tags/\345\261\236\346\200\247/index.html" @@ -0,0 +1,148 @@ +标签: 属性 | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git "a/tags/\345\267\245\345\205\267/index.html" "b/tags/\345\267\245\345\205\267/index.html" index afa83036..65687960 100644 --- "a/tags/\345\267\245\345\205\267/index.html" +++ "b/tags/\345\267\245\345\205\267/index.html" @@ -1,145 +1,148 @@ -标签: 工具 | all4fun blog +标签: 工具 | 王恒's Blog - + - + - + -
      标签 - 工具
      2012
      使用Vim和Viki来写文章
      分享iPad2越狱工具
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\274\200\345\247\213-\347\273\223\346\235\237/index.html" "b/tags/\345\274\200\345\247\213-\347\273\223\346\235\237/index.html" new file mode 100644 index 00000000..160c77b2 --- /dev/null +++ "b/tags/\345\274\200\345\247\213-\347\273\223\346\235\237/index.html" @@ -0,0 +1,148 @@ +标签: 开始?结束 | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git "a/tags/\345\274\200\346\272\220/index.html" "b/tags/\345\274\200\346\272\220/index.html" index 48593f9d..6cb8b26b 100644 --- "a/tags/\345\274\200\346\272\220/index.html" +++ "b/tags/\345\274\200\346\272\220/index.html" @@ -1,145 +1,148 @@ -标签: 开源 | all4fun blog +标签: 开源 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\276\256\345\212\250/index.html" "b/tags/\345\276\256\345\212\250/index.html" index b9aa1f4c..27d5b629 100644 --- "a/tags/\345\276\256\345\212\250/index.html" +++ "b/tags/\345\276\256\345\212\250/index.html" @@ -1,145 +1,148 @@ -标签: 微动 | all4fun blog +标签: 微动 | 王恒's Blog - + - + - + -
      标签 - 微动
      2011
      Razer Krait 鼠标换微动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\345\277\253\347\233\230/index.html" "b/tags/\345\277\253\347\233\230/index.html" index 4d43daf1..28c1e479 100644 --- "a/tags/\345\277\253\347\233\230/index.html" +++ "b/tags/\345\277\253\347\233\230/index.html" @@ -1,145 +1,148 @@ -标签: 快盘 | all4fun blog +标签: 快盘 | 王恒's Blog - + - + - + -
      标签 - 快盘
      2015
      ubuntu 安装配置denyhosts
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\346\216\222\345\272\217/index.html" "b/tags/\346\216\222\345\272\217/index.html" new file mode 100644 index 00000000..a2ac09ab --- /dev/null +++ "b/tags/\346\216\222\345\272\217/index.html" @@ -0,0 +1,148 @@ +标签: 排序 | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git "a/tags/\346\226\207\344\273\266\344\270\242\345\244\261/index.html" "b/tags/\346\226\207\344\273\266\344\270\242\345\244\261/index.html" new file mode 100644 index 00000000..fb57e8a3 --- /dev/null +++ "b/tags/\346\226\207\344\273\266\344\270\242\345\244\261/index.html" @@ -0,0 +1,148 @@ +标签: 文件丢失 | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git "a/tags/\346\227\245\345\277\227/index.html" "b/tags/\346\227\245\345\277\227/index.html" index 0a5274b5..948e33f5 100644 --- "a/tags/\346\227\245\345\277\227/index.html" +++ "b/tags/\346\227\245\345\277\227/index.html" @@ -1,145 +1,148 @@ -标签: 日志 | all4fun blog +标签: 日志 | 王恒's Blog - + - + - + -
      标签 - 日志
      2013
      解决MySQL远程连接丢失问题
      2012
      清除mysql的log-bin日志
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\346\233\264\346\226\260\346\272\220/index.html" "b/tags/\346\233\264\346\226\260\346\272\220/index.html" index d3d44d44..91aec310 100644 --- "a/tags/\346\233\264\346\226\260\346\272\220/index.html" +++ "b/tags/\346\233\264\346\226\260\346\272\220/index.html" @@ -1,145 +1,148 @@ -标签: 更新源 | all4fun blog +标签: 更新源 | 王恒's Blog - + - + - + -
      标签 - 更新源
      2012
      ubuntu 12.04更新源
      2011
      Ubuntu 10.10 更新源总结
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\346\265\201\345\252\222\344\275\223/index.html" "b/tags/\346\265\201\345\252\222\344\275\223/index.html" index 9ddbb5b9..ff4df37f 100644 --- "a/tags/\346\265\201\345\252\222\344\275\223/index.html" +++ "b/tags/\346\265\201\345\252\222\344\275\223/index.html" @@ -1,145 +1,148 @@ -标签: 流媒体 | all4fun blog +标签: 流媒体 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" "b/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" index 42e8a080..786be22c 100644 --- "a/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" +++ "b/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" @@ -1,145 +1,148 @@ -标签: 环境搭建 | all4fun blog +标签: 环境搭建 | 王恒's Blog - + - + - + -
      标签 - 环境搭建
      2012
      Apache2配置多域名
      为ipad2安装和配置gcc编译环境
      2011
      ubuntu搭建LAMP环境
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\225\214\351\235\242\345\201\207\346\255\273/index.html" "b/tags/\347\225\214\351\235\242\345\201\207\346\255\273/index.html" index d34fe58a..134e34f1 100644 --- "a/tags/\347\225\214\351\235\242\345\201\207\346\255\273/index.html" +++ "b/tags/\347\225\214\351\235\242\345\201\207\346\255\273/index.html" @@ -1,145 +1,148 @@ -标签: 界面假死 | all4fun blog +标签: 界面假死 | 王恒's Blog - + - + - + -
      标签 - 界面假死
      2011
      C#使用委托与多线程,解决界面假死
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\250\213\345\272\217\345\221\230/index.html" "b/tags/\347\250\213\345\272\217\345\221\230/index.html" index 4c3bdd92..cbbecbb7 100644 --- "a/tags/\347\250\213\345\272\217\345\221\230/index.html" +++ "b/tags/\347\250\213\345\272\217\345\221\230/index.html" @@ -1,145 +1,148 @@ -标签: 程序员 | all4fun blog +标签: 程序员 | 王恒's Blog - + - + - + -
      标签 - 程序员
      2012
      安装nvidia官方驱动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\253\257\345\217\243/index.html" "b/tags/\347\253\257\345\217\243/index.html" index 37558400..a5f04f3c 100644 --- "a/tags/\347\253\257\345\217\243/index.html" +++ "b/tags/\347\253\257\345\217\243/index.html" @@ -1,145 +1,148 @@ -标签: 端口 | all4fun blog +标签: 端口 | 王恒's Blog - + - + - + -
      标签 - 端口
      2011
      修改openssh-server 的默认端口号
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\274\226\347\250\213/index.html" "b/tags/\347\274\226\347\250\213/index.html" index b6260167..1cf9a241 100644 --- "a/tags/\347\274\226\347\250\213/index.html" +++ "b/tags/\347\274\226\347\250\213/index.html" @@ -1,145 +1,148 @@ -标签: 编程 | all4fun blog +标签: 编程 | 王恒's Blog - + - + - + -
      标签 - 编程
      2012
      为ipad2安装和配置gcc编译环境
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\274\226\347\250\213\350\211\272\346\234\257/index.html" "b/tags/\347\274\226\347\250\213\350\211\272\346\234\257/index.html" new file mode 100644 index 00000000..a9cfeaca --- /dev/null +++ "b/tags/\347\274\226\347\250\213\350\211\272\346\234\257/index.html" @@ -0,0 +1,148 @@ +标签: 编程艺术 | 王恒's Blog + + + + + + + + + + +
      \ No newline at end of file diff --git "a/tags/\347\274\226\350\257\221/index.html" "b/tags/\347\274\226\350\257\221/index.html" index 37ec6baf..5af40f65 100644 --- "a/tags/\347\274\226\350\257\221/index.html" +++ "b/tags/\347\274\226\350\257\221/index.html" @@ -1,145 +1,148 @@ -标签: 编译 | all4fun blog +标签: 编译 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\275\221\347\273\234/index.html" "b/tags/\347\275\221\347\273\234/index.html" index 126d5656..de62e2cd 100644 --- "a/tags/\347\275\221\347\273\234/index.html" +++ "b/tags/\347\275\221\347\273\234/index.html" @@ -1,145 +1,148 @@ -标签: 网络 | all4fun blog +标签: 网络 | 王恒's Blog - + - + - + -
      标签 - 网络
      2012
      设置Win7无线网络共享
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\347\277\273\345\242\231/index.html" "b/tags/\347\277\273\345\242\231/index.html" index c264606c..7b86a60e 100644 --- "a/tags/\347\277\273\345\242\231/index.html" +++ "b/tags/\347\277\273\345\242\231/index.html" @@ -1,145 +1,148 @@ -标签: 翻墙 | all4fun blog +标签: 翻墙 | 王恒's Blog - + - + - + -
      标签 - 翻墙
      2011
      Ubuntu 搭建 Vpn 服务
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\201\224\351\200\232/index.html" "b/tags/\350\201\224\351\200\232/index.html" index 795b15b3..91e1dcce 100644 --- "a/tags/\350\201\224\351\200\232/index.html" +++ "b/tags/\350\201\224\351\200\232/index.html" @@ -1,145 +1,148 @@ -标签: 联通 | all4fun blog +标签: 联通 | 王恒's Blog - + - + - + -
      标签 - 联通
      2011
      北京联通DNS劫持!
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\204\232\346\234\254/index.html" "b/tags/\350\204\232\346\234\254/index.html" index 209b6b43..b1cd3032 100644 --- "a/tags/\350\204\232\346\234\254/index.html" +++ "b/tags/\350\204\232\346\234\254/index.html" @@ -1,145 +1,148 @@ -标签: 脚本 | all4fun blog +标签: 脚本 | 王恒's Blog - + - + - + -
      标签 - 脚本
      2012
      备份网站到FTP和Dropbox脚本
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\213\246\351\200\274\347\224\237\346\264\273/index.html" "b/tags/\350\213\246\351\200\274\347\224\237\346\264\273/index.html" index ab5e2d6f..88836cfa 100644 --- "a/tags/\350\213\246\351\200\274\347\224\237\346\264\273/index.html" +++ "b/tags/\350\213\246\351\200\274\347\224\237\346\264\273/index.html" @@ -1,145 +1,148 @@ -标签: 苦逼生活 | all4fun blog +标签: 苦逼生活 | 王恒's Blog - + - + - + -
      标签 - 苦逼生活
      2012
      windows下用pear安装symfony
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\231\232\346\213\237WIFI/index.html" "b/tags/\350\231\232\346\213\237WIFI/index.html" index 8a000dbd..89b87520 100644 --- "a/tags/\350\231\232\346\213\237WIFI/index.html" +++ "b/tags/\350\231\232\346\213\237WIFI/index.html" @@ -1,145 +1,148 @@ -标签: 虚拟WIFI | all4fun blog +标签: 虚拟WIFI | 王恒's Blog - + - + - + -
      标签 - 虚拟WIFI
      2012
      设置Win7无线网络共享
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\231\232\346\213\237\344\270\273\346\234\272/index.html" "b/tags/\350\231\232\346\213\237\344\270\273\346\234\272/index.html" index adecb7a0..27f51184 100644 --- "a/tags/\350\231\232\346\213\237\344\270\273\346\234\272/index.html" +++ "b/tags/\350\231\232\346\213\237\344\270\273\346\234\272/index.html" @@ -1,145 +1,148 @@ -标签: 虚拟主机 | all4fun blog +标签: 虚拟主机 | 王恒's Blog - + - + - + -
      标签 - 虚拟主机
      2012
      wamp配置多域名虚拟目录
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\257\255\346\263\225\351\253\230\344\272\256/index.html" "b/tags/\350\257\255\346\263\225\351\253\230\344\272\256/index.html" index a5a877eb..7ee97f65 100644 --- "a/tags/\350\257\255\346\263\225\351\253\230\344\272\256/index.html" +++ "b/tags/\350\257\255\346\263\225\351\253\230\344\272\256/index.html" @@ -1,145 +1,148 @@ -标签: 语法高亮 | all4fun blog +标签: 语法高亮 | 王恒's Blog - + - + - + -
      标签 - 语法高亮
      2012
      ipad2下的vim安装和配置
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\350\266\212\347\213\261/index.html" "b/tags/\350\266\212\347\213\261/index.html" index f7dca11c..883f2430 100644 --- "a/tags/\350\266\212\347\213\261/index.html" +++ "b/tags/\350\266\212\347\213\261/index.html" @@ -1,145 +1,148 @@ -标签: 越狱 | all4fun blog +标签: 越狱 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\351\203\250\347\275\262/index.html" "b/tags/\351\203\250\347\275\262/index.html" index 65f197d5..af5ca36c 100644 --- "a/tags/\351\203\250\347\275\262/index.html" +++ "b/tags/\351\203\250\347\275\262/index.html" @@ -1,145 +1,148 @@ -标签: 部署 | all4fun blog +标签: 部署 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\351\205\215\347\275\256/index.html" "b/tags/\351\205\215\347\275\256/index.html" index fa6d289f..5186a22e 100644 --- "a/tags/\351\205\215\347\275\256/index.html" +++ "b/tags/\351\205\215\347\275\256/index.html" @@ -1,145 +1,148 @@ -标签: 配置 | all4fun blog +标签: 配置 | 王恒's Blog - + - + - + -
      标签 - 配置
      2012
      简单配置PHP
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\351\205\215\350\211\262/index.html" "b/tags/\351\205\215\350\211\262/index.html" index 0696496b..f4636be7 100644 --- "a/tags/\351\205\215\350\211\262/index.html" +++ "b/tags/\351\205\215\350\211\262/index.html" @@ -1,145 +1,148 @@ -标签: 配色 | all4fun blog +标签: 配色 | 王恒's Blog - + - + - + -
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\351\207\221\345\261\261\345\277\253\347\233\230/index.html" "b/tags/\351\207\221\345\261\261\345\277\253\347\233\230/index.html" index 6c345306..99fe024d 100644 --- "a/tags/\351\207\221\345\261\261\345\277\253\347\233\230/index.html" +++ "b/tags/\351\207\221\345\261\261\345\277\253\347\233\230/index.html" @@ -1,145 +1,148 @@ -标签: 金山快盘 | all4fun blog +标签: 金山快盘 | 王恒's Blog - + - + - + -
      标签 - 金山快盘
      2012
      金山快盘丢文件
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\351\241\265\351\235\242\350\267\263\350\275\254/index.html" "b/tags/\351\241\265\351\235\242\350\267\263\350\275\254/index.html" index 3e5048a2..029439be 100644 --- "a/tags/\351\241\265\351\235\242\350\267\263\350\275\254/index.html" +++ "b/tags/\351\241\265\351\235\242\350\267\263\350\275\254/index.html" @@ -1,145 +1,148 @@ -标签: 页面跳转 | all4fun blog +标签: 页面跳转 | 王恒's Blog - + - + - + -
      标签 - 页面跳转
      2011
      HTML 页面跳转的几种方法
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git "a/tags/\351\274\240\346\240\207/index.html" "b/tags/\351\274\240\346\240\207/index.html" index 8af1aef9..8b4d703d 100644 --- "a/tags/\351\274\240\346\240\207/index.html" +++ "b/tags/\351\274\240\346\240\207/index.html" @@ -1,145 +1,148 @@ -标签: 鼠标 | all4fun blog +标签: 鼠标 | 王恒's Blog - + - + - + -
      标签 - 鼠标
      2011
      Razer Krait 鼠标换微动
      \ No newline at end of file + })(window)
      \ No newline at end of file diff --git a/the-apache2-configure-multi-the-domain.html b/the-apache2-configure-multi-the-domain.html index 4bb45d46..40861329 100644 --- a/the-apache2-configure-multi-the-domain.html +++ b/the-apache2-configure-multi-the-domain.html @@ -1,169 +1,157 @@ -Apache2配置多域名 | all4fun blog +Apache2配置多域名 | 王恒's Blog - + - + - - + + -

      Apache2配置多域名

      -

      几经周折买回来的VPS终于能用了!  Smile打算试用一段时间后,如果服务器足够稳定就将自己的博客完全转入新的VPS。搭建好LAMP环境 后需要对服务器进行一些配置以支持多个域名的独立管理。没有自己顶级域名的朋友可以试试 www.co.cc的免费二级域名,之前在大学期间一直用的是他们的免费域名去绑定一些不好记住的ip服务,解析速度也挺快的,再次感谢!为你的域名(例如:xxx.co.cc)新建一个文本文件并编辑xxx.co.cc的站点配置文件 xxx.co.cc

      
      +    })(window)

      Apache2配置多域名

      +

      几经周折买回来的VPS终于能用了!  Smile打算试用一段时间后,如果服务器足够稳定就将自己的博客完全转入新的VPS。搭建好LAMP环境 后需要对服务器进行一些配置以支持多个域名的独立管理。没有自己顶级域名的朋友可以试试 www.co.cc的免费二级域名,之前在大学期间一直用的是他们的免费域名去绑定一些不好记住的ip服务,解析速度也挺快的,再次感谢!为你的域名(例如:xxx.co.cc)新建一个文本文件并编辑xxx.co.cc的站点配置文件 xxx.co.cc

      
       ServerName xxx.co.cc
       ServerAlias xxx.co.cc
       DocumentRoot /var/www/test/
      @@ -189,63 +177,39 @@
       chown -R www-data:www-data /var/www/test/*
       
      -

      好了现在输入“你的域名”/tz.php,这里是xxx.co.cc,是不是配置成功了呢?Smile

      +

      好了现在输入“你的域名”/tz.php,这里是xxx.co.cc,是不是配置成功了呢?Smile

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/the-apache2-configure-multi-the-domain.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html b/the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html index 54b668cc..a3888a34 100644 --- a/the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html +++ b/the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html @@ -1,225 +1,189 @@ -LNMP环境WordPress出现No Input File Specified的解决方案 | all4fun blog +LNMP环境WordPress出现No Input File Specified的解决方案 | 王恒's Blog - + - + - - + + -

      LNMP环境WordPress出现No Input File Specified的解决方案

      + })(window)

      LNMP环境WordPress出现No Input File Specified的解决方案

      前阵子一直用的是LAMP的平台,最近换成LNMP环境,wordpress出现这个问题,在进入后台后,添加新文章或者进行其他操作时提示,后台经常提示“No Input File Specified”,经过一番股勾摆渡终于找到了原因,原来是路径后面少了一个”/”引起的。可以修改LNMP配置的重写规则文件来解决这个问题,下面是解决方案:

      修改lnmp下的wordpress.conf配置

      location / {
      if (-f $request_filename/index.html){
      rewrite (.) $1/index.html break;
      }
      if (-f $request_filename/index.php){
      rewrite (.
      ) $1/index.php;
      }
      if (!-f $request_filename){
      rewrite (.*) /index.php;
      }
      rewrite /wp-admin$ $scheme://$host$uri/ permanent;
      }

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/the-environmental-wordpress-in-lnmp-no-input-file-specified-solutions.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/the-git-tools-msysgit-under-the-windows.html b/the-git-tools-msysgit-under-the-windows.html index f46ccf53..de7bd436 100644 --- a/the-git-tools-msysgit-under-the-windows.html +++ b/the-git-tools-msysgit-under-the-windows.html @@ -1,166 +1,154 @@ -Windows下的git工具msysGit | all4fun blog +Windows下的git工具msysGit | 王恒's Blog - + - + - - + + -

      Windows下的git工具msysGit

      + })(window)

      Windows下的git工具msysGit

      下载请移步百度或者谷歌搜索:msysGit,安装完成后配置如下

      需要的配置:

      @@ -186,61 +174,37 @@

      2、$ git diff,如果代码里有中文,会显示乱码;

      3、$ git checkout 有时候需要修改/增删很多文件,如果某些文件被占用,会被 Windows 拒绝,导致失败,甚至可能造成版本库出现无法修复的问题。

      具体操作可以参考《Windows 下 git 配置与使用》 执行。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/the-git-tools-msysgit-under-the-windows.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/the-route-setup-script-realize-domestic-network-by-the-vpn.html b/the-route-setup-script-realize-domestic-network-by-the-vpn.html index c107fbca..e13184aa 100644 --- a/the-route-setup-script-realize-domestic-network-by-the-vpn.html +++ b/the-route-setup-script-realize-domestic-network-by-the-vpn.html @@ -1,166 +1,154 @@ -Route设置脚本,实现国内网不经VPN | all4fun blog +Route设置脚本,实现国内网不经VPN | 王恒's Blog - + - + - - + + -

      Route设置脚本,实现国内网不经VPN

      + })(window)

      Route设置脚本,实现国内网不经VPN

            使用vpn拨入后,所有的网络请求默认经vpn通道,故vpn拨号后不需要设置任何参数就可以直接访问国际网。但是这个时候访问国内的网络也要走vpn,所以导致了国内的部分网站打开速度很慢。这个问题可以修改本机的路由表来解决。

      步骤:

      首先断开机器的vpn连接

      1、新建一个route_vpn.bat文件,右键编辑,将下面的代码复制进去

      @echo off
       rem Create by wangheng
       ipconfig /flushdns
      @@ -1161,61 +1149,37 @@
       
       

      Tips:机器重启后路由表会重置,故重启后再次vpn拨号需要再次执行脚本文件。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/the-route-setup-script-realize-domestic-network-by-the-vpn.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/the-simple-to-configure-php.html b/the-simple-to-configure-php.html index 6250d63b..2a60813a 100644 --- a/the-simple-to-configure-php.html +++ b/the-simple-to-configure-php.html @@ -1,166 +1,154 @@ -简单配置PHP | all4fun blog +简单配置PHP | 王恒's Blog - + - + - - + + -

      简单配置PHP

      + })(window)

      简单配置PHP

      为了修改PHP的配置,我们需要编辑/etc/php5/apache2/php.ini文件,在改动之前,请先将该配置文件做个备份,以便在出错的时候可以恢复。

      修改成内存的大小限制:

      @@ -194,61 +182,37 @@ /etc/init.d/apache2 restart
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/the-simple-to-configure-php.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/the-time-social-network-marketing-is.html b/the-time-social-network-marketing-is.html new file mode 100644 index 00000000..c96b026e --- /dev/null +++ b/the-time-social-network-marketing-is.html @@ -0,0 +1,186 @@ +社交网络营销的最佳时间点 | 王恒's Blog + + + + + + + + + + + + +

      社交网络营销的最佳时间点

      +

      随着社交网络在人们生活占据的时间越来越大,商家们已经开始尝试用各种手段在社交网络上推广自己的产品。内容有趣固然重要,营销的时间如果选的正确,则可以让你的内容获得最大程度的曝光,事半功倍。

      邮件营销

      我们还是先从最传统的邮件营销说起,一周7天,一天24小时里,哪天,那个时间段是人们打开邮件的高峰期呢?请看图:

      clip_image001

      clip_image002

      pic via: sign-up.to

      从打开邮件的数量来看,可以说明邮件营销的黄金时间是周二至周四,10:00 – 17:00。不过这个调查的受众人群是英国人,可能和国人还有一些差别,但我相信人类的行为方面还是具有有一致性的。

      博客

      人们又习惯在什么时候阅读博客呢:

      clip_image003

      答案是早上,博主最喜欢的事情之一就是吃着早餐,打开Google Reader看自己喜欢的博客。

      Facebook

      Facebook营销的最佳时间是上午和晚上,大约是7:00 – 12:00以及19:00 – 21:00点

      clip_image004

      调查还显示,大家在周五至周日间会更容易参与社交的活动。不过博主认为,国内的新浪微博等社交网络还是工作日的中午最为活跃。

      Twitter

      Twitter营销的最佳时间是12:00 – 20:00点,周三至周五。

      clip_image005

      clip_image006

      移动营销

      智能手机用户使用手机频率最高的时间点是12:00 – 20:00之间,所以在这个时间段做移动营销的效果可能最好。

      clip_image007

      原文地址:http://www.williamlong.info/archives/3076.html

      +
      +
      文章作者: 王恒
      文章链接: http://wangheng.org/the-time-social-network-marketing-is.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file diff --git a/to-use-scribefire-offline-writing-a-blog.html b/to-use-scribefire-offline-writing-a-blog.html index 21adf958..7e65bdcd 100644 --- a/to-use-scribefire-offline-writing-a-blog.html +++ b/to-use-scribefire-offline-writing-a-blog.html @@ -1,133 +1,29 @@ -使用ScribeFire离线编写博客 | all4fun blog +使用ScribeFire离线编写博客 | 王恒's Blog - + - + - - + + -

      使用ScribeFire离线编写博客

      -

      以前都是通过windows live writer在写博客,在windows中使用确实很不错。最近转做web开发后,对windows的依赖也越来越小了,刚好回家可以在自己喜欢的linux环境中谢谢代码。没有了游戏的诱惑,感觉专注了不少。 linux系统中live writer肯定是没戏了,不想面对wordpress蛋疼的在线编辑工具,所以最近写博客的频率也有点低。还好最近发现了ScribeFire这款插件,支持多种博客类型,也有FireFox和Chrome的版本,强烈推荐大家使用! 用ScribFire写博客,最大的好处当然是速度的优势,不用每次都登录自己博客的后台。 以下以Firefox浏览器上使用为例 1、在附加组建搜索并安装ScribeFire,有两个版本classic 和next,classic我这里安上报错,next版本正常,懒得折腾,直接用了next版本,装好重启firefox; 2、在firefox工具选项卡找到Scribeire,点击后会出现一个编辑界面; 3、按照Wizard的提示创建一个帐号,如图;

      4、输入博客地址,ScribeFire会自动选择API接口。 5、输入用户名和密码,完成帐户创建过程。 6、在主编辑界面撰写文章内容,左边栏选择文章的分类,以及文章的标签等,很方便。 7、点击右下角的发布,来发表文章到你的博客; 8、文章发表完成。 ScribeFire编辑器本身自带大量的功能,并且同样支持插入标签、文章归类等等操作,强烈推荐给各位博友使用。 FireFox的ScribFire下载:https://addons.mozilla.org/en-US/firefox/addon/1730/ Chrome的ScribFire下载:http://code.google.com/p/scribefire-chrome/downloads/detail?name=scribefire-0.1.0.0.crx&can=2&q=#makechanges

       

      -
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/to-use-scribefire-offline-writing-a-blog.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      使用ScribeFire离线编写博客

      +

      以前都是通过windows live writer在写博客,在windows中使用确实很不错。最近转做web开发后,对windows的依赖也越来越小了,刚好回家可以在自己喜欢的linux环境中谢谢代码。没有了游戏的诱惑,感觉专注了不少。 linux系统中live writer肯定是没戏了,不想面对wordpress蛋疼的在线编辑工具,所以最近写博客的频率也有点低。还好最近发现了ScribeFire这款插件,支持多种博客类型,也有FireFox和Chrome的版本,强烈推荐大家使用! 用ScribFire写博客,最大的好处当然是速度的优势,不用每次都登录自己博客的后台。 以下以Firefox浏览器上使用为例 1、在附加组建搜索并安装ScribeFire,有两个版本classic 和next,classic我这里安上报错,next版本正常,懒得折腾,直接用了next版本,装好重启firefox; 2、在firefox工具选项卡找到Scribeire,点击后会出现一个编辑界面; 3、按照Wizard的提示创建一个帐号,如图;

      4、输入博客地址,ScribeFire会自动选择API接口。 5、输入用户名和密码,完成帐户创建过程。 6、在主编辑界面撰写文章内容,左边栏选择文章的分类,以及文章的标签等,很方便。 7、点击右下角的发布,来发表文章到你的博客; 8、文章发表完成。 ScribeFire编辑器本身自带大量的功能,并且同样支持插入标签、文章归类等等操作,强烈推荐给各位博友使用。 FireFox的ScribFire下载:https://addons.mozilla.org/en-US/firefox/addon/1730/ Chrome的ScribFire下载:http://code.google.com/p/scribefire-chrome/downloads/detail?name=scribefire-0.1.0.0.crx&can=2&q=#makechanges

       

      +
      +
      文章作者: 王恒
      文章链接: http://wangheng.org/to-use-scribefire-offline-writing-a-blog.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/tuning-memo-reproduced.html b/tuning-memo-reproduced.html index 594ee8a9..3017cca6 100644 --- a/tuning-memo-reproduced.html +++ b/tuning-memo-reproduced.html @@ -1,169 +1,156 @@ -性能调优备忘 | all4fun blog +性能调优备忘 | 王恒's Blog - - + + - + - - + + -

      性能调优备忘

      + })(window)

      性能调优备忘

      +1. 当性能遇到问题时,如果能在应用层进行计算和处理,那就把它从数据库层拿出来。排序和分组就是典型的例子。在应用层做性能提升总是要比在数据库层容易的多。就像对于MySQL,sqlite更容易掌控。 -
        -
      1. 当性能遇到问题时,如果能在应用层进行计算和处理,那就把它从数据库层拿出来。排序和分组就是典型的例子。在应用层做性能提升总是要比在数据库层容易的多。就像对于MySQL,sqlite更容易掌控。

        -
      2. +
        1. 关于并行计算,如果能避免就尽量避免。如果无法避免,记住,能力越大,责任越大。如果有可能,尽量避免直接对线程操作。尽可能在更高的抽象层上操作。例 如,在iOS中,GCD,分发和队列操作是你的好朋友。人类的大脑没有被设计成用来分析那些无穷临时状态——这是我的惨痛教训所得。

        2. 尽可能简化状态,尽可能局部本地化。适用至上。

          @@ -191,63 +178,38 @@
        3. 复杂是大敌。

        -

        部分内容从自己以前记录的笔记中摘抄过来的,忘记从哪看到的了,找不到原始链接。如作者看到,请留言认领!

        - -
      文章作者: all4fun
      文章链接: http://wangheng.org/tuning-memo-reproduced.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-10-10-update-source.html b/ubuntu-10-10-update-source.html index c381b842..82bba2be 100644 --- a/ubuntu-10-10-update-source.html +++ b/ubuntu-10-10-update-source.html @@ -1,168 +1,156 @@ -Ubuntu 10.10 更新源总结 | all4fun blog +Ubuntu 10.10 更新源总结 | 王恒's Blog - + - + - - + + -

      Ubuntu 10.10 更新源总结

      + })(window)

      Ubuntu 10.10 更新源总结

      1.首先备份你的sources 文件
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bksudo gedit /etc/apt/sources.list
      编辑你的源列表,将原来的内容全部删除,添加下面列表中最适合你的源(注意不要全部添加),选择一个最合适你的即可,复制到你的列表中,然后保存列表。 @@ -192,61 +180,37 @@
       
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-10-10-update-source.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-12-04-source-list.html b/ubuntu-12-04-source-list.html index cded3602..d45bfb13 100644 --- a/ubuntu-12-04-source-list.html +++ b/ubuntu-12-04-source-list.html @@ -1,166 +1,154 @@ -ubuntu 12.04更新源 | all4fun blog +ubuntu 12.04更新源 | 王恒's Blog - + - + - - + + -

      ubuntu 12.04更新源

      + })(window)

      ubuntu 12.04更新源

      1、首先备份Ubuntu 11.10源列表
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)
      2、修改更新源
      sudo gedit /etc/apt/sources.list
      #台湾源
      deb http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse 
      @@ -204,61 +192,37 @@
       sudo apt-get upgrade
      经过6个月的开发周期,ubuntu 12.04 LTS (Precise Pangolin)终于发布了,这个版本是一个长期支持版本。官方正式版下载地址公布: http://releases.ubuntu.com/precise/ 完成同步的国内镜像站点(已经可以下载正式版本): 中科大地址(同步完毕,可下载):http://mirrors.ustc.edu.cn/ubuntu-releases/12.04/ 顺便提一下,其实unity用习惯了还是不错的
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-12-04-source-list.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-14-04-install-configure-denyhosts.html b/ubuntu-14-04-install-configure-denyhosts.html index 7e053416..34680747 100644 --- a/ubuntu-14-04-install-configure-denyhosts.html +++ b/ubuntu-14-04-install-configure-denyhosts.html @@ -1,168 +1,156 @@ -ubuntu 安装配置denyhosts | all4fun blog +ubuntu 安装配置denyhosts | 王恒's Blog - + - + - - + + -

      ubuntu 安装配置denyhosts

      + })(window)

      ubuntu 安装配置denyhosts

      DenyHosts是使用Python语言写的一个程序,它会分析sshd的日志文件(/var/log/auth.log*),当发现大量重复的攻击时会记录IP到/etc/hosts.deny文件,从而达到自动屏攻击者IP的功能。

      目前官网最新版本是2.10,记得以前的ubuntu版本(<=12.04LTS)中好像直接apt-get install denyhosts 就可以了,在最新的发行版不知为何不见了。

      @@ -190,61 +178,37 @@

      sudo vim /etc/hosts.allow 

      #按下面的样例添加你的IP

      /etc/hosts.allow: list of hosts that are allowed to access the system.

      See the manual pages hosts_access(5) and hosts_options(5).

      Example: ALL: LOCAL @wangheng.org

      ALL: .wangheng.org EXCEPT terminalserver.wangheng.org

      If you’re going to protect the portmapper use the name “rpcbind” for the

      daemon name. See rpcbind(8) and rpc.mountd(8) for further information.

      sshd: 123.123.123.123

      编辑保存后,我们需要重启一下服务:

      sudo /etc/init.d/denyhosts restart


      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-14-04-install-configure-denyhosts.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-install-air-video-server.html b/ubuntu-install-air-video-server.html index a04663c2..d885e085 100644 --- a/ubuntu-install-air-video-server.html +++ b/ubuntu-install-air-video-server.html @@ -1,167 +1,155 @@ -ubuntu中安装air video server | all4fun blog +ubuntu中安装air video server | 王恒's Blog - + - + - - + + -

      ubuntu中安装air video server

      + })(window)

      ubuntu中安装air video server

      AirVideo 是IOS上很好用的一个媒体播放器。可以由局域网内的电脑完成实时转码,不用再做任何转换操作,就可以让你通过无线网络在iphone和ipad观看存在电脑上的视频,而不需要把视频拷贝过来。

      官方提供了MAC和Windows下的服务端程序,但因为服务端是基于FFmpeg和Java的,都是开源项目,所以也可以通过自行编译的方式,在Linux下安装服务端。前段日子自己组装了一台htpc,但要通过 iPad看里面的电影颇为麻烦。今天刚好看到有一份教程,简单的几个APT命令就可以完成安装了,具体步骤如下:

      @@ -186,61 +174,37 @@
      参阅:
      http://inmethod.com/air-video/index.html
      http://wiki.birth-online.de/know-how/hardware/apple-iphone/airvideo-server-linux
      http://www.inmethod.com/forum/posts/list/1856.page
      https://launchpad.net/~rubiojr/+archive/airvideo
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-install-air-video-server.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-install-lamp.html b/ubuntu-install-lamp.html index 5f507f40..0e763a2d 100644 --- a/ubuntu-install-lamp.html +++ b/ubuntu-install-lamp.html @@ -1,167 +1,155 @@ -ubuntu搭建LAMP环境 | all4fun blog +ubuntu搭建LAMP环境 | 王恒's Blog - + - + - - + + -

      ubuntu搭建LAMP环境

      + })(window)

      ubuntu搭建LAMP环境

      首先安装apache2服务,在终端中使用命令:
      sudo apt-get install apache2 php5 libapache2-mod-php5  libapache2-mod-auth-mysql
      如果希望开启Apache2 伪静态 rewrite 支持,输入如下命令安装 @@ -181,61 +169,37 @@ unzip tz.zip 执行完重启apache2后,浏览器查看http://localhost/tz.php正常打开说明环境搭建成功了,并且可以通过此页面查看服务器的一些状态
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-install-lamp.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-to-add-boot-script.html b/ubuntu-to-add-boot-script.html index 44417092..00b53988 100644 --- a/ubuntu-to-add-boot-script.html +++ b/ubuntu-to-add-boot-script.html @@ -1,165 +1,153 @@ -Ubuntu下添加开机启动脚本 | all4fun blog +Ubuntu下添加开机启动脚本 | 王恒's Blog - + - + - - + + -

      Ubuntu下添加开机启动脚本

      + })(window)

      Ubuntu下添加开机启动脚本

      1、方法一,编辑rc.loacl脚本 

      Ubuntu开机之后会执行/etc/rc.local文件中的脚本,

      @@ -192,61 +180,37 @@ /etc/rc5.d/S95test /etc/rc6.d/K95test
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-to-add-boot-script.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/ubuntu-vpn-connection.html b/ubuntu-vpn-connection.html index f015b854..826d0084 100644 --- a/ubuntu-vpn-connection.html +++ b/ubuntu-vpn-connection.html @@ -1,166 +1,154 @@ -Ubuntu下的 VPN 连接 | all4fun blog +Ubuntu下的 VPN 连接 | 王恒's Blog - + - + - - + + -

      Ubuntu下的 VPN 连接

      + })(window)

      Ubuntu下的 VPN 连接

      ubuntu的桌面版中,以前使用系统自带的网络管理工具总是连不上VPN , 最近自己试着搭一个VPN,发现可以用命令行连接上VPN。

      命令很简单:

      apt-get install pptpd
       apt-get install pptp-linux
      @@ -179,61 +167,37 @@
        
      (如果不写这个–start参数要连接刚才定义好的vpn只能用 sudo pon lsavpn,断开用sudo poff)

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/ubuntu-vpn-connection.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/under-windows-install-php-pear.html b/under-windows-install-php-pear.html index 8e429b8e..85c5857f 100644 --- a/under-windows-install-php-pear.html +++ b/under-windows-install-php-pear.html @@ -1,132 +1,28 @@ -Windows下安装PHP Pear | all4fun blog +Windows下安装PHP Pear | 王恒's Blog - + - + - - + + -

      Windows下安装PHP Pear

      -
      PEAR简介
      PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR之于PHP就像是CPAN(Comprehensive Perl Archive Network)之于Perl。

      PEAR的基本目标是发展成为PHP扩展和库代码的知识库,而这个项目最有雄心的目标则是试图定义一种标准,这种标准将帮助开发者编写可移植、可重用的代码。

      在WAMP集成环境中安装PEAR

      1、首先下载一个go-pear.phar文件。

      点击这里下载~

      2、进入到php的运行目录安装

      我这里使用了一个wamp的集成开发环境,版本是wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b,我本地的安装路径是C:\wamp\bin\php\php5.4.3>

      执行如下的命令:

      php.exe -d phar.require_hash=0 go-pear.phar

      image

      到这一步可以修改PEAR安装的$prefix路径,我选择了默认,一路回车进行安装。

      3、修改include_path选项

      最后PEAR默认扩展包安装后,提示是否需要配置php.ini文件中的include_path选项指向pear的安装目录

      image

      当然需要配置,否则无法使用,Y并回车,安装包会自动修改include_path选项。提示我们环境变量没有设置,所以下面我们还需要设置一下系统的环境变量。

      新建一个环境变量名,如下图

      image

      然后在PATH变量中加入%php_home%就完成啦~。

      PEAR常用命令

      在命令行方式下,运用PEAR的相关命令可以安装自己需要的PEAR安装包。

      pear help  列出pear的所有命令,类似于pear的命令帮助命令。

      pear help <command>  列出某个pear命令的具体信息

      pear help shortcuts  列出所有pear命令的简写

      -
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/under-windows-install-php-pear.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      Windows下安装PHP Pear

      +
      PEAR简介
      PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR之于PHP就像是CPAN(Comprehensive Perl Archive Network)之于Perl。

      PEAR的基本目标是发展成为PHP扩展和库代码的知识库,而这个项目最有雄心的目标则是试图定义一种标准,这种标准将帮助开发者编写可移植、可重用的代码。

      在WAMP集成环境中安装PEAR

      1、首先下载一个go-pear.phar文件。

      点击这里下载~

      2、进入到php的运行目录安装

      我这里使用了一个wamp的集成开发环境,版本是wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b,我本地的安装路径是C:\wamp\bin\php\php5.4.3>

      执行如下的命令:

      php.exe -d phar.require_hash=0 go-pear.phar

      image

      到这一步可以修改PEAR安装的$prefix路径,我选择了默认,一路回车进行安装。

      3、修改include_path选项

      最后PEAR默认扩展包安装后,提示是否需要配置php.ini文件中的include_path选项指向pear的安装目录

      image

      当然需要配置,否则无法使用,Y并回车,安装包会自动修改include_path选项。提示我们环境变量没有设置,所以下面我们还需要设置一下系统的环境变量。

      新建一个环境变量名,如下图

      image

      然后在PATH变量中加入%php_home%就完成啦~。

      PEAR常用命令

      在命令行方式下,运用PEAR的相关命令可以安装自己需要的PEAR安装包。

      pear help  列出pear的所有命令,类似于pear的命令帮助命令。

      pear help <command>  列出某个pear命令的具体信息

      pear help shortcuts  列出所有pear命令的简写

      +
      +
      文章作者: 王恒
      文章链接: http://wangheng.org/under-windows-install-php-pear.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/unicom-dns-hijacking.html b/unicom-dns-hijacking.html index d0a6ea74..372bb681 100644 --- a/unicom-dns-hijacking.html +++ b/unicom-dns-hijacking.html @@ -1,132 +1,28 @@ -北京联通DNS劫持! | all4fun blog +北京联通DNS劫持! | 王恒's Blog - + - + - - + + -

      北京联通DNS劫持!

      -2011年8月31日凌晨上网时候访问自己的域名,发现被联通劫持到了http://202.106.33.158/DNS/这个页面!连续试了几次都是如此,太过分了!如截图所示 + postUpdate: '2021-10-11 10:11:44' +}
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      北京联通DNS劫持!

      +2011年8月31日凌晨上网时候访问自己的域名,发现被联通劫持到了http://202.106.33.158/DNS/这个页面!连续试了几次都是如此,太过分了!如截图所示 - gitalk.render('gitalk-container') - } +

      image

      +

      截图为证

      +
      文章作者: 王恒
      文章链接: http://wangheng.org/unicom-dns-hijacking.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/unix-programming-art-unix-philosophy.html b/unix-programming-art-unix-philosophy.html new file mode 100644 index 00000000..8638cd61 --- /dev/null +++ b/unix-programming-art-unix-philosophy.html @@ -0,0 +1,258 @@ +Unix编程艺术&mdash;&mdash;Unix哲学(转载) | 王恒's Blog + + + + + + + + + + + + + +

      Unix编程艺术&mdash;&mdash;Unix哲学(转载)

      +Unix编程艺术主要介绍了Unix系统领域中的设计和开发哲学、思想文化体系、原则与经验。此文大致摘录了Unix的哲学。 + +

      web程序员也应该看看此书,软件开发和web开发很多地方都是相通的。看完之后,我甚至觉得Unix哲学对于做人也有很大的参考价值。

      +
      模块原则 (使用简洁的接口拼合简单的部件)
      +计算机编程的本质就是控制复杂度 + +

      要编写复杂软件而又不至于一败涂地的唯一方法就是降低其整体复杂度——用清晰的接口把若干简单的模块组合成一个复杂的软件。如此一来,多数问题只会局限于某个局部,那么就还有希望对局部进行改进而不至牵动全身。

      +
      清晰原则 (清晰胜于技巧)
      +维护成本是高昂的,在写程序时,要想到你不是写给执行代码的计算机看的,而是给人——将来阅读维护源码的人,包括你自己看的。 + +

      在Unix传统中,这个建议不仅意味着代码注释。良好的Unix实践同样信奉在选择算法和实现时就应该考虑到将来的可扩展性。为了取得程序一丁点性能的提升就大幅增加技术的复杂性和晦涩性,这个买卖做不得——这不仅仅是因为复杂的代码容易滋生bug,也因为它会使日后的阅读和维护工作更加艰难。

      +
      组合原则 (设计时考虑拼接组合)
      +如果程序彼此之间不能有效通信,那么软件就难免会陷入复杂度的泥淖。 + +

      在输入方面,Unix传统极力提倡采用简单、文本化、面向流、设备无关的格式。在经典的Unix下,多数程序都尽可能采用简单过滤器的形式,即将一个简单的文本输入流处理为一个简单的文本流输出。

      +

      Unix程序员偏爱这种做法并不是因为它们仇视视图界面,而是因为如果程序不采用简单的文本输入输出流,它们就极难衔接。

      +

      要想让程序具有组合性,就要使程序彼此独立。在文本流这一端的程序应该尽可能不要考虑到文本流另一端的程序。

      + + +
      分离原则 (策略同机制分离,接口同引擎分离)
      +把策略同机制揉成一团有两个负面影响:一来会使策略变得死板,难以适应用户需求的改变,二来也意味着任何策略的改变都可能会动摇机制。 + +

      可以将应用程序分成可以协作的前端和后端进程,通过socket专用应用协议进行通讯。这种双端设计方法大大降低了整体复杂度,bug有望减少。

      +
      简洁原则 (设计要简洁,复杂度能低就低)
      +来自多方面的压力常常会让程序变得复杂(bug更多),其中一种压力就是来自技术上的虚荣心理。Unix程序员相互比的是谁能够做到"简洁而漂亮"并以此为荣。 + +

      更为常见的是,过度的复杂性往往来自于项目的需求,要避免这种状况,就需要鼓励一种软件文化,以简洁为美,人人对庞大复杂的东西群起而攻之。

      +
      吝啬原则 (除非确无它法,不要编写庞大的程序)
      +"大"有两重含义:体积大,复杂程度高。程序大了,维护起来就困难。由于人们对花费了大量精力才做出来的东西难以割舍,结果导致在庞大的程序中把投资浪费的注定要失败或者并非最佳的方案上。 +
      透明原则 (设计要可见,以便审查和调试)
      +软件系统的透明性是指你一眼就能够看出软件是在做什么以及怎样做的。显示性是指程序带有监视和显示内部状态的功能。 + +

      设计时如果充分考虑到这些要求会给整个项目全过程都带来好处。至少,调试选项的设置应该尽量不要在事后,而应该在设计之初便考虑进去。这是考虑到程序不但应该能够展示其正确性,也应该能够把原开发者解决问题的思维模型告诉后来者。

      +

      程序如果要展示其正确性,应该使用足够简单的输入输出格式,这样才能保证很容易地检验有效输入和正确输出之间的关系是否正确。

      +

      出于充分考虑透明性和显见性的目的,还应该提倡接口简洁,以方便其他程序对它进行操作。

      +
      健壮原则 (健壮源于透明与简洁)
      +软件的健壮性指软件不仅能在正常情况下运行良好,而且在超出设计者设想的意外条件下也能够运行良好。 + +

      大多数软件禁不起磕碰,毛病很多,就是因为过于复杂,很难通盘考虑。如果不能够正确理解一个程序的逻辑,就不能确信其是否正确,也就不能在出错时修复它。

      +

      这也就带来了让程序健壮的方法,就是让程序的内部逻辑更易于理解。要做到这一点主要有两种方法:透明化和简洁化。

      +

      上面曾说过,软件的透明性就是指一眼就能够看出是怎么回事,即人们不需要绞尽脑汁就能够推断出所有可能的情况,那么这个程序就是简洁的。程序越简洁,越透明,也就越健壮。

      +
      表示原则 (把知识代入数据以求逻辑质朴而健壮)
      +数据要比程序逻辑更容易驾驭。所以如果要在复杂数据和复杂代码中选择一个,宁愿选择前者。更进一步:在设计中,应该主动将代码的复杂度转移到数据中去。 +
      通俗原则 (接口避免标新立异)
      +最易用的程序就是用户需要学习新东西最少的程序,换句话说最易用的程序就是最切合用户已有知识的程序。 +
      缄默原则 (无话可说?那就沉默)
      +行为良好的程序应该默默工作,绝不唠唠叨叨,碍手碍脚。沉默是金。 + +

      简洁是Unix程序的核心风格。一旦程序的输出成为另一个程序的输入,就要很容易把需要的数据挑出来。站在人的角度上来说,重要的信息不应该混杂在冗长的程序内部行为信息中。

      +
      补救原则 (出现异常时,马上退出并给出足够错误信息)
      +软件在发生错误时也应该与在正常操作的情况下一样,有透明的逻辑。最理想的情况当然是软件能够适应和应付非正常操作;而如果补救措施明明没有成功,却悄无声息地埋下崩溃的隐患,这就是最坏的情况了。 + +

      宽容地收,谨慎地发。就算输入的数据很不规范,一个设计良好的程序也会尽量领会其中的意义,以尽量与别的程序协作。然后要么抛出异常,要么为工作链的下一环程序输出一个严谨干净正确的数据。

      +
      经济原则 (宁花机器一分,不花程序员一秒)
      +随着技术的发展,开发公司和大多数用户都能得到廉价的机器,所以这一准则的合理性就显然不用多说了。 + +

      如果我们在软件开发中严格遵循这条原则的话,大多数的应用场合应该使用高级语言,如Perl,Python,Java,Php,甚至Shell——这些语言可以将程序员从自行管理内存的负担中释放出来。

      +
      生成原则 (避免手工hack,尽量编写程序去生成程序)
      +人类很不善于干辛苦的细节工作。因此程序中任何手工hacking都是滋生错误和延误的温床。程序规格越简单越抽象,设计者就越容易做对。 +
      优化原则 (过早优化是万恶之源)
      +还不知道瓶颈所在就匆忙进行优化,这可能是唯一一个比乱加功能更加损害设计的错误。从畸形的代码到杂乱无章的数据布局,牺牲透明性和简洁性而片面追求速度、内存或者磁盘使用的后果随处可见。 + +

      先制作原型,再精雕细琢。优化之前先确保能用。”极限编程”宗师Kent Beck从另一种不同的文化将这点有效地扩展为:先求运行,再求正确,最后求快。

      +

      借助原型化找出哪些功能不必实现,有助于对性能进行优化;那些不用写的代码显然无须优化。

      +
      多样原则 (绝不相信所谓"不二法门"的断言)
      +Unix传统有一点很好,即从不相信任何所谓的"不二法门"。Unix奉行的是广泛采用多种语言、开放的可扩展系统和用户定制机制。 +
      扩展原则 (设计着眼未来,未来总比预想来得快)
      +要为数据格式和代码留下扩展的空间,否则就会发现自己常常被原先不明智选择捆住了手脚,因为你无法既要改变它们又要维持对原来的兼容性。 + +

      设计协议或是文本格式时,应使其具有充分的自描述性以便可以扩展。要么包含进一个版本号,要么采用独立、自描述的语句、按照可以随时插入新的而不会搞乱格式读取代码的方法组织格式。

      +
      Unix哲学一言以蔽之
      + +

      –EOF–

      +
      文章作者: 王恒
      文章链接: http://wangheng.org/unix-programming-art-unix-philosophy.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      \ No newline at end of file diff --git a/uploads/2011/07/w-150x150.jpg b/uploads/2011/07/w-150x150.jpg new file mode 100644 index 00000000..3214aa16 Binary files /dev/null and b/uploads/2011/07/w-150x150.jpg differ diff --git a/uploads/2011/07/w-254x300.jpg b/uploads/2011/07/w-254x300.jpg new file mode 100644 index 00000000..bc035ee8 Binary files /dev/null and b/uploads/2011/07/w-254x300.jpg differ diff --git a/uploads/2011/07/w.jpg b/uploads/2011/07/w.jpg new file mode 100644 index 00000000..9b3c9aa8 Binary files /dev/null and b/uploads/2011/07/w.jpg differ diff --git a/uploads/2011/08/LogoMaker.gif b/uploads/2011/08/LogoMaker.gif new file mode 100644 index 00000000..351a102c Binary files /dev/null and b/uploads/2011/08/LogoMaker.gif differ diff --git a/uploads/2011/08/clip_image001-411x180.jpg b/uploads/2011/08/clip_image001-411x180.jpg new file mode 100644 index 00000000..facf1bbc Binary files /dev/null and b/uploads/2011/08/clip_image001-411x180.jpg differ diff --git a/uploads/2011/08/clip_image001-411x200.jpg b/uploads/2011/08/clip_image001-411x200.jpg new file mode 100644 index 00000000..be8d50fa Binary files /dev/null and b/uploads/2011/08/clip_image001-411x200.jpg differ diff --git a/uploads/2011/08/clip_image001_thumb-244x180.jpg b/uploads/2011/08/clip_image001_thumb-244x180.jpg new file mode 100644 index 00000000..8034e455 Binary files /dev/null and b/uploads/2011/08/clip_image001_thumb-244x180.jpg differ diff --git a/uploads/2011/08/clip_image001_thumb-244x200.jpg b/uploads/2011/08/clip_image001_thumb-244x200.jpg new file mode 100644 index 00000000..c55cfe33 Binary files /dev/null and b/uploads/2011/08/clip_image001_thumb-244x200.jpg differ diff --git a/uploads/2011/08/clip_image002-524x180.jpg b/uploads/2011/08/clip_image002-524x180.jpg new file mode 100644 index 00000000..ca1d64a1 Binary files /dev/null and b/uploads/2011/08/clip_image002-524x180.jpg differ diff --git a/uploads/2011/08/clip_image002-524x200.jpg b/uploads/2011/08/clip_image002-524x200.jpg new file mode 100644 index 00000000..18ae058d Binary files /dev/null and b/uploads/2011/08/clip_image002-524x200.jpg differ diff --git a/uploads/2011/08/clip_image003-150x84.gif b/uploads/2011/08/clip_image003-150x84.gif new file mode 100644 index 00000000..99bb8984 Binary files /dev/null and b/uploads/2011/08/clip_image003-150x84.gif differ diff --git a/uploads/2011/08/clip_image003-620x200.jpg b/uploads/2011/08/clip_image003-620x200.jpg new file mode 100644 index 00000000..1192c0cf Binary files /dev/null and b/uploads/2011/08/clip_image003-620x200.jpg differ diff --git a/uploads/2011/08/clip_image003-644x180.jpg b/uploads/2011/08/clip_image003-644x180.jpg new file mode 100644 index 00000000..0ba08a81 Binary files /dev/null and b/uploads/2011/08/clip_image003-644x180.jpg differ diff --git a/uploads/2011/08/clip_image003.gif b/uploads/2011/08/clip_image003.gif new file mode 100644 index 00000000..4a329bc1 Binary files /dev/null and b/uploads/2011/08/clip_image003.gif differ diff --git a/uploads/2011/08/clip_image003_thumb-236x180.jpg b/uploads/2011/08/clip_image003_thumb-236x180.jpg new file mode 100644 index 00000000..335b34cc Binary files /dev/null and b/uploads/2011/08/clip_image003_thumb-236x180.jpg differ diff --git a/uploads/2011/08/clip_image003_thumb-236x200.jpg b/uploads/2011/08/clip_image003_thumb-236x200.jpg new file mode 100644 index 00000000..8b823a45 Binary files /dev/null and b/uploads/2011/08/clip_image003_thumb-236x200.jpg differ diff --git a/uploads/2011/08/clip_image004-150x74.jpg b/uploads/2011/08/clip_image004-150x74.jpg new file mode 100644 index 00000000..2a44f4b0 Binary files /dev/null and b/uploads/2011/08/clip_image004-150x74.jpg differ diff --git a/uploads/2011/08/clip_image004.jpg b/uploads/2011/08/clip_image004.jpg new file mode 100644 index 00000000..a07093a4 Binary files /dev/null and b/uploads/2011/08/clip_image004.jpg differ diff --git a/uploads/2011/08/clip_image0041-441x180.jpg b/uploads/2011/08/clip_image0041-441x180.jpg new file mode 100644 index 00000000..7aecb697 Binary files /dev/null and b/uploads/2011/08/clip_image0041-441x180.jpg differ diff --git a/uploads/2011/08/clip_image0041-441x200.jpg b/uploads/2011/08/clip_image0041-441x200.jpg new file mode 100644 index 00000000..28ae39d9 Binary files /dev/null and b/uploads/2011/08/clip_image0041-441x200.jpg differ diff --git a/uploads/2011/08/clip_image006-150x150.gif b/uploads/2011/08/clip_image006-150x150.gif new file mode 100644 index 00000000..3f2eb96d Binary files /dev/null and b/uploads/2011/08/clip_image006-150x150.gif differ diff --git a/uploads/2011/08/clip_image006-604x180.jpg b/uploads/2011/08/clip_image006-604x180.jpg new file mode 100644 index 00000000..fb91cd75 Binary files /dev/null and b/uploads/2011/08/clip_image006-604x180.jpg differ diff --git a/uploads/2011/08/clip_image006-604x200.jpg b/uploads/2011/08/clip_image006-604x200.jpg new file mode 100644 index 00000000..d44ae3e6 Binary files /dev/null and b/uploads/2011/08/clip_image006-604x200.jpg differ diff --git a/uploads/2011/08/clip_image006.gif b/uploads/2011/08/clip_image006.gif new file mode 100644 index 00000000..ca887f82 Binary files /dev/null and b/uploads/2011/08/clip_image006.gif differ diff --git a/uploads/2011/08/clip_image007-150x130.jpg b/uploads/2011/08/clip_image007-150x130.jpg new file mode 100644 index 00000000..34d6a845 Binary files /dev/null and b/uploads/2011/08/clip_image007-150x130.jpg differ diff --git a/uploads/2011/08/clip_image007.jpg b/uploads/2011/08/clip_image007.jpg new file mode 100644 index 00000000..1bcd5aa4 Binary files /dev/null and b/uploads/2011/08/clip_image007.jpg differ diff --git a/uploads/2011/08/clip_image0071-620x200.jpg b/uploads/2011/08/clip_image0071-620x200.jpg new file mode 100644 index 00000000..6d1809f2 Binary files /dev/null and b/uploads/2011/08/clip_image0071-620x200.jpg differ diff --git a/uploads/2011/08/clip_image0071-668x180.jpg b/uploads/2011/08/clip_image0071-668x180.jpg new file mode 100644 index 00000000..524bcb62 Binary files /dev/null and b/uploads/2011/08/clip_image0071-668x180.jpg differ diff --git a/uploads/2011/08/clip_image007_thumb-244x180.jpg b/uploads/2011/08/clip_image007_thumb-244x180.jpg new file mode 100644 index 00000000..2a9428df Binary files /dev/null and b/uploads/2011/08/clip_image007_thumb-244x180.jpg differ diff --git a/uploads/2011/08/clip_image007_thumb-244x200.jpg b/uploads/2011/08/clip_image007_thumb-244x200.jpg new file mode 100644 index 00000000..8569b456 Binary files /dev/null and b/uploads/2011/08/clip_image007_thumb-244x200.jpg differ diff --git a/uploads/2011/08/clip_image008-620x200.jpg b/uploads/2011/08/clip_image008-620x200.jpg new file mode 100644 index 00000000..2f5169fe Binary files /dev/null and b/uploads/2011/08/clip_image008-620x200.jpg differ diff --git a/uploads/2011/08/clip_image008-676x180.jpg b/uploads/2011/08/clip_image008-676x180.jpg new file mode 100644 index 00000000..64d69d04 Binary files /dev/null and b/uploads/2011/08/clip_image008-676x180.jpg differ diff --git a/uploads/2011/08/clip_image009-150x150.gif b/uploads/2011/08/clip_image009-150x150.gif new file mode 100644 index 00000000..a8e84747 Binary files /dev/null and b/uploads/2011/08/clip_image009-150x150.gif differ diff --git a/uploads/2011/08/clip_image009-441x180.jpg b/uploads/2011/08/clip_image009-441x180.jpg new file mode 100644 index 00000000..e3364a42 Binary files /dev/null and b/uploads/2011/08/clip_image009-441x180.jpg differ diff --git a/uploads/2011/08/clip_image009-441x200.jpg b/uploads/2011/08/clip_image009-441x200.jpg new file mode 100644 index 00000000..81383260 Binary files /dev/null and b/uploads/2011/08/clip_image009-441x200.jpg differ diff --git a/uploads/2011/08/clip_image009.gif b/uploads/2011/08/clip_image009.gif new file mode 100644 index 00000000..7162a771 Binary files /dev/null and b/uploads/2011/08/clip_image009.gif differ diff --git a/uploads/2011/08/clip_image010-620x200.jpg b/uploads/2011/08/clip_image010-620x200.jpg new file mode 100644 index 00000000..948f5901 Binary files /dev/null and b/uploads/2011/08/clip_image010-620x200.jpg differ diff --git a/uploads/2011/08/clip_image010-628x180.jpg b/uploads/2011/08/clip_image010-628x180.jpg new file mode 100644 index 00000000..31fb1cf9 Binary files /dev/null and b/uploads/2011/08/clip_image010-628x180.jpg differ diff --git a/uploads/2011/08/clip_image011-150x150.gif b/uploads/2011/08/clip_image011-150x150.gif new file mode 100644 index 00000000..975fe916 Binary files /dev/null and b/uploads/2011/08/clip_image011-150x150.gif differ diff --git a/uploads/2011/08/clip_image011-244x180.gif b/uploads/2011/08/clip_image011-244x180.gif new file mode 100644 index 00000000..2f1cb83b Binary files /dev/null and b/uploads/2011/08/clip_image011-244x180.gif differ diff --git a/uploads/2011/08/clip_image011-620x200.jpg b/uploads/2011/08/clip_image011-620x200.jpg new file mode 100644 index 00000000..dfc111e9 Binary files /dev/null and b/uploads/2011/08/clip_image011-620x200.jpg differ diff --git a/uploads/2011/08/clip_image011-628x180.jpg b/uploads/2011/08/clip_image011-628x180.jpg new file mode 100644 index 00000000..089600a3 Binary files /dev/null and b/uploads/2011/08/clip_image011-628x180.jpg differ diff --git a/uploads/2011/08/clip_image011.gif b/uploads/2011/08/clip_image011.gif new file mode 100644 index 00000000..9c8ced66 Binary files /dev/null and b/uploads/2011/08/clip_image011.gif differ diff --git a/uploads/2011/08/clip_image013-150x150.gif b/uploads/2011/08/clip_image013-150x150.gif new file mode 100644 index 00000000..8f0ebb26 Binary files /dev/null and b/uploads/2011/08/clip_image013-150x150.gif differ diff --git a/uploads/2011/08/clip_image013-568x180.jpg b/uploads/2011/08/clip_image013-568x180.jpg new file mode 100644 index 00000000..0a614ca3 Binary files /dev/null and b/uploads/2011/08/clip_image013-568x180.jpg differ diff --git a/uploads/2011/08/clip_image013-568x200.jpg b/uploads/2011/08/clip_image013-568x200.jpg new file mode 100644 index 00000000..637091dd Binary files /dev/null and b/uploads/2011/08/clip_image013-568x200.jpg differ diff --git a/uploads/2011/08/clip_image013.gif b/uploads/2011/08/clip_image013.gif new file mode 100644 index 00000000..971bc2d4 Binary files /dev/null and b/uploads/2011/08/clip_image013.gif differ diff --git a/uploads/2011/08/clip_image014-620x200.jpg b/uploads/2011/08/clip_image014-620x200.jpg new file mode 100644 index 00000000..3b8d72b8 Binary files /dev/null and b/uploads/2011/08/clip_image014-620x200.jpg differ diff --git a/uploads/2011/08/clip_image014-624x180.jpg b/uploads/2011/08/clip_image014-624x180.jpg new file mode 100644 index 00000000..ec9c5816 Binary files /dev/null and b/uploads/2011/08/clip_image014-624x180.jpg differ diff --git a/uploads/2011/08/clip_image015-150x150.gif b/uploads/2011/08/clip_image015-150x150.gif new file mode 100644 index 00000000..f52e85b2 Binary files /dev/null and b/uploads/2011/08/clip_image015-150x150.gif differ diff --git a/uploads/2011/08/clip_image015-265x180.jpg b/uploads/2011/08/clip_image015-265x180.jpg new file mode 100644 index 00000000..9b022ca6 Binary files /dev/null and b/uploads/2011/08/clip_image015-265x180.jpg differ diff --git a/uploads/2011/08/clip_image015-265x200.jpg b/uploads/2011/08/clip_image015-265x200.jpg new file mode 100644 index 00000000..dd5c20cb Binary files /dev/null and b/uploads/2011/08/clip_image015-265x200.jpg differ diff --git a/uploads/2011/08/clip_image015.gif b/uploads/2011/08/clip_image015.gif new file mode 100644 index 00000000..34cae188 Binary files /dev/null and b/uploads/2011/08/clip_image015.gif differ diff --git a/uploads/2011/08/clip_image015_thumb-178x180.jpg b/uploads/2011/08/clip_image015_thumb-178x180.jpg new file mode 100644 index 00000000..7602b3e4 Binary files /dev/null and b/uploads/2011/08/clip_image015_thumb-178x180.jpg differ diff --git a/uploads/2011/08/clip_image015_thumb-178x200.jpg b/uploads/2011/08/clip_image015_thumb-178x200.jpg new file mode 100644 index 00000000..b48e66eb Binary files /dev/null and b/uploads/2011/08/clip_image015_thumb-178x200.jpg differ diff --git a/uploads/2011/08/clip_image017-150x150.jpg b/uploads/2011/08/clip_image017-150x150.jpg new file mode 100644 index 00000000..e2a168d7 Binary files /dev/null and b/uploads/2011/08/clip_image017-150x150.jpg differ diff --git a/uploads/2011/08/clip_image017-265x300.jpg b/uploads/2011/08/clip_image017-265x300.jpg new file mode 100644 index 00000000..24a0f41f Binary files /dev/null and b/uploads/2011/08/clip_image017-265x300.jpg differ diff --git a/uploads/2011/08/clip_image017-502x180.jpg b/uploads/2011/08/clip_image017-502x180.jpg new file mode 100644 index 00000000..daf6c911 Binary files /dev/null and b/uploads/2011/08/clip_image017-502x180.jpg differ diff --git a/uploads/2011/08/clip_image017-502x200.jpg b/uploads/2011/08/clip_image017-502x200.jpg new file mode 100644 index 00000000..b9297ced Binary files /dev/null and b/uploads/2011/08/clip_image017-502x200.jpg differ diff --git a/uploads/2011/08/clip_image017.jpg b/uploads/2011/08/clip_image017.jpg new file mode 100644 index 00000000..84610e57 Binary files /dev/null and b/uploads/2011/08/clip_image017.jpg differ diff --git a/uploads/2011/08/clip_image0171-588x180.jpg b/uploads/2011/08/clip_image0171-588x180.jpg new file mode 100644 index 00000000..9ac40e3e Binary files /dev/null and b/uploads/2011/08/clip_image0171-588x180.jpg differ diff --git a/uploads/2011/08/clip_image0171-588x200.jpg b/uploads/2011/08/clip_image0171-588x200.jpg new file mode 100644 index 00000000..27c58075 Binary files /dev/null and b/uploads/2011/08/clip_image0171-588x200.jpg differ diff --git a/uploads/2011/08/clip_image017_thumb-150x150.jpg b/uploads/2011/08/clip_image017_thumb-150x150.jpg new file mode 100644 index 00000000..8af037cd Binary files /dev/null and b/uploads/2011/08/clip_image017_thumb-150x150.jpg differ diff --git a/uploads/2011/08/clip_image017_thumb-216x180.jpg b/uploads/2011/08/clip_image017_thumb-216x180.jpg new file mode 100644 index 00000000..5d1553d7 Binary files /dev/null and b/uploads/2011/08/clip_image017_thumb-216x180.jpg differ diff --git a/uploads/2011/08/clip_image017_thumb-216x200.jpg b/uploads/2011/08/clip_image017_thumb-216x200.jpg new file mode 100644 index 00000000..bb7acb27 Binary files /dev/null and b/uploads/2011/08/clip_image017_thumb-216x200.jpg differ diff --git a/uploads/2011/08/clip_image017_thumb.jpg b/uploads/2011/08/clip_image017_thumb.jpg new file mode 100644 index 00000000..34d9b553 Binary files /dev/null and b/uploads/2011/08/clip_image017_thumb.jpg differ diff --git a/uploads/2011/08/clip_image018-606x180.jpg b/uploads/2011/08/clip_image018-606x180.jpg new file mode 100644 index 00000000..04077d25 Binary files /dev/null and b/uploads/2011/08/clip_image018-606x180.jpg differ diff --git a/uploads/2011/08/clip_image018-606x200.jpg b/uploads/2011/08/clip_image018-606x200.jpg new file mode 100644 index 00000000..cf2da1af Binary files /dev/null and b/uploads/2011/08/clip_image018-606x200.jpg differ diff --git a/uploads/2011/08/clip_image019-150x150.gif b/uploads/2011/08/clip_image019-150x150.gif new file mode 100644 index 00000000..305e7f3a Binary files /dev/null and b/uploads/2011/08/clip_image019-150x150.gif differ diff --git a/uploads/2011/08/clip_image019-213x180.gif b/uploads/2011/08/clip_image019-213x180.gif new file mode 100644 index 00000000..730969e6 Binary files /dev/null and b/uploads/2011/08/clip_image019-213x180.gif differ diff --git a/uploads/2011/08/clip_image019-213x200.gif b/uploads/2011/08/clip_image019-213x200.gif new file mode 100644 index 00000000..334f9ced Binary files /dev/null and b/uploads/2011/08/clip_image019-213x200.gif differ diff --git a/uploads/2011/08/clip_image019-620x200.jpg b/uploads/2011/08/clip_image019-620x200.jpg new file mode 100644 index 00000000..2d5d346b Binary files /dev/null and b/uploads/2011/08/clip_image019-620x200.jpg differ diff --git a/uploads/2011/08/clip_image019-898x180.jpg b/uploads/2011/08/clip_image019-898x180.jpg new file mode 100644 index 00000000..2bb94d9a Binary files /dev/null and b/uploads/2011/08/clip_image019-898x180.jpg differ diff --git a/uploads/2011/08/clip_image019.gif b/uploads/2011/08/clip_image019.gif new file mode 100644 index 00000000..1e9e2c0b Binary files /dev/null and b/uploads/2011/08/clip_image019.gif differ diff --git a/uploads/2011/08/clip_image021-150x150.gif b/uploads/2011/08/clip_image021-150x150.gif new file mode 100644 index 00000000..d28e5d6c Binary files /dev/null and b/uploads/2011/08/clip_image021-150x150.gif differ diff --git a/uploads/2011/08/clip_image021.gif b/uploads/2011/08/clip_image021.gif new file mode 100644 index 00000000..5661f3f8 Binary files /dev/null and b/uploads/2011/08/clip_image021.gif differ diff --git a/uploads/2011/08/clip_image023-150x150.gif b/uploads/2011/08/clip_image023-150x150.gif new file mode 100644 index 00000000..9261d649 Binary files /dev/null and b/uploads/2011/08/clip_image023-150x150.gif differ diff --git a/uploads/2011/08/clip_image023.gif b/uploads/2011/08/clip_image023.gif new file mode 100644 index 00000000..35e8f05e Binary files /dev/null and b/uploads/2011/08/clip_image023.gif differ diff --git a/uploads/2011/08/clip_image025-150x150.gif b/uploads/2011/08/clip_image025-150x150.gif new file mode 100644 index 00000000..dbeeb55d Binary files /dev/null and b/uploads/2011/08/clip_image025-150x150.gif differ diff --git a/uploads/2011/08/clip_image025.gif b/uploads/2011/08/clip_image025.gif new file mode 100644 index 00000000..6cdf9392 Binary files /dev/null and b/uploads/2011/08/clip_image025.gif differ diff --git a/uploads/2011/08/clip_image027-150x125.gif b/uploads/2011/08/clip_image027-150x125.gif new file mode 100644 index 00000000..eca27bb6 Binary files /dev/null and b/uploads/2011/08/clip_image027-150x125.gif differ diff --git a/uploads/2011/08/clip_image027.gif b/uploads/2011/08/clip_image027.gif new file mode 100644 index 00000000..80c430b0 Binary files /dev/null and b/uploads/2011/08/clip_image027.gif differ diff --git a/uploads/2011/08/clip_image028-150x150.jpg b/uploads/2011/08/clip_image028-150x150.jpg new file mode 100644 index 00000000..c295d078 Binary files /dev/null and b/uploads/2011/08/clip_image028-150x150.jpg differ diff --git a/uploads/2011/08/clip_image028.jpg b/uploads/2011/08/clip_image028.jpg new file mode 100644 index 00000000..d097c3a8 Binary files /dev/null and b/uploads/2011/08/clip_image028.jpg differ diff --git a/uploads/2011/08/clip_image029-150x150.jpg b/uploads/2011/08/clip_image029-150x150.jpg new file mode 100644 index 00000000..f59af8dc Binary files /dev/null and b/uploads/2011/08/clip_image029-150x150.jpg differ diff --git a/uploads/2011/08/clip_image029.jpg b/uploads/2011/08/clip_image029.jpg new file mode 100644 index 00000000..9b376962 Binary files /dev/null and b/uploads/2011/08/clip_image029.jpg differ diff --git a/uploads/2011/08/clip_image030-150x150.jpg b/uploads/2011/08/clip_image030-150x150.jpg new file mode 100644 index 00000000..65be718f Binary files /dev/null and b/uploads/2011/08/clip_image030-150x150.jpg differ diff --git a/uploads/2011/08/clip_image030.jpg b/uploads/2011/08/clip_image030.jpg new file mode 100644 index 00000000..c3cbe9eb Binary files /dev/null and b/uploads/2011/08/clip_image030.jpg differ diff --git a/uploads/2011/08/clip_image031-150x150.jpg b/uploads/2011/08/clip_image031-150x150.jpg new file mode 100644 index 00000000..ba5dee52 Binary files /dev/null and b/uploads/2011/08/clip_image031-150x150.jpg differ diff --git a/uploads/2011/08/clip_image031.jpg b/uploads/2011/08/clip_image031.jpg new file mode 100644 index 00000000..36107e79 Binary files /dev/null and b/uploads/2011/08/clip_image031.jpg differ diff --git a/uploads/2011/08/clip_image032-150x150.jpg b/uploads/2011/08/clip_image032-150x150.jpg new file mode 100644 index 00000000..5a839667 Binary files /dev/null and b/uploads/2011/08/clip_image032-150x150.jpg differ diff --git a/uploads/2011/08/clip_image032.jpg b/uploads/2011/08/clip_image032.jpg new file mode 100644 index 00000000..fb43dcaf Binary files /dev/null and b/uploads/2011/08/clip_image032.jpg differ diff --git a/uploads/2011/08/clip_image033-150x150.jpg b/uploads/2011/08/clip_image033-150x150.jpg new file mode 100644 index 00000000..e3211e99 Binary files /dev/null and b/uploads/2011/08/clip_image033-150x150.jpg differ diff --git a/uploads/2011/08/clip_image033.jpg b/uploads/2011/08/clip_image033.jpg new file mode 100644 index 00000000..91b2d14d Binary files /dev/null and b/uploads/2011/08/clip_image033.jpg differ diff --git a/uploads/2011/08/clip_image034-150x150.jpg b/uploads/2011/08/clip_image034-150x150.jpg new file mode 100644 index 00000000..16624d82 Binary files /dev/null and b/uploads/2011/08/clip_image034-150x150.jpg differ diff --git a/uploads/2011/08/clip_image034.jpg b/uploads/2011/08/clip_image034.jpg new file mode 100644 index 00000000..b3464f8b Binary files /dev/null and b/uploads/2011/08/clip_image034.jpg differ diff --git a/uploads/2011/08/clip_image035-150x150.jpg b/uploads/2011/08/clip_image035-150x150.jpg new file mode 100644 index 00000000..d59ac724 Binary files /dev/null and b/uploads/2011/08/clip_image035-150x150.jpg differ diff --git a/uploads/2011/08/clip_image035.jpg b/uploads/2011/08/clip_image035.jpg new file mode 100644 index 00000000..b55adb3b Binary files /dev/null and b/uploads/2011/08/clip_image035.jpg differ diff --git a/uploads/2011/08/clip_image036-150x150.jpg b/uploads/2011/08/clip_image036-150x150.jpg new file mode 100644 index 00000000..6012e169 Binary files /dev/null and b/uploads/2011/08/clip_image036-150x150.jpg differ diff --git a/uploads/2011/08/clip_image036.jpg b/uploads/2011/08/clip_image036.jpg new file mode 100644 index 00000000..9b5729f7 Binary files /dev/null and b/uploads/2011/08/clip_image036.jpg differ diff --git a/uploads/2011/08/clip_image037-150x150.jpg b/uploads/2011/08/clip_image037-150x150.jpg new file mode 100644 index 00000000..2c61db78 Binary files /dev/null and b/uploads/2011/08/clip_image037-150x150.jpg differ diff --git a/uploads/2011/08/clip_image037.jpg b/uploads/2011/08/clip_image037.jpg new file mode 100644 index 00000000..96d4916b Binary files /dev/null and b/uploads/2011/08/clip_image037.jpg differ diff --git a/uploads/2011/08/clip_image038-150x150.jpg b/uploads/2011/08/clip_image038-150x150.jpg new file mode 100644 index 00000000..ddbdef13 Binary files /dev/null and b/uploads/2011/08/clip_image038-150x150.jpg differ diff --git a/uploads/2011/08/clip_image038.jpg b/uploads/2011/08/clip_image038.jpg new file mode 100644 index 00000000..c546feb5 Binary files /dev/null and b/uploads/2011/08/clip_image038.jpg differ diff --git a/uploads/2011/08/clip_image039-150x150.jpg b/uploads/2011/08/clip_image039-150x150.jpg new file mode 100644 index 00000000..021756d2 Binary files /dev/null and b/uploads/2011/08/clip_image039-150x150.jpg differ diff --git a/uploads/2011/08/clip_image039.jpg b/uploads/2011/08/clip_image039.jpg new file mode 100644 index 00000000..0b4d2a49 Binary files /dev/null and b/uploads/2011/08/clip_image039.jpg differ diff --git a/uploads/2011/08/clip_image040-150x150.jpg b/uploads/2011/08/clip_image040-150x150.jpg new file mode 100644 index 00000000..aec679b3 Binary files /dev/null and b/uploads/2011/08/clip_image040-150x150.jpg differ diff --git a/uploads/2011/08/clip_image040.jpg b/uploads/2011/08/clip_image040.jpg new file mode 100644 index 00000000..bfcd18a5 Binary files /dev/null and b/uploads/2011/08/clip_image040.jpg differ diff --git a/uploads/2011/08/clip_image041-150x150.jpg b/uploads/2011/08/clip_image041-150x150.jpg new file mode 100644 index 00000000..5b1752a8 Binary files /dev/null and b/uploads/2011/08/clip_image041-150x150.jpg differ diff --git a/uploads/2011/08/clip_image041.jpg b/uploads/2011/08/clip_image041.jpg new file mode 100644 index 00000000..486af0a1 Binary files /dev/null and b/uploads/2011/08/clip_image041.jpg differ diff --git a/uploads/2011/08/clip_image042-150x150.jpg b/uploads/2011/08/clip_image042-150x150.jpg new file mode 100644 index 00000000..f28a5ad7 Binary files /dev/null and b/uploads/2011/08/clip_image042-150x150.jpg differ diff --git a/uploads/2011/08/clip_image042.jpg b/uploads/2011/08/clip_image042.jpg new file mode 100644 index 00000000..58b7b8f4 Binary files /dev/null and b/uploads/2011/08/clip_image042.jpg differ diff --git a/uploads/2011/08/image-150x150.jpg b/uploads/2011/08/image-150x150.jpg new file mode 100644 index 00000000..2b207d2b Binary files /dev/null and b/uploads/2011/08/image-150x150.jpg differ diff --git a/uploads/2011/08/image-150x150.png b/uploads/2011/08/image-150x150.png new file mode 100644 index 00000000..e189d70e Binary files /dev/null and b/uploads/2011/08/image-150x150.png differ diff --git a/uploads/2011/08/image-296x300.png b/uploads/2011/08/image-296x300.png new file mode 100644 index 00000000..36dc20a0 Binary files /dev/null and b/uploads/2011/08/image-296x300.png differ diff --git a/uploads/2011/08/image-300x215.jpg b/uploads/2011/08/image-300x215.jpg new file mode 100644 index 00000000..26714a2e Binary files /dev/null and b/uploads/2011/08/image-300x215.jpg differ diff --git a/uploads/2011/08/image-541x180.png b/uploads/2011/08/image-541x180.png new file mode 100644 index 00000000..e4a93938 Binary files /dev/null and b/uploads/2011/08/image-541x180.png differ diff --git a/uploads/2011/08/image-541x200.png b/uploads/2011/08/image-541x200.png new file mode 100644 index 00000000..2c3c1371 Binary files /dev/null and b/uploads/2011/08/image-541x200.png differ diff --git a/uploads/2011/08/image.jpg b/uploads/2011/08/image.jpg new file mode 100644 index 00000000..11cb5404 Binary files /dev/null and b/uploads/2011/08/image.jpg differ diff --git a/uploads/2011/08/image.png b/uploads/2011/08/image.png new file mode 100644 index 00000000..b26c4ed2 Binary files /dev/null and b/uploads/2011/08/image.png differ diff --git a/uploads/2011/08/image_thumb-150x150.jpg b/uploads/2011/08/image_thumb-150x150.jpg new file mode 100644 index 00000000..c275aba6 Binary files /dev/null and b/uploads/2011/08/image_thumb-150x150.jpg differ diff --git a/uploads/2011/08/image_thumb-150x150.png b/uploads/2011/08/image_thumb-150x150.png new file mode 100644 index 00000000..e9f95804 Binary files /dev/null and b/uploads/2011/08/image_thumb-150x150.png differ diff --git a/uploads/2011/08/image_thumb-295x300.png b/uploads/2011/08/image_thumb-295x300.png new file mode 100644 index 00000000..96e5fc4d Binary files /dev/null and b/uploads/2011/08/image_thumb-295x300.png differ diff --git a/uploads/2011/08/image_thumb-300x215.jpg b/uploads/2011/08/image_thumb-300x215.jpg new file mode 100644 index 00000000..9697d390 Binary files /dev/null and b/uploads/2011/08/image_thumb-300x215.jpg differ diff --git a/uploads/2011/08/image_thumb-426x180.png b/uploads/2011/08/image_thumb-426x180.png new file mode 100644 index 00000000..8e3a5e28 Binary files /dev/null and b/uploads/2011/08/image_thumb-426x180.png differ diff --git a/uploads/2011/08/image_thumb-426x200.png b/uploads/2011/08/image_thumb-426x200.png new file mode 100644 index 00000000..78e907e1 Binary files /dev/null and b/uploads/2011/08/image_thumb-426x200.png differ diff --git a/uploads/2011/08/wanglogo.png b/uploads/2011/08/wanglogo.png new file mode 100644 index 00000000..86276809 Binary files /dev/null and b/uploads/2011/08/wanglogo.png differ diff --git a/uploads/2011/11/pic1-150x150.jpg b/uploads/2011/11/pic1-150x150.jpg new file mode 100644 index 00000000..878c7d8a Binary files /dev/null and b/uploads/2011/11/pic1-150x150.jpg differ diff --git a/uploads/2011/11/pic1-300x230.jpg b/uploads/2011/11/pic1-300x230.jpg new file mode 100644 index 00000000..f2f1f086 Binary files /dev/null and b/uploads/2011/11/pic1-300x230.jpg differ diff --git a/uploads/2011/11/pic1-613x180.jpg b/uploads/2011/11/pic1-613x180.jpg new file mode 100644 index 00000000..283fef55 Binary files /dev/null and b/uploads/2011/11/pic1-613x180.jpg differ diff --git a/uploads/2011/11/pic1-613x200.jpg b/uploads/2011/11/pic1-613x200.jpg new file mode 100644 index 00000000..66972e4a Binary files /dev/null and b/uploads/2011/11/pic1-613x200.jpg differ diff --git a/uploads/2011/11/pic1.jpg b/uploads/2011/11/pic1.jpg new file mode 100644 index 00000000..9ec02ec2 Binary files /dev/null and b/uploads/2011/11/pic1.jpg differ diff --git a/uploads/2011/11/pic1_thumb-150x150.jpg b/uploads/2011/11/pic1_thumb-150x150.jpg new file mode 100644 index 00000000..018cbdb7 Binary files /dev/null and b/uploads/2011/11/pic1_thumb-150x150.jpg differ diff --git a/uploads/2011/11/pic1_thumb-244x180.jpg b/uploads/2011/11/pic1_thumb-244x180.jpg new file mode 100644 index 00000000..61095974 Binary files /dev/null and b/uploads/2011/11/pic1_thumb-244x180.jpg differ diff --git a/uploads/2011/11/pic2-150x150.jpg b/uploads/2011/11/pic2-150x150.jpg new file mode 100644 index 00000000..994f7203 Binary files /dev/null and b/uploads/2011/11/pic2-150x150.jpg differ diff --git a/uploads/2011/11/pic2-300x196.jpg b/uploads/2011/11/pic2-300x196.jpg new file mode 100644 index 00000000..bb8426a1 Binary files /dev/null and b/uploads/2011/11/pic2-300x196.jpg differ diff --git a/uploads/2011/11/pic2-620x200.jpg b/uploads/2011/11/pic2-620x200.jpg new file mode 100644 index 00000000..7efa484d Binary files /dev/null and b/uploads/2011/11/pic2-620x200.jpg differ diff --git a/uploads/2011/11/pic2-636x180.jpg b/uploads/2011/11/pic2-636x180.jpg new file mode 100644 index 00000000..cf800fd7 Binary files /dev/null and b/uploads/2011/11/pic2-636x180.jpg differ diff --git a/uploads/2011/11/pic2.jpg b/uploads/2011/11/pic2.jpg new file mode 100644 index 00000000..bfe6e028 Binary files /dev/null and b/uploads/2011/11/pic2.jpg differ diff --git a/uploads/2011/11/pic2_thumb-150x150.jpg b/uploads/2011/11/pic2_thumb-150x150.jpg new file mode 100644 index 00000000..71411868 Binary files /dev/null and b/uploads/2011/11/pic2_thumb-150x150.jpg differ diff --git a/uploads/2011/12/image-150x150.png b/uploads/2011/12/image-150x150.png new file mode 100644 index 00000000..51d82c06 Binary files /dev/null and b/uploads/2011/12/image-150x150.png differ diff --git a/uploads/2011/12/image-300x223.png b/uploads/2011/12/image-300x223.png new file mode 100644 index 00000000..aca32dd1 Binary files /dev/null and b/uploads/2011/12/image-300x223.png differ diff --git a/uploads/2011/12/image-551x180.png b/uploads/2011/12/image-551x180.png new file mode 100644 index 00000000..02d4b42a Binary files /dev/null and b/uploads/2011/12/image-551x180.png differ diff --git a/uploads/2011/12/image-551x200.png b/uploads/2011/12/image-551x200.png new file mode 100644 index 00000000..099cb47c Binary files /dev/null and b/uploads/2011/12/image-551x200.png differ diff --git a/uploads/2011/12/image.png b/uploads/2011/12/image.png new file mode 100644 index 00000000..7a866370 Binary files /dev/null and b/uploads/2011/12/image.png differ diff --git a/uploads/2011/12/image_thumb-150x150.png b/uploads/2011/12/image_thumb-150x150.png new file mode 100644 index 00000000..a8506de7 Binary files /dev/null and b/uploads/2011/12/image_thumb-150x150.png differ diff --git a/uploads/2011/12/image_thumb-291x180.png b/uploads/2011/12/image_thumb-291x180.png new file mode 100644 index 00000000..0cbb77e4 Binary files /dev/null and b/uploads/2011/12/image_thumb-291x180.png differ diff --git a/uploads/2011/12/image_thumb-291x200.png b/uploads/2011/12/image_thumb-291x200.png new file mode 100644 index 00000000..4ced89fd Binary files /dev/null and b/uploads/2011/12/image_thumb-291x200.png differ diff --git a/uploads/2012/01/d1-150x150.png b/uploads/2012/01/d1-150x150.png new file mode 100644 index 00000000..af439e9d Binary files /dev/null and b/uploads/2012/01/d1-150x150.png differ diff --git a/uploads/2012/01/d1-600x800.png b/uploads/2012/01/d1-600x800.png new file mode 100644 index 00000000..e08c4b76 Binary files /dev/null and b/uploads/2012/01/d1-600x800.png differ diff --git a/uploads/2012/01/d1.png b/uploads/2012/01/d1.png new file mode 100644 index 00000000..3114f93c Binary files /dev/null and b/uploads/2012/01/d1.png differ diff --git a/uploads/2012/01/image1-150x150.png b/uploads/2012/01/image1-150x150.png new file mode 100644 index 00000000..8158007a Binary files /dev/null and b/uploads/2012/01/image1-150x150.png differ diff --git a/uploads/2012/01/image1-300x211.png b/uploads/2012/01/image1-300x211.png new file mode 100644 index 00000000..4944a96a Binary files /dev/null and b/uploads/2012/01/image1-300x211.png differ diff --git a/uploads/2012/01/image1.png b/uploads/2012/01/image1.png new file mode 100644 index 00000000..42fec78f Binary files /dev/null and b/uploads/2012/01/image1.png differ diff --git a/uploads/2012/01/image2-150x150.png b/uploads/2012/01/image2-150x150.png new file mode 100644 index 00000000..a3aa3407 Binary files /dev/null and b/uploads/2012/01/image2-150x150.png differ diff --git a/uploads/2012/01/image2-300x200.png b/uploads/2012/01/image2-300x200.png new file mode 100644 index 00000000..fd9f204e Binary files /dev/null and b/uploads/2012/01/image2-300x200.png differ diff --git a/uploads/2012/01/image3-150x150.png b/uploads/2012/01/image3-150x150.png new file mode 100644 index 00000000..990bd239 Binary files /dev/null and b/uploads/2012/01/image3-150x150.png differ diff --git a/uploads/2012/01/image3-300x195.png b/uploads/2012/01/image3-300x195.png new file mode 100644 index 00000000..159b3001 Binary files /dev/null and b/uploads/2012/01/image3-300x195.png differ diff --git a/uploads/2012/01/image3.png b/uploads/2012/01/image3.png new file mode 100644 index 00000000..a314ef71 Binary files /dev/null and b/uploads/2012/01/image3.png differ diff --git a/uploads/2012/01/image4-150x115.png b/uploads/2012/01/image4-150x115.png new file mode 100644 index 00000000..513d5ed5 Binary files /dev/null and b/uploads/2012/01/image4-150x115.png differ diff --git a/uploads/2012/01/image4-300x59.png b/uploads/2012/01/image4-300x59.png new file mode 100644 index 00000000..c55d8ca6 Binary files /dev/null and b/uploads/2012/01/image4-300x59.png differ diff --git a/uploads/2012/01/image4.png b/uploads/2012/01/image4.png new file mode 100644 index 00000000..fd9c06bf Binary files /dev/null and b/uploads/2012/01/image4.png differ diff --git a/uploads/2012/01/image5-150x126.png b/uploads/2012/01/image5-150x126.png new file mode 100644 index 00000000..81a06419 Binary files /dev/null and b/uploads/2012/01/image5-150x126.png differ diff --git a/uploads/2012/01/image5-300x84.png b/uploads/2012/01/image5-300x84.png new file mode 100644 index 00000000..6e919bf4 Binary files /dev/null and b/uploads/2012/01/image5-300x84.png differ diff --git a/uploads/2012/01/image6-150x150.png b/uploads/2012/01/image6-150x150.png new file mode 100644 index 00000000..5012cc45 Binary files /dev/null and b/uploads/2012/01/image6-150x150.png differ diff --git a/uploads/2012/01/image6-300x190.png b/uploads/2012/01/image6-300x190.png new file mode 100644 index 00000000..b25a49ee Binary files /dev/null and b/uploads/2012/01/image6-300x190.png differ diff --git a/uploads/2012/01/image6.png b/uploads/2012/01/image6.png new file mode 100644 index 00000000..0dcdaaa6 Binary files /dev/null and b/uploads/2012/01/image6.png differ diff --git a/uploads/2012/01/image_thumb1-150x150.png b/uploads/2012/01/image_thumb1-150x150.png new file mode 100644 index 00000000..ea9c7994 Binary files /dev/null and b/uploads/2012/01/image_thumb1-150x150.png differ diff --git a/uploads/2012/01/image_thumb1-300x212.png b/uploads/2012/01/image_thumb1-300x212.png new file mode 100644 index 00000000..decfd332 Binary files /dev/null and b/uploads/2012/01/image_thumb1-300x212.png differ diff --git a/uploads/2012/01/image_thumb2-150x150.png b/uploads/2012/01/image_thumb2-150x150.png new file mode 100644 index 00000000..af880668 Binary files /dev/null and b/uploads/2012/01/image_thumb2-150x150.png differ diff --git a/uploads/2012/01/image_thumb2-300x202.png b/uploads/2012/01/image_thumb2-300x202.png new file mode 100644 index 00000000..506443fc Binary files /dev/null and b/uploads/2012/01/image_thumb2-300x202.png differ diff --git a/uploads/2012/01/image_thumb3-150x150.png b/uploads/2012/01/image_thumb3-150x150.png new file mode 100644 index 00000000..c48cf58d Binary files /dev/null and b/uploads/2012/01/image_thumb3-150x150.png differ diff --git a/uploads/2012/01/image_thumb3-300x197.png b/uploads/2012/01/image_thumb3-300x197.png new file mode 100644 index 00000000..4c9f6772 Binary files /dev/null and b/uploads/2012/01/image_thumb3-300x197.png differ diff --git a/uploads/2012/01/image_thumb4-150x101.png b/uploads/2012/01/image_thumb4-150x101.png new file mode 100644 index 00000000..c3f00294 Binary files /dev/null and b/uploads/2012/01/image_thumb4-150x101.png differ diff --git a/uploads/2012/01/image_thumb4-300x66.png b/uploads/2012/01/image_thumb4-300x66.png new file mode 100644 index 00000000..45639db6 Binary files /dev/null and b/uploads/2012/01/image_thumb4-300x66.png differ diff --git a/uploads/2012/01/image_thumb5-150x125.png b/uploads/2012/01/image_thumb5-150x125.png new file mode 100644 index 00000000..3d4a864b Binary files /dev/null and b/uploads/2012/01/image_thumb5-150x125.png differ diff --git a/uploads/2012/01/image_thumb5-300x87.png b/uploads/2012/01/image_thumb5-300x87.png new file mode 100644 index 00000000..54afc02c Binary files /dev/null and b/uploads/2012/01/image_thumb5-300x87.png differ diff --git a/uploads/2012/01/image_thumb6-150x150.png b/uploads/2012/01/image_thumb6-150x150.png new file mode 100644 index 00000000..5a9196d0 Binary files /dev/null and b/uploads/2012/01/image_thumb6-150x150.png differ diff --git a/uploads/2012/01/image_thumb6-300x196.png b/uploads/2012/01/image_thumb6-300x196.png new file mode 100644 index 00000000..2e2c1e43 Binary files /dev/null and b/uploads/2012/01/image_thumb6-300x196.png differ diff --git a/uploads/2012/01/son-of-obsidian3-150x150.jpg b/uploads/2012/01/son-of-obsidian3-150x150.jpg new file mode 100644 index 00000000..c0c9a7b0 Binary files /dev/null and b/uploads/2012/01/son-of-obsidian3-150x150.jpg differ diff --git a/uploads/2012/01/son-of-obsidian3-300x88.jpg b/uploads/2012/01/son-of-obsidian3-300x88.jpg new file mode 100644 index 00000000..661bf300 Binary files /dev/null and b/uploads/2012/01/son-of-obsidian3-300x88.jpg differ diff --git a/uploads/2012/01/son-of-obsidian3.jpg b/uploads/2012/01/son-of-obsidian3.jpg new file mode 100644 index 00000000..bc2f5e5a Binary files /dev/null and b/uploads/2012/01/son-of-obsidian3.jpg differ diff --git a/uploads/2012/01/son-of-obsidian_thumb1-150x132.jpg b/uploads/2012/01/son-of-obsidian_thumb1-150x132.jpg new file mode 100644 index 00000000..4f7db4b1 Binary files /dev/null and b/uploads/2012/01/son-of-obsidian_thumb1-150x132.jpg differ diff --git a/uploads/2012/01/son-of-obsidian_thumb1-300x91.jpg b/uploads/2012/01/son-of-obsidian_thumb1-300x91.jpg new file mode 100644 index 00000000..468ba423 Binary files /dev/null and b/uploads/2012/01/son-of-obsidian_thumb1-300x91.jpg differ diff --git a/uploads/2012/01/wekeroad-ink1-150x150.jpg b/uploads/2012/01/wekeroad-ink1-150x150.jpg new file mode 100644 index 00000000..4a33e00a Binary files /dev/null and b/uploads/2012/01/wekeroad-ink1-150x150.jpg differ diff --git a/uploads/2012/01/wekeroad-ink1-300x88.jpg b/uploads/2012/01/wekeroad-ink1-300x88.jpg new file mode 100644 index 00000000..113c795f Binary files /dev/null and b/uploads/2012/01/wekeroad-ink1-300x88.jpg differ diff --git a/uploads/2012/01/wekeroad-ink1.jpg b/uploads/2012/01/wekeroad-ink1.jpg new file mode 100644 index 00000000..bce65811 Binary files /dev/null and b/uploads/2012/01/wekeroad-ink1.jpg differ diff --git a/uploads/2012/01/wekeroad-ink_thumb1-150x130.jpg b/uploads/2012/01/wekeroad-ink_thumb1-150x130.jpg new file mode 100644 index 00000000..44300920 Binary files /dev/null and b/uploads/2012/01/wekeroad-ink_thumb1-150x130.jpg differ diff --git a/uploads/2012/01/wekeroad-ink_thumb1-300x90.jpg b/uploads/2012/01/wekeroad-ink_thumb1-300x90.jpg new file mode 100644 index 00000000..514c412d Binary files /dev/null and b/uploads/2012/01/wekeroad-ink_thumb1-300x90.jpg differ diff --git a/uploads/2012/02/image-150x101.png b/uploads/2012/02/image-150x101.png new file mode 100644 index 00000000..7417ab4b Binary files /dev/null and b/uploads/2012/02/image-150x101.png differ diff --git a/uploads/2012/02/image-300x46.png b/uploads/2012/02/image-300x46.png new file mode 100644 index 00000000..e31b4fc1 Binary files /dev/null and b/uploads/2012/02/image-300x46.png differ diff --git a/uploads/2012/02/image.png b/uploads/2012/02/image.png new file mode 100644 index 00000000..6b9d9486 Binary files /dev/null and b/uploads/2012/02/image.png differ diff --git a/uploads/2012/02/image1-150x83.png b/uploads/2012/02/image1-150x83.png new file mode 100644 index 00000000..8eed3988 Binary files /dev/null and b/uploads/2012/02/image1-150x83.png differ diff --git a/uploads/2012/02/image1-300x66.png b/uploads/2012/02/image1-300x66.png new file mode 100644 index 00000000..23b5f0b7 Binary files /dev/null and b/uploads/2012/02/image1-300x66.png differ diff --git a/uploads/2012/02/image1.png b/uploads/2012/02/image1.png new file mode 100644 index 00000000..f53cbef7 Binary files /dev/null and b/uploads/2012/02/image1.png differ diff --git a/uploads/2012/02/image2-150x150.png b/uploads/2012/02/image2-150x150.png new file mode 100644 index 00000000..94becef2 Binary files /dev/null and b/uploads/2012/02/image2-150x150.png differ diff --git a/uploads/2012/02/image2-300x203.png b/uploads/2012/02/image2-300x203.png new file mode 100644 index 00000000..2877e304 Binary files /dev/null and b/uploads/2012/02/image2-300x203.png differ diff --git a/uploads/2012/02/image3-150x150.png b/uploads/2012/02/image3-150x150.png new file mode 100644 index 00000000..1cad1ef5 Binary files /dev/null and b/uploads/2012/02/image3-150x150.png differ diff --git a/uploads/2012/02/image3-300x80.png b/uploads/2012/02/image3-300x80.png new file mode 100644 index 00000000..3778a248 Binary files /dev/null and b/uploads/2012/02/image3-300x80.png differ diff --git a/uploads/2012/02/image3.png b/uploads/2012/02/image3.png new file mode 100644 index 00000000..74ef3551 Binary files /dev/null and b/uploads/2012/02/image3.png differ diff --git a/uploads/2012/02/image4-150x150.png b/uploads/2012/02/image4-150x150.png new file mode 100644 index 00000000..31901d4e Binary files /dev/null and b/uploads/2012/02/image4-150x150.png differ diff --git a/uploads/2012/02/image4-300x158.png b/uploads/2012/02/image4-300x158.png new file mode 100644 index 00000000..28ffdf64 Binary files /dev/null and b/uploads/2012/02/image4-300x158.png differ diff --git a/uploads/2012/02/image4.png b/uploads/2012/02/image4.png new file mode 100644 index 00000000..a2436ed1 Binary files /dev/null and b/uploads/2012/02/image4.png differ diff --git a/uploads/2012/02/image5-150x150.png b/uploads/2012/02/image5-150x150.png new file mode 100644 index 00000000..c5bc8373 Binary files /dev/null and b/uploads/2012/02/image5-150x150.png differ diff --git a/uploads/2012/02/image5-300x231.png b/uploads/2012/02/image5-300x231.png new file mode 100644 index 00000000..7a410367 Binary files /dev/null and b/uploads/2012/02/image5-300x231.png differ diff --git a/uploads/2012/02/image6-150x150.png b/uploads/2012/02/image6-150x150.png new file mode 100644 index 00000000..52dc40a1 Binary files /dev/null and b/uploads/2012/02/image6-150x150.png differ diff --git a/uploads/2012/02/image6-300x122.png b/uploads/2012/02/image6-300x122.png new file mode 100644 index 00000000..048b027d Binary files /dev/null and b/uploads/2012/02/image6-300x122.png differ diff --git a/uploads/2012/02/image6.png b/uploads/2012/02/image6.png new file mode 100644 index 00000000..20fc0771 Binary files /dev/null and b/uploads/2012/02/image6.png differ diff --git a/uploads/2012/02/image7-150x61.png b/uploads/2012/02/image7-150x61.png new file mode 100644 index 00000000..014eaec3 Binary files /dev/null and b/uploads/2012/02/image7-150x61.png differ diff --git a/uploads/2012/02/image7.png b/uploads/2012/02/image7.png new file mode 100644 index 00000000..6e0930aa Binary files /dev/null and b/uploads/2012/02/image7.png differ diff --git a/uploads/2012/02/image8-150x150.png b/uploads/2012/02/image8-150x150.png new file mode 100644 index 00000000..a5c539ea Binary files /dev/null and b/uploads/2012/02/image8-150x150.png differ diff --git a/uploads/2012/02/image8-300x221.png b/uploads/2012/02/image8-300x221.png new file mode 100644 index 00000000..d47c5629 Binary files /dev/null and b/uploads/2012/02/image8-300x221.png differ diff --git a/uploads/2012/02/image8.png b/uploads/2012/02/image8.png new file mode 100644 index 00000000..3628a570 Binary files /dev/null and b/uploads/2012/02/image8.png differ diff --git a/uploads/2012/02/image_thumb-150x100.png b/uploads/2012/02/image_thumb-150x100.png new file mode 100644 index 00000000..abbdb897 Binary files /dev/null and b/uploads/2012/02/image_thumb-150x100.png differ diff --git a/uploads/2012/02/image_thumb-300x54.png b/uploads/2012/02/image_thumb-300x54.png new file mode 100644 index 00000000..970eba38 Binary files /dev/null and b/uploads/2012/02/image_thumb-300x54.png differ diff --git a/uploads/2012/02/image_thumb1-150x101.png b/uploads/2012/02/image_thumb1-150x101.png new file mode 100644 index 00000000..47ace041 Binary files /dev/null and b/uploads/2012/02/image_thumb1-150x101.png differ diff --git a/uploads/2012/02/image_thumb1-300x72.png b/uploads/2012/02/image_thumb1-300x72.png new file mode 100644 index 00000000..a99c06ee Binary files /dev/null and b/uploads/2012/02/image_thumb1-300x72.png differ diff --git a/uploads/2012/02/image_thumb2-150x150.png b/uploads/2012/02/image_thumb2-150x150.png new file mode 100644 index 00000000..5f22c70f Binary files /dev/null and b/uploads/2012/02/image_thumb2-150x150.png differ diff --git a/uploads/2012/02/image_thumb2-300x208.png b/uploads/2012/02/image_thumb2-300x208.png new file mode 100644 index 00000000..6bcb727e Binary files /dev/null and b/uploads/2012/02/image_thumb2-300x208.png differ diff --git a/uploads/2012/02/image_thumb3-150x141.png b/uploads/2012/02/image_thumb3-150x141.png new file mode 100644 index 00000000..52dca8f3 Binary files /dev/null and b/uploads/2012/02/image_thumb3-150x141.png differ diff --git a/uploads/2012/02/image_thumb3-300x90.png b/uploads/2012/02/image_thumb3-300x90.png new file mode 100644 index 00000000..7b72a09d Binary files /dev/null and b/uploads/2012/02/image_thumb3-300x90.png differ diff --git a/uploads/2012/02/image_thumb4-150x150.png b/uploads/2012/02/image_thumb4-150x150.png new file mode 100644 index 00000000..b0213061 Binary files /dev/null and b/uploads/2012/02/image_thumb4-150x150.png differ diff --git a/uploads/2012/02/image_thumb4-300x166.png b/uploads/2012/02/image_thumb4-300x166.png new file mode 100644 index 00000000..d7f9f70e Binary files /dev/null and b/uploads/2012/02/image_thumb4-300x166.png differ diff --git a/uploads/2012/02/image_thumb5-150x150.png b/uploads/2012/02/image_thumb5-150x150.png new file mode 100644 index 00000000..9353b792 Binary files /dev/null and b/uploads/2012/02/image_thumb5-150x150.png differ diff --git a/uploads/2012/02/image_thumb5-300x235.png b/uploads/2012/02/image_thumb5-300x235.png new file mode 100644 index 00000000..124233fc Binary files /dev/null and b/uploads/2012/02/image_thumb5-300x235.png differ diff --git a/uploads/2012/02/image_thumb6-150x150.png b/uploads/2012/02/image_thumb6-150x150.png new file mode 100644 index 00000000..c5b1775d Binary files /dev/null and b/uploads/2012/02/image_thumb6-150x150.png differ diff --git a/uploads/2012/02/image_thumb6-300x127.png b/uploads/2012/02/image_thumb6-300x127.png new file mode 100644 index 00000000..8d37c8e7 Binary files /dev/null and b/uploads/2012/02/image_thumb6-300x127.png differ diff --git a/uploads/2012/02/image_thumb7-150x93.png b/uploads/2012/02/image_thumb7-150x93.png new file mode 100644 index 00000000..fa368289 Binary files /dev/null and b/uploads/2012/02/image_thumb7-150x93.png differ diff --git a/uploads/2012/02/image_thumb7-300x79.png b/uploads/2012/02/image_thumb7-300x79.png new file mode 100644 index 00000000..ec42cc29 Binary files /dev/null and b/uploads/2012/02/image_thumb7-300x79.png differ diff --git a/uploads/2012/02/image_thumb8-150x150.png b/uploads/2012/02/image_thumb8-150x150.png new file mode 100644 index 00000000..a73a06d1 Binary files /dev/null and b/uploads/2012/02/image_thumb8-150x150.png differ diff --git a/uploads/2012/02/image_thumb8-300x225.png b/uploads/2012/02/image_thumb8-300x225.png new file mode 100644 index 00000000..339adeb4 Binary files /dev/null and b/uploads/2012/02/image_thumb8-300x225.png differ diff --git a/uploads/2012/03/clip_image0014-150x150.png b/uploads/2012/03/clip_image0014-150x150.png new file mode 100644 index 00000000..dd8cf881 Binary files /dev/null and b/uploads/2012/03/clip_image0014-150x150.png differ diff --git a/uploads/2012/03/clip_image0014-300x86.png b/uploads/2012/03/clip_image0014-300x86.png new file mode 100644 index 00000000..80b0b935 Binary files /dev/null and b/uploads/2012/03/clip_image0014-300x86.png differ diff --git a/uploads/2012/03/clip_image0014.png b/uploads/2012/03/clip_image0014.png new file mode 100644 index 00000000..f75b333b Binary files /dev/null and b/uploads/2012/03/clip_image0014.png differ diff --git a/uploads/2012/03/clip_image0014_thumb-150x150.png b/uploads/2012/03/clip_image0014_thumb-150x150.png new file mode 100644 index 00000000..3669be3f Binary files /dev/null and b/uploads/2012/03/clip_image0014_thumb-150x150.png differ diff --git a/uploads/2012/03/clip_image0014_thumb-300x91.png b/uploads/2012/03/clip_image0014_thumb-300x91.png new file mode 100644 index 00000000..f24cd0a8 Binary files /dev/null and b/uploads/2012/03/clip_image0014_thumb-300x91.png differ diff --git a/uploads/2012/03/clip_image0024-150x150.png b/uploads/2012/03/clip_image0024-150x150.png new file mode 100644 index 00000000..b0618955 Binary files /dev/null and b/uploads/2012/03/clip_image0024-150x150.png differ diff --git a/uploads/2012/03/clip_image0024-300x140.png b/uploads/2012/03/clip_image0024-300x140.png new file mode 100644 index 00000000..f31fe42f Binary files /dev/null and b/uploads/2012/03/clip_image0024-300x140.png differ diff --git a/uploads/2012/03/clip_image0024.png b/uploads/2012/03/clip_image0024.png new file mode 100644 index 00000000..d31094c2 Binary files /dev/null and b/uploads/2012/03/clip_image0024.png differ diff --git a/uploads/2012/03/clip_image0024_thumb-150x150.png b/uploads/2012/03/clip_image0024_thumb-150x150.png new file mode 100644 index 00000000..abe6902c Binary files /dev/null and b/uploads/2012/03/clip_image0024_thumb-150x150.png differ diff --git a/uploads/2012/03/clip_image0024_thumb-300x145.png b/uploads/2012/03/clip_image0024_thumb-300x145.png new file mode 100644 index 00000000..d70612e6 Binary files /dev/null and b/uploads/2012/03/clip_image0024_thumb-300x145.png differ diff --git a/uploads/2012/03/image-150x150.png b/uploads/2012/03/image-150x150.png new file mode 100644 index 00000000..afd3f286 Binary files /dev/null and b/uploads/2012/03/image-150x150.png differ diff --git a/uploads/2012/03/image-300x166.png b/uploads/2012/03/image-300x166.png new file mode 100644 index 00000000..22030a0d Binary files /dev/null and b/uploads/2012/03/image-300x166.png differ diff --git a/uploads/2012/03/image.png b/uploads/2012/03/image.png new file mode 100644 index 00000000..7f6405de Binary files /dev/null and b/uploads/2012/03/image.png differ diff --git a/uploads/2012/03/image_thumb-150x150.png b/uploads/2012/03/image_thumb-150x150.png new file mode 100644 index 00000000..c5f94d2b Binary files /dev/null and b/uploads/2012/03/image_thumb-150x150.png differ diff --git a/uploads/2012/03/image_thumb-300x171.png b/uploads/2012/03/image_thumb-300x171.png new file mode 100644 index 00000000..21de4422 Binary files /dev/null and b/uploads/2012/03/image_thumb-300x171.png differ diff --git a/uploads/2012/03/razer-150x150.png b/uploads/2012/03/razer-150x150.png new file mode 100644 index 00000000..f16915a9 Binary files /dev/null and b/uploads/2012/03/razer-150x150.png differ diff --git a/uploads/2012/03/razer.png b/uploads/2012/03/razer.png new file mode 100644 index 00000000..0f349ded Binary files /dev/null and b/uploads/2012/03/razer.png differ diff --git a/uploads/2012/05/20120505-231334-150x150.jpg b/uploads/2012/05/20120505-231334-150x150.jpg new file mode 100644 index 00000000..9cb42158 Binary files /dev/null and b/uploads/2012/05/20120505-231334-150x150.jpg differ diff --git a/uploads/2012/05/20120505-231334-300x224.jpg b/uploads/2012/05/20120505-231334-300x224.jpg new file mode 100644 index 00000000..f13791cb Binary files /dev/null and b/uploads/2012/05/20120505-231334-300x224.jpg differ diff --git a/uploads/2012/05/20120505-231334-800x597.jpg b/uploads/2012/05/20120505-231334-800x597.jpg new file mode 100644 index 00000000..688bc7d2 Binary files /dev/null and b/uploads/2012/05/20120505-231334-800x597.jpg differ diff --git a/uploads/2012/05/20120505-231334.jpg b/uploads/2012/05/20120505-231334.jpg new file mode 100644 index 00000000..7fec01fd Binary files /dev/null and b/uploads/2012/05/20120505-231334.jpg differ diff --git a/uploads/2012/05/clip_image001-150x150.jpg b/uploads/2012/05/clip_image001-150x150.jpg new file mode 100644 index 00000000..e727ab85 Binary files /dev/null and b/uploads/2012/05/clip_image001-150x150.jpg differ diff --git a/uploads/2012/05/clip_image001-300x171.jpg b/uploads/2012/05/clip_image001-300x171.jpg new file mode 100644 index 00000000..bc1ecb8b Binary files /dev/null and b/uploads/2012/05/clip_image001-300x171.jpg differ diff --git a/uploads/2012/05/clip_image001.jpg b/uploads/2012/05/clip_image001.jpg new file mode 100644 index 00000000..990fe65f Binary files /dev/null and b/uploads/2012/05/clip_image001.jpg differ diff --git a/uploads/2012/05/clip_image001_thumb-150x150.jpg b/uploads/2012/05/clip_image001_thumb-150x150.jpg new file mode 100644 index 00000000..880e65f3 Binary files /dev/null and b/uploads/2012/05/clip_image001_thumb-150x150.jpg differ diff --git a/uploads/2012/05/clip_image001_thumb-300x176.jpg b/uploads/2012/05/clip_image001_thumb-300x176.jpg new file mode 100644 index 00000000..16d84296 Binary files /dev/null and b/uploads/2012/05/clip_image001_thumb-300x176.jpg differ diff --git a/uploads/2012/05/clip_image002-150x150.jpg b/uploads/2012/05/clip_image002-150x150.jpg new file mode 100644 index 00000000..59276bf2 Binary files /dev/null and b/uploads/2012/05/clip_image002-150x150.jpg differ diff --git a/uploads/2012/05/clip_image002-300x204.jpg b/uploads/2012/05/clip_image002-300x204.jpg new file mode 100644 index 00000000..27f98bd5 Binary files /dev/null and b/uploads/2012/05/clip_image002-300x204.jpg differ diff --git a/uploads/2012/05/clip_image002.jpg b/uploads/2012/05/clip_image002.jpg new file mode 100644 index 00000000..cc5835b1 Binary files /dev/null and b/uploads/2012/05/clip_image002.jpg differ diff --git a/uploads/2012/05/clip_image002_thumb-150x150.jpg b/uploads/2012/05/clip_image002_thumb-150x150.jpg new file mode 100644 index 00000000..5270f469 Binary files /dev/null and b/uploads/2012/05/clip_image002_thumb-150x150.jpg differ diff --git a/uploads/2012/05/clip_image002_thumb-300x209.jpg b/uploads/2012/05/clip_image002_thumb-300x209.jpg new file mode 100644 index 00000000..1a1d7cc4 Binary files /dev/null and b/uploads/2012/05/clip_image002_thumb-300x209.jpg differ diff --git a/uploads/2012/05/clip_image003-150x150.jpg b/uploads/2012/05/clip_image003-150x150.jpg new file mode 100644 index 00000000..d4f80d76 Binary files /dev/null and b/uploads/2012/05/clip_image003-150x150.jpg differ diff --git a/uploads/2012/05/clip_image003-300x199.jpg b/uploads/2012/05/clip_image003-300x199.jpg new file mode 100644 index 00000000..f87566de Binary files /dev/null and b/uploads/2012/05/clip_image003-300x199.jpg differ diff --git a/uploads/2012/05/clip_image003_thumb-150x150.jpg b/uploads/2012/05/clip_image003_thumb-150x150.jpg new file mode 100644 index 00000000..3029a012 Binary files /dev/null and b/uploads/2012/05/clip_image003_thumb-150x150.jpg differ diff --git a/uploads/2012/05/clip_image003_thumb-300x205.jpg b/uploads/2012/05/clip_image003_thumb-300x205.jpg new file mode 100644 index 00000000..40e905a0 Binary files /dev/null and b/uploads/2012/05/clip_image003_thumb-300x205.jpg differ diff --git a/uploads/2012/05/clip_image004-150x150.jpg b/uploads/2012/05/clip_image004-150x150.jpg new file mode 100644 index 00000000..20ba4a69 Binary files /dev/null and b/uploads/2012/05/clip_image004-150x150.jpg differ diff --git a/uploads/2012/05/clip_image004-300x281.jpg b/uploads/2012/05/clip_image004-300x281.jpg new file mode 100644 index 00000000..5ee3eff3 Binary files /dev/null and b/uploads/2012/05/clip_image004-300x281.jpg differ diff --git a/uploads/2012/05/clip_image004.jpg b/uploads/2012/05/clip_image004.jpg new file mode 100644 index 00000000..d7ef7e19 Binary files /dev/null and b/uploads/2012/05/clip_image004.jpg differ diff --git a/uploads/2012/05/clip_image004_thumb-150x150.jpg b/uploads/2012/05/clip_image004_thumb-150x150.jpg new file mode 100644 index 00000000..b4cffd72 Binary files /dev/null and b/uploads/2012/05/clip_image004_thumb-150x150.jpg differ diff --git a/uploads/2012/05/clip_image004_thumb-300x285.jpg b/uploads/2012/05/clip_image004_thumb-300x285.jpg new file mode 100644 index 00000000..b46923b8 Binary files /dev/null and b/uploads/2012/05/clip_image004_thumb-300x285.jpg differ diff --git a/uploads/2012/05/clip_image005-150x150.jpg b/uploads/2012/05/clip_image005-150x150.jpg new file mode 100644 index 00000000..e4b59957 Binary files /dev/null and b/uploads/2012/05/clip_image005-150x150.jpg differ diff --git a/uploads/2012/05/clip_image005-300x233.jpg b/uploads/2012/05/clip_image005-300x233.jpg new file mode 100644 index 00000000..32c2bb47 Binary files /dev/null and b/uploads/2012/05/clip_image005-300x233.jpg differ diff --git a/uploads/2012/05/clip_image005.jpg b/uploads/2012/05/clip_image005.jpg new file mode 100644 index 00000000..5d55dc8f Binary files /dev/null and b/uploads/2012/05/clip_image005.jpg differ diff --git a/uploads/2012/05/clip_image005_thumb-300x237.jpg b/uploads/2012/05/clip_image005_thumb-300x237.jpg new file mode 100644 index 00000000..68b90ec7 Binary files /dev/null and b/uploads/2012/05/clip_image005_thumb-300x237.jpg differ diff --git a/uploads/2012/05/clip_image006-150x150.jpg b/uploads/2012/05/clip_image006-150x150.jpg new file mode 100644 index 00000000..63069009 Binary files /dev/null and b/uploads/2012/05/clip_image006-150x150.jpg differ diff --git a/uploads/2012/05/clip_image006-300x227.jpg b/uploads/2012/05/clip_image006-300x227.jpg new file mode 100644 index 00000000..05061ab9 Binary files /dev/null and b/uploads/2012/05/clip_image006-300x227.jpg differ diff --git a/uploads/2012/05/clip_image006.jpg b/uploads/2012/05/clip_image006.jpg new file mode 100644 index 00000000..099e1abb Binary files /dev/null and b/uploads/2012/05/clip_image006.jpg differ diff --git a/uploads/2012/05/clip_image006_thumb-300x234.jpg b/uploads/2012/05/clip_image006_thumb-300x234.jpg new file mode 100644 index 00000000..94ec2aa5 Binary files /dev/null and b/uploads/2012/05/clip_image006_thumb-300x234.jpg differ diff --git a/uploads/2012/05/clip_image007-150x150.jpg b/uploads/2012/05/clip_image007-150x150.jpg new file mode 100644 index 00000000..12a70b44 Binary files /dev/null and b/uploads/2012/05/clip_image007-150x150.jpg differ diff --git a/uploads/2012/05/clip_image007-300x160.jpg b/uploads/2012/05/clip_image007-300x160.jpg new file mode 100644 index 00000000..baebafe4 Binary files /dev/null and b/uploads/2012/05/clip_image007-300x160.jpg differ diff --git a/uploads/2012/05/clip_image007.jpg b/uploads/2012/05/clip_image007.jpg new file mode 100644 index 00000000..1c3e4eae Binary files /dev/null and b/uploads/2012/05/clip_image007.jpg differ diff --git a/uploads/2012/05/clip_image007_thumb-150x150.jpg b/uploads/2012/05/clip_image007_thumb-150x150.jpg new file mode 100644 index 00000000..c01fd73f Binary files /dev/null and b/uploads/2012/05/clip_image007_thumb-150x150.jpg differ diff --git a/uploads/2012/05/clip_image007_thumb-300x164.jpg b/uploads/2012/05/clip_image007_thumb-300x164.jpg new file mode 100644 index 00000000..31eb3d8a Binary files /dev/null and b/uploads/2012/05/clip_image007_thumb-300x164.jpg differ diff --git a/uploads/2012/05/image-150x150.png b/uploads/2012/05/image-150x150.png new file mode 100644 index 00000000..12e196fa Binary files /dev/null and b/uploads/2012/05/image-150x150.png differ diff --git a/uploads/2012/05/image.png b/uploads/2012/05/image.png new file mode 100644 index 00000000..ac4a5e87 Binary files /dev/null and b/uploads/2012/05/image.png differ diff --git a/uploads/2012/05/image1-150x150.png b/uploads/2012/05/image1-150x150.png new file mode 100644 index 00000000..1105bb83 Binary files /dev/null and b/uploads/2012/05/image1-150x150.png differ diff --git a/uploads/2012/05/image1-300x124.png b/uploads/2012/05/image1-300x124.png new file mode 100644 index 00000000..2874ad3c Binary files /dev/null and b/uploads/2012/05/image1-300x124.png differ diff --git a/uploads/2012/05/image1.png b/uploads/2012/05/image1.png new file mode 100644 index 00000000..59d0f787 Binary files /dev/null and b/uploads/2012/05/image1.png differ diff --git a/uploads/2012/05/image2-150x150.png b/uploads/2012/05/image2-150x150.png new file mode 100644 index 00000000..db912469 Binary files /dev/null and b/uploads/2012/05/image2-150x150.png differ diff --git a/uploads/2012/05/image2-300x141.png b/uploads/2012/05/image2-300x141.png new file mode 100644 index 00000000..7af48358 Binary files /dev/null and b/uploads/2012/05/image2-300x141.png differ diff --git a/uploads/2012/05/image3-150x150.png b/uploads/2012/05/image3-150x150.png new file mode 100644 index 00000000..e495c5d9 Binary files /dev/null and b/uploads/2012/05/image3-150x150.png differ diff --git a/uploads/2012/05/image3-300x218.png b/uploads/2012/05/image3-300x218.png new file mode 100644 index 00000000..5de658c6 Binary files /dev/null and b/uploads/2012/05/image3-300x218.png differ diff --git a/uploads/2012/05/image3.png b/uploads/2012/05/image3.png new file mode 100644 index 00000000..bfb89917 Binary files /dev/null and b/uploads/2012/05/image3.png differ diff --git a/uploads/2012/05/image_thumb-150x150.png b/uploads/2012/05/image_thumb-150x150.png new file mode 100644 index 00000000..2a4f35cd Binary files /dev/null and b/uploads/2012/05/image_thumb-150x150.png differ diff --git a/uploads/2012/05/image_thumb-300x210.png b/uploads/2012/05/image_thumb-300x210.png new file mode 100644 index 00000000..3e1c60f5 Binary files /dev/null and b/uploads/2012/05/image_thumb-300x210.png differ diff --git a/uploads/2012/05/image_thumb1-150x150.png b/uploads/2012/05/image_thumb1-150x150.png new file mode 100644 index 00000000..45ba2d72 Binary files /dev/null and b/uploads/2012/05/image_thumb1-150x150.png differ diff --git a/uploads/2012/05/image_thumb1-300x129.png b/uploads/2012/05/image_thumb1-300x129.png new file mode 100644 index 00000000..b5f688d4 Binary files /dev/null and b/uploads/2012/05/image_thumb1-300x129.png differ diff --git a/uploads/2012/05/image_thumb2-150x150.png b/uploads/2012/05/image_thumb2-150x150.png new file mode 100644 index 00000000..addfbc4a Binary files /dev/null and b/uploads/2012/05/image_thumb2-150x150.png differ diff --git a/uploads/2012/05/image_thumb2-300x147.png b/uploads/2012/05/image_thumb2-300x147.png new file mode 100644 index 00000000..a51cd4ed Binary files /dev/null and b/uploads/2012/05/image_thumb2-300x147.png differ diff --git a/uploads/2012/05/image_thumb3-150x150.png b/uploads/2012/05/image_thumb3-150x150.png new file mode 100644 index 00000000..2b54f312 Binary files /dev/null and b/uploads/2012/05/image_thumb3-150x150.png differ diff --git a/uploads/2012/05/image_thumb3-300x225.png b/uploads/2012/05/image_thumb3-300x225.png new file mode 100644 index 00000000..34612e17 Binary files /dev/null and b/uploads/2012/05/image_thumb3-300x225.png differ diff --git a/uploads/2012/06/image-150x150.png b/uploads/2012/06/image-150x150.png new file mode 100644 index 00000000..73b34c18 Binary files /dev/null and b/uploads/2012/06/image-150x150.png differ diff --git a/uploads/2012/06/image.png b/uploads/2012/06/image.png new file mode 100644 index 00000000..85116f6f Binary files /dev/null and b/uploads/2012/06/image.png differ diff --git a/uploads/2012/06/image1-150x89.png b/uploads/2012/06/image1-150x89.png new file mode 100644 index 00000000..a72a90d8 Binary files /dev/null and b/uploads/2012/06/image1-150x89.png differ diff --git a/uploads/2012/06/image1-300x42.png b/uploads/2012/06/image1-300x42.png new file mode 100644 index 00000000..ef850cde Binary files /dev/null and b/uploads/2012/06/image1-300x42.png differ diff --git a/uploads/2012/06/image1.png b/uploads/2012/06/image1.png new file mode 100644 index 00000000..59e10086 Binary files /dev/null and b/uploads/2012/06/image1.png differ diff --git a/uploads/2012/06/image2-150x134.png b/uploads/2012/06/image2-150x134.png new file mode 100644 index 00000000..ed84cebc Binary files /dev/null and b/uploads/2012/06/image2-150x134.png differ diff --git a/uploads/2012/06/image2-300x112.png b/uploads/2012/06/image2-300x112.png new file mode 100644 index 00000000..a7507c1f Binary files /dev/null and b/uploads/2012/06/image2-300x112.png differ diff --git a/uploads/2012/06/image_thumb-150x150.png b/uploads/2012/06/image_thumb-150x150.png new file mode 100644 index 00000000..db3b9eef Binary files /dev/null and b/uploads/2012/06/image_thumb-150x150.png differ diff --git a/uploads/2012/06/image_thumb1-150x87.png b/uploads/2012/06/image_thumb1-150x87.png new file mode 100644 index 00000000..1302dcff Binary files /dev/null and b/uploads/2012/06/image_thumb1-150x87.png differ diff --git a/uploads/2012/06/image_thumb1-300x48.png b/uploads/2012/06/image_thumb1-300x48.png new file mode 100644 index 00000000..603ef16f Binary files /dev/null and b/uploads/2012/06/image_thumb1-300x48.png differ diff --git a/uploads/2012/06/image_thumb2-150x150.png b/uploads/2012/06/image_thumb2-150x150.png new file mode 100644 index 00000000..531c2c3f Binary files /dev/null and b/uploads/2012/06/image_thumb2-150x150.png differ diff --git a/uploads/2012/06/image_thumb2-300x118.png b/uploads/2012/06/image_thumb2-300x118.png new file mode 100644 index 00000000..f2f739c8 Binary files /dev/null and b/uploads/2012/06/image_thumb2-300x118.png differ diff --git a/uploads/2012/07/image-150x54.png b/uploads/2012/07/image-150x54.png new file mode 100644 index 00000000..7a7feafd Binary files /dev/null and b/uploads/2012/07/image-150x54.png differ diff --git a/uploads/2012/07/image-300x33.png b/uploads/2012/07/image-300x33.png new file mode 100644 index 00000000..baabfa9c Binary files /dev/null and b/uploads/2012/07/image-300x33.png differ diff --git a/uploads/2012/07/image.png b/uploads/2012/07/image.png new file mode 100644 index 00000000..2b1e2cd1 Binary files /dev/null and b/uploads/2012/07/image.png differ diff --git a/uploads/2012/07/image1-150x150.png b/uploads/2012/07/image1-150x150.png new file mode 100644 index 00000000..0a6d0ac2 Binary files /dev/null and b/uploads/2012/07/image1-150x150.png differ diff --git a/uploads/2012/07/image1-300x292.png b/uploads/2012/07/image1-300x292.png new file mode 100644 index 00000000..16f78f36 Binary files /dev/null and b/uploads/2012/07/image1-300x292.png differ diff --git a/uploads/2012/07/image1.png b/uploads/2012/07/image1.png new file mode 100644 index 00000000..dbd3078d Binary files /dev/null and b/uploads/2012/07/image1.png differ diff --git a/uploads/2012/07/image2-150x150.png b/uploads/2012/07/image2-150x150.png new file mode 100644 index 00000000..62607c89 Binary files /dev/null and b/uploads/2012/07/image2-150x150.png differ diff --git a/uploads/2012/07/image2-300x246.png b/uploads/2012/07/image2-300x246.png new file mode 100644 index 00000000..3d4bddaa Binary files /dev/null and b/uploads/2012/07/image2-300x246.png differ diff --git a/uploads/2012/07/image3-150x150.png b/uploads/2012/07/image3-150x150.png new file mode 100644 index 00000000..09d426a1 Binary files /dev/null and b/uploads/2012/07/image3-150x150.png differ diff --git a/uploads/2012/07/image3-300x184.png b/uploads/2012/07/image3-300x184.png new file mode 100644 index 00000000..cfc0f45e Binary files /dev/null and b/uploads/2012/07/image3-300x184.png differ diff --git a/uploads/2012/07/image3.png b/uploads/2012/07/image3.png new file mode 100644 index 00000000..c377278c Binary files /dev/null and b/uploads/2012/07/image3.png differ diff --git a/uploads/2012/07/image4-150x150.png b/uploads/2012/07/image4-150x150.png new file mode 100644 index 00000000..ce044577 Binary files /dev/null and b/uploads/2012/07/image4-150x150.png differ diff --git a/uploads/2012/07/image4-300x206.png b/uploads/2012/07/image4-300x206.png new file mode 100644 index 00000000..102de686 Binary files /dev/null and b/uploads/2012/07/image4-300x206.png differ diff --git a/uploads/2012/07/image4.png b/uploads/2012/07/image4.png new file mode 100644 index 00000000..82310ada Binary files /dev/null and b/uploads/2012/07/image4.png differ diff --git a/uploads/2012/07/image5-150x150.png b/uploads/2012/07/image5-150x150.png new file mode 100644 index 00000000..24ca7e70 Binary files /dev/null and b/uploads/2012/07/image5-150x150.png differ diff --git a/uploads/2012/07/image5-300x191.png b/uploads/2012/07/image5-300x191.png new file mode 100644 index 00000000..879c63e3 Binary files /dev/null and b/uploads/2012/07/image5-300x191.png differ diff --git a/uploads/2012/07/image6-150x150.png b/uploads/2012/07/image6-150x150.png new file mode 100644 index 00000000..53ff63ea Binary files /dev/null and b/uploads/2012/07/image6-150x150.png differ diff --git a/uploads/2012/07/image6-300x191.png b/uploads/2012/07/image6-300x191.png new file mode 100644 index 00000000..53d0d0bc Binary files /dev/null and b/uploads/2012/07/image6-300x191.png differ diff --git a/uploads/2012/07/image6.png b/uploads/2012/07/image6.png new file mode 100644 index 00000000..a888a3a1 Binary files /dev/null and b/uploads/2012/07/image6.png differ diff --git a/uploads/2012/07/image_thumb-150x72.png b/uploads/2012/07/image_thumb-150x72.png new file mode 100644 index 00000000..0e454d42 Binary files /dev/null and b/uploads/2012/07/image_thumb-150x72.png differ diff --git a/uploads/2012/07/image_thumb-300x41.png b/uploads/2012/07/image_thumb-300x41.png new file mode 100644 index 00000000..b4850471 Binary files /dev/null and b/uploads/2012/07/image_thumb-300x41.png differ diff --git a/uploads/2012/07/image_thumb1-150x150.png b/uploads/2012/07/image_thumb1-150x150.png new file mode 100644 index 00000000..bc65ad98 Binary files /dev/null and b/uploads/2012/07/image_thumb1-150x150.png differ diff --git a/uploads/2012/07/image_thumb1-300x298.png b/uploads/2012/07/image_thumb1-300x298.png new file mode 100644 index 00000000..ce76a74f Binary files /dev/null and b/uploads/2012/07/image_thumb1-300x298.png differ diff --git a/uploads/2012/07/image_thumb2-150x150.png b/uploads/2012/07/image_thumb2-150x150.png new file mode 100644 index 00000000..a4611aa5 Binary files /dev/null and b/uploads/2012/07/image_thumb2-150x150.png differ diff --git a/uploads/2012/07/image_thumb2-300x252.png b/uploads/2012/07/image_thumb2-300x252.png new file mode 100644 index 00000000..a1985e86 Binary files /dev/null and b/uploads/2012/07/image_thumb2-300x252.png differ diff --git a/uploads/2012/07/image_thumb3-150x150.png b/uploads/2012/07/image_thumb3-150x150.png new file mode 100644 index 00000000..ca387c7e Binary files /dev/null and b/uploads/2012/07/image_thumb3-150x150.png differ diff --git a/uploads/2012/07/image_thumb3-300x192.png b/uploads/2012/07/image_thumb3-300x192.png new file mode 100644 index 00000000..87ebbe2b Binary files /dev/null and b/uploads/2012/07/image_thumb3-300x192.png differ diff --git a/uploads/2012/07/image_thumb4-150x150.png b/uploads/2012/07/image_thumb4-150x150.png new file mode 100644 index 00000000..dfde6dd6 Binary files /dev/null and b/uploads/2012/07/image_thumb4-150x150.png differ diff --git a/uploads/2012/07/image_thumb4-300x210.png b/uploads/2012/07/image_thumb4-300x210.png new file mode 100644 index 00000000..97f04edc Binary files /dev/null and b/uploads/2012/07/image_thumb4-300x210.png differ diff --git a/uploads/2012/07/image_thumb5-150x150.png b/uploads/2012/07/image_thumb5-150x150.png new file mode 100644 index 00000000..d7269448 Binary files /dev/null and b/uploads/2012/07/image_thumb5-150x150.png differ diff --git a/uploads/2012/07/image_thumb5-300x197.png b/uploads/2012/07/image_thumb5-300x197.png new file mode 100644 index 00000000..b1ba233f Binary files /dev/null and b/uploads/2012/07/image_thumb5-300x197.png differ diff --git a/uploads/2012/07/image_thumb6-150x150.png b/uploads/2012/07/image_thumb6-150x150.png new file mode 100644 index 00000000..dc6e2f03 Binary files /dev/null and b/uploads/2012/07/image_thumb6-150x150.png differ diff --git a/uploads/2012/07/image_thumb6-300x196.png b/uploads/2012/07/image_thumb6-300x196.png new file mode 100644 index 00000000..e6fdc2fd Binary files /dev/null and b/uploads/2012/07/image_thumb6-300x196.png differ diff --git a/uploads/2012/08/clip_image001-150x150.jpg b/uploads/2012/08/clip_image001-150x150.jpg new file mode 100644 index 00000000..5095937d Binary files /dev/null and b/uploads/2012/08/clip_image001-150x150.jpg differ diff --git a/uploads/2012/08/clip_image001.jpg b/uploads/2012/08/clip_image001.jpg new file mode 100644 index 00000000..36283a34 Binary files /dev/null and b/uploads/2012/08/clip_image001.jpg differ diff --git a/uploads/2012/08/clip_image001_thumb-150x150.jpg b/uploads/2012/08/clip_image001_thumb-150x150.jpg new file mode 100644 index 00000000..3205372b Binary files /dev/null and b/uploads/2012/08/clip_image001_thumb-150x150.jpg differ diff --git a/uploads/2012/08/clip_image002-150x150.jpg b/uploads/2012/08/clip_image002-150x150.jpg new file mode 100644 index 00000000..344c3db8 Binary files /dev/null and b/uploads/2012/08/clip_image002-150x150.jpg differ diff --git a/uploads/2012/08/clip_image002-300x225.jpg b/uploads/2012/08/clip_image002-300x225.jpg new file mode 100644 index 00000000..0582c19a Binary files /dev/null and b/uploads/2012/08/clip_image002-300x225.jpg differ diff --git a/uploads/2012/08/clip_image002-800x600.jpg b/uploads/2012/08/clip_image002-800x600.jpg new file mode 100644 index 00000000..5bd5f3c3 Binary files /dev/null and b/uploads/2012/08/clip_image002-800x600.jpg differ diff --git a/uploads/2012/08/clip_image002.jpg b/uploads/2012/08/clip_image002.jpg new file mode 100644 index 00000000..2d6076e8 Binary files /dev/null and b/uploads/2012/08/clip_image002.jpg differ diff --git a/uploads/2012/08/clip_image002_thumb-150x150.jpg b/uploads/2012/08/clip_image002_thumb-150x150.jpg new file mode 100644 index 00000000..89350018 Binary files /dev/null and b/uploads/2012/08/clip_image002_thumb-150x150.jpg differ diff --git a/uploads/2012/08/clip_image003-150x150.jpg b/uploads/2012/08/clip_image003-150x150.jpg new file mode 100644 index 00000000..1d55cb0b Binary files /dev/null and b/uploads/2012/08/clip_image003-150x150.jpg differ diff --git a/uploads/2012/08/clip_image003-300x200.jpg b/uploads/2012/08/clip_image003-300x200.jpg new file mode 100644 index 00000000..4b337fa3 Binary files /dev/null and b/uploads/2012/08/clip_image003-300x200.jpg differ diff --git a/uploads/2012/08/clip_image003-800x533.jpg b/uploads/2012/08/clip_image003-800x533.jpg new file mode 100644 index 00000000..09c9c317 Binary files /dev/null and b/uploads/2012/08/clip_image003-800x533.jpg differ diff --git a/uploads/2012/08/clip_image003_thumb-150x150.jpg b/uploads/2012/08/clip_image003_thumb-150x150.jpg new file mode 100644 index 00000000..21b07d76 Binary files /dev/null and b/uploads/2012/08/clip_image003_thumb-150x150.jpg differ diff --git a/uploads/2012/08/lost_wiki-150x150.jpg b/uploads/2012/08/lost_wiki-150x150.jpg new file mode 100644 index 00000000..277d4b18 Binary files /dev/null and b/uploads/2012/08/lost_wiki-150x150.jpg differ diff --git a/uploads/2012/08/lost_wiki-800x480.jpg b/uploads/2012/08/lost_wiki-800x480.jpg new file mode 100644 index 00000000..b90239b3 Binary files /dev/null and b/uploads/2012/08/lost_wiki-800x480.jpg differ diff --git a/uploads/2012/08/lost_wiki.jpg b/uploads/2012/08/lost_wiki.jpg new file mode 100644 index 00000000..0cad1058 Binary files /dev/null and b/uploads/2012/08/lost_wiki.jpg differ diff --git a/uploads/2012/12/nginx_thinkphp-150x129.jpg b/uploads/2012/12/nginx_thinkphp-150x129.jpg new file mode 100644 index 00000000..6dd72967 Binary files /dev/null and b/uploads/2012/12/nginx_thinkphp-150x129.jpg differ diff --git a/uploads/2012/12/nginx_thinkphp.jpg b/uploads/2012/12/nginx_thinkphp.jpg new file mode 100644 index 00000000..a664b904 Binary files /dev/null and b/uploads/2012/12/nginx_thinkphp.jpg differ diff --git a/uploads/2012/12/nginx_thinkphp_config-150x150.jpg b/uploads/2012/12/nginx_thinkphp_config-150x150.jpg new file mode 100644 index 00000000..b6c94e84 Binary files /dev/null and b/uploads/2012/12/nginx_thinkphp_config-150x150.jpg differ diff --git a/uploads/2012/12/nginx_thinkphp_config.jpg b/uploads/2012/12/nginx_thinkphp_config.jpg new file mode 100644 index 00000000..1a1e7f71 Binary files /dev/null and b/uploads/2012/12/nginx_thinkphp_config.jpg differ diff --git a/uploads/2013/07/1-0Z92P92G5-150x150.png b/uploads/2013/07/1-0Z92P92G5-150x150.png new file mode 100644 index 00000000..403a4fac Binary files /dev/null and b/uploads/2013/07/1-0Z92P92G5-150x150.png differ diff --git a/uploads/2013/07/1-0Z92P92G5-8x6-150x150.jpg b/uploads/2013/07/1-0Z92P92G5-8x6-150x150.jpg new file mode 100644 index 00000000..17686a10 Binary files /dev/null and b/uploads/2013/07/1-0Z92P92G5-8x6-150x150.jpg differ diff --git a/uploads/2013/07/1-0Z92P92G5-8x6-200x300.jpg b/uploads/2013/07/1-0Z92P92G5-8x6-200x300.jpg new file mode 100644 index 00000000..0a5186a6 Binary files /dev/null and b/uploads/2013/07/1-0Z92P92G5-8x6-200x300.jpg differ diff --git a/uploads/2013/07/1-0Z92P92G5-8x6.jpg b/uploads/2013/07/1-0Z92P92G5-8x6.jpg new file mode 100644 index 00000000..70a44110 Binary files /dev/null and b/uploads/2013/07/1-0Z92P92G5-8x6.jpg differ diff --git a/uploads/2013/07/1-0Z92P92G5.png b/uploads/2013/07/1-0Z92P92G5.png new file mode 100644 index 00000000..a4559a3f Binary files /dev/null and b/uploads/2013/07/1-0Z92P92G5.png differ diff --git a/uploads/2013/07/1-0Z92P92G51-150x150.png b/uploads/2013/07/1-0Z92P92G51-150x150.png new file mode 100644 index 00000000..cb7a7c02 Binary files /dev/null and b/uploads/2013/07/1-0Z92P92G51-150x150.png differ diff --git a/uploads/2014/06/IMG_3081.jpg b/uploads/2014/06/IMG_3081.jpg new file mode 100644 index 00000000..4970b60e Binary files /dev/null and b/uploads/2014/06/IMG_3081.jpg differ diff --git a/uploads/2015/01/IMG_20150124_181146-150x150.jpg b/uploads/2015/01/IMG_20150124_181146-150x150.jpg new file mode 100644 index 00000000..e65ef81b Binary files /dev/null and b/uploads/2015/01/IMG_20150124_181146-150x150.jpg differ diff --git a/uploads/2015/01/IMG_20150124_181146-222x300.jpg b/uploads/2015/01/IMG_20150124_181146-222x300.jpg new file mode 100644 index 00000000..ee35c171 Binary files /dev/null and b/uploads/2015/01/IMG_20150124_181146-222x300.jpg differ diff --git a/uploads/2015/01/IMG_20150124_181146-593x800.jpg b/uploads/2015/01/IMG_20150124_181146-593x800.jpg new file mode 100644 index 00000000..de6b8ee6 Binary files /dev/null and b/uploads/2015/01/IMG_20150124_181146-593x800.jpg differ diff --git a/uploads/2015/01/IMG_20150124_181146.jpg b/uploads/2015/01/IMG_20150124_181146.jpg new file mode 100644 index 00000000..d059d26d Binary files /dev/null and b/uploads/2015/01/IMG_20150124_181146.jpg differ diff --git a/uploads/2015/01/android_target_sdk_version_error-150x150.png b/uploads/2015/01/android_target_sdk_version_error-150x150.png new file mode 100644 index 00000000..9b1a41eb Binary files /dev/null and b/uploads/2015/01/android_target_sdk_version_error-150x150.png differ diff --git a/uploads/2015/01/android_target_sdk_version_error-800x203.png b/uploads/2015/01/android_target_sdk_version_error-800x203.png new file mode 100644 index 00000000..e59b0923 Binary files /dev/null and b/uploads/2015/01/android_target_sdk_version_error-800x203.png differ diff --git a/uploads/2015/01/android_target_sdk_version_error.png b/uploads/2015/01/android_target_sdk_version_error.png new file mode 100644 index 00000000..64af9712 Binary files /dev/null and b/uploads/2015/01/android_target_sdk_version_error.png differ diff --git a/uploads/2015/01/dht11_pin_define-150x150.jpg b/uploads/2015/01/dht11_pin_define-150x150.jpg new file mode 100644 index 00000000..9b911363 Binary files /dev/null and b/uploads/2015/01/dht11_pin_define-150x150.jpg differ diff --git a/uploads/2015/01/dht11_pin_define.jpg b/uploads/2015/01/dht11_pin_define.jpg new file mode 100644 index 00000000..606bc83a Binary files /dev/null and b/uploads/2015/01/dht11_pin_define.jpg differ diff --git a/uploads/2015/01/google_fonts2consolas-150x150.jpg b/uploads/2015/01/google_fonts2consolas-150x150.jpg new file mode 100644 index 00000000..8ede699b Binary files /dev/null and b/uploads/2015/01/google_fonts2consolas-150x150.jpg differ diff --git a/uploads/2015/01/google_fonts2consolas.jpg b/uploads/2015/01/google_fonts2consolas.jpg new file mode 100644 index 00000000..fd2a411a Binary files /dev/null and b/uploads/2015/01/google_fonts2consolas.jpg differ diff --git a/uploads/2015/01/gpio_detail-150x150.jpg b/uploads/2015/01/gpio_detail-150x150.jpg new file mode 100644 index 00000000..21797153 Binary files /dev/null and b/uploads/2015/01/gpio_detail-150x150.jpg differ diff --git a/uploads/2015/01/gpio_detail.jpg b/uploads/2015/01/gpio_detail.jpg new file mode 100644 index 00000000..dc2926b9 Binary files /dev/null and b/uploads/2015/01/gpio_detail.jpg differ diff --git a/uploads/2015/01/piCar.wangheng.org_-150x150.png b/uploads/2015/01/piCar.wangheng.org_-150x150.png new file mode 100644 index 00000000..1c7df8dc Binary files /dev/null and b/uploads/2015/01/piCar.wangheng.org_-150x150.png differ diff --git a/uploads/2015/01/piCar.wangheng.org_-300x230.png b/uploads/2015/01/piCar.wangheng.org_-300x230.png new file mode 100644 index 00000000..f11a1abd Binary files /dev/null and b/uploads/2015/01/piCar.wangheng.org_-300x230.png differ diff --git a/uploads/2015/01/piCar_screenshot-150x150.png b/uploads/2015/01/piCar_screenshot-150x150.png new file mode 100644 index 00000000..78651f67 Binary files /dev/null and b/uploads/2015/01/piCar_screenshot-150x150.png differ diff --git a/uploads/2015/01/piCar_screenshot-450x800.png b/uploads/2015/01/piCar_screenshot-450x800.png new file mode 100644 index 00000000..b94b1fd0 Binary files /dev/null and b/uploads/2015/01/piCar_screenshot-450x800.png differ diff --git a/uploads/2015/01/piCar_screenshot.png b/uploads/2015/01/piCar_screenshot.png new file mode 100644 index 00000000..d72891fa Binary files /dev/null and b/uploads/2015/01/piCar_screenshot.png differ diff --git a/uploads/2015/01/picar_web_ui-150x150.png b/uploads/2015/01/picar_web_ui-150x150.png new file mode 100644 index 00000000..e52bbb28 Binary files /dev/null and b/uploads/2015/01/picar_web_ui-150x150.png differ diff --git a/uploads/2015/01/picar_web_ui-300x134.png b/uploads/2015/01/picar_web_ui-300x134.png new file mode 100644 index 00000000..f3a26e42 Binary files /dev/null and b/uploads/2015/01/picar_web_ui-300x134.png differ diff --git a/uploads/2015/01/picar_web_ui-800x359.png b/uploads/2015/01/picar_web_ui-800x359.png new file mode 100644 index 00000000..823568b2 Binary files /dev/null and b/uploads/2015/01/picar_web_ui-800x359.png differ diff --git a/uploads/2015/01/picar_with_webcam-150x150.png b/uploads/2015/01/picar_with_webcam-150x150.png new file mode 100644 index 00000000..c8dbee34 Binary files /dev/null and b/uploads/2015/01/picar_with_webcam-150x150.png differ diff --git a/uploads/2015/01/picar_with_webcam-735x800.png b/uploads/2015/01/picar_with_webcam-735x800.png new file mode 100644 index 00000000..8f2802b7 Binary files /dev/null and b/uploads/2015/01/picar_with_webcam-735x800.png differ diff --git a/uploads/2015/01/picar_with_webcam.png b/uploads/2015/01/picar_with_webcam.png new file mode 100644 index 00000000..56afe99c Binary files /dev/null and b/uploads/2015/01/picar_with_webcam.png differ diff --git a/uploads/2015/01/raspberry_b+_version-150x150.jpg b/uploads/2015/01/raspberry_b+_version-150x150.jpg new file mode 100644 index 00000000..7a0955cb Binary files /dev/null and b/uploads/2015/01/raspberry_b+_version-150x150.jpg differ diff --git a/uploads/2015/01/raspberry_b+_version.jpg b/uploads/2015/01/raspberry_b+_version.jpg new file mode 100644 index 00000000..d444bb3b Binary files /dev/null and b/uploads/2015/01/raspberry_b+_version.jpg differ diff --git a/uploads/2015/01/wiringPi_readall-150x150.jpg b/uploads/2015/01/wiringPi_readall-150x150.jpg new file mode 100644 index 00000000..94152dc3 Binary files /dev/null and b/uploads/2015/01/wiringPi_readall-150x150.jpg differ diff --git a/uploads/2015/01/wiringPi_readall.jpg b/uploads/2015/01/wiringPi_readall.jpg new file mode 100644 index 00000000..22bd17f8 Binary files /dev/null and b/uploads/2015/01/wiringPi_readall.jpg differ diff --git a/uploads/2015/05/oauth_info-150x150.png b/uploads/2015/05/oauth_info-150x150.png new file mode 100644 index 00000000..0f332e72 Binary files /dev/null and b/uploads/2015/05/oauth_info-150x150.png differ diff --git a/uploads/2015/05/oauth_info.png b/uploads/2015/05/oauth_info.png new file mode 100644 index 00000000..b3d62edc Binary files /dev/null and b/uploads/2015/05/oauth_info.png differ diff --git a/use-apt-get-installation-official-nvidia-drivers.html b/use-apt-get-installation-official-nvidia-drivers.html index 702a7985..3c27c95d 100644 --- a/use-apt-get-installation-official-nvidia-drivers.html +++ b/use-apt-get-installation-official-nvidia-drivers.html @@ -1,168 +1,156 @@ -使用apt-get 安装NVIDIA官方驱动 | all4fun blog +使用apt-get 安装NVIDIA官方驱动 | 王恒's Blog - + - + - - + + -

      使用apt-get 安装NVIDIA官方驱动

      + })(window)

      使用apt-get 安装NVIDIA官方驱动

      1. 首先需要添加apt-get源:
      @@ -180,61 +168,37 @@
       sudo apt-get install nvidia-current-dev
       
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/use-apt-get-installation-official-nvidia-drivers.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/use-multiple-threads-resolve-interface-feign-death.html b/use-multiple-threads-resolve-interface-feign-death.html index 76242e62..ce7f1c66 100644 --- a/use-multiple-threads-resolve-interface-feign-death.html +++ b/use-multiple-threads-resolve-interface-feign-death.html @@ -1,168 +1,156 @@ -C#使用委托与多线程,解决界面假死 | all4fun blog +C#使用委托与多线程,解决界面假死 | 王恒's Blog - + - + - - + + -

      C#使用委托与多线程,解决界面假死

      + })(window)

      C#使用委托与多线程,解决界面假死

      .NET Framework 为我们提供了一个处理控件闪烁的方案-双缓冲,我们可以直接调用它。
      • 首先自己封装一个Windows组件 MyListView.cs,并让它继承自Listview。
      • 在控件中添加打开双缓冲的代码如下:
      @@ -190,61 +178,37 @@
       
      ImageThread.Start();
       

      }


      使用这种方法可以有效的解决加载大量数据的时候造成的界面假死。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/use-multiple-threads-resolve-interface-feign-death.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/use-vimwiki-set-up-a-personal-wiki.html b/use-vimwiki-set-up-a-personal-wiki.html index 466e024e..62a3cab3 100644 --- a/use-vimwiki-set-up-a-personal-wiki.html +++ b/use-vimwiki-set-up-a-personal-wiki.html @@ -1,167 +1,155 @@ -使用vimwiki组建个人wiki | all4fun blog +使用vimwiki组建个人wiki | 王恒's Blog - + - + - - + + -

      使用vimwiki组建个人wiki

      + })(window)

      使用vimwiki组建个人wiki

      为什么用vimwiki?

      博客平台可以记录自己学习的总结,适合较多的知识积累才能写出一篇较好的博文。但是平时学到用到的很多零碎的小知识点却常常不知道该放在哪里。而且博客的组织结构也不能很好的把一些相关知识点总结在一起,种种原因吧。还好遇到了vimwiki这款插件,从此后便一发不可收拾的喜欢上了在vim中写自己的个人wiki。 @@ -184,61 +172,37 @@
      进阶技巧
      为vimwiki添加语法高亮 为vimwiki实现语法高亮可以参考vimwiki语法高亮
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/use-vimwiki-set-up-a-personal-wiki.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      \ No newline at end of file +} + \ No newline at end of file diff --git a/using-ssh-for-the-iphone-automatic-proxy.html b/using-ssh-for-the-iphone-automatic-proxy.html index b66ea5c3..daa5deeb 100644 --- a/using-ssh-for-the-iphone-automatic-proxy.html +++ b/using-ssh-for-the-iphone-automatic-proxy.html @@ -1,169 +1,157 @@ -使用SSH实现iPhone自动代理 | all4fun blog +使用SSH实现iPhone自动代理 | 王恒's Blog - + - + - - + + -

      使用SSH实现iPhone自动代理

      + })(window)

      使用SSH实现iPhone自动代理

      对于绝大部分国内网站,正常上网,对于twitter等,自动走SSH代理,无需手工切换,这即是所谓的“自动翻墙”,好处就是不影响国内网站的访问速度,不用来回切换网络。

      IOS中最方便的翻墙方式是使用VPN,速度尚可,但PPTP和L2TP是不能像OpenVPN一样定义路由的,打开VPN后,所有流量均走VPN线路,浏览国内网站很慢,需要来回切换。windows下可以用脚本定义静态路由,使用Route设置脚本,实现国内网不经VPN搞定,但IOS下在cydia找了半天也没找到iptable这个命令包,所以还是用ssh吧。下面是具体使用方法:

      @@ -199,61 +187,37 @@ return “DIRECT”; }

      好了,大功告成,享受你的无国界自由网络吧~

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/using-ssh-for-the-iphone-automatic-proxy.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/vim-and-viki-to-write-articles.html b/vim-and-viki-to-write-articles.html index 26d24baf..edd11e63 100644 --- a/vim-and-viki-to-write-articles.html +++ b/vim-and-viki-to-write-articles.html @@ -1,168 +1,156 @@ -使用Vim和Viki来写文章 | all4fun blog +使用Vim和Viki来写文章 | 王恒's Blog - + - + - - + + -

      使用Vim和Viki来写文章

      + })(window)

      使用Vim和Viki来写文章

      已经改用vim中的vimwiki插件来实现!具体请参考使用vimwiki组建个人wiki分享个人wiki部署脚本

      ViKi,就是 VIM WiKi 的缩写。WiKi 是一种非常方便快捷地组织信息的方式,而 ViKi也可以作为个人的Wiki管理工具。利用deplate来编译vim中写好的viki文件,可以快速的依据你自己的模板来生成带样式的html文件。这里是利用viki创建出来的测试html,效果还是很不错的,至少我很喜欢这种简约的风格。另外,我还写了bat脚本来配合自动部署html到web,所以我要得到一个viki页面流程很简单:

      @@ -188,61 +176,37 @@

      deplate test.viki -m utf8 -m code-vim73 -t .\template\bright.html -d html

      现在打开你的test.html,是不是跟这个 一样呢?

      当然功能远远不止这些,鉴于我也是刚尝试,并且只是用它来记一些简单的文字,有空会在去慢慢摸索啦~

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/vim-and-viki-to-write-articles.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/vim-copy-and-paste-format-disorder.html b/vim-copy-and-paste-format-disorder.html index 0fc88410..40518421 100644 --- a/vim-copy-and-paste-format-disorder.html +++ b/vim-copy-and-paste-format-disorder.html @@ -1,165 +1,153 @@ -vim复制粘贴格式错乱 | all4fun blog +vim复制粘贴格式错乱 | 王恒's Blog - + - + - - + + -

      vim复制粘贴格式错乱

      + })(window)

      vim复制粘贴格式错乱

      使用vim的过程中,用SSH打开的终端中复制代码,常常出现格式错乱的情况,解决办法如下:

      @@ -170,61 +158,37 @@

      :set nopaste

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/vim-copy-and-paste-format-disorder.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/wamp-to-configure-a-multi-domain-virtual-directory.html b/wamp-to-configure-a-multi-domain-virtual-directory.html index 60c364f1..40d79395 100644 --- a/wamp-to-configure-a-multi-domain-virtual-directory.html +++ b/wamp-to-configure-a-multi-domain-virtual-directory.html @@ -1,133 +1,29 @@ -wamp配置多域名虚拟目录 | all4fun blog +wamp配置多域名虚拟目录 | 王恒's Blog - + - + - - + + -

      wamp配置多域名虚拟目录

      -

            安装完成wamp后默认的www目录是在我本地的C:\wamp\www,这个目录下我放了一些自己测试php写的一些小例子。但是我工作的项目都是在其他的D盘、E盘,反复的设置apache的DocumentRoot 路径实在不是一个好的解决方案。当然这点小问题还是很好解决的,跟VPS中设置多域名类似,使用Apache的虚拟主机扩展Vhost可以轻松解决这个问题。

      现在先来配置虚拟主机:
      1、首先打开apache的配置文件httpd.conf

      我这里是C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf,打开后去掉#Include conf/extra/httpd-vhosts.conf前面的#注释标记。
      2、打开配置文件httpd-vhosts.conf

      我这里的文件路径是C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf 。在httpd-vhosts.conf文件的末尾添加上:
        <VirtualHost *:8080
              DocumentRoot 你的项目所在的路径 #例如E:\src\myproject\web
              ServerName d.com  #取一个自己容易记忆的名字我使用的是d.com
              <Directory "你的项目所在的路径">
                  Options Indexes FollowSymLinks
                  AllowOverride None
                  Order allow,deny
                  Allow from all
              </Directory>
        </VirtualHost>

      但是使用Vhost配置后,localhost访问则出现了问题,所以需要同样为localhost配置成一个虚拟主机目录,如下:

      <VirtualHost *:8080>
      DocumentRoot c:/wamp/www
      ServerName localhost
      <Directory "c:/wamp/www">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
      </Directory>
      </VirtualHost>

      红色部分需要自己手动修改成你对于的目录,我这里设置的Apache的监听端口是8080,修改时请改为你自己的端口号。修改后,如图所示:

      image


      3、设置系统hosts文件

      打开在C:/WINDOWS/system32/drivers/etc中的hosts文件中加上如下的内容
          127.0.0.1    d.com
      完成上面的步骤后,这样我们就配置好了我们的虚拟主机,重启一下Apache服务。

      在浏览器输入http://localhost:8080 访问到的是c:/wamp/www目录下的内容了!

      同样输入http://d.com:8080 访问到的是你自定义的E盘的那个路径,是不是很方便~

      -
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/wamp-to-configure-a-multi-domain-virtual-directory.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      wamp配置多域名虚拟目录

      +

            安装完成wamp后默认的www目录是在我本地的C:\wamp\www,这个目录下我放了一些自己测试php写的一些小例子。但是我工作的项目都是在其他的D盘、E盘,反复的设置apache的DocumentRoot 路径实在不是一个好的解决方案。当然这点小问题还是很好解决的,跟VPS中设置多域名类似,使用Apache的虚拟主机扩展Vhost可以轻松解决这个问题。

      现在先来配置虚拟主机:
      1、首先打开apache的配置文件httpd.conf

      我这里是C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf,打开后去掉#Include conf/extra/httpd-vhosts.conf前面的#注释标记。
      2、打开配置文件httpd-vhosts.conf

      我这里的文件路径是C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf 。在httpd-vhosts.conf文件的末尾添加上:
        <VirtualHost *:8080
              DocumentRoot 你的项目所在的路径 #例如E:\src\myproject\web
              ServerName d.com  #取一个自己容易记忆的名字我使用的是d.com
              <Directory "你的项目所在的路径">
                  Options Indexes FollowSymLinks
                  AllowOverride None
                  Order allow,deny
                  Allow from all
              </Directory>
        </VirtualHost>

      但是使用Vhost配置后,localhost访问则出现了问题,所以需要同样为localhost配置成一个虚拟主机目录,如下:

      <VirtualHost *:8080>
      DocumentRoot c:/wamp/www
      ServerName localhost
      <Directory "c:/wamp/www">
      Options Indexes FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
      </Directory>
      </VirtualHost>

      红色部分需要自己手动修改成你对于的目录,我这里设置的Apache的监听端口是8080,修改时请改为你自己的端口号。修改后,如图所示:

      image


      3、设置系统hosts文件

      打开在C:/WINDOWS/system32/drivers/etc中的hosts文件中加上如下的内容
          127.0.0.1    d.com
      完成上面的步骤后,这样我们就配置好了我们的虚拟主机,重启一下Apache服务。

      在浏览器输入http://localhost:8080 访问到的是c:/wamp/www目录下的内容了!

      同样输入http://d.com:8080 访问到的是你自定义的E盘的那个路径,是不是很方便~

      +
      +
      文章作者: 王恒
      文章链接: http://wangheng.org/wamp-to-configure-a-multi-domain-virtual-directory.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/wei-vim-tian-jia-vimgdb-zhi-chi.html b/wei-vim-tian-jia-vimgdb-zhi-chi.html index 7e0be99b..0c2e9c83 100644 --- a/wei-vim-tian-jia-vimgdb-zhi-chi.html +++ b/wei-vim-tian-jia-vimgdb-zhi-chi.html @@ -1,165 +1,153 @@ -为Vim 添加vimgdb支持 | all4fun blog +为Vim 添加vimgdb支持 | 王恒's Blog - + - + - - + + -

      为Vim 添加vimgdb支持

      + })(window)

      为Vim 添加vimgdb支持

      1、    下载最新的vim74的源码包 wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 2、下载vimgdb-for-vim7.4源码 @@ -196,61 +184,37 @@
      cp -rf /tmp/vimgdb-for-vim7.4-master/vimgdb_runtime/* ~/.vim

      切换到cd ~/.vim/doc/目录并执行 “:helptags .” 命令来在vim中创建帮助文档。
      cd ~/.vim/doc/
      vim
      :helptags .
      以后想查看关于vimgdb的使用说明可以在vim中执行”:help vimgdb” 命令来获取帮助。

      具体的使用方法以及可选配置,在官方帮助文档里面已经详细的介绍,请不了解的同学自行查阅,这里就不冗述了。

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/wei-vim-tian-jia-vimgdb-zhi-chi.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} + \ No newline at end of file diff --git a/wiki/asp.net_mvc3_guide.html b/wiki/asp.net_mvc3_guide.html index 572cb0f7..b6efb0c0 100644 --- a/wiki/asp.net_mvc3_guide.html +++ b/wiki/asp.net_mvc3_guide.html @@ -3,7 +3,7 @@ Asp.net mvc3 简单教程 - + diff --git a/wiki/cannot_remote_connect_mysql.html b/wiki/cannot_remote_connect_mysql.html index 2bb1b743..dde2c1c9 100644 --- a/wiki/cannot_remote_connect_mysql.html +++ b/wiki/cannot_remote_connect_mysql.html @@ -3,7 +3,7 @@ 无法远程访问Mysql的解决方案 - + diff --git a/wiki/changelog.sh b/wiki/changelog.sh index 958893b6..502fd9d4 100644 --- a/wiki/changelog.sh +++ b/wiki/changelog.sh @@ -40,7 +40,7 @@ cat > $sitemap <
      diff --git a/wiki/codes.html b/wiki/codes.html index ea3732a5..7eccbd2a 100644 --- a/wiki/codes.html +++ b/wiki/codes.html @@ -3,7 +3,7 @@ 编程笔记 - + diff --git a/wiki/codes_of_cpp.html b/wiki/codes_of_cpp.html index 68cf94ed..35730e6f 100644 --- a/wiki/codes_of_cpp.html +++ b/wiki/codes_of_cpp.html @@ -3,7 +3,7 @@ C++ 学习笔记 - + diff --git a/wiki/cowire.html b/wiki/cowire.html index 81799f23..9595ab1e 100644 --- a/wiki/cowire.html +++ b/wiki/cowire.html @@ -3,7 +3,7 @@ cowire - + diff --git a/wiki/cpp_interview.html b/wiki/cpp_interview.html index 3cd57a2b..3b09a4a4 100644 --- a/wiki/cpp_interview.html +++ b/wiki/cpp_interview.html @@ -3,7 +3,7 @@ C++ 练习题 - + diff --git a/wiki/create_linux_start_script.html b/wiki/create_linux_start_script.html index 7662fcaf..332408d4 100644 --- a/wiki/create_linux_start_script.html +++ b/wiki/create_linux_start_script.html @@ -3,7 +3,7 @@ 创建Linux随机启动服务 - + diff --git a/wiki/csharp_implement_hotkey.html b/wiki/csharp_implement_hotkey.html index 7003cfbf..71b31cac 100644 --- a/wiki/csharp_implement_hotkey.html +++ b/wiki/csharp_implement_hotkey.html @@ -3,7 +3,7 @@ C#实现快捷键(系统热键)响应 - + diff --git a/wiki/cygwin.html b/wiki/cygwin.html index bcd575b8..eb9c092d 100644 --- a/wiki/cygwin.html +++ b/wiki/cygwin.html @@ -3,7 +3,7 @@ cygwin documents - + diff --git a/wiki/database_oracle_autobackup.html b/wiki/database_oracle_autobackup.html index b7a11430..5b99e547 100644 --- a/wiki/database_oracle_autobackup.html +++ b/wiki/database_oracle_autobackup.html @@ -3,7 +3,7 @@ oracle数据库备份脚本 - + diff --git a/wiki/edit_with_vim.html b/wiki/edit_with_vim.html index 60d2be16..ed98fdae 100644 --- a/wiki/edit_with_vim.html +++ b/wiki/edit_with_vim.html @@ -3,7 +3,7 @@ 右键菜单添加使用vim编辑 - + diff --git a/wiki/emacs.html b/wiki/emacs.html index 1137a7d1..821b5879 100644 --- a/wiki/emacs.html +++ b/wiki/emacs.html @@ -3,7 +3,7 @@ 我的emacs - + diff --git a/wiki/git_commands.html b/wiki/git_commands.html index 29aa83e7..bc55fefa 100644 --- a/wiki/git_commands.html +++ b/wiki/git_commands.html @@ -3,7 +3,7 @@ git 常用命令 - + diff --git a/wiki/github_markdown_tips.html b/wiki/github_markdown_tips.html index 8d2640bb..47a40aea 100644 --- a/wiki/github_markdown_tips.html +++ b/wiki/github_markdown_tips.html @@ -3,7 +3,7 @@ Github中的Markdown 格式的说明 - + diff --git a/wiki/html.html b/wiki/html.html index 6f135407..818c5577 100644 --- a/wiki/html.html +++ b/wiki/html.html @@ -3,7 +3,7 @@ html - + diff --git a/wiki/ie_about_margin.html b/wiki/ie_about_margin.html index c8c615d2..2087a189 100644 --- a/wiki/ie_about_margin.html +++ b/wiki/ie_about_margin.html @@ -3,7 +3,7 @@ IE的margin居中问题 - + diff --git a/wiki/index.html b/wiki/index.html index 397a8acf..95fb257a 100644 --- a/wiki/index.html +++ b/wiki/index.html @@ -3,7 +3,7 @@ 只言片语- 积跬步以致千里,积怠惰以致深渊。 - + diff --git a/wiki/linux.html b/wiki/linux.html index e31b9d4e..19f0847e 100644 --- a/wiki/linux.html +++ b/wiki/linux.html @@ -3,7 +3,7 @@ Linux笔记 - + diff --git a/wiki/linux_basic_command.html b/wiki/linux_basic_command.html index 55d0b7dc..05ea9daa 100644 --- a/wiki/linux_basic_command.html +++ b/wiki/linux_basic_command.html @@ -3,7 +3,7 @@ Linux 常用命令 - + diff --git a/wiki/linux_centos_service.html b/wiki/linux_centos_service.html index fb185210..c9689185 100644 --- a/wiki/linux_centos_service.html +++ b/wiki/linux_centos_service.html @@ -3,7 +3,7 @@ centos 常用服务 - + diff --git a/wiki/linux_create_autostart_script.html b/wiki/linux_create_autostart_script.html index 7662fcaf..332408d4 100644 --- a/wiki/linux_create_autostart_script.html +++ b/wiki/linux_create_autostart_script.html @@ -3,7 +3,7 @@ 创建Linux随机启动服务 - + diff --git a/wiki/linux_lynx_webbroswer.html b/wiki/linux_lynx_webbroswer.html index 8a00b753..f37b828c 100644 --- a/wiki/linux_lynx_webbroswer.html +++ b/wiki/linux_lynx_webbroswer.html @@ -3,7 +3,7 @@ Lynx 简明使用教程 - + diff --git a/wiki/linux_mysql_backup.html b/wiki/linux_mysql_backup.html index 7adc104d..5d73411b 100644 --- a/wiki/linux_mysql_backup.html +++ b/wiki/linux_mysql_backup.html @@ -3,7 +3,7 @@ Linux下的MySQL数据库备份 - + diff --git a/wiki/linux_network_config.html b/wiki/linux_network_config.html index 1c6f28c0..d677e83d 100644 --- a/wiki/linux_network_config.html +++ b/wiki/linux_network_config.html @@ -3,7 +3,7 @@ ubuntu系统网络的相关命令。 - + diff --git a/wiki/linux_php-cgi_overuse.html b/wiki/linux_php-cgi_overuse.html index 7a8119b1..a72e289f 100644 --- a/wiki/linux_php-cgi_overuse.html +++ b/wiki/linux_php-cgi_overuse.html @@ -3,7 +3,7 @@ php-cgi占用内存问题解决方法。 - + diff --git a/wiki/linux_set_svnserver.html b/wiki/linux_set_svnserver.html index ea9b8637..5df506c9 100644 --- a/wiki/linux_set_svnserver.html +++ b/wiki/linux_set_svnserver.html @@ -3,7 +3,7 @@ linux搭建svn服务器 - + diff --git a/wiki/linux_ubuntu_start_without_gdm.html b/wiki/linux_ubuntu_start_without_gdm.html index a98affc4..714ff1d1 100644 --- a/wiki/linux_ubuntu_start_without_gdm.html +++ b/wiki/linux_ubuntu_start_without_gdm.html @@ -3,7 +3,7 @@ 设置Ubuntu默认不启动图形界面 - + diff --git a/wiki/mac_os_tips.html b/wiki/mac_os_tips.html index f7ab438d..a9438e1e 100644 --- a/wiki/mac_os_tips.html +++ b/wiki/mac_os_tips.html @@ -3,7 +3,7 @@ Mac OS小技巧 - + diff --git a/wiki/mldonkey_guide.html b/wiki/mldonkey_guide.html index e40b58f5..7a6e1b91 100644 --- a/wiki/mldonkey_guide.html +++ b/wiki/mldonkey_guide.html @@ -3,7 +3,7 @@ mldonkey 学习 - + diff --git a/wiki/mldonkey_optimization.html b/wiki/mldonkey_optimization.html index 88a79577..c1dcc1cd 100644 --- a/wiki/mldonkey_optimization.html +++ b/wiki/mldonkey_optimization.html @@ -3,7 +3,7 @@ mldonkey配置优化 - + diff --git a/wiki/modify_mysql_password.html b/wiki/modify_mysql_password.html index 50dba1f1..d17eb826 100644 --- a/wiki/modify_mysql_password.html +++ b/wiki/modify_mysql_password.html @@ -3,7 +3,7 @@ 修改mysql的密码 - + diff --git a/wiki/mysql_case_when.html b/wiki/mysql_case_when.html index 5424e82f..09189ebc 100644 --- a/wiki/mysql_case_when.html +++ b/wiki/mysql_case_when.html @@ -3,7 +3,7 @@ case when的用法 - + diff --git a/wiki/mysql_datetime_campare.html b/wiki/mysql_datetime_campare.html index aa46a8f6..678eabd0 100644 --- a/wiki/mysql_datetime_campare.html +++ b/wiki/mysql_datetime_campare.html @@ -3,7 +3,7 @@ Mysql 时间相关 - + diff --git a/wiki/mysql_initialize.html b/wiki/mysql_initialize.html index 701895d4..b253109d 100644 --- a/wiki/mysql_initialize.html +++ b/wiki/mysql_initialize.html @@ -3,7 +3,7 @@ windows 初始化绿色版mysql - + diff --git a/wiki/network.html b/wiki/network.html index 48b7febf..738b4f3a 100644 --- a/wiki/network.html +++ b/wiki/network.html @@ -3,7 +3,7 @@ 网络小知识 - + diff --git a/wiki/nginx_rewrite_doc.html b/wiki/nginx_rewrite_doc.html index 730917e3..3e586654 100644 --- a/wiki/nginx_rewrite_doc.html +++ b/wiki/nginx_rewrite_doc.html @@ -3,7 +3,7 @@ nginx rewrite 规则 - + diff --git a/wiki/open_command_here.html b/wiki/open_command_here.html index 54d94dd8..f53d7282 100644 --- a/wiki/open_command_here.html +++ b/wiki/open_command_here.html @@ -3,7 +3,7 @@ 修改右键菜单 - + diff --git a/wiki/php_cookie_iframe.html b/wiki/php_cookie_iframe.html index d6b23766..c501412c 100644 --- a/wiki/php_cookie_iframe.html +++ b/wiki/php_cookie_iframe.html @@ -3,7 +3,7 @@ cookies 跨域问题 - + diff --git a/wiki/php_study_notes.html b/wiki/php_study_notes.html index d1f2fdd7..042f566f 100644 --- a/wiki/php_study_notes.html +++ b/wiki/php_study_notes.html @@ -3,7 +3,7 @@ PHP学习笔记 - + diff --git a/wiki/php_weakly_type_implement.html b/wiki/php_weakly_type_implement.html index f8a54fce..6806e441 100644 --- a/wiki/php_weakly_type_implement.html +++ b/wiki/php_weakly_type_implement.html @@ -3,7 +3,7 @@ php弱类型实现 - + diff --git a/wiki/python.html b/wiki/python.html index 8861e769..7db6f35c 100644 --- a/wiki/python.html +++ b/wiki/python.html @@ -3,7 +3,7 @@ pythone脚本 - + diff --git a/wiki/python_datetime.html b/wiki/python_datetime.html index 6d7ec5b2..5055fa44 100644 --- a/wiki/python_datetime.html +++ b/wiki/python_datetime.html @@ -3,7 +3,7 @@ python获取时间字符串 - + diff --git a/wiki/python_guide.html b/wiki/python_guide.html index a36e1c9b..71877092 100644 --- a/wiki/python_guide.html +++ b/wiki/python_guide.html @@ -3,7 +3,7 @@ python入门 - + diff --git a/wiki/python_practice.html b/wiki/python_practice.html index 52a856e2..9e56a78d 100644 --- a/wiki/python_practice.html +++ b/wiki/python_practice.html @@ -3,7 +3,7 @@ Python 练习册,每天一个小程序 - + diff --git a/wiki/python_vim_script.html b/wiki/python_vim_script.html index 445c6a6d..955def71 100644 --- a/wiki/python_vim_script.html +++ b/wiki/python_vim_script.html @@ -3,7 +3,7 @@ 使用python写vim脚本 - + diff --git a/wiki/python_webRequest.html b/wiki/python_webRequest.html index 95f38a9e..abd0fdc2 100644 --- a/wiki/python_webRequest.html +++ b/wiki/python_webRequest.html @@ -3,7 +3,7 @@ python发送GET或POST请求以便干一些趣事 - + diff --git a/wiki/reg.html b/wiki/reg.html index ec5aca96..a8ad1274 100644 --- a/wiki/reg.html +++ b/wiki/reg.html @@ -3,7 +3,7 @@ 各种注册码 - + diff --git a/wiki/set_ubuntu_start_without_gdm.html b/wiki/set_ubuntu_start_without_gdm.html index 1e0de04b..f98a93ee 100644 --- a/wiki/set_ubuntu_start_without_gdm.html +++ b/wiki/set_ubuntu_start_without_gdm.html @@ -3,7 +3,7 @@ 设置Ubuntu默认不启动图形界面 - + diff --git a/wiki/sitemap.html b/wiki/sitemap.html index 28632471..7c1643e3 100644 --- a/wiki/sitemap.html +++ b/wiki/sitemap.html @@ -3,7 +3,7 @@ 站点地图 - + diff --git a/wiki/sitemap.sh b/wiki/sitemap.sh index 1111f23f..8af1d81d 100644 --- a/wiki/sitemap.sh +++ b/wiki/sitemap.sh @@ -42,7 +42,7 @@ cat > $sitemap <
      diff --git a/wiki/sql.html b/wiki/sql.html index 46c50ed4..61e0dbfc 100644 --- a/wiki/sql.html +++ b/wiki/sql.html @@ -3,7 +3,7 @@ 数据库笔记 - + diff --git a/wiki/synology.html b/wiki/synology.html index a7f72a76..446ca04d 100644 --- a/wiki/synology.html +++ b/wiki/synology.html @@ -3,7 +3,7 @@ synology 问题解决 - + diff --git a/wiki/syntax.html b/wiki/syntax.html index 466e2179..19dcf939 100644 --- a/wiki/syntax.html +++ b/wiki/syntax.html @@ -3,7 +3,7 @@ 支持的语言 - + diff --git a/wiki/syntax_for_wordpress.html b/wiki/syntax_for_wordpress.html index 497ce65f..4571c626 100644 --- a/wiki/syntax_for_wordpress.html +++ b/wiki/syntax_for_wordpress.html @@ -3,7 +3,7 @@ 支持的语言 - + diff --git a/wiki/test.html b/wiki/test.html index 3ba5bed0..8d53fc95 100644 --- a/wiki/test.html +++ b/wiki/test.html @@ -3,7 +3,7 @@ 测试 - + diff --git a/wiki/theme/bright/default.tpl b/wiki/theme/bright/default.tpl index cbb95680..73c641fb 100644 --- a/wiki/theme/bright/default.tpl +++ b/wiki/theme/bright/default.tpl @@ -3,7 +3,7 @@ %title% - + diff --git a/wiki/theme/bright/default_duoshuo_bootstrap_jquery.tpl b/wiki/theme/bright/default_duoshuo_bootstrap_jquery.tpl index d433c020..2124320c 100644 --- a/wiki/theme/bright/default_duoshuo_bootstrap_jquery.tpl +++ b/wiki/theme/bright/default_duoshuo_bootstrap_jquery.tpl @@ -15,7 +15,7 @@
      diff --git a/wiki/theme/bright/diary.tpl b/wiki/theme/bright/diary.tpl index 8058207e..237854c5 100644 --- a/wiki/theme/bright/diary.tpl +++ b/wiki/theme/bright/diary.tpl @@ -12,7 +12,7 @@
      diff --git a/wiki/unclassified.html b/wiki/unclassified.html index 27e042ff..1540eeda 100644 --- a/wiki/unclassified.html +++ b/wiki/unclassified.html @@ -3,7 +3,7 @@ 一些未分类的宝藏 - + diff --git a/wiki/vim.html b/wiki/vim.html index 12e215f2..5626a119 100644 --- a/wiki/vim.html +++ b/wiki/vim.html @@ -3,7 +3,7 @@ vim小技巧 - + diff --git a/wiki/vim_plugin.html b/wiki/vim_plugin.html index a97e9022..243e2a8a 100644 --- a/wiki/vim_plugin.html +++ b/wiki/vim_plugin.html @@ -3,7 +3,7 @@ vim插件 - + diff --git a/wiki/vim_wiki.html b/wiki/vim_wiki.html index e29c2680..3ae9fcf5 100644 --- a/wiki/vim_wiki.html +++ b/wiki/vim_wiki.html @@ -3,7 +3,7 @@ vim wiki - + diff --git a/wiki/vimwiki.html b/wiki/vimwiki.html index fc469906..e2e0bfea 100644 --- a/wiki/vimwiki.html +++ b/wiki/vimwiki.html @@ -3,7 +3,7 @@ VimWiki介绍,以及安装使用 - + diff --git a/wiki/vimwiki_install.html b/wiki/vimwiki_install.html index d99df13d..3b16f46a 100644 --- a/wiki/vimwiki_install.html +++ b/wiki/vimwiki_install.html @@ -3,7 +3,7 @@ 安装vimwiki - + diff --git a/wiki/vimwiki_syntax_highlighter.html b/wiki/vimwiki_syntax_highlighter.html index a4b1763e..25cc57e1 100644 --- a/wiki/vimwiki_syntax_highlighter.html +++ b/wiki/vimwiki_syntax_highlighter.html @@ -3,7 +3,7 @@ 语法测试 - + diff --git a/wiki/vimwiki_test.html b/wiki/vimwiki_test.html index 3ba5bed0..8d53fc95 100644 --- a/wiki/vimwiki_test.html +++ b/wiki/vimwiki_test.html @@ -3,7 +3,7 @@ 测试 - + diff --git a/wiki/vimwiki_tips.html b/wiki/vimwiki_tips.html index 394a5d9a..30c822aa 100644 --- a/wiki/vimwiki_tips.html +++ b/wiki/vimwiki_tips.html @@ -3,7 +3,7 @@ vimwiki实用技巧 - + diff --git a/wiki/weakly_typed_implement.html b/wiki/weakly_typed_implement.html index 66e69ef4..78409695 100644 --- a/wiki/weakly_typed_implement.html +++ b/wiki/weakly_typed_implement.html @@ -3,7 +3,7 @@ php弱类型实现 - + diff --git a/wiki/wiki_SyntaxHighlighter.html b/wiki/wiki_SyntaxHighlighter.html index 782b1436..3c846d8a 100644 --- a/wiki/wiki_SyntaxHighlighter.html +++ b/wiki/wiki_SyntaxHighlighter.html @@ -3,7 +3,7 @@ 语法测试 - + diff --git a/wiki/windows.html b/wiki/windows.html index 7067c7d4..ce02ba72 100644 --- a/wiki/windows.html +++ b/wiki/windows.html @@ -3,7 +3,7 @@ windows tips - + diff --git a/wiki/windows_asp.net_mvc3_guide.html b/wiki/windows_asp.net_mvc3_guide.html index 9f871d08..55cea1d4 100644 --- a/wiki/windows_asp.net_mvc3_guide.html +++ b/wiki/windows_asp.net_mvc3_guide.html @@ -3,7 +3,7 @@ Asp.net mvc3 简单教程 - + diff --git a/wiki/windows_del_svn_folder.html b/wiki/windows_del_svn_folder.html index 414592ad..a29c1fca 100644 --- a/wiki/windows_del_svn_folder.html +++ b/wiki/windows_del_svn_folder.html @@ -3,7 +3,7 @@ Windows下删除.svn文件夹 - + diff --git a/wiki/windows_make_install_vim.html b/wiki/windows_make_install_vim.html index 46109d9b..5d9fa84c 100644 --- a/wiki/windows_make_install_vim.html +++ b/wiki/windows_make_install_vim.html @@ -3,7 +3,7 @@ windows编译安装gvim - + diff --git a/wiki/windows_modify_route.html b/wiki/windows_modify_route.html index 26e7fea1..bfad25a3 100644 --- a/wiki/windows_modify_route.html +++ b/wiki/windows_modify_route.html @@ -3,7 +3,7 @@ 修改windows的路由表 - + diff --git a/wiki/zen_coding.html b/wiki/zen_coding.html index 3415e7a8..a77a20af 100644 --- a/wiki/zen_coding.html +++ b/wiki/zen_coding.html @@ -3,7 +3,7 @@ VIM ZEN-CODING 插件 - + diff --git a/win7-modify-the-network-card-mac-address.html b/win7-modify-the-network-card-mac-address.html index 60d3c290..e47f74d0 100644 --- a/win7-modify-the-network-card-mac-address.html +++ b/win7-modify-the-network-card-mac-address.html @@ -1,166 +1,154 @@ -win7修改网卡MAC地址 | all4fun blog +win7修改网卡MAC地址 | 王恒's Blog - + - + - - + + -

      win7修改网卡MAC地址

      + })(window)

      win7修改网卡MAC地址

      Win7操作系统下修改MAC时不能随机生成MAC地址,修改时要注意如下规则: 从左往右第二个字符必须为2、6、A、E其中之一, 例如: @@ -183,61 +171,37 @@

      PS:公司网络各种限制各种监控,被监控的感觉很不爽,真想天天挂着代理或者联着自己的VPN上网~

      -
      文章作者: all4fun
      文章链接: http://wangheng.org/win7-modify-the-network-card-mac-address.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/windows-with-pear-install-symfony.html b/windows-with-pear-install-symfony.html index eb4dd38f..4f0a432a 100644 --- a/windows-with-pear-install-symfony.html +++ b/windows-with-pear-install-symfony.html @@ -1,167 +1,155 @@ -windows下用pear安装symfony | all4fun blog +windows下用pear安装symfony | 王恒's Blog - + - + - - + + -

      windows下用pear安装symfony

      + })(window)

      windows下用pear安装symfony

      介绍

      Symfony是一个基于MVC模式的面向对象的PHP5框架。Symfony允许在一个web应用中分离事务控制,服务逻辑和表示层。同时,它还包含了很多工具和类用以缩短开发复杂的网络应用的时间。

      @@ -186,61 +174,37 @@

      安装包:

      pear install symfony2/package_name
      不需要两个版本都安装,请根据你实际的项目需要自行选择1或者2安装~
      
       
      -
      文章作者: all4fun
      文章链接: http://wangheng.org/windows-with-pear-install-symfony.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 all4fun blog
      赞助
      • 微信
        微信
      • 支付宝
        支付宝

      评论

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file +} +
      \ No newline at end of file diff --git a/wrote-net-programmer-and-not-get-bogged-down-in-the-box-built.html b/wrote-net-programmer-and-not-get-bogged-down-in-the-box-built.html new file mode 100644 index 00000000..a0e4be32 --- /dev/null +++ b/wrote-net-programmer-and-not-get-bogged-down-in-the-box-built.html @@ -0,0 +1,188 @@ +写给.NET程序员,不要困在自己建造的盒子里 | 王恒's Blog + + + + + + + + + + + + + + +

      写给.NET程序员,不要困在自己建造的盒子里

      +

      原文地址:http://blog.jobbole.com/19001/       作者:@敲代码的张洋

      此文章的主旨是希望过于专注.NET程序员在做好工作、写好.NET程序的同时,能分拨出一点时间接触一下.NET之外的东西(例如10%-20%的时间),而不是鼓动大家什么都去学最后什么都学不精,更不是说.NET不行或劝大家放弃.NET。恕我愚钝,此主旨在文中表达不够清楚,看评论中很多朋友误解了,特此说明。

      另外,本文中的观点并不全部是我个人的想法,相当一部分来自我以前聊过天的某些大牛,他们很多来自微软、百度、腾讯等知名企业,并且很多已经成为技术骨干,我曾经从他们那里受益匪浅,于是我把他们的指教结合自身的经验和理解写成此文。这就是此文的来源。

      —————————————–华丽的分割线—————————————–

      在给这篇文章起标题的时候,我斟酌了很久,因为我个人是反对使用“.NET程序员”、“C++程序员”或“PHP程序员”这类简单粗暴的方式为程序员做划分的。但是客观确实存在一个现象,就是很多程序员会为自己设置一个无形的界限,将自己与某种语言或平台硬绑定到一起,例如我这里所指的“.NET程序员”。请注意这与“术业有专攻”是不同概念的,有自己专攻的平台或领域这很正常,但是有很多人偏执地将自己与某个语言或平台紧紧捆绑,而忘记了自己首先是一名程序员,然后才使用某种语言,他们偏执于平台并陶醉于自己建立的盒子里,而不愿主动去接触一些盒子外的事物,最终使得自己无法进步。

      张洋:写给.NET程序员,不要困在自己建造的盒子里

      从我个人的观点看,本文中“.NET程序员”是指具有如下特点的程序员群体:

      ● 学习、工作的技术范围均局限于.NET平台及衍生,对.NET之外的技术没有主动接触或学习的欲望。

      ● 不断学习各种.NET平台上的库或框架,如ADO.NET,ASP.NET MVC,WPF,Silverlight,WCF,WP,EF,NHibernate……

      ● 工作无法脱离Visual Studio,习惯于图形化的工作环境。

      ● 时常抱怨微软的技术更新太快,微软开发平台包办太多以至于自己身价贬值。

      ● 对面向对象、设计模式、软件架构等东西具有极大的热情,宁可花大量时间编造各种“设计模式小故事”也不愿花点时间了解一点新鲜的东西(如Unix下的IPC)。

      ● 对Java颇有微词,觉得C我根本用不到,至于PHP?它能做到的.NET都能做到,认为用Linux的大多在装逼,而Lisp、Lua、Eiffel神马的都是浮云,我管它们干什么。

      ● 认为面向对象语言就是程序设计语言的代名词,命令式编程深入骨髓,不太了解函数式语言或契约式语言是什么。

      ● 用.NET很多年了,但感觉自己没什么突破,没什么进步,成天就搞些增删改查的劳什子。

      ● 经常讨论或思考.NET或Java或C或其它语言哪个好,搞哪个更挣钱这种问题。

      如果您有超过3项符合上述特征,我想我们可以聊一聊,因为据我的观察,感觉博客园上这类朋友还是挺多的。

      希望我能做到旁观者清

      有一个事实我想先和大家澄清一下,其实.NET只是我的业余爱好。由于博客园主要偏重于.NET平台,且园子里的朋友对面向对象、架构之类的颇感兴趣,所以我写了很多关于.NET及架构方面的文章(如果您注意观察,会发现我博客里这类文章正减少并趋于消失),其实相对于设计、架构这类东西,我个人更感兴趣的是具体的科学与技术,例如各种编程语言的原理、应用及实现扩展,操作系统原理,网络编程,通信协议,算法与数据结构,数据挖掘,机器学习,分布式等等;语言方面我比较喜欢的是PHP、Python、Lisp等;而编程方面我更推崇Unix下的编程哲学和编程方法;我爱vim胜过VS无数倍。

      因此,.NET和C#我一直是作为业余爱好来发展的,希望这没有让任何人觉得沮丧。很多朋友加我QQ或MSN问我关于.NET的问题,我经常答不上来,很多人或许觉得我不近人情,但我其实是真的答不上来。例如我在博客中写过一系列关于ASP.NET MVC的文章,很多人是冲那系列文章加我的,但是其实ASP.NET MVC我只在beta版时摆弄过两个星期,然后就再也没有碰过,所以后来很多朋友问我想关问题我是真的答不上来。

      所以,在博客园这个以.NET和架构之类为主的社区,我算是半个旁观者吧,我看到园子里很多朋友都把自己禁锢在自己创造的盒子里,所以我希望以旁观者的身份,给这些朋友提几个建议。

      每半年接触并学习一门语言

      有许多人通常觉得只要把一门语言学会学精就行,这个想法我觉得对了一半。一个程序员应该有一门精通的语言,但是还要不断学习新的语言(当然不能太频繁),倒不是为了以防哪天万一用到这门语言,而是接触学习不同的语言会拓展程序员的视野。

      如果你一直用C#,试试Lisp,你会惊叹于还有这样写程序的方式,嗯?看来我得去学学Lamda演算;试试Python,你会惊讶于还有如此小巧优美的东西;试试Lua,你会发现原来语言还能嵌入其它语言,要不要为WOW写个外挂试试?试试Eiffel,你会发现还有契约式编程这种方法,嗯?什么?Java上有iContract,那我要不要为.NET实现一个?随着这种学习过程,你的思维自然就被拓展开了,而不是满脑子的Class、Object、MVC、OO……

      其实学习语言不一定是学习没听说过的,许多您听到耳朵长茧却从来没有深入学习的“老朋友”,如C、PHP,如果您细心学下来,也会得到许多意外的收获。

      例如在学C的过程中,你会发现不可能脱离Unix环境而把C学好,你会接触POSIX和System V,你会主动深入学习进程、线程、信号、I/O、IPC,你会接触TCP/IP协议。你会发现要学好C还要理解计算机组成原理,你还会发现原来还有大小端这个东西。

      深入学习PHP,你会发现PHP远不仅仅是一个做Web的脚本语言那么简单,你会了解到它SAPI、PHP Compiler和Zend Engine的优美结构,你会发现有opcode,你会发现PHP浑身都是扩展点,你可以扩展功能,扩展Compiler和Zend Engine,甚至可以完全实现自己的编译和运行逻辑。你会了解APC是如何缓存opcode,APD是如何跟踪PHP的运行。

      每次学习一门语言,你会发现这不是一门语言,而是一个崭新的新大陆,里面有太多让人兴奋和新奇的东西,而如果你执意禁锢在“.NET盒子”里,你就永远不会知道这些。

      主动突破自己 接受更多挑战

      如果什么东西都是用到才学,代码都是有用才写,那我只能非常抱歉的说你还不是个程序员,而只是个代码工人。程序员应该有主动出击的意识,应该对自己未接触的领域有无限向往。幸运的是,互联网上的财富实在太多了,你应该尽其所能去接触学习未知的东西,而不要总想我学习这个东西能不能换来钱给孩子买尿布和奶粉。你可以有很多借口,但是我想说,借口想找总是有的,时间想找也总是有的,还是看自己到底要什么。不要一边躺在盒子里一边又抱怨自己没有进步。

      例如Google Publication,这里有世界最优秀的Google工程师们理论和实践的总结,来读读这些伟大的论文吧,看看这个伟大的公司和一群伟大的人都干了些什么,了解一下Map Reduce是怎么回事,如果了解了你自然想去试试Hadoop,还有Bigtable和GFS,哦!太震撼了,原来存储数据也有这么多讲究,不是放硬盘里或通过Insert插入数据库就行了。也许这些英文论文读起来很困难,但是我想一周一篇的要求并不高(我现在仍然保持着一周读两篇论文的习惯)。要知道,最新、最严谨的东西都在论文里,如果你只是通过书本或社区学习,那么你永远不会知道今天在计算机科学与技术的领域又发生了哪些令人震撼的事情,出现了哪些新奇的东西。

      不要太懒惰,你写增删改查写累了吗?Come on!有没有想过自己写一个小型的httpd?当然你需要先去学习HTTP协议(rfc2612),试试能不能写一个PHP的SAPI扩展令你的httpd处理PHP脚本。有没有想过自己用lex和yacc实现一个自己的小语言,也不是完全没用,也许你已经对你的领域业务逻辑烂熟于胸,那么去实现一个自己的领域语言吧。啊!我要去学习编译原理、形式语言与自动机……咦,这东西还挺有意思的,去看看计算理论去……如果到了这里,你已经开始接触计算机的数学本质了,而你的层次将会得到升华。

      学习就是这样,主动突破自己,给自己一些挑战性的任务,生活才有趣。成天困在.NET的盒子里,我们还有脸称自己为程序员吗?

      脱离IDE 玩玩纯文本与shell

      从没用过IDE的程序员可能是悲剧,但从没脱离过IDE的程序员绝对是悲剧!

      你有没有觉得自己越来越不像个“编程序”的而越来越像“堆程序”的。好的,即使在工作时你离不开IDE,那么业余时间让你的IDE滚蛋,等等,你改用Notepad?气死我了你!试试vimEmacs,体验一下用纯文本写程序,用gcc编译连接的乐趣。你会发现“yyp”比“选中一行,Ctrl+C,点击下一行起始位置,Ctrl+V”简单的多,你会发现按一下“0”比按20次“左箭头”省事的多。等源程序多了,也许你会想去学习Makefile的写法。你会莫名其妙地发现自己更懂编译和连接过程了。

      相信我,用纯文本和shell写程序比用IDE酷多了,想吸引女孩子吗?你去问问你们班或你们公司最漂亮的女生,她也会这么想。重要的是,这种酷不是“装B”的酷,而是有效率的酷。什么?你已经受不了IDE了……

      接受更多的编程哲学与学习方式

      注意我是用的“接受”而不是用“改变”,你不需要改变什么,写.NET程序很好,不过你可以适当吸取一下其它领域的编程哲学与学习方式。可以说Windows(特别是.NET)程序员和Unix程序员思考问题的方式大不相同,如果现在需要一辆汽车,Windows程序员会建立一个从冶铁到装配的“All in one”汽车制造基地;而Unix程序员会去分别建立采矿场、冶铁厂、设计公司、材料制造厂、机械制造厂和装配厂。我不想讨论他们各自的优缺点(因为很容易陷入无谓的宗教纷争),但是对于你来说,了解一些其它的编程哲学对你没有坏处。

      另外就是学习方式,例如你要学习PHP,请千万不要去书店购买各种《21天精通PHP》或《PHP编程宝典》,你应该首先打开Google,找到PHP官网,然后去官方文档哪里寻找学习资源。网上还有各种wiki,mailing lists和社区,请不要放弃这些资源。然后同时你可以去Amazon看书评,然后小心而谨慎地选择一本相关的书籍(影印版最优,翻译版其次)。

      一个人想突破自己不容易,关键在于自己有没有突破的意愿。衷心希望有一天,您的脑中不再被ASP.NET,ASP.NET MVC,WCF,WPF,ADO.NET,Silverlight,EF……而占满,如果到了那一天,你会发现,咦?!我.NET的水平也大幅提升了!

      —————————————–华丽的分割线—————————————–

      精彩评论】

      Jacky Song:真正的程序员肯定不会限定在.net平台,程序员就是为了解放生产力,提高工作效率而生的,其实除.net以外,还有其他很好玩的技术或工具,比如你所说的编辑器之神vim,无论是windows平台还是linux平台,都是其它编辑器无法比拟的(谁用谁知道)。脚本的话python, php, 以及各平台的shell, 这些都是可以大大的提高工作效率。总之,计算机就是一门艺术,越往里面研究越觉得它是划时代的奇迹,这玩意太神奇了!!

      toEverybody:我认为改变一下公司的技术会眼界很宽,如学C#, 再学一下Delphi, 再了解一下C++, 再了解一下PHP…..

      微生物:其实本质上还是要问这样一个问题,你真的是一个合格的程序员吗?你真的打算一直做程序员吗?

      FlyDragon:思想的认识升华到你这个层次需要时间和好的引导。真正埋头于技术,而不参与社区交流的人很难走出自己的瓶颈!

      朝_夕:博主的观点正好描述了我目前的状态,作为一个以.net 技术来混烦吃的技术人员来说,当我掌握的.net 技术越高深,在工作中体现的价值就越大,获得的报酬就越多,使我不得不专注于.net 的技术;但微软的技术更新得那么快、那么多,对于我这个资质比较普通的脑袋来说,实在是有心无力……目前趁着工作任务比较少,学习了下python, 和用下Linux,释放下满脑都是.net的大脑。

      JaiHo:很高兴我已经和VS无关了,曾经一次装VS快一个小时后,我就不再用了,以前用VS学C++和C,后来发现很多问题,就用gcc编译器了。我已经脱离IDE了,工作以来还未用IDE,感觉纯文本编译器vim很好。

      llzhzhbb:执拗于一个平台和刻意使用多个平台其实本质上没差别,都是认为镰刀的意义大于麦子。

      午后的小睡:相比微软,当苹果程序员吧。苹果对框架的推出和更改非常谨慎,修改语法更是谨慎,所以苹果的系统基本上都是增添API,不会像.net那样,微软今天一个框架,明天又一个,没完没了的往C#里添加各种语言特性,让你把本来应该学习先进的开发算法和方法的时间全浪费在语言和框架的钻研里了。

      hogface:技术眼界不断的扩张是必须的,我倒是认为我们做技术的不应该总在技术层面晃,可以多多了解其他行业的运作规则。我们会获取很多信息,有助于我们的程序设计。中国多数的程序员的归宿在哪里呢?当你30岁了还在写代码,而对其他行业不了解,那你的职业寿命到头了。简单适用的技术应用于行业运作才是我们程序员的价值提现,也是能够生存下来的关键。看看开心网,优酷,凡客诚品等。都是成功的案例,一味谈技术在中国多数人是没希望,没饭碗的。

      Keven Wang:有时候现实和我们的愿望还是有很大的差距的。不过我很支持楼主的观点。毕竟我们不可能一辈子做程序员。在应用中学习,在学习中应用。带着任务性的学习是最快的。

      Jeffrey Zhao:

      引用

      午后的小睡:相比微软,当苹果程序员吧。苹果对框架的推出和更改非常谨慎,修改语法更是谨慎,所以苹果的系统基本上都是增添API,不会像.net那样,微软今天一个框架,明天又一个,没完没了的往C#里添加各种语言特性,让你把本来应该学习先进的开发算法和方法的时间全浪费在语言和框架的钻研里了。

      你搞笑,obj-c的年年加新特性。苹果系统增加API,微软就不是了?

      苹果出一个GCD,你们嗷嗷叫好。微软加一个TPL,你们就说冗余。两个tmd是一种东西好不好。

      要说学习先进的开发方法和算法和理论,学C#绝对比obj-c有价值,如今obj-c的兴起完全是iPhone等等在商业上的成功。

      你谈比赚钱倒也罢,你比“长进”,这不是扯蛋么。

      午后的小睡:

      @Jeffrey Zhao

      您不是个C/C++程序员,不知道微软的开发工具是多么郁闷的东西,我这里不是怪微软,因为微软的镇山之宝是Windows,如果允许程序员在Windows下写的程序可以随便移植到别的平台上,对微软来说那是致命的。所以当初IE擅自修改HTML的支持搞得Web开发人员晕头转向,它不去支持OpenGL,却去搞D3D,它擅自修改Java,JDC不高兴它才搞的C#,不光是开源软件,任何平台中立的标准微软都一定要单开一套,所谓Mono的跨平台也是个笑话,我问过很多用过的人都不建议使用它,都是说不到万不得已,用.net还是迁移到Windows平台上好。

      我以前写Cygwin/Mingw/Linux的程序,想用个IDE提高效率,用了下VS,一看它生成的模板程序就放弃了,微软连STD C++都不放过,你对C++生成托管代码或者什么框架我无所谓,如果在语法级标准支持的有差异,甚至另立新语法挖空心思逼迫程序员转用微软独有的东西那就没法忍受了。

      Obj-C不过是C/C++的扩展,它不像微软从语法级变更了C/C++,你可以使用所有既有的库和标准代码,实际上除了图形界面相关的部分,根本没必要写Obj-C的代码,苹果的新Obj-C前端CLang也没有对C/C++在语法级做变更,而是强调遵从标准。苹果修改Objc-C从来只修改它扩展的那部分,从来不会对C/C++本身动手术,这就是区别。

      总之,追踪微软的东西是最累人的,到处是Windows粘合陷阱,稍不留神写的东西就变成了Windows依赖,哪怕是某些明明是逻辑公共的部分,当然,如果发誓只给Windows平台写程序是另一回事。

      Jeffrey Zhao:

      @午后的小睡

      说obj-c是c++扩展?无语啊,只是c扩展而已。VC++不支持C++标准?求证。

      IE的标准问题,那是Web标准看IE不爽故意定成不一样的,请分清先后顺序。

      微软现在一直拥抱标准,请更新您的思路,还D3D,Java呢,什么年代的事情。

      扩展之类的谁都再做,IE有扩展,Opera有扩展,Mozilla有扩展,WebKit有扩展。而且你不也说,obj-c是c的扩展么,呵呵。

      至于说mono是笑话的人,要么本来就看和.NET有关的东西不爽,要么是不知道mono现在是多牛。

      午后的小睡:

      @Jeffery Zhao

      obj-C还包括obj-C++,它不过是C/C++语法上加了Smaltalk类语法扩展(所有用@符号开始的部分),我爱用C++和STL,天天在用。XCode目前用的是gcc和g++前端,将来CLang对C++标准支持达标了,将会替代gcc前端,参见www.llvm.org。

      VC++对标准支持的烂,这个所有用过VC++的人都知道,据说到了2008比较好了,但是到了2010就是另一番天地了。你现在用VS2010生成一段C++ HelloWorld,你去给C++程序员看,他肯定说,这是什么C++?这是.net代码吧。

      SnowDreamist:

      @午后的小睡

      OpenGL本身就有问题,他更适合于工业级别的渲染但对于计算机游戏的支持并不到位。Mono现在做的很强,我想你才是没有用过mono的人,不得不说,在SL5推出之前,MoonLight的硬件加速要比SL4,微软官方的性能要好,你都视而不见吗?Cygwin我装了一个小时没有完成果断杀掉进程了。虽然我也很喜欢Linux的命令行和那些漂亮的小工具,工作效率很高,但是这并不足以成为谋生手段。至于C++标准,简直就是笑话。我在学习编译原理的时候,老师就说C++是为编译器作者创造的一门语言,而不是编程人员。C++用的很多,但不能说明C++就是一门优秀的语言,他太复杂了,让机器自动生成吧。Gcc的作者同样抛弃了#pragma开关,这也是对标准的篡改,也没好到哪儿去。

      ocean:

      有些跑题了。

      真正的主题应该是专注于一项技术,培养自己的特长,增加自己的核心竞争力。而不应该每样技术都去学,最后搞得没有一样精通,也没有核心竞争力。多学一些,多看一些,多关注一些是好事,但是不要颠倒次序,一定要专注。

      至于语言哪个好如个不好,这个争论起来就大了,就像你用VS写程序,却非要在Linux上跑,这就是蛋疼的事情,你选择了.NET,当然应该基于微软的平台。你选择了iphone平台,那你完全可以用object-c,什么样的平台上有什么样的技术,选对平台,选对技术也是一种能耐。用linux,不用php而用asp.net就是蛋疼,用windows,不用.NET而用java也很蛋疼。

      虽说跨平台是好事,我这么多年见过这么多大企业,还真没见过有企业把自己的应用从一个平台迁移到另外一个平台的,别说从linux迁移到windows,就是从同样在unix/linux下将websphere迁移到到weblogic的都没看到。一个大型应用一旦运用起来,再去迁移基础平台本身而是蛋疼。

      Jeffrey Zhao:

      @午后的小睡

      嗯嗯,obj-c对c语言的扩展,WebKit,Firefox,Opera对标准的扩展都是先进生产力。IE的扩展就是邪恶。苹果对obj-c每年都加新特性就是发展生产力,C#两三年一次就是追逐新技术。我懂的。

      话说我不写C++,但我身边写C++的人太多了,从VS 2008转到VS 2010的人也很多。而且太多C++项目在Windows下是使用VC++编译器,在*nix下面用gcc,按你的说法,我实在理解不了这种情况是怎么回事。

      你不妨先说说,有空我也问问那些C++程序员。

      引用

      迂腐啊迂腐:
      2.为什么.net能轻易实现的东西,您要去用php做,您是在炫技术么?

      不说别的,今天我还真听说了公司里某个项目是这个情况,嘿嘿。

      ocean:

      用VC++6.0确实能让一些不太符合C++标准的代码编译通过,不过这也要看程序员了,如果程序员比较遵循标准,也同样可以用VC++6.0写出完全规范的代码来,这点还是用 VC++ 2010吧,VC++ 2010支持最新的C++标准,不过这样也带来了升级的一个问题,原来一些在VC++6.0下写的不太规范的代码,在VC++ 2010上就编译不过去了。

      至于IE的扩展,更多的基于历史问题,因为标准的定制太慢,导致IE不得已自己定了很多东西。同时在10几年前,网页编辑器,特别是所见即所得的编辑器,很多都不符合标准,所以导致做出来的网页大多不符合标准。毕竟做网页的不是程序员,并不懂什么标准,甚至很多html里面都有错误,比如漏掉反标签,或者反标签错位等等。为了更好的容错性,IE可以很完美的将这些页面显示出来,这实际上是程序健壮性的一种表现。我们在计算机课程上都学过,程序健壮性是很重要的,就是在用户录入错误的时候能够有正确的提示或者修正,举个例子,比如我们现在写程序,会经常将用户输入的全角的数字替换成半角的数字,因为如果你提示用户不能用全角输入数字,那用户可能并不清楚什么是半角什么是全角,健壮性在于我能够很好的修正用户输入的这些错误。对于html这么复杂的东西,如果没有自动修正就等于很多网页都看不了,所以在早期,这种做法是可取的。很多东西要从历史的角度去看,问题产生都和起产生的背景相关。

      午后的小睡:

      争哪种技术好很无聊。厂商玩垄断也好,玩革新也好,那是厂商的事情,我很简单,我为钱工作,虽然我也喜欢钻研技术。我不会为了反微软而反微软,应该明白一件事情,反微软的平台垄断,是为了赚钱!因为,市面上平台越多,越混乱,搞开发的人才好赚钱,才意味着更多的机会,平台间竞争越多,大厂商才会为了吸引我们这些小开发者进行让利,一旦谁获得了统治地位,开发人员必然会同质化,开发人员的价值就低了,至于什么节省社会资源,哪种技术更优秀之类的P话,能比进你钱包里的钱实在?蛋糕就那么大,厂商占的多了,咱们开发人员自然占的就少了,博主的意思可以这么理解,一旦发现某块蛋糕自己能分的越来越少了,必须能立刻跳到另一块蛋糕上去!

      szse:

      W3C就是个笑话。至于OpenGL和D3D之争,游戏业同时做过两种东西的人怕是还真没有站在OpenGL这边的。标准的不等于就是好的,标准协会归根结底还不是一群大头抢话语权?

      Hunts.C:

      可惜很多人都不是真正的程序员,所以你善意的提醒,受众不多。很大一部分软件开发从业人员并没有给自己加上程序员的社会属性,并以此出发,作为未来数年甚至是数十年的努力方向。仅仅是年少无知时被忽悠学了这个学科,或是一些非主观的原因最终从事了这个行业的工作,如今难以脱离。在这片神奇的土地上,做真正的自己是不容易的,你懂得。所以请不要失望,继续分享你认为有意义的观点。

      chenkai:

      最近很忙都没有时间写博。说到一门技术专业程度上来,个人认为大部分程序员都局限在企业的选择之上。当然这也无可厚非,但是我曾经无数次强调过一个程序员职业修养来说,开放是很重要的。这也是我考察其他程序员一个”另类”的标准, 技术范围、编程思想、视野的开放等等,这也无疑也成就不同程序员各自的夜郎之国。不得不说这是一个很现实也很悲哀的事情。但愿你的提醒能唤醒更多的程序员同行….

      Qinw:

      很好,和我的学习方向一致,这就是大师的学习方式,金字塔学习法。我现在也一直在学习其他语言,像ruby,python C/c++, 汇编等,发现这个世界原来是那么大,那么精彩,最主要的是让我激情源源不,但现在脱离IDE我的技术还不行,玩过,但我经常崩溃而死。

      东风31:

      非常棒的文章。也许,在国内,只有这种兴趣,这种孜孜不倦的探索与追求,才能在技术领域 make a difference.

      一杰:

      对于本文的理解,不对的请指点:其主要宗旨是多接触行业内的事物,开拓思维,才能深入其本质,不只是从微观的角度分析与理解自有的语言(不仅是.NET程序员);只有宏观的看待事物才能更好的把握住好的方向;

      学习或使用语言也是一种投资;从投资学的角度说:就是所有的鸡蛋放在一个篮子里,风险很高,因为谁也不能保证你的篮子是永久存在的或品质优良;多关注周围的篮子,就可以发现自有篮子的不足,才可以修补当前篮子的不足;当然也可以换一只更加优秀的篮子来投资,谁会害怕有更好的收益呢?

      空明流转:

      @午后的小睡

      MSVC从2002开始,就开始对标准有很好的兼容性了。你懂不懂为什么VC6对标准兼容不好啊?因为VC6在标准之前推出的。用的是当时标准的草案。VS2010?你看看GCC 4.5的Feature list,再看看C++1x的标准草案,你就懂了。

      老坏猫:

      实际上,感觉这里很多喜欢不喜欢.NET的人其实并不了解.NET。一个真正的.NET高手要了解计算机体系的绝大部分知识,并能权衡利弊,妥善运用。大部分还不熟练.NET的人企图浅尝辄止学其他语言,不仅起不到楼主所谓集思广益的效果,反而狗熊掰包谷一样一事无成。

      李晓强:

      引用

      Jacky Song:真正的程序员肯定不会限定在.net平台,程序员就是为了解放生产力,提高工作效率而生的。其实除.net以外,还有其他很好玩的技术或工具,比如你所说的编辑器之神vim, 无论是windows平台还是linux平台, 都是其它编辑器无法比拟的(谁用谁知道)。脚本的话python, php, 以及各平台的shell, 这些都是可以大大的提高工作效率。总之,计算机就是一门艺术,越往里面研究越觉得它是划时代的奇迹,这玩意太神奇了!!

      额,这个所谓的神器VIM不知道有没有如下功能:

      1) 脚本智能提示,那种简单的关键字提示的就别说了。(别说我菜,大多数情况下我还是记得API的,但是一个回车就能节约输入的情况下,我觉得还是值的,而且作为一个Web开发人员,很无奈至少我需要同时使用CSS,HTML,JS�用CSS,HTML,JS,C#,VB.NET).

      2) 格式化代码,我是个很懒的人,比如写XHTML属性懒得写引号,写C#,js之流的代码不想手工用Tab键格式化代码,所以我需要一种一个快捷键就能按照我设定的规则来格式化我的代码的工具。(Ctrl+E,D VS中轻松搞定)

      3) 项目管理,额,现代的程序员,通常都是把自己的代码分成各个项目来开发的。

      4) 版本控制和团队协作工具(BUG管理,任务分配之类的)。

      如果没有,请记住这句话:VIM和VS不具有可比性,一个只是文本编辑器,另一个是IDE;一个是播种机,一个是联合收割机…

      另外VS的快捷键用起来比VIM有效率多了,我用VS基本上不用鼠标的。

      思考-总结:

      楼主,顶你,我觉得说的很有道理的。

      举个例子说明下,很多人用nhibernate ,里面的实体类,要么继承于接口,要么是virtual的。但是java下,好像就没有这个限制? 为什么呢?其实深究下,能明白,java下都是virtual call, 而在.net, 为了提升效率,有call 和 virtual call 之分。 之后再看看 ioc 的实现原理,大概也能明白一些了。

      其实很多技术是相通,你在看别的技术的时候,可以带着自己所熟悉的平台的问题, 去学习和去看,一是开阔了眼界,另外对你理解自己熟悉的平台有更深入的理解。

      读书也是,很多人基本上看书和资料,都是走马观花,基本上看完就忘, 如果能做到带着问题去看,或者看的时候能想着自己曾经遇到过的同类的问题,吸收新的知识,会更快更牢更扎实。

      李晓强:

      哎,发现很多人骂微软技术更新快的。这个IT本来就是个快速发展的行业,发展快总比发展慢要好吧,我觉得微软发展的还是有点慢了。knect之类的技术要是早出现几年多好啊,啥时候才能达到让计算机扩展人的大脑的思维能力啊…比如我一个想法能够查询全中国的资料文献。

      Jacky Song:

      @李晓强

      vs本身是集开发,编译为一体的,但论文本编辑功能,vs能实现的,没有vim搞不定的,vs搞不定的,vim同样能搞定(智能提示,自动完成,列操作,语法高亮….) 都可以自己配,网上n多vim的牛比插件,你试用以后就知道他的强悍,vim在文本编辑器领域当之无愧是No.1。

      EricZhang(T2噬菌体) :

      @李晓强

      呵呵,说起来还是Windows程序员和*nix程序员在思考问题方式上的不同。您作为Windows程序员,习惯使用大而全的东西。而*nix程序员习惯把小而灵巧的东西组合起来使用,例如您说到的版本控制,vim本身当然不会有,因为vim对*nix程序员来说就是编辑器,版本控制我们有svn和git啊,我们也可以通过配置(vim或emacs的可配置性和可扩展性超乎你的想象)将snv或git更方便地集成到vim中。至于代码格式化,VS给你提供了有限的功能,而vim或emacs提供了无限的可能,只要有需要,自己写扩展脚本就行了,例如你在emacs下输入“M-x sort lines”看看效果。至于您提到的智能提示啥的在vim中更是小菜一碟,插件遍地飞。最后,我绝不是说IDE不好,只是说习惯了IDE的朋友抽点宝贵时间适当脱离IDE玩玩vim和shell会更好。

      李晓强:

      额,这个各种编辑器啥的没少玩,就是觉得忒麻烦了,生产力太低。在了解VS做了什么的情况下,我觉得嘛,有奔驰,完全没必要骑自行车。呵呵,个人意见。大家引入计算机就是为了降低难度,省点脑细胞,你要说我用个Emacs,VIM还得自己写写脚本扩展(何况格式化源代码之类的扩展不是一两百行代码就能搞定的事儿),那还是有点不合适吧。

      @Jacky Song

      呵呵,自动完成,列操作,语法高亮这种就不说了,大家都有,没啥好比较的。智能提示就不一样了,VS的智能提示有类型推断而且针对.NET 平台和JS的智能提示更是编译性的,何况VIM那么多扩展插件良莠不齐…WIN下使用VIM装插件后,崩溃的不是一次两次啊。不说了,个人意见,不过最牛的是VS可以在装了一些插件后切换成VIM模式,完全可以满足您的要求。

      Jeffery Zhao:

      其实吧,VIM的确是好东西,但是举例子的时候一定要靠谱,比如文章里写的东西,直接ctrl+c,ctrl+v,和yyp是一个效果,不用选中该行的。光标到行首,也是一个home键搞定。VS也有快捷键,也可以扩展,用起来也可以不碰鼠标。VS连VIM插件都有,也有不少人用,我也在用,既可以VIM又有智能提示。说到智能提示啊重构啊,在VIM要做到VS,NetBeans这种程度也是很难的,插件找不到好的(你说你不需要则是另一回事情了)。

      徐少侠:

      本质是同意楼主的说法的。问题是楼主的打击面太大。尤其是那个IDE的说法。不过其实楼主说的很清楚,是在工作之余去耍耍。耍过了,尤其是经历了编译的全流程。会学到和领悟到更多的。而工作的时候,快捷键的优势足以将vi搞下去了。不用IDE,不是仅仅不用它,而是为了去体会平时更多我们不去体会的东西。

      llzhzhbb:

      我觉得程序员应该把自己经常考虑的问题作一下分析,哪些是和语言及平台相关的,哪些是和语言无关的。比如数据结构、通信、图形、外接设备等,绝大部分都和语言无关;嵌入式系统、驱动等,和语言及平台的关系较大,不过更多的还是与操作系统的知识有关。把问题的这些层面剥离之后,真正和语言相关的其实并不多。语言不过是提供了一个门,人们可以从这个门进去观看大厅里的东西,或者语言是一种交流的工具,人们只是采用了这一种语言和某个庞然大物对话,而这些真正的交流对象,不会天然的歧视你从哪个门进入或者采用何种语言。

      gussing:

      引用

      午后的小睡:
      VC++对标准支持的烂,这个所有用过VC++的人都知道,据说到了2008比较好了,但是到了2010就是另一番天地了。你现在用VS2010生成一段C++ HelloWorld,你去给C++程序员看,他肯定说,这是什么C++?这是.net代码吧。

      有的人就是分不清c++和c++/cli之间的区别。。。不过这个真怪微软,搞c++/cli这么废的东西。。
      vs2010对c++标准的支持是最好的,没有之一,具体请自行google

      午后的小睡:

      @gussing

      我确实没仔细看,我也知道不去理会那个自动模板可以写纯C++,可能我真的是在FUD吧,不过我没太理会编译出来的代码到底是CLI还是Native Code。不过, VS2010确实在某些方面和GCC4解释的不太一样,我记得在声明会抛异常的函数时,是否需要列举异常这个方面,两个编译器有一个就会吐警告,另一个不会,我当时懒得再去翻看标准文档里是怎么叙述这一段了。VS2010就用了一下,印象是对C++语法进行了扩充,还提供了很多替代标准库的东西进去,我记得很多年前Windows号称posix标准完全兼容,那个时候我水平差,怎么也没能顺利的使用posix标准库,最后程序与系统打交道的部分全使用的是Windwos API。还是那句话,不论是什么,微软一定会通过再发明一遍轮子的方法尽量让你写微软工具粘合的东西。

      小鱼仔:

      (╯▽╰)╭,.NET平台不够好吗?为什么这年头总有些人明明很简单的东西(用C#实现)要用那些很复杂而且效率低下的语言或工具去实现呢?显拽吗?同为做一个项目,我用.NET一个星期,你用汇编做了两年,我会认为你很牛逼吗?谁说.NET的程序员就菜,Microsoft Press的英文原版书你看过多少(像《CLR via C#》),研究过多少高级编程?技术没有好坏之分,只有适不适合之分。每一种技术都有它最擅长发挥重要的地方,你没看到人家卓越网那么大的也是aspx堆出来的代码,可咱们学校的教务网站也是ASP.NET写的,但是超过一千人网上选课就崩溃了!那些做网站的老师还在抱怨C#太烂,还没有某某…好呢?那你用记事本写HTML去堆吧,我会觉得你真的很牛逼!你何不说我就在一台裸机上连续按0和1,一个上午一个操作系统就出来了,那你更牛逼了!学.NET没有错,它本身就是一把锋利的刀,不要再去像其它语言一样去磨了,但是你不能因为它已经够锋利了而放低对自己的要求,只满足于拖拖控件,那才是真正的让人鄙视。真正的.NET庞大着呢。

      Ivony…:

      引用

      EricZhang(T2噬菌体):“呵呵,说起来还是 Windows程序员和*nix程序员在思考问题方式上的不同。您作为Windows程序员,习惯使用大而全的东西。而*nix程序员习惯把小而灵巧的东西组合起来使用,例如您说到的版本控制,vim本身当然不会有,因为vim对*nix程序员来说就是编辑器,版本控制我们有svn和git啊,我们也可以通过配置(vim或emacs的可配置性和可扩展性超乎你的想象)将snv或git更方便地集成到vim中。至于代码格式化,VS给你提供了有限的功能,而vim或emacs提供了无限的可能,只要有需要,自己写扩展脚本就行了,例如你在emacs下输入“M-x sort lines”看看效果。至于您提到的智能提示啥的在vim中更是小菜一碟,插件遍地飞。”

      LZ再一次的把程序员人为的划分阵营,这个习惯不好,必须指出。

      那么来讨论问题。
      就说那个无聊的yyp,事实上VS也有很多插件,也能整个Zhuangbility插件来解决yyp的问题,那是不是VS也就成为神器了?
      开拓眼界是好的,不同平台的用户习惯不同也是对的。但外国的月亮就是圆的这就不对了。
      顺带说yyp,一般一个标准的Windows用户(我)是这样做的:
      HomeShift + ↓ + Del + Ins + Ins。

      这不见得比yyp要繁琐(事实上先要搞清楚自己在编辑状态还是命令状态和学习适应就要花掉一段时间),也不觉得会慢零点多少秒,其次,这个方法在VS、记事本、Word、或是现在这个博客园的输入框里面都能用。请问那个神器要怎么才能搞定?

      huhuc:

      不要这么急着发表自己看法,像yyp这样的功能通过宏就可以实现,而且很多编辑器就自带复制当前行功能,就算没有,很多编辑器都可以写插件的,就算还没有,还可以像SQL Assistant那样Hook窗口过程,或者通过发送Windows消息读写文本。设计模式这种书,千万不要看,浮躁且肤浅。我买过一本2手,看了下目录,和其它书一起论斤卖了。

      inhesoft:

      vim和vs不是一个级别的东西,不能相比,单纯从编辑器的角度来看,vim是很好,个人感觉,vim并不太适合windows下编程,而是适合unix下编程,unix下编程,函数名都很短,一般推荐都用小写,而windows下的.net和win32 api函数我都很长,还要分出大小写,用起来就累了,各有各的长处。顺带说一句,vim的o相当与vs的下的shift+enter,不是有些同志说的ctrl+c。

      curer:

      你的本意是好的,但是在这篇文章中却隐隐有把自己的观点强加到所有.net开发者上。这种强盗逻辑是不是又掉入另一个盒子中了?每个人都有自己不同的经历,把MS,Google大牛的例子生生的加在每个人身上合适么?换句话,加在自己身上就肯定合适么?呵呵,送T2一句话“求同存异”。 不管是大牛,还是菜鸟。都有我们值得学习的地方。和大牛对话能够给出醍醐灌顶的畅快,和菜鸟对话则可以给我们发掘自己知识体系中的漏洞。和菜鸟对话,因为那是一种全新的角度。甚至在我看来比大牛对话更有收获。因为不仅能够收获自己,还能和更多地人分享。

      你发现别人总是不能理解自己的意思,为什么不反过来思考一些,这么多人反对,是不是自己有不足?因为这篇文章的漏洞太多了,是不是应该抓紧机会重新回顾下?这种经验类文章,本没有对错。只是我们大部分都是典型的理科生,在隐隐的数学思维习惯支配下,你文章中只要有漏洞,那么你推出的结论就是大家不能接受的。更不说,这篇文章漏洞百出。

      可以准确的说,从这篇文章的本意来看,并不算是一篇有价值的。但是你却可以反过来获得更多的知识。想要成为大牛,关键是能不能包容别人的不同观点,并从中吸收经验。而不是消极的说“手贱,不该写”这类消极的语言。呵呵,其实有这么多人纠你的错误,自己反而应该感到幸福。真的,我已经很羡慕你了。

      fxs:

      作为一个已经使用4年的 Linux人,我之前一值是使用Ubuntu,在公司的时候,电脑也是装的Ubuntu,里面跑Virtualbox的xp做一些photoshop切图的事情,后来烦Ubuntu不停更新,而且系统比较耗资源,换成debian一直用着。我用Linux不是为了装B,而是习惯了,因为Xp经常中毒,而我又没有钱买高配置的电脑,也忍受不了杀毒软件占据的资源,用了这么久的Linux做过的PHP网站也很多了,并没有像你说的那样神乎其神,告诉你Linux其实一点都不好用,shell?这个玩意垃圾的要死,我这几天写个脚本来自动压缩所有的js代码,当然先是shell遍历js文件,然后调用YUI的compressor,你以为shell多好用?连个子字符串查找功能都没有,要剔除一些文件,还得借助awk,不要鼓吹vim,我在服务器上改东西必须用vim(难道指望用nano?),但是平常开发还是用Netbeans,别的不说,光是按Esc键都能让你发火,因为早期的键盘是ESC键在现在的Tab键位置,所以很好按到,但现在你基本买不到这样的键盘了。你鼓吹VIM,可见你并不熟练使用VIM。

      Linux/UNIX界的东西混乱的不是你能想像到的,我们公司服务器有Debian, Freebsd, CentOS这三个系统,光是apache的配置文件路径,Freebsd, CentOS, Debian这三个系统都放置的不一样,程序的安装路径更是乱七八糟,你真正整天跟这些个系统打交道,就能把你烦死。也只有你不懂,或者只懂个皮毛的时候,才会觉得Linux/UNIX有多么高明,对于.NET不想多说,我之前写过两年的.NET,不喜欢那些懂点Linux/Unix的人在.NET界鼓吹Linux/Unix,并嘲笑.NET程序员,打鱼的嘲笑种田的,实在是没有什么意思!

      你以为你懂那么多语言术语就很牛了?程序员应该专一,而不是像你那样博而不专,你跟我很像,你提到过的术语我都了解,还有很多你没提到的我也了解,Haskell,Ocaml,你用过没?Perl/Ruby/TCL脚本写过没?GTK+写过没?每半年学一种语言,到最后你就成了什么都不会了,专一 一点吧!

      还有推荐你看一本书《UNIX痛恨者手册》,UNIX界不是你想像中的那么美好。

      省油的灯:

      先赞一个,这么年轻就有如此见的,英雄出少年,了不起!每个人都困在盒子里,是每个人思维的界限。不仅仅是自己建造的,也是企业文化和社会文化建造的。如果要批判的是一个群体,我认为关注国内程序员(其实C++程序员也是同样的现状)生存的土壤(哲学上又叫唯物史观):粗制滥造的设计,高耦合度成为主流,低水平的重复开发。有的程序员周末都没时间来看你的大作,还在加班做低水平的维护,这将耗尽他们的青春,你会不会觉得他们是闰土?试问这样的土壤怎么能生长出参天大树(林)?当然,这样的现状背后有它的原因的原因(哲学上又叫第一因)。

      curer:

      事实上,我觉得,如果你还有精力或是有不服输的精神,更应该再写一篇更加严谨的文章来解释自己的想法。没办法,谁让大家都是理科生呢。要知道我们可不是抱着看穿越小说的心态来看的。

      +
      +
      文章作者: 王恒
      文章链接: http://wangheng.org/wrote-net-programmer-and-not-get-bogged-down-in-the-box-built.html
      版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王恒's Blog

      评论
      avatar
      王恒
      make progress little day by day.
      关注
      \ No newline at end of file