diff --git a/app/Constant/AppConstant.php b/app/Constant/AppConstant.php index c2cd16ca7..ed67d7291 100644 --- a/app/Constant/AppConstant.php +++ b/app/Constant/AppConstant.php @@ -6,6 +6,6 @@ class AppConstant { const APP = 'cms9'; const APP_NAME = 'ModStartCMS9'; - const VERSION = '8.8.0'; + const VERSION = '8.9.0'; } diff --git a/module/Banner/Asset/style/banner.css b/module/Banner/Asset/style/banner.css index f4352832d..a306de427 100644 --- a/module/Banner/Asset/style/banner.css +++ b/module/Banner/Asset/style/banner.css @@ -1 +1 @@ -.ub-banner{width:100%;overflow:hidden;--swiper-navigation-size:20px}.ub-banner.container .swiper-slide .cover{max-width:var(--container-width);margin:0 auto}.ub-banner .swiper-slide{display:block}.ub-banner .swiper-slide .cover{background-repeat:no-repeat;background-size:cover;background-color:transparent;background-position:center;overflow:hidden;display:block;position:relative}.ub-banner .swiper-slide .cover:after{content:'';display:block;margin-top:50%}.ub-banner .swiper-slide.a .cover{display:flex;align-content:center;align-items:center}.ub-banner .swiper-slide.a .cover .content{max-width:var(--container-width);display:block;margin:1.5rem auto;line-height:2em;flex-grow:1;padding:0 2rem}.ub-banner .swiper-slide.a .cover .content.reverse .title{color:#fff}.ub-banner .swiper-slide.a .cover .content.reverse .slogan{color:#fff}.ub-banner .swiper-slide.a .cover .content.reverse .link{border-color:#fff;color:#fff;background:0 0}.ub-banner .swiper-slide.a .cover .content.reverse .text{color:#fff}.ub-banner .swiper-slide.a .cover .content .title{font-size:2rem;font-weight:700;color:var(--color-text);line-height:2rem}.ub-banner .swiper-slide.a .cover .content .slogan{margin-top:1rem;padding:.5rem 0;font-size:1rem;color:var(--color-text)}.ub-banner .swiper-slide.a .cover .content .slogan .line{font-size:1rem}.ub-banner .swiper-slide.a .cover .content .link{padding:0 1rem;display:inline-block;line-height:2rem;border-radius:2rem;background:var(--color-primary);font-size:var(--font-size);color:#fff;border:.1rem solid var(--color-primary);letter-spacing:.1rem;margin-top:1rem}.ub-banner .swiper-slide.a .cover .content .link.sm{font-size:var(--font-size-small);line-height:1.2rem;border-width:1px;letter-spacing:0;padding:0 .5rem;background:#fff;color:var(--color-primary)}.ub-banner .swiper-slide.a .cover .content .text{padding-top:1rem}.ub-banner .swiper-slide.b .cover{display:flex}.ub-banner .swiper-slide.b .cover .content{max-width:var(--container-width);display:flex;flex-grow:1;margin:0 auto}.ub-banner .swiper-slide.b .cover .content .left{flex-shrink:0;width:50%;display:flex;flex-direction:column;justify-content:center;padding-left:2rem;box-sizing:border-box}.ub-banner .swiper-slide.b .cover .content .left .title{font-size:2rem}.ub-banner .swiper-slide.b .cover .content .left .slogan{margin-top:1rem;padding:.5rem 0;font-size:1rem}.ub-banner .swiper-slide.b .cover .content .left .link{margin-top:1rem}.ub-banner .swiper-slide.b .cover .content .left .link .action{padding:0 1rem;display:inline-block;line-height:2rem;border-radius:2rem;background:var(--color-primary);font-size:var(--font-size);color:#fff;border:.1rem solid var(--color-primary);letter-spacing:.1rem;margin-bottom:.5rem}.ub-banner .swiper-slide.b .cover .content .left .link .action.sm{font-size:var(--font-size-small);line-height:1.2rem;border-width:1px;letter-spacing:0;padding:0 .5rem;background:#fff;color:var(--color-primary)}.ub-banner .swiper-slide.b .cover .content .left .text{margin-top:1rem}.ub-banner .swiper-slide.b .cover .content .right{flex-shrink:0;width:50%;display:flex;flex-direction:column;justify-content:center}.ub-banner .swiper-slide.b .cover .content .right .image{background-size:contain;background-repeat:no-repeat;background-position:center;width:80%;margin:0 auto}.ub-banner .swiper-slide.b .cover .content .right .image:after{content:'';display:block;margin-top:100%}.ub-banner .swiper-slide.video .cover .video-player{width:100%;height:100%;object-fit:cover;position:absolute;top:0;left:0}.ub-banner:hover .swiper-button-white{opacity:.5}.ub-banner .swiper-button-white{opacity:0;background:#fff;color:var(--color-text);font-size:10px;width:2.5rem;height:2.5rem;border-radius:50%;margin-top:-1.25rem;transition:opacity .3s ease-in-out}.ub-banner .swiper-pagination-bullet{box-shadow:#666 0 0 .25rem;width:16px;height:4px;border-radius:4px}.ub-banner .swiper-pagination-bullet.swiper-pagination-bullet-active{box-shadow:none}.ub-banner .swiper-pagination .swiper-pagination-bullet-active{background:var(--color-primary)}.ub-banner.ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.ratio-3-2 .swiper-slide .cover:after{margin-top:66.66%}.ub-banner.ratio-4-3 .swiper-slide .cover:after{margin-top:75%}.ub-banner.ratio-2-1 .swiper-slide .cover:after{margin-top:50%}.ub-banner.ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.ratio-3-1 .swiper-slide .cover:after{margin-top:33.33%}.ub-banner.ratio-4-1 .swiper-slide .cover:after{margin-top:25%}.ub-banner.ratio-5-1 .swiper-slide .cover:after{margin-top:20%}.ub-banner.ratio-5-2 .swiper-slide .cover:after{margin-top:40%}.ub-banner.ratio-5-3 .swiper-slide .cover:after{margin-top:60%}.ub-banner.ratio-10-1 .swiper-slide .cover:after{margin-top:10%}@media screen and (max-width:40rem){.ub-banner.m-ratio-1-2 .swiper-slide .cover:after{margin-top:200%}.ub-banner.m-ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.m-ratio-3-2 .swiper-slide .cover:after{margin-top:66.66%}.ub-banner.m-ratio-4-3 .swiper-slide .cover:after{margin-top:75%}.ub-banner.m-ratio-2-1 .swiper-slide .cover:after{margin-top:50%}.ub-banner.m-ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.m-ratio-3-1 .swiper-slide .cover:after{margin-top:33.33%}.ub-banner.m-ratio-4-1 .swiper-slide .cover:after{margin-top:25%}.ub-banner.m-ratio-5-1 .swiper-slide .cover:after{margin-top:20%}.ub-banner.m-ratio-5-2 .swiper-slide .cover:after{margin-top:40%}.ub-banner.m-ratio-5-3 .swiper-slide .cover:after{margin-top:60%}.ub-banner.m-ratio-10-1 .swiper-slide .cover:after{margin-top:10%}.ub-banner .swiper-button-next,.ub-banner .swiper-button-prev{display:none}.ub-banner .swiper-slide.a .cover .content{padding:1rem;text-align:center;position:absolute;top:0;left:0;right:0;border:0;margin:0;height:calc(100% - 50px);display:flex;flex-direction:column;justify-content:center;align-items:center}.ub-banner .swiper-slide.a .cover .content .title{font-size:1.2rem}.ub-banner .swiper-slide.a .cover .content .slogan{padding:.5rem 0}.ub-banner .swiper-slide.a .cover .content .link{line-height:1.5rem;height:1.5rem}.ub-banner .swiper-slide.b .cover .content{flex-direction:column}.ub-banner .swiper-slide.b .cover .content .left{width:100%;height:50%;text-align:center;padding-left:0}.ub-banner .swiper-slide.b .cover .content .right{width:100%;height:50%;margin-top:1rem}} \ No newline at end of file +.ub-banner{width:100%;overflow:hidden;--swiper-navigation-size:20px}.ub-banner.container .swiper-slide .cover{max-width:var(--container-width);margin:0 auto}.ub-banner .swiper-slide{display:block}.ub-banner .swiper-slide .cover{background-repeat:no-repeat;background-size:cover;background-color:transparent;background-position:center;overflow:hidden;display:block;position:relative}.ub-banner .swiper-slide .cover:after{content:'';display:block;margin-top:50%}.ub-banner .swiper-slide.a .cover{display:flex;align-content:center;align-items:center}.ub-banner .swiper-slide.a .cover .content{max-width:var(--container-width);display:block;margin:1.5rem auto;line-height:2em;flex-grow:1;padding:0 2rem}.ub-banner .swiper-slide.a .cover .content.reverse .title{color:#fff}.ub-banner .swiper-slide.a .cover .content.reverse .slogan{color:#fff}.ub-banner .swiper-slide.a .cover .content.reverse .link{border-color:#fff;color:#fff;background:0 0}.ub-banner .swiper-slide.a .cover .content.reverse .text{color:#fff}.ub-banner .swiper-slide.a .cover .content .title{font-size:2rem;font-weight:700;color:var(--color-text);line-height:2rem}.ub-banner .swiper-slide.a .cover .content .slogan{margin-top:1rem;padding:.5rem 0;font-size:1rem;color:var(--color-text)}.ub-banner .swiper-slide.a .cover .content .slogan .line{font-size:1rem}.ub-banner .swiper-slide.a .cover .content .link{padding:0 1rem;display:inline-block;line-height:2rem;border-radius:2rem;background:var(--color-primary);font-size:var(--font-size);color:#fff;border:.1rem solid var(--color-primary);letter-spacing:.1rem;margin-top:1rem}.ub-banner .swiper-slide.a .cover .content .link.sm{font-size:var(--font-size-small);line-height:1.2rem;border-width:1px;letter-spacing:0;padding:0 .5rem;background:#fff;color:var(--color-primary)}.ub-banner .swiper-slide.a .cover .content .text{padding-top:1rem}.ub-banner .swiper-slide.b .cover{display:flex}.ub-banner .swiper-slide.b .cover .content{max-width:var(--container-width);display:flex;flex-grow:1;margin:0 auto}.ub-banner .swiper-slide.b .cover .content .left{flex-shrink:0;width:50%;display:flex;flex-direction:column;justify-content:center;padding-left:2rem;box-sizing:border-box}.ub-banner .swiper-slide.b .cover .content .left .title{font-size:2rem}.ub-banner .swiper-slide.b .cover .content .left .slogan{margin-top:1rem;padding:.5rem 0;font-size:1rem}.ub-banner .swiper-slide.b .cover .content .left .link{margin-top:1rem}.ub-banner .swiper-slide.b .cover .content .left .link .action{padding:0 1rem;display:inline-block;line-height:2rem;border-radius:2rem;background:var(--color-primary);font-size:var(--font-size);color:#fff;border:.1rem solid var(--color-primary);letter-spacing:.1rem;margin-bottom:.5rem}.ub-banner .swiper-slide.b .cover .content .left .link .action.sm{font-size:var(--font-size-small);line-height:1.2rem;border-width:1px;letter-spacing:0;padding:0 .5rem;background:#fff;color:var(--color-primary)}.ub-banner .swiper-slide.b .cover .content .left .text{margin-top:1rem}.ub-banner .swiper-slide.b .cover .content .right{flex-shrink:0;width:50%;display:flex;flex-direction:column;justify-content:center}.ub-banner .swiper-slide.b .cover .content .right .image{background-size:contain;background-repeat:no-repeat;background-position:center;width:80%;margin:0 auto}.ub-banner .swiper-slide.b .cover .content .right .image:after{content:'';display:block;margin-top:100%}.ub-banner .swiper-slide.video .cover .video-player{width:100%;height:100%;object-fit:cover;position:absolute;top:0;left:0}.ub-banner:hover .swiper-button-white{opacity:.5}.ub-banner .swiper-button-white{opacity:0;background:#fff;color:var(--color-text);font-size:10px;width:2.5rem;height:2.5rem;border-radius:50%;margin-top:-1.25rem;transition:opacity .3s ease-in-out}.ub-banner .swiper-pagination-bullet{box-shadow:#666 0 0 .25rem;width:16px;height:4px;border-radius:4px}.ub-banner .swiper-pagination-bullet.swiper-pagination-bullet-active{box-shadow:none}.ub-banner .swiper-pagination .swiper-pagination-bullet-active{background:var(--color-primary)}.ub-banner.ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.ratio-3-2 .swiper-slide .cover:after{margin-top:66.66%}.ub-banner.ratio-4-3 .swiper-slide .cover:after{margin-top:75%}.ub-banner.ratio-2-1 .swiper-slide .cover:after{margin-top:50%}.ub-banner.ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.ratio-3-1 .swiper-slide .cover:after{margin-top:33.33%}.ub-banner.ratio-4-1 .swiper-slide .cover:after{margin-top:25%}.ub-banner.ratio-5-1 .swiper-slide .cover:after{margin-top:20%}.ub-banner.ratio-5-2 .swiper-slide .cover:after{margin-top:40%}.ub-banner.ratio-5-3 .swiper-slide .cover:after{margin-top:60%}.ub-banner.ratio-10-1 .swiper-slide .cover:after{margin-top:10%}@media screen and (max-width:40rem){.ub-banner.m-ratio-1-2 .swiper-slide .cover:after{margin-top:200%}.ub-banner.m-ratio-2-3 .swiper-slide .cover:after{margin-top:150%}.ub-banner.m-ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.m-ratio-3-2 .swiper-slide .cover:after{margin-top:66.66%}.ub-banner.m-ratio-4-3 .swiper-slide .cover:after{margin-top:75%}.ub-banner.m-ratio-2-1 .swiper-slide .cover:after{margin-top:50%}.ub-banner.m-ratio-1-1 .swiper-slide .cover:after{margin-top:100%}.ub-banner.m-ratio-3-1 .swiper-slide .cover:after{margin-top:33.33%}.ub-banner.m-ratio-4-1 .swiper-slide .cover:after{margin-top:25%}.ub-banner.m-ratio-5-1 .swiper-slide .cover:after{margin-top:20%}.ub-banner.m-ratio-5-2 .swiper-slide .cover:after{margin-top:40%}.ub-banner.m-ratio-5-3 .swiper-slide .cover:after{margin-top:60%}.ub-banner.m-ratio-10-1 .swiper-slide .cover:after{margin-top:10%}.ub-banner .swiper-button-next,.ub-banner .swiper-button-prev{display:none}.ub-banner .swiper-slide.a .cover .content{padding:1rem;text-align:center;position:absolute;top:0;left:0;right:0;border:0;margin:0;height:calc(100% - 50px);display:flex;flex-direction:column;justify-content:center;align-items:center}.ub-banner .swiper-slide.a .cover .content .title{font-size:1.2rem}.ub-banner .swiper-slide.a .cover .content .slogan{padding:.5rem 0}.ub-banner .swiper-slide.a .cover .content .link{line-height:1.5rem;height:1.5rem}.ub-banner .swiper-slide.b .cover .content{flex-direction:column}.ub-banner .swiper-slide.b .cover .content .left{width:100%;height:50%;text-align:center;padding-left:0}.ub-banner .swiper-slide.b .cover .content .right{width:100%;height:50%;margin-top:1rem}} \ No newline at end of file diff --git a/module/Member/Admin/Controller/ConfigController.php b/module/Member/Admin/Controller/ConfigController.php index af79fa4b2..777126186 100644 --- a/module/Member/Admin/Controller/ConfigController.php +++ b/module/Member/Admin/Controller/ConfigController.php @@ -135,7 +135,8 @@ public function setting(AdminConfigBuilder $builder) $builder->number('Member_PasswordLengthMin', '密码最小长度') ->defaultValue(0) ->help('0表示不限制,推荐为8位以上'); - + $builder->switch('Member_LoginInfoEncrypt', '登录信息加密') + ->help('开启后,登录信息请求时将会加密传输'); }); if (ModuleManager::getModuleConfig('Member', 'dataStatisticEnable', false)) { $builder->layoutPanel('存储上传', function ($builder) { diff --git a/module/Member/Api/Controller/AuthController.php b/module/Member/Api/Controller/AuthController.php index 42cc3febc..cf0e256c2 100644 --- a/module/Member/Api/Controller/AuthController.php +++ b/module/Member/Api/Controller/AuthController.php @@ -14,6 +14,7 @@ use ModStart\Core\Util\CurlUtil; use ModStart\Core\Util\EventUtil; use ModStart\Core\Util\RandomUtil; +use ModStart\Core\Util\SecureUtil; use ModStart\Core\Util\StrUtil; use ModStart\Misc\Captcha\CaptchaFacade; use ModStart\Module\ModuleBaseController; @@ -712,8 +713,8 @@ public function login() { $input = InputPackage::buildFromInput(); - $username = $input->getTrimString('username'); - $password = $input->getTrimString('password'); + $username = $input->getTrimStringWithAutoDecrypt('username'); + $password = $input->getTrimStringWithAutoDecrypt('password'); if (empty($username)) { return Response::generate(-1, '请输入用户'); } diff --git a/module/Member/Docs/release.md b/module/Member/Docs/release.md index b544efae0..4a9879e12 100644 --- a/module/Member/Docs/release.md +++ b/module/Member/Docs/release.md @@ -2,6 +2,7 @@ - 新增:VIP 优惠券功能集成,支持折扣券 - 新增:可完全自定义上传功能定制的特性 UploadScript Hook +- 新增:用户登录传输用户密码加密 - 优化:VIP 开通页面交互形式优化 --- diff --git a/module/Member/View/pc/inc/loginPanel.blade.php b/module/Member/View/pc/inc/loginPanel.blade.php index f2b91981f..54d33d219 100644 --- a/module/Member/View/pc/inc/loginPanel.blade.php +++ b/module/Member/View/pc/inc/loginPanel.blade.php @@ -11,14 +11,19 @@
+ @if(modstart_config('Member_LoginInfoEncrypt',false)) + + @endif
- +
- +
@if(modstart_config('loginCaptchaEnable',false)) diff --git a/module/Member/View/pc/loginDialog.blade.php b/module/Member/View/pc/loginDialog.blade.php index 3e9c29800..76eb68496 100644 --- a/module/Member/View/pc/loginDialog.blade.php +++ b/module/Member/View/pc/loginDialog.blade.php @@ -32,14 +32,19 @@
+ @if(modstart_config('Member_LoginInfoEncrypt',false)) + + @endif
- +
- +
@if(modstart_config('loginCaptchaEnable',false)) diff --git a/module/Member/View/pc/memberProfile/avatar.blade.php b/module/Member/View/pc/memberProfile/avatar.blade.php index e68e24c38..af36842df 100644 --- a/module/Member/View/pc/memberProfile/avatar.blade.php +++ b/module/Member/View/pc/memberProfile/avatar.blade.php @@ -88,7 +88,7 @@ class="tw-h-48 tw-rounded-lg"
- @@ -97,22 +97,22 @@ class="tw-h-48 tw-rounded-lg"
- + 返回 - + 重新选择 - + - + - - 保存头像 + + 保存头像
diff --git a/module/Member/Web/Controller/AuthController.php b/module/Member/Web/Controller/AuthController.php index 1060f94e5..8889b7739 100644 --- a/module/Member/Web/Controller/AuthController.php +++ b/module/Member/Web/Controller/AuthController.php @@ -4,6 +4,7 @@ namespace Module\Member\Web\Controller; use Illuminate\Support\Facades\Input; +use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Session; use ModStart\Core\Exception\BizException; use ModStart\Core\Input\InputPackage; @@ -350,6 +351,11 @@ public function oauthLogin($oauthType = null) { $input = InputPackage::buildFromInput(); + $refer = Request::headerReferer(); + if (empty($refer)) { + + } + /** @deprecated delete at 2024-06-29 */ $view = $input->getBoolean('view', false); if ($view) { diff --git a/module/Vendor/Api/Controller/EntryController.php b/module/Vendor/Api/Controller/EntryController.php new file mode 100644 index 000000000..5b0ac277c --- /dev/null +++ b/module/Vendor/Api/Controller/EntryController.php @@ -0,0 +1,20 @@ +getTrimString('name'); + $param = $input->getArray('param'); + EntryBizEvent::fire($name, $param); + return Response::generateSuccess(); + } +} diff --git a/module/Vendor/Api/routes.php b/module/Vendor/Api/routes.php index 86646bd89..d9f169387 100644 --- a/module/Vendor/Api/routes.php +++ b/module/Vendor/Api/routes.php @@ -9,5 +9,6 @@ ], function () use ($router) { $router->match(['post'], 'captcha/image', 'CaptchaController@image'); + $router->match(['post'], 'entry/biz', 'EntryController@biz'); }); diff --git a/module/Vendor/Asset/entry/all.js b/module/Vendor/Asset/entry/all.js index 293deeae7..520ae2aea 100644 --- a/module/Vendor/Asset/entry/all.js +++ b/module/Vendor/Asset/entry/all.js @@ -1 +1 @@ -!function(i){var r={};function n(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,n),e.l=!0,e.exports}n.m=i,n.c=r,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=window.__msCDN+"vendor/Vendor/",n(n.s=284)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){var i;e&&(t.super_=e,(i=function(){}).prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t)}},function(t,e,i){var r=i(4),n=r.Buffer;function o(t,e){for(var i in t)e[i]=t[i]}function a(t,e,i){return n(t,e,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(n,a),a.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,i)},a.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");t=n(t);return void 0!==e?"string"==typeof i?t.fill(e,i):t.fill(e):t.fill(0),t},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e){t.exports=Vue},function(t,e){var i,r,t=t.exports={};function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(i===setTimeout)return setTimeout(e,0);if((i===n||!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:n}catch(t){i=n}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var s,u=[],h=!1,l=-1;function f(){h&&s&&(h=!1,s.length?u=s.concat(u):l=-1,u.length&&c())}function c(){if(!h){var t=a(f);h=!0;for(var e=u.length;e;){for(s=u,u=[];++l=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function d(t,e){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;var i=(t="string"!=typeof t?""+t:t).length;if(0===i)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return A(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return R(t).length;default:if(r)return A(t).length;e=(""+e).toLowerCase(),r=!0}}function e(t,e,i){var r,n,o,a=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((i=void 0===i||i>this.length?this.length:i)<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return function(t,e,i){var r=t.length;(!i||i<0||r=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=f.from(e,r)),f.isBuffer(e))return 0===e.length?-1:g(t,e,i,r,n);if("number"==typeof e)return e&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(n?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,i):g(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function g(t,e,i,r,n){var o=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a/=o=2,s/=2,i/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n)for(var h=-1,l=i;l>>10&1023|55296),l=56320|1023&l),r.push(l),n+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var i="",r=0;rt.length)throw new RangeError("Index out of range")}function M(t,e,i,r){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-i,2);n>>8*(r?n:1-n)}function _(t,e,i,r){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-i,4);n>>8*(r?n:3-n)&255}function S(t,e,i,r){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function x(t,e,i,r,n){return n||S(t,0,i,4),o.write(t,e,i,r,23,4),i+4}function E(t,e,i,r,n){return n||S(t,0,i,8),o.write(t,e,i,r,52,8),i+8}C.Buffer=f,C.SlowBuffer=function(t){return f.alloc(+(t=+t!=t?0:t))},C.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),C.kMaxLength=i(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,e,i){return r(null,t,e,i)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,e,i){return r=null,e=e,i=i,u(t=t),!(t<=0)&&void 0!==e?"string"==typeof i?n(r,t).fill(e,i):n(r,t).fill(e):n(r,t);var r},f.allocUnsafe=function(t){return h(null,t)},f.allocUnsafeSlow=function(t){return h(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,e){if(!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);ne&&(t+=" ... ")),""},f.prototype.compare=function(t,e,i,r,n){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),(e=void 0===e?0:e)<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(n<=r&&i<=e)return 0;if(n<=r)return-1;if(i<=e)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,n),h=t.slice(e,i),l=0;lthis.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var o,a,s,u,h,l,f=!1;;)switch(r){case"hex":return function(t,e,i,r){i=Number(i)||0;var n=t.length-i;if((!r||(r=Number(r))>n)&&(r=n),(n=e.length)%2!=0)throw new TypeError("Invalid hex string");n/2>8,n.push(i%256),n.push(r);return n}(t,(s=this).length-o),s,o,a);default:if(f)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),f=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(t,e){var i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):i=(n*=128)&&(r-=Math.pow(2,8*e)),r},f.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||y(t,e,this.length);for(var r=e,n=1,o=this[t+--r];0=(n*=128)&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return e||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){e||y(t,2,this.length);t=this[t]|this[t+1]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt16BE=function(t,e){e||y(t,2,this.length);t=this[t+1]|this[t]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt32LE=function(t,e){return e||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return e||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return e||y(t,4,this.length),o.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return e||y(t,4,this.length),o.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return e||y(t,8,this.length),o.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return e||y(t,8,this.length),o.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,i,r){t=+t,e|=0,i|=0,r||w(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>8):M(this,t,e,!0),e+2},f.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},f.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):_(this,t,e,!0),e+4},f.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):_(this,t,e,!1),e+4},f.prototype.writeIntLE=function(t,e,i,r){t=+t,e|=0,r||w(this,t,e,i,(r=Math.pow(2,8*i-1))-1,-r);var n=0,o=1,a=0;for(this[e]=255&t;++n>0)-a&255;return e+i},f.prototype.writeIntBE=function(t,e,i,r){t=+t,e|=0,r||w(this,t,e,i,(r=Math.pow(2,8*i-1))-1,-r);var n=i-1,o=1,a=0;for(this[e+n]=255&t;0<=--n&&(o*=256);)t<0&&0===a&&0!==this[e+n+1]&&(a=1),this[e+n]=(t/o>>0)-a&255;return e+i},f.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},f.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},f.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):_(this,t,e,!0),e+4},f.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||w(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):_(this,t,e,!1),e+4},f.prototype.writeFloatLE=function(t,e,i){return x(this,t,e,!0,i)},f.prototype.writeFloatBE=function(t,e,i){return x(this,t,e,!1,i)},f.prototype.writeDoubleLE=function(t,e,i){return E(this,t,e,!0,i)},f.prototype.writeDoubleBE=function(t,e,i){return E(this,t,e,!1,i)},f.prototype.copy=function(t,e,i,r){if(i=i||0,r||0===r||(r=this.length),e>=t.length&&(e=t.length),(r=0=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var n,o=(r=t.length-e>>=0,i=void 0===i?this.length:i>>>0,"number"==typeof(t=t||0))for(s=e;s>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function R(t){return s.toByteArray(function(t){if((t=((e=t).trim?e.trim():e.replace(/^\s+|\s+$/g,"")).replace(k,"")).length<2)return"";for(var e;t.length%4!=0;)t+="=";return t}(t))}function T(t,e,i,r){for(var n=0;n=e.length||n>=t.length);++n)e[n+i]=t[n];return n}}.call(this,I(5))},function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}(t.exports=i).equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)}},function(t,e,i){"use strict";var r=e,n=i(10),e=i(6),i=i(104);r.assert=e,r.toArray=i.toArray,r.zero2=i.zero2,r.toHex=i.toHex,r.encode=i.encode,r.getNAF=function(t,e,i){var r=new Array(Math.max(t.bitLength(),i)+1);r.fill(0);for(var n=1<>1)-1>1)-u:u):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(t,e){var i=[[],[]];t=t.clone(),e=e.clone();for(var r,n=0,o=0;0>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function r(t){return 1===t.length?"0"+t:t}function a(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i,r,n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),a=0;a>6|192,n[o++]=63&s|128):(r=a,55296!=(64512&(i=t).charCodeAt(r))||r<0||r+1>=i.length||56320!=(64512&i.charCodeAt(r+1))?n[o++]=s>>12|224:(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++a)),n[o++]=s>>18|240,n[o++]=s>>12&63|128),n[o++]=s>>6&63|128,n[o++]=63&s|128)}else for(a=0;a>>0}return n},e.split32=function(t,e){for(var i=new Array(4*t.length),r=0,n=0;r>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,i){return t+e+i>>>0},e.sum32_4=function(t,e,i,r){return t+e+i+r>>>0},e.sum32_5=function(t,e,i,r,n){return t+e+i+r+n>>>0},e.sum64=function(t,e,i,r){var n=t[e],o=r+t[e+1]>>>0;t[e]=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,i,r){return(e+r>>>0>>0},e.sum64_lo=function(t,e,i,r){return e+r>>>0},e.sum64_4_hi=function(t,e,i,r,n,o,a,s){var u,h=0;return h+=(u=e+r>>>0)>>0)>>0>>0},e.sum64_4_lo=function(t,e,i,r,n,o,a,s){return e+r+o+s>>>0},e.sum64_5_hi=function(t,e,i,r,n,o,a,s,u,h){var l,f=0;return f+=(l=e+r>>>0)>>0)>>0)>>0>>0},e.sum64_5_lo=function(t,e,i,r,n,o,a,s,u,h){return e+r+o+s+h>>>0},e.rotr64_hi=function(t,e,i){return(e<<32-i|t>>>i)>>>0},e.rotr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0},e.shr64_hi=function(t,e,i){return t>>>i},e.shr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0}},function(t,e,S){!function(_){!function(t){"use strict";function m(t,e){if(!t)throw new Error(e||"Assertion failed")}function e(t,e){t.super_=e;function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function g(t,e,i){if(g.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var i;"object"==typeof _?_.exports=g:t.BN=g,(g.BN=g).wordSize=26;try{i=S(191).Buffer}catch(t){}function a(t,e,i){for(var r=0,n=Math.min(t.length,i),o=e;o>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this.strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function r(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i.strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this.strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function o(t,e,i){return(new s).mulp(t,e,i)}function s(t,e){this.x=t,this.y=e}Math.imul||(n=r),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?n:i<63?r:i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}:o)(this,t,e)},s.prototype.makeRBT=function(t){for(var e=new Array(t),i=g.prototype._countBits(t)-1,r=0;r>=1;return r},s.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a>>=1)i++;return 1<>>=13),n>>>=13;for(o=2*e;o>=26,e+=r/67108864|0,e+=n>>>26,this.words[i]=67108863&n}return 0!==e&&(this.words[i]=e,this.length++),this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r}return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this.strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modn=function(t){m(t<=67108863);for(var e=(1<<26)%t,i=0,r=this.length-1;0<=r;r--)i=(e*i+(0|this.words[r]))%t;return i},g.prototype.idivn=function(t){m(t<=67108863);for(var e=0,i=this.length-1;0<=i;i--){var r=(0|this.words[i])+67108864*e;this.words[i]=r/t|0,e=r%t}return this.strip()},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return u[t]=e},w.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new M(t)},e(M,w),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,S(16)(t))},function(t,e,i){"use strict";i.d(e,"a",function(){return a}),i.d(e,"c",function(){return s}),i.d(e,"d",function(){return h}),i.d(e,"b",function(){return l}),i(124),i(125);const r=i(230),n=i(39),o=(i(235),i(238).sprintf),a={specialchars:function(t){var e=[];if(!t)return"";if(0==t.length)return"";for(var i=0;i":e.push(">");break;case"&":e.push("&");break;case" ":e.push(" ");break;case'"':e.push(""");break;default:e.push(t.substr(i,1))}return e.join("")}},s={randomString(e){e=e||32;var i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",r=i.length,n="";for(let t=0;t(e="^"+e.split("*").map(t=>t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")).join(".*")+"$",new RegExp(e).test(t)),keywordsMatchWildcard:(t,e)=>(e=e.split("*").map(t=>t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")).join(".*"),new RegExp(e).test(t)),sprintf(){var t=Array.from(arguments);return o.call(null,...t)}};function u(t){return String.fromCharCode(t)}const h={domainUrl(t){t=t||"";var e=window.location.protocol+"//"+window.location.host;return t?e+"/"+t:e},urlencode(r){let n="",o="";for(let i=0;i?[]^`{|}~%".indexOf(t)?n+="%"+e.toString(16):n+=t}return n},urldecode(e){let i="";e+="";for(let t=0;th.parseQuery(t),getQuery(t,e=null,i){i=h.parseQuery(i);return t in i?i[t]:e},parseQuery:t=>(t=t||window.location.search,r.parse(t)),buildQuery:t=>r.stringify(t)},l={extend(){return n.extend(...arguments)},clone:t=>JSON.parse(JSON.stringify(t)),equal:(t,e)=>JSON.stringify(t)===JSON.stringify(e),notEqual:(t,e)=>!l.equal(t,e),clearObject(t){var e,i;for(i in t)switch(e=typeof t[i],e){case"string":t[i]="";break;case"number":t[i]=0}}};i(239)},function(t,e,i){var r=i(1).Buffer,n=i(143).Transform,o=i(14).StringDecoder;function a(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}i(0)(a,n),a.prototype.update=function(t,e,i){"string"==typeof t&&(t=r.from(t,e));t=this._update(t);return this.hashMode?this:t=i?this._toString(t,i):t},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return e=t?this._toString(e,t,!0):e},a.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");t=this._decoder.write(t);return i&&(t+=this._decoder.end()),t},t.exports=a},function(t,e,i){"use strict";var r="object"==typeof Reflect?Reflect:null,u=r&&"function"==typeof r.apply?r.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)},n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)},o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(n,o){return new Promise(function(t,e){function i(){void 0!==r&&n.removeListener("error",r),t([].slice.call(arguments))}var r;"error"!==o&&(r=function(t){n.removeListener(o,i),e(t)},n.once("error",r)),n.once(o,i)})},(a.EventEmitter=a).prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function h(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function f(t,e,i,r){var n,o;return h(i),void 0===(n=t._events)?(n=t._events=Object.create(null),t._eventsCount=0):(void 0!==n.newListener&&(t.emit("newListener",e,i.listener||i),n=t._events),o=n[e]),void 0===o?(o=n[e]=i,++t._eventsCount):("function"==typeof o?o=n[e]=r?[i,o]:[o,i]:r?o.unshift(i):o.push(i),0<(i=l(t))&&o.length>i&&!o.warned&&(o.warned=!0,(i=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",i.emitter=t,i.type=e,i.count=o.length,console&&console.warn&&console.warn(i))),t}function c(t,e,i){t={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},e=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(t);return e.listener=i,t.wrapFn=e}function d(t,e,i){t=t._events;if(void 0===t)return[];e=t[e];return void 0===e?[]:"function"==typeof e?i?[e.listener||e]:[e]:i?function(t){for(var e=new Array(t.length),i=0;i>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e,i,r=this.lastTotal-this.lastNeed,e=(e=this,128!=(192&(i=t)[0])?(e.lastNeed=0,"�"):1o.length)&&(s=o.length),(o.substring(s-a.length,s)===a?"The ".concat(t," ").concat(r," ").concat(u(e,"type")):(n=(n="number"!=typeof n?0:n)+".".length>(a=t).length||-1===a.indexOf(".",n)?"argument":"property",'The "'.concat(t,'" ').concat(n," ").concat(r," ").concat(u(e,"type"))))+". Received type ".concat(typeof i)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=s},function(l,t,f){"use strict";!function(t){var e=Object.keys||function(t){var e,i=[];for(e in t)i.push(e);return i};l.exports=s;var i=f(68),r=f(72);f(0)(s,i);for(var n=e(r.prototype),o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));e=8*this._len;e<=4294967295?this._block.writeUInt32BE(e,this._blockSize-4):(this._block.writeUInt32BE((e-(i=(4294967295&e)>>>0))/4294967296,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)),this._update(this._block);var i=this._hash();return t?i.toString(t):i},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r},function(t,e,i){"use strict";var s={};function r(t,r,e){e=e||Error;var n,i,o,o=(o=n=e,(i=a).prototype=Object.create(o.prototype),(i.prototype.constructor=i).__proto__=o,a);function a(t,e,i){return n.call(this,"string"==typeof r?r:r(t,e,i))||this}o.prototype.name=e.name,o.prototype.code=t,s[t]=o}function u(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map(function(t){return String(t)}),2o.length)&&(s=o.length),(o.substring(s-a.length,s)===a?"The ".concat(t," ").concat(r," ").concat(u(e,"type")):(n=(n="number"!=typeof n?0:n)+".".length>(a=t).length||-1===a.indexOf(".",n)?"argument":"property",'The "'.concat(t,'" ').concat(n," ").concat(r," ").concat(u(e,"type"))))+". Received type ".concat(typeof i)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=s},function(l,t,f){"use strict";!function(t){var e=Object.keys||function(t){var e,i=[];for(e in t)i.push(e);return i};l.exports=s;var i=f(98),r=f(102);f(0)(s,i);for(var n=e(r.prototype),o=0;onull},isRequired:{type:Boolean,default:!1},option:{type:Array,default:()=>[]},textLength:{type:Number,default:50},placeholder:{type:String,default:""},defaultValue:{}},methods:{onDataChange(t){this.$emit("update",t)}}};Boolean},function(t,e,i){"use strict";var r=i(0),n=i(40),o=i(43),a=i(44),s=i(12);function u(t){s.call(this,"digest"),this._hash=t}r(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},function(t,i,e){!function(t){function e(t){return Object.prototype.toString.call(t)}i.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},i.isBoolean=function(t){return"boolean"==typeof t},i.isNull=function(t){return null===t},i.isNullOrUndefined=function(t){return null==t},i.isNumber=function(t){return"number"==typeof t},i.isString=function(t){return"string"==typeof t},i.isSymbol=function(t){return"symbol"==typeof t},i.isUndefined=function(t){return void 0===t},i.isRegExp=function(t){return"[object RegExp]"===e(t)},i.isObject=function(t){return"object"==typeof t&&null!==t},i.isDate=function(t){return"[object Date]"===e(t)},i.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},i.isFunction=function(t){return"function"==typeof t},i.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},i.isBuffer=t.isBuffer}.call(this,e(4).Buffer)},function(t,e,i){!function(o){t.exports=function(t,e){for(var i=Math.min(t.length,e.length),r=new o(i),n=0;n=this._delta8){e=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-e,this.endian);for(var i=0;i>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o>>24]^l[p>>>16&255]^f[m>>>8&255]^c[255&g]^e[b++],a=h[p>>>24]^l[m>>>16&255]^f[g>>>8&255]^c[255&d]^e[b++],s=h[m>>>24]^l[g>>>16&255]^f[d>>>8&255]^c[255&p]^e[b++],u=h[g>>>24]^l[d>>>16&255]^f[p>>>8&255]^c[255&m]^e[b++],d=o,p=a,m=s,g=u;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[b++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&d])^e[b++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[b++],u=(r[g>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var f=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var h=s^s<<1^s<<2^s<<3^s<<4;i[a]=h=h>>>8^255&h^99;var l=t[r[h]=a],f=t[l],c=t[f],d=257*t[h]^16843008*h;n[0][a]=d<<24|d>>>8,n[1][a]=d<<16|d>>>16,n[2][a]=d<<8|d>>>24,n[3][a]=d,o[0][h]=(d=16843009*c^65537*f^257*l^16843008*a)<<24|d>>>8,o[1][h]=d<<16|d>>>16,o[2][h]=d<<8|d>>>24,o[3][h]=d,0===a?a=s=1:(a=l^t[t[t[c^l]]],s^=t[t[s]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function s(t){this._key=r(t),this._reset()}s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o>>24)>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=f[o/e|0]<<24):6>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),n[o]=n[o-e]^a}for(var s=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[l>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[l>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&l]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=s},s.prototype.encryptBlockRaw=function(t){return a(t=r(t),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},s.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),t=n.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[1],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[3],12),t},s.prototype.decryptBlock=function(t){var e=(t=r(t))[1];t[1]=t[3],t[3]=e;e=a(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),t=n.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[3],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[1],12),t},s.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=s},function(t,e,i){var f=i(1).Buffer,c=i(40);t.exports=function(t,e,i,r){if(f.isBuffer(t)||(t=f.from(t,"binary")),e&&8!==(e=!f.isBuffer(e)?f.from(e,"binary"):e).length)throw new RangeError("salt should be Buffer with 8 byte length");for(var n=i/8,o=f.alloc(n),a=f.alloc(r||0),s=f.alloc(0);0>1]):a.mixedAdd(n[-h-1>>1].neg()):0>1]):a.add(n[-h-1>>1].neg())}return"affine"===t.type?a.toP():a},o.prototype._wnafMulAdd=function(t,e,i,r,n){for(var o,a=this._wnafT1,s=this._wnafT2,u=this._wnafT3,h=0,l=0;l>1]:x<0&&(o=s[S][-x-1>>1].neg()),y="affine"===o.type?y.mixedAdd(o):y.add(o))}}for(l=0;l=Math.ceil((t.bitLength()+1)/e.step)},a.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n>>32-e}function h(t,e,i,r,n,o,a){return u(t+(e&i|~e&r)+n+o|0,a)+e|0}function l(t,e,i,r,n,o,a){return u(t+(e&r|i&~r)+n+o|0,a)+e|0}function f(t,e,i,r,n,o,a){return u(t+(e^i^r)+n+o|0,a)+e|0}function c(t,e,i,r,n,o,a){return u(t+(i^(e|~r))+n+o|0,a)+e|0}r(s,n),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=h(i=this._a,o=this._b,n=this._c,r=this._d,t[0],3614090360,7),r=h(r,i,o,n,t[1],3905402710,12),n=h(n,r,i,o,t[2],606105819,17),o=h(o,n,r,i,t[3],3250441966,22);i=h(i,o,n,r,t[4],4118548399,7),r=h(r,i,o,n,t[5],1200080426,12),n=h(n,r,i,o,t[6],2821735955,17),o=h(o,n,r,i,t[7],4249261313,22),i=h(i,o,n,r,t[8],1770035416,7),r=h(r,i,o,n,t[9],2336552879,12),n=h(n,r,i,o,t[10],4294925233,17),o=h(o,n,r,i,t[11],2304563134,22),i=h(i,o,n,r,t[12],1804603682,7),r=h(r,i,o,n,t[13],4254626195,12),n=h(n,r,i,o,t[14],2792965006,17),i=l(i,o=h(o,n,r,i,t[15],1236535329,22),n,r,t[1],4129170786,5),r=l(r,i,o,n,t[6],3225465664,9),n=l(n,r,i,o,t[11],643717713,14),o=l(o,n,r,i,t[0],3921069994,20),i=l(i,o,n,r,t[5],3593408605,5),r=l(r,i,o,n,t[10],38016083,9),n=l(n,r,i,o,t[15],3634488961,14),o=l(o,n,r,i,t[4],3889429448,20),i=l(i,o,n,r,t[9],568446438,5),r=l(r,i,o,n,t[14],3275163606,9),n=l(n,r,i,o,t[3],4107603335,14),o=l(o,n,r,i,t[8],1163531501,20),i=l(i,o,n,r,t[13],2850285829,5),r=l(r,i,o,n,t[2],4243563512,9),n=l(n,r,i,o,t[7],1735328473,14),i=f(i,o=l(o,n,r,i,t[12],2368359562,20),n,r,t[5],4294588738,4),r=f(r,i,o,n,t[8],2272392833,11),n=f(n,r,i,o,t[11],1839030562,16),o=f(o,n,r,i,t[14],4259657740,23),i=f(i,o,n,r,t[1],2763975236,4),r=f(r,i,o,n,t[4],1272893353,11),n=f(n,r,i,o,t[7],4139469664,16),o=f(o,n,r,i,t[10],3200236656,23),i=f(i,o,n,r,t[13],681279174,4),r=f(r,i,o,n,t[0],3936430074,11),n=f(n,r,i,o,t[3],3572445317,16),o=f(o,n,r,i,t[6],76029189,23),i=f(i,o,n,r,t[9],3654602809,4),r=f(r,i,o,n,t[12],3873151461,11),n=f(n,r,i,o,t[15],530742520,16),i=c(i,o=f(o,n,r,i,t[2],3299628645,23),n,r,t[0],4096336452,6),r=c(r,i,o,n,t[7],1126891415,10),n=c(n,r,i,o,t[14],2878612391,15),o=c(o,n,r,i,t[5],4237533241,21),i=c(i,o,n,r,t[12],1700485571,6),r=c(r,i,o,n,t[3],2399980690,10),n=c(n,r,i,o,t[10],4293915773,15),o=c(o,n,r,i,t[1],2240044497,21),i=c(i,o,n,r,t[8],1873313359,6),r=c(r,i,o,n,t[15],4264355552,10),n=c(n,r,i,o,t[6],2734768916,15),o=c(o,n,r,i,t[13],1309151649,21),i=c(i,o,n,r,t[4],4149444226,6),r=c(r,i,o,n,t[11],3174756917,10),n=c(n,r,i,o,t[2],718787259,15),o=c(o,n,r,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+o|0,this._c=this._c+n|0,this._d=this._d+r|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,56>>32-e}function x(t,e,i,r,n,o,a,s){return S(t+(e^i^r)+o+a|0,s)+n|0}function E(t,e,i,r,n,o,a,s){return S(t+(e&i|~e&r)+o+a|0,s)+n|0}function k(t,e,i,r,n,o,a,s){return S(t+((e|~i)^r)+o+a|0,s)+n|0}function A(t,e,i,r,n,o,a,s){return S(t+(e&r|i&~r)+o+a|0,s)+n|0}function R(t,e,i,r,n,o,a,s){return S(t+(e^(i|~r))+o+a|0,s)+n|0}n(a,o),a.prototype._update=function(){for(var t=g,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,u=0|this._b,h=0|this._c,l=0|this._d,f=0|this._e,c=0;c<80;c+=1)var d,p=c<16?(d=x(i,r,n,o,a,t[b[c]],M[0],y[c]),R(s,u,h,l,f,t[v[c]],_[0],w[c])):c<32?(d=E(i,r,n,o,a,t[b[c]],M[1],y[c]),A(s,u,h,l,f,t[v[c]],_[1],w[c])):c<48?(d=k(i,r,n,o,a,t[b[c]],M[2],y[c]),k(s,u,h,l,f,t[v[c]],_[2],w[c])):c<64?(d=A(i,r,n,o,a,t[b[c]],M[3],y[c]),E(s,u,h,l,f,t[v[c]],_[3],w[c])):(d=R(i,r,n,o,a,t[b[c]],M[4],y[c]),x(s,u,h,l,f,t[v[c]],_[4],w[c])),i=a,a=o,o=S(n,10),n=r,r=d,s=f,f=l,l=S(h,10),h=u,u=p;var m=this._b+n+l|0;this._b=this._c+o+f|0,this._c=this._d+a+s|0,this._d=this._e+i+u|0,this._e=this._a+r+h|0,this._a=m},a.prototype._digest=function(){this._block[this._blockOffset++]=128,56>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this._strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this._strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function o(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i._strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modrn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>8&255),i>16&255),6===o?(i>24&255),o=r=0):(r=a>>>24,o+=2)}if(i>8&255),0<=i&&(t[i--]=a>>16&255),6===o?(0<=i&&(t[i--]=a>>24&255),o=r=0):(r=a>>>24,o+=2)}if(0<=i)for(t[i--]=r;0<=i;)t[i--]=0},Math.clz32?g.prototype._countBits=function(t){return 32-Math.clz32(t)}:g.prototype._countBits=function(t){var e=t,t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this._strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function u(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function h(t,e,i){return u(t,e,i)}Math.imul||(s=o),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?s:i<63?o:i<1024?u:h)(this,t,e)},g.prototype.mul=function(t){var e=new g(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},g.prototype.mulf=function(t){var e=new g(null);return e.words=new Array(this.length+t.length),h(this,t,e)},g.prototype.imul=function(t){return this.clone().mulTo(t,this)},g.prototype.imuln=function(t){var e=t<0;m("number"==typeof(t=e?-t:t)),m(t<67108864);for(var i=0,r=0;r>=26,i+=n/67108864|0,i+=o>>>26,this.words[r]=67108863&o}return 0!==i&&(this.words[r]=i,this.length++),e?this.ineg():this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>i%26&1;return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this._strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this._strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modrn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modrn=function(t){var e=t<0;m((t=e?-t:t)<=67108863);for(var i=(1<<26)%t,r=0,n=this.length-1;0<=n;n--)r=(i*r+(0|this.words[n]))%t;return e?-r:r},g.prototype.modn=function(t){return this.modrn(t)},g.prototype.idivn=function(t){var e=t<0;m((t=e?-t:t)<=67108863);for(var i=0,r=this.length-1;0<=r;r--){var n=(0|this.words[r])+67108864*i;this.words[r]=n/t|0,i=n%t}return this._strip(),e?this.ineg():this},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this._strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(l[t])return l[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return l[t]=e},_.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(r(t,t.umod(this.m)._forceRed(this)),t)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},_.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new S(t)},e(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,E(16)(t))},function(t,e,i){"use strict";e.version=i(190).version,e.utils=i(7),e.rand=i(50),e.curve=i(105),e.curves=i(56),e.ec=i(202),e.eddsa=i(206)},function(t,e,i){"use strict";var r,n=e,e=i(57),o=i(105),a=i(7).assert;function s(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.type?this.curve=new o.edwards(t):this.curve=new o.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,i){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var t=new s(i);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:t}),t}})}n.PresetCurve=s,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:e.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:e.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:e.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:e.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:e.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:e.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:e.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=i(201)}catch(t){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:e.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,i){e.utils=i(9),e.common=i(30),e.sha=i(195),e.ripemd=i(199),e.hmac=i(200),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},function(a,t,s){"use strict";!function(t){var e,i=s(4),r=i.Buffer,n={};for(e in i)i.hasOwnProperty(e)&&"SlowBuffer"!==e&&"Buffer"!==e&&(n[e]=i[e]);var o=n.Buffer={};for(e in r)r.hasOwnProperty(e)&&"allocUnsafe"!==e&&"allocUnsafeSlow"!==e&&(o[e]=r[e]);if(n.Buffer.prototype=r.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(t,e,i){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return r(t,e,i)}),o.alloc||(o.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||2*(1<<30)<=t)throw new RangeError('The value "'+t+'" is invalid for option "size"');t=r(t);return e&&0!==e.length?"string"==typeof i?t.fill(e,i):t.fill(e):t.fill(0),t}),!n.kStringMaxLength)try{n.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(t){}n.constants||(n.constants={MAX_LENGTH:n.kMaxLength},n.kStringMaxLength&&(n.constants.MAX_STRING_LENGTH=n.kStringMaxLength)),a.exports=n}.call(this,s(3))},function(t,e,i){"use strict";const s=i(60).Reporter,r=i(31).EncoderBuffer,u=i(31).DecoderBuffer,n=i(6),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],a=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function h(t,e,i){const r={};this._baseState=r,r.name=i,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=h;const l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){const e=this._baseState,i={};l.forEach(function(t){i[t]=e[t]});const t=new this.constructor(i.parent);return t._baseState=i,t},h.prototype._wrap=function(){const i=this._baseState;a.forEach(function(e){this[e]=function(){const t=new this.constructor(this);return i.children.push(t),t[e].apply(t,arguments)}},this)},h.prototype._init=function(t){const e=this._baseState;n(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),n.equal(e.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(t){const e=this._baseState,i=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==i.length&&(n(null===e.children),e.children=i,i.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(n(null===e.args),e.args=t,e.reverseArgs=t.map(function(i){if("object"!=typeof i||i.constructor!==Object)return i;const r={};return Object.keys(i).forEach(function(t){t==(0|t)&&(t|=0);var e=i[t];r[e]=t}),r}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){h.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),o.forEach(function(i){h.prototype[i]=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return n(null===t.tag),t.tag=i,this._useArgs(e),this}}),h.prototype.use=function(t){n(t);const e=this._baseState;return n(null===e.use),e.use=t,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(t){const e=this._baseState;return n(null===e.default),e.default=t,e.optional=!0,this},h.prototype.explicit=function(t){const e=this._baseState;return n(null===e.explicit&&null===e.implicit),e.explicit=t,this},h.prototype.implicit=function(t){const e=this._baseState;return n(null===e.explicit&&null===e.implicit),e.implicit=t,this},h.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},h.prototype.key=function(t){const e=this._baseState;return n(null===e.key),e.key=t,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(e){const t=this._baseState;return n(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},h.prototype.contains=function(t){const e=this._baseState;return n(null===e.use),e.contains=t,this},h.prototype._decode=function(e,i){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,i));let n,o=r.default,a=!0,t=null;if(null!==r.key&&(t=e.enterKey(r.key)),r.optional){let t=null;if(null!==r.explicit?t=r.explicit:null!==r.implicit?t=r.implicit:null!==r.tag&&(t=r.tag),null!==t||r.any){if(a=this._peekTag(e,t,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,i):this._decodeChoice(e,i),a=!0}catch(e){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const i=this._decodeTag(e,r.explicit);if(e.isError(i))return i;e=i}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?o=e.raw(t):e=n}if(i&&i.track&&null!==r.tag&&i.track(e.path(),n,e.length,"tagged"),i&&i.track&&null!==r.tag&&i.track(e.path(),e.offset,e.length,"content"),r.any||(o=null===r.choice?this._decodeGeneric(r.tag,e,i):this._decodeChoice(e,i)),e.isError(o))return o;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(t){t._decode(e,i)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new u(o);o=this._getUse(r.contains,e._reporterState.obj)._decode(n,i)}}return r.obj&&a&&(o=e.leaveObject(n)),null===r.key||null===o&&!0!==a?null!==t&&e.exitKey(t):e.leaveKey(t,r.key,o),o},h.prototype._decodeGeneric=function(t,e,i){var r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],i):/str$/.test(t)?this._decodeStr(e,t,i):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],i):"objid"===t?this._decodeObjid(e,null,null,i):"gentime"===t||"utctime"===t?this._decodeTime(e,t,i):"null_"===t?this._decodeNull(e,i):"bool"===t?this._decodeBool(e,i):"objDesc"===t?this._decodeStr(e,t,i):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,i):e.error("unknown tag: "+t)},h.prototype._getUse=function(t,e){const i=this._baseState;return i.useDecoder=this._use(t,e),n(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},h.prototype._decodeChoice=function(r,n){const o=this._baseState;let a=null,s=!1;return Object.keys(o.choice).some(function(t){const e=r.save(),i=o.choice[t];try{const o=i._decode(r,n);if(r.isError(o))return!1;a={type:t,value:o},s=!0}catch(t){return r.restore(e),!1}return!0},this),s?a:r.error("Choice not matched")},h.prototype._createEncoderBuffer=function(t){return new r(t,this.reporter)},h.prototype._encode=function(t,e,i){var r=this._baseState;if(null===r.default||r.default!==t){t=this._encodeValue(t,e,i);return void 0===t||this._skipDefault(t,e,i)?void 0:t}},h.prototype._encodeValue=function(i,r,t){const e=this._baseState;if(null===e.parent)return e.children[0]._encode(i,r||new s);let n=null;if(this.reporter=r,e.optional&&void 0===i){if(null===e.default)return;i=e.default}let o=null,a=!1;if(e.any)n=this._createEncoderBuffer(i);else if(e.choice)n=this._encodeChoice(i,r);else if(e.contains)o=this._getUse(e.contains,t)._encode(i,r),a=!0;else if(e.children)o=e.children.map(function(t){if("null_"===t._baseState.tag)return t._encode(null,r,i);if(null===t._baseState.key)return r.error("Child should have a key");var e=r.enterKey(t._baseState.key);if("object"!=typeof i)return r.error("Child expected, but input is not object");t=t._encode(i[t._baseState.key],r,i);return r.leaveKey(e),t},this).filter(function(t){return t}),o=this._createEncoderBuffer(o);else if("seqof"===e.tag||"setof"===e.tag){if(!e.args||1!==e.args.length)return r.error("Too many args for : "+e.tag);if(!Array.isArray(i))return r.error("seqof/setof, but data is not Array");const t=this.clone();t._baseState.implicit=null,o=this._createEncoderBuffer(i.map(function(t){var e=this._baseState;return this._getUse(e.args[0],i)._encode(t,r)},t))}else null!==e.use?n=this._getUse(e.use,t)._encode(i,r):(o=this._encodePrimitive(e.tag,i),a=!0);if(!e.any&&null===e.choice){const i=null!==e.implicit?e.implicit:e.tag,t=null===e.implicit?"universal":"context";null===i?null===e.use&&r.error("Tag could be omitted only for .use()"):null===e.use&&(n=this._encodeComposite(i,a,t,o))}return null!==e.explicit&&(n=this._encodeComposite(e.explicit,!1,"context",n)),n},h.prototype._encodeChoice=function(t,e){const i=this._baseState,r=i.choice[t.type];return r||n(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(t.value,e)},h.prototype._encodePrimitive=function(t,e){var i=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&i.args)return this._encodeObjid(e,i.reverseArgs[0],i.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,i.args&&i.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},h.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},h.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,i){"use strict";const r=i(0);function n(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}(e.Reporter=n).prototype.isError=function(t){return t instanceof o},n.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},n.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},n.prototype.enterKey=function(t){return this._reporterState.path.push(t)},n.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},n.prototype.leaveKey=function(t,e,i){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},n.prototype.leaveObject=function(t){const e=this._reporterState,i=e.obj;return e.obj=t,i},n.prototype.error=function(t){const e=this._reporterState,i=t instanceof o;if(t=i?t:new o(e.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!e.options.partial)throw t;return i||e.errors.push(t),t},n.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,i){"use strict";function r(i){const r={};return Object.keys(i).forEach(function(t){(0|t)==t&&(t|=0);var e=i[t];r[e]=t}),r}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r(e.tag)},function(t,e,S){!function(_){!function(t){"use strict";function m(t,e){if(!t)throw new Error(e||"Assertion failed")}function e(t,e){t.super_=e;function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function g(t,e,i){if(g.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var i;"object"==typeof _?_.exports=g:t.BN=g,(g.BN=g).wordSize=26;try{i=S(225).Buffer}catch(t){}function a(t,e,i){for(var r=0,n=Math.min(t.length,i),o=e;o>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this.strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function r(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i.strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this.strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function o(t,e,i){return(new s).mulp(t,e,i)}function s(t,e){this.x=t,this.y=e}Math.imul||(n=r),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?n:i<63?r:i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}:o)(this,t,e)},s.prototype.makeRBT=function(t){for(var e=new Array(t),i=g.prototype._countBits(t)-1,r=0;r>=1;return r},s.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a>>=1)i++;return 1<>>=13),n>>>=13;for(o=2*e;o>=26,e+=r/67108864|0,e+=n>>>26,this.words[i]=67108863&n}return 0!==e&&(this.words[i]=e,this.length++),this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r}return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this.strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modn=function(t){m(t<=67108863);for(var e=(1<<26)%t,i=0,r=this.length-1;0<=r;r--)i=(e*i+(0|this.words[r]))%t;return i},g.prototype.idivn=function(t){m(t<=67108863);for(var e=0,i=this.length-1;0<=i;i--){var r=(0|this.words[i])+67108864*e;this.words[i]=r/t|0,e=r%t}return this.strip()},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return u[t]=e},w.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new M(t)},e(M,w),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,S(16)(t))},function(t,e,i){t.exports=function(t){function n(t,e){this.name=e,this.path=t,this.keys=[],this.fns=[],this.params={},this.regex=i(this.path,this.keys,!1,!1)}var o,a=[],s={},e=t.routie;n.prototype.addHandler=function(t){this.fns.push(t)},n.prototype.removeHandler=function(t){for(var e=0,i=this.fns.length;e=this.options.chunkUploaded?setTimeout(e.resolve,0):setTimeout(e.reject,0),a.when(e)},beforeSendFile:function(i){var r=new a.Deferred,n=this,o={action:"init",name:i.name,type:i.type,lastModifiedDate:i.lastModifiedDate.toString(),size:i.size,md5:null};return(new s.Uploader).md5File(i).then(function(t){o.md5=t,i.fileMd5=t;function e(){a.ajax({type:"POST",url:n.options.server,headers:n.options.headers,data:JSON.stringify(o),contentType:"application/json",dataType:"json"}).done(function(t){t.code?(u(t.msg),r.reject()):(n.options.chunkUploaded=t.data.chunkUploaded,r.resolve())}).fail(function(t){u("上传出错"),r.reject()})}n.options.uploadBeforeCheck?n.options.uploadBeforeCheck(o,i,function(){e()},function(t){n.owner.cancelFile(i),r.reject(t)}):e()}).fail(function(t){u("上传出错:"+t),r.reject()}),a.when(r)}});var n=i(11),o={name:"UploadButton",props:{url:{type:String,default:"/path_to_url"},category:{type:String,default:"file"},uploadConfig:{type:Object,default:null},width:{type:String,default:"200px"},size:{type:String,default:null},uploadBeforeCheck:{type:Function,default:null},autoSave:{type:Boolean,default:!1},styles:{type:String,default:"simple"},uploadText:{type:String,default:null}},data:()=>({id:"UploadButtonUploader_"+n.c.randomString(10),uploader:null,dataConfigFromServer:null}),computed:{classes(){return[this.size,this.styles]},dataUploadConfig(){if(this.uploadConfig)return this.uploadConfig;if(this.$store)return this.$store.state.base.config.dataUpload;if(window.__dataConfigLoading&&window.__dataConfigLoading[this.category]){if(window.__dataConfigLoadingId&&window.__dataConfigLoadingId[this.category]!=this.id){const t=setInterval(()=>{window.__dataConfigFromServer&&window.__dataConfigFromServer[this.category]&&(this.dataConfigFromServer=window.__dataConfigFromServer[this.category],clearInterval(t))},100)}}else window.__dataConfigLoadingId=Object.assign({[this.category]:this.id},window.__dataConfigLoadingId),window.__dataConfigLoading=Object.assign({[this.category]:!0},window.__dataConfigLoading),this.initConfig();return this.dataConfigFromServer},apiUrl(){var t=`${this.url}/${this.category}`;return this.$api.url?this.$api.url(t):t}},mounted(){this.init()},methods:{initConfig(){this.$api.post(`${this.url}/${this.category}`,{action:"config"},t=>{this.dataConfigFromServer=t.data,window.__dataConfigFromServer=Object.assign({[this.category]:t.data},window.__dataConfigFromServer)})},addFile(t){this.uploader.addFile(t)},init(){if(this.dataUploadConfig){let t=this.uploadText||this.L("Select Local File"),e='
'+t+"
";"lg"===this.size?e=' '+t+"":"flat"===this.size&&(e='
'+t+"
");const o=this;var i="#"+this.id,r={text:e,server:this.apiUrl,extensions:this.dataUploadConfig.category[this.category].extensions.join(","),sizeLimit:this.dataUploadConfig.category[this.category].maxSize,chunkSize:this.dataUploadConfig.chunkSize,uploadBeforeCheck:this.uploadBeforeCheck,ready:t=>{o.uploader=t},callback:(t,e)=>{o.$emit("success",t),this.autoSave&&this.$api.post(this.apiUrl,{action:"save",path:t.path,name:t.name,size:t.size,categoryId:0},t=>{o.$emit("save",t.data)})},finish:function(){o.$emit("finish")}},n=a.extend({text:"上传文件",swf:"/Uploader.swf",server:"/path/to/server",sizeLimit:2097152,extensions:"gif,jpg,png,jpeg",chunked:!0,chunkSize:5242880,uploadBeforeCheck:null,compress:{enable:!0,maxWidthOrHeight:4e3,maxSize:10485760},tipError:function(t){MS&&MS.dialog?MS.dialog.tipError(t):alert(t)},ready:function(t){},callback:function(t,e){},finish:function(){}},r);a(i).each(function(){var i=this,t=a(this);t.html('
'+n.text+'
    ');var e=t.find(".webuploader-list"),t=s.create({auto:!0,swf:n.swf,server:n.server,pick:t.find(".picker"),fileSingleSizeLimit:n.sizeLimit,chunked:n.chunked,chunkSize:n.chunkSize,chunkRetry:5,threads:1,accept:{extensions:n.extensions},formData:{},headers:{},duplicate:!1,uploadBeforeCheck:n.uploadBeforeCheck,compress:n.compress});t.on("fileQueued",function(t){t='
  • '+t.name+"
  • ",t=a(t);e.append(t)}),t.on("fileDequeued",function(t){a("#"+t.id).fadeOut(function(){a("#"+t.id).remove()})}),t.on("uploadProgress",function(t,e){t=a("#"+t.id);t.find(".progress-bar").css("width",100*e+"%"),t.find(".status .iconfont").is(".icon-refresh")||t.find(".status").html('')}),t.on("uploadAccept",function(t,e,i){return!e.code||(i(e.msg),!1)}),t.on("uploadSuccess",function(t,e){this.removeFile(t);e={name:e.data.data.filename,size:e.data.data.size,path:e.data.path};a("#"+t.id).fadeOut(function(){a("#"+t.id).remove()}),n.callback(e,i)}),t.on("uploadBeforeSend",function(t,e){e.md5=t.file.fileMd5}),t.on("uploadError",function(t,e){e&&0<=e.indexOf("ShouldRetryUpload")?this.retry(t):(this.removeFile(t),e&&("server"===e?n.tipError(MS.L("Upload Error : %s",MS.L("Server Error"))):n.tipError(MS.L("Upload Error : %s",e))))}),t.on("uploadFinished",function(){n.finish()}),t.on("error",function(t){"Q_TYPE_DENIED"==t?n.tipError("文件类型不合法(只能上传"+n.extensions+"文件)"):"Q_EXCEED_SIZE_LIMIT"!=t&&"F_EXCEED_SIZE"!=t||n.tipError("文件大小不合法")}),n.ready(t)})}else setTimeout(()=>{this.init()},100)}}},h=i(18),l=i.n(h),h=i(261),i=(l()(h.a,{insert:"head",singleton:!1}),h.a.locals,i(8)),r=Object(i.a)(o,r,[],!1,null,null,null);r.options.__file="vendor/modstart/modstart/resources/asset/src/svue/components/UploadButton.vue",e.a=r.exports},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){"use strict";var s=i(130).Buffer,r=i(131).Transform;function n(t){r.call(this),this._block=s.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(0)(n,r),n.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(t){r=t}i(r)},n.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},n.prototype.update=function(t,e){if(function(t){if(!s.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer")}(t),this._finalized)throw new Error("Digest already called");s.isBuffer(t)||(t=s.from(t,e));for(var i=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var n=this._blockOffset;ne.highWaterMark&&(e.highWaterMark=(1073741824<=(i=t)?i=1073741824:(i--,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i++),i)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0));var i}function E(t){var e=t._readableState;b("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(b("emitReadable",e.flowing),e.emittedReadable=!0,m.nextTick(k,t))}function k(t){var e=t._readableState;b("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function A(t,e){e.readingMore||(e.readingMore=!0,m.nextTick(R,t,e))}function R(t,e){for(;!e.reading&&!e.ended&&(e.length=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function B(t){var e=t._readableState;b("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,m.nextTick(L,e,t))}function L(t,e){b("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)&&(!(t=e._writableState)||t.autoDestroy&&t.finished)&&e.destroy()}function P(t,e){for(var i=0,r=t.length;i=e.highWaterMark:0>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+i[f-7]+(((e=i[f-15])>>>7|e<<25)^(e>>>18|e<<14)^e>>>3)+i[f-16];for(var c=0;c<64;++c)var d=l+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(h^s&(u^h))+m[c]+i[c]|0,p=0|((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n|o&(r|n)),l=h,h=u,u=s,s=a+d|0,a=o,o=n,n=r,r=d+p|0;this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=h+this._g|0,this._h=l+this._h|0},s.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=s},function(t,e,i){var r=i(0),n=i(22),o=i(1).Buffer,N=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function s(){this.init(),this._w=a,n.call(this,128,112)}function F(t,e,i){return i^t&(e^i)}function q(t,e,i){return t&e|i&(t|e)}function z(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function H(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function $(t,e){return t>>>0>>0?1:0}r(s,n),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,u=0|this._gh,h=0|this._hh,l=0|this._al,f=0|this._bl,c=0|this._cl,d=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,b=0|this._hl,v=0;v<32;v+=2)e[v]=t.readInt32BE(4*v),e[v+1]=t.readInt32BE(4*v+4);for(;v<160;v+=2){var y=e[v-30],w=e[v-30+1],M=(y>>>1|w<<31)^(y>>>8|w<<24)^y>>>7,_=(w>>>1|y<<31)^(w>>>8|y<<24)^(w>>>7|y<<25),S=(y=e[v-4],w=e[v-4+1],(y>>>19|w<<13)^(w>>>29|y<<3)^y>>>6),x=(w>>>19|y<<13)^(y>>>29|w<<3)^(w>>>6|y<<26),E=e[v-14],k=e[v-14+1],w=e[v-32],y=e[v-32+1],A=_+k|0,R=(R=(R=M+E+$(A,_)|0)+S+$(A=A+x|0,x)|0)+w+$(A=A+y|0,y)|0;e[v]=R,e[v+1]=A}for(var T=0;T<160;T+=2){R=e[T];var A=e[T+1],C=q(i,r,n),I=q(l,f,c),O=z(i,l),D=z(l,i),B=H(a,p),L=H(p,a),P=N[T+1],j=F(a,s,u),U=F(p,m,g),L=b+L|0,B=(B=(B=(B=h+B+$(L,b)|0)+j+$(L=L+U|0,U)|0)+N[T]+$(L=L+P|0,P)|0)+R+$(L=L+A|0,A)|0,I=D+I|0,D=O+C+$(I,D)|0,h=u,b=g,u=s,g=m,s=a,m=p,a=o+B+$(p=d+L|0,d)|0,o=n,d=c,n=r,c=f,r=i,f=l,i=B+D+$(l=L+I|0,L)|0}this._al=this._al+l|0,this._bl=this._bl+f|0,this._cl=this._cl+c|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+b|0,this._ah=this._ah+i+$(this._al,l)|0,this._bh=this._bh+r+$(this._bl,f)|0,this._ch=this._ch+n+$(this._cl,c)|0,this._dh=this._dh+o+$(this._dl,d)|0,this._eh=this._eh+a+$(this._el,p)|0,this._fh=this._fh+s+$(this._fl,m)|0,this._gh=this._gh+u+$(this._gl,g)|0,this._hh=this._hh+h+$(this._hl,b)|0},s.prototype._hash=function(){var r=o.allocUnsafe(64);function t(t,e,i){r.writeInt32BE(t,i),r.writeInt32BE(e,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),r},t.exports=s},function(C,t,I){"use strict";!function(t,g){var b=I(33);C.exports=n;var o,v=I(66);n.ReadableState=r,I(13).EventEmitter;function y(t,e){return t.listeners(e).length}var i=I(77),f=I(1).Buffer,c=t.Uint8Array||function(){},e=Object.create(I(28));e.inherits=I(0);var a,t=I(144),w=void 0,w=t&&t.debuglog?t.debuglog("stream"):function(){},s=I(145),t=I(78);e.inherits(n,i);var u=["error","close","destroy","pause","resume"];function r(t,e){t=t||{};var i=e instanceof(o=o||I(15));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,n=t.readableHighWaterMark,e=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(n||0===n)?n:e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new s,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a=a||I(14).StringDecoder,this.decoder=new a(t.encoding),this.encoding=t.encoding)}function n(t){if(o=o||I(15),!(this instanceof n))return new n(t);this._readableState=new r(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function h(t,e,i,r,n){var o,a,s,u,h,l=t._readableState;return null===e?(l.reading=!1,s=t,(u=l).ended||(!u.decoder||(h=u.decoder.end())&&h.length&&(u.buffer.push(h),u.length+=u.objectMode?1:h.length),u.ended=!0,p(s))):(n||(o=l,n=s=e,o=a=f.isBuffer(n)||n instanceof c||"string"==typeof s||void 0===s||o.objectMode?a:new TypeError("Invalid non-string/buffer chunk")),o?t.emit("error",o):l.objectMode||e&&0e.highWaterMark&&(e.highWaterMark=(8388608<=(i=t)?i=8388608:(i--,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i++),i)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0));var i}function p(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(w("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?b.nextTick(m,t):m(t))}function m(t){w("emit readable"),t.emit("readable"),E(t)}function M(t,e){e.readingMore||(e.readingMore=!0,b.nextTick(_,t,e))}function _(t,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):(i=t,t=e.buffer,e=e.decoder,io.length?o.length:t;if(a===o.length?n+=o:n+=o.slice(0,t),0==(t-=a)){a===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i).data=o.slice(a);break}++r}return e.length-=r,n}:function(t,e){var i=f.allocUnsafe(t),r=e.head,n=1;for(r.data.copy(i),t-=r.data.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,a),0==(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r).data=o.slice(a);break}++n}return e.length-=n,i})(i,t),n=r),n);var i,r,n}function A(t){var e=t._readableState;if(0=e.highWaterMark||e.ended))return w("read: emitReadable",e.length,e.ended),(0===e.length&&e.ended?A:p)(this),null;if(0===(t=l(t,e))&&e.ended)return 0===e.length&&A(this),null;var r=e.needReadable;return w("need readable",r),(0===e.length||e.length-ti?e=("rmd160"===t?new u:h(t)).update(e).digest():e.lengtho?e=n(e):e.length>>0},e.writeUInt32BE=function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},e.ip=function(t,e,i,r){for(var n=0,o=0,a=6;0<=a;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1}for(a=6;0<=a;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}i[r+0]=n>>>0,i[r+1]=o>>>0},e.rip=function(t,e,i,r){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;0<=s;s-=8)n<<=1,n|=e>>>s+a&1,n<<=1,n|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;0<=s;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.pc1=function(t,e,i,r){for(var n=0,o=0,a=7;5<=a;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var u=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,i,r){for(var n=0,o=0,a=u.length>>>1,s=0;s>>u[s]&1;for(s=a;s>>u[s]&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.expand=function(t,e,i){for(var r=0,n=0,r=(1&t)<<5|t>>>27,o=23;15<=o;o-=4)r<<=6,r|=t>>>o&63;for(o=11;3<=o;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var i=0,r=0;r<4;r++)i<<=4,i|=n[64*r+(t>>>18-6*r&63)];for(r=0;r<4;r++)i<<=4,i|=n[256+64*r+(e>>>18-6*r&63)];return i>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,i=0;i>>r[i]&1;return e>>>0},e.padSplit=function(t,e,i){for(var r=t.toString(2);r.length>>1],i=l.r28shl(i,o),r=l.r28shl(r,o);l.pc2(i,r,t.keys,n)}},s.prototype._update=function(t,e,i,r){var n=this._desState,o=l.readUInt32BE(t,e),e=l.readUInt32BE(t,e+4);l.ip(o,e,n.tmp,0),o=n.tmp[0],e=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,e,n.tmp,0):this._decrypt(n,o,e,n.tmp,0),o=n.tmp[0],e=n.tmp[1],l.writeUInt32BE(i,o,r),l.writeUInt32BE(i,e,r+4)},s.prototype._pad=function(t,e){for(var i=t.length-e,r=e;r>>0,o=h}l.rip(a,o,r,n)},s.prototype._decrypt=function(t,e,i,r,n){for(var o=i,a=e,s=t.keys.length-2;0<=s;s-=2){var u=t.keys[s],h=t.keys[s+1];l.expand(o,t.tmp,0),u^=t.tmp[0],h^=t.tmp[1];u=l.substitute(u,h),h=o,o=(a^l.permute(u))>>>0,a=h}l.rip(o,a,r,n)}},function(t,e,i){var u=i(29),h=i(1).Buffer,l=i(91);e.encrypt=function(t,e){var i=Math.ceil(e.length/16),r=t._cache.length;t._cache=h.concat([t._cache,h.allocUnsafe(16*i)]);for(var n=0;nt;)i.ishrn(1);if(i.isEven()&&i.iadd(u),i.testn(1)||i.iadd(h),e.cmp(h)){if(!e.cmp(l))for(;i.mod(f).cmp(c);)i.iadd(p)}else for(;i.mod(a).cmp(d);)i.iadd(p);if(g(r=i.shrn(1))&&g(i)&&b(r)&&b(i)&&s.test(r)&&s.test(i))return i}}},function(t,e,S){!function(_){!function(t){"use strict";function m(t,e){if(!t)throw new Error(e||"Assertion failed")}function e(t,e){t.super_=e;function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function g(t,e,i){if(g.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var i;"object"==typeof _?_.exports=g:t.BN=g,(g.BN=g).wordSize=26;try{i=S(173).Buffer}catch(t){}function a(t,e,i){for(var r=0,n=Math.min(t.length,i),o=e;o>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this.strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function r(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i.strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this.strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function o(t,e,i){return(new s).mulp(t,e,i)}function s(t,e){this.x=t,this.y=e}Math.imul||(n=r),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?n:i<63?r:i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}:o)(this,t,e)},s.prototype.makeRBT=function(t){for(var e=new Array(t),i=g.prototype._countBits(t)-1,r=0;r>=1;return r},s.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a>>=1)i++;return 1<>>=13),n>>>=13;for(o=2*e;o>=26,e+=r/67108864|0,e+=n>>>26,this.words[i]=67108863&n}return 0!==e&&(this.words[i]=e,this.length++),this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r}return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this.strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modn=function(t){m(t<=67108863);for(var e=(1<<26)%t,i=0,r=this.length-1;0<=r;r--)i=(e*i+(0|this.words[r]))%t;return i},g.prototype.idivn=function(t){m(t<=67108863);for(var e=0,i=this.length-1;0<=i;i--){var r=(0|this.words[i])+67108864*e;this.words[i]=r/t|0,e=r%t}return this.strip()},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return u[t]=e},w.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new M(t)},e(M,w),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,S(16)(t))},function(t,e,i){var d=i(174),r=i(50);function n(t){this.rand=t||new r.Rand}(t.exports=n).create=function(t){return new n(t)},n.prototype._randbelow=function(t){var e=t.bitLength(),i=Math.ceil(e/8);do{var r=new d(this.rand.generate(i))}while(0<=r.cmp(t));return r},n.prototype._randrange=function(t,e){e=e.sub(t);return t.add(this._randbelow(e))},n.prototype.test=function(t,e,i){var r=t.bitLength(),n=d.mont(t),o=new d(1).toRed(n);e=e||Math.max(1,r/48|0);for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),h=a.toRed(n);0e.highWaterMark&&(e.highWaterMark=(1073741824<=(i=t)?i=1073741824:(i--,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i++),i)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0));var i}function E(t){var e=t._readableState;b("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(b("emitReadable",e.flowing),e.emittedReadable=!0,m.nextTick(k,t))}function k(t){var e=t._readableState;b("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function A(t,e){e.readingMore||(e.readingMore=!0,m.nextTick(R,t,e))}function R(t,e){for(;!e.reading&&!e.ended&&(e.length=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function B(t){var e=t._readableState;b("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,m.nextTick(L,e,t))}function L(t,e){b("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)&&(!(t=e._writableState)||t.autoDestroy&&t.finished)&&e.destroy()}function P(t,e){for(var i=0,r=t.length;i=e.highWaterMark:0>8,n=255&n;o?i.push(o,n):i.push(n)}return i},e.zero2=r,e.toHex=n,e.encode=function(t,e){return"hex"===e?n(t):t}},function(t,e,i){"use strict";e.base=i(36),e.short=i(192),e.mont=i(193),e.edwards=i(194)},function(t,e,i){"use strict";var r=i(9).rotr32;function n(t,e,i){return t&e^~t&i}function o(t,e,i){return t&e^t&i^e&i}function a(t,e,i){return t^e^i}e.ft_1=function(t,e,i,r){return 0===t?n(e,i,r):1===t||3===t?e^i^r:2===t?o(e,i,r):void 0},e.ch32=n,e.maj32=o,e.p32=a,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,i){"use strict";var r=i(9),n=i(30),o=i(106),p=i(6),m=r.sum32,g=r.sum32_4,b=r.sum32_5,v=o.ch32,y=o.maj32,w=o.s0_256,M=o.s1_256,_=o.g0_256,S=o.g1_256,a=n.BlockHash,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function u(){if(!(this instanceof u))return new u;a.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=s,this.W=new Array(64)}r.inherits(u,a),(t.exports=u).blockSize=512,u.outSize=256,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this.strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function r(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i.strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this.strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function o(t,e,i){return(new s).mulp(t,e,i)}function s(t,e){this.x=t,this.y=e}Math.imul||(n=r),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?n:i<63?r:i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}:o)(this,t,e)},s.prototype.makeRBT=function(t){for(var e=new Array(t),i=g.prototype._countBits(t)-1,r=0;r>=1;return r},s.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a>>=1)i++;return 1<>>=13),n>>>=13;for(o=2*e;o>=26,e+=r/67108864|0,e+=n>>>26,this.words[i]=67108863&n}return 0!==e&&(this.words[i]=e,this.length++),this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r}return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this.strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modn=function(t){m(t<=67108863);for(var e=(1<<26)%t,i=0,r=this.length-1;0<=r;r--)i=(e*i+(0|this.words[r]))%t;return i},g.prototype.idivn=function(t){m(t<=67108863);for(var e=0,i=this.length-1;0<=i;i--){var r=(0|this.words[i])+67108864*e;this.words[i]=r/t|0,e=r%t}return this.strip()},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return u[t]=e},w.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new M(t)},e(M,w),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,S(16)(t))},function(t,e,i){"use strict";const r=e;r.der=i(112),r.pem=i(212)},function(t,e,i){"use strict";const r=i(0),a=i(58).Buffer,n=i(59),s=i(61);function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){n.call(this,"der",t)}function h(t){return t<10?"0"+t:t}(t.exports=o).prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(u,n),u.prototype._encodeComposite=function(t,e,i,r){i=function(t,e,i,r){let n;if("seqof"===t?t="seq":"setof"===t&&(t="set"),s.tagByName.hasOwnProperty(t))n=s.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);n=t}return 31<=n?r.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=s.tagClassByName[i||"universal"]<<6,n)}(t,e,i,this.reporter);if(r.length<128){const t=a.alloc(2);return t[0]=i,t[1]=r.length,this._createEncoderBuffer([t,r])}let n=1;for(let t=r.length;256<=t;t>>=8)n++;const o=a.alloc(2+n);o[0]=i,o[1]=128|n;for(let t=1+n,e=r.length;0>=8)o[t]=255&e;return this._createEncoderBuffer([o,r])},u.prototype._encodeStr=function(e,i){if("bitstr"===i)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"!==i)return"numstr"===i?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===i?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(i)||"objDesc"===i?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+i+" unsupported");{const i=a.alloc(2*e.length);for(let t=0;t>=7)r++}const n=a.alloc(r);let o=n.length-1;for(let e=i.length-1;0<=e;e--){let t=i[e];for(n[o--]=127&t;0<(t>>=7);)n[o--]=128|127&t}return this._createEncoderBuffer(n)},u.prototype._encodeTime=function(t,e){let i;const r=new Date(t);return"gentime"===e?i=[h(r.getUTCFullYear()),h(r.getUTCMonth()+1),h(r.getUTCDate()),h(r.getUTCHours()),h(r.getUTCMinutes()),h(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[h(r.getUTCFullYear()%100),h(r.getUTCMonth()+1),h(r.getUTCDate()),h(r.getUTCHours()),h(r.getUTCMinutes()),h(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!a.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=a.from(t)}if(a.isBuffer(e)){let t=e.length;0===e.length&&t++;const i=a.alloc(t);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let t=e;256<=t;t>>=8)i++;const r=new Array(i);for(let t=r.length-1;0<=t;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(a.from(r))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return(t="function"==typeof t?t(e):t)._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,i){const r=this._baseState;let n;if(null===r.default)return!1;var o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,i).join()),o.length!==r.defaultBuffer.length)return!1;for(n=0;n>6],n=0==(32&r);if(31==(31&r)){let t=r;for(r=0;128==(128&t);){if(t=e.readUInt8(i),e.isError(t))return t;r<<=7,r|=127&t}}else r&=31;return{cls:t,primitive:n,tag:r,tagStr:s.tag[r]}}function f(e,i,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!i&&128===n)return null;if(0==(128&n))return n;var o=127&n;if(4{t in u.$onOnceListeners||(u.$onOnceListeners[t]=[]),u.$onOnceListeners[t].includes(e)||(u.$onOnceListeners[t].push(e),u.$on(t,i))};var o=i(63),h=i.n(o),l=i(64);const f=window.api.dialog,c=window.api.base;s.a.config.productionTip=!1,s.a.use(e.a,{size:"mini",zIndex:3e3}),s.a.use(function(t,e){var i,r,n;t.prototype.$timeago||(i={locale:e.locale},t.prototype.$timeago=t.observable?t.observable(i):new t({data:i}),n=(r=void 0===(r=e)?{}:r).locales||{},e={name:r.name||"Timeago",props:{datetime:{required:!0},title:{type:[String,Boolean]},locale:{type:String},autoUpdate:{type:[Number,Boolean]},converter:{type:Function},converterOptions:{type:Object}},data:function(){return{timeago:this.getTimeago()}},computed:{localeName:function(){return this.locale||this.$timeago.locale}},mounted:function(){this.startUpdater()},beforeDestroy:function(){this.stopUpdater()},render:function(t){return t("time",{attrs:{datetime:new Date(this.datetime).toISOString(),title:"string"==typeof this.title?this.title:!1===this.title?null:this.timeago}},[this.timeago])},methods:{getTimeago:function(t){return(this.converter||r.converter||function(t,e,i){var r=i.includeSeconds,i=i.addSuffix;return void 0===i&&(i=!0),a()(t,{locale:e,includeSeconds:r,addSuffix:i})})(t||this.datetime,n[this.locale||this.$timeago.locale],this.converterOptions||{})},convert:function(t){this.timeago=this.getTimeago(t)},startUpdater:function(){var t,e=this;this.autoUpdate&&(t=!0===this.autoUpdate?60:this.autoUpdate,this.updater=setInterval(function(){e.convert()},1e3*t))},stopUpdater:function(){this.updater&&(clearInterval(this.updater),this.updater=null)}},watch:{autoUpdate:function(t){this.stopUpdater(),t&&this.startUpdater()},datetime:function(){this.convert()},localeName:function(){this.convert()},converter:function(){this.convert()},converterOptions:{handler:function(){this.convert()},deep:!0}}},t.component(e.name,e))},{name:"TimeAgo",locale:"zh_CN",locales:{zh_CN:i(253)}}),s.a.use(r.a),s.a.prototype.$doCopyText=function(t,e){e=e||this.L("Copy Success"),this.$copyText(t).then(()=>f.tipSuccess(e),()=>f.tipError(this.L("Copy Fail")))},s.a.prototype.$onCopySuccess=()=>{f.tipSuccess(window.lang&&window.lang["Copy Success"]?window.lang["Copy Success"]:"Copy Success")},s.a.prototype.$onCopyError=()=>{f.tipError(window.lang&&window.lang["Copy Fail"]?window.lang["Copy Fail"]:"Copy Fail")},s.a.prototype.$highlight=(t,e)=>{if(t=n.a.specialchars(t),!e)return t;e=new RegExp(e,"ig");return t.toString().replace(e,function(t,e,i){return''+t+""})},s.a.prototype.$hashRouter={init(t){h()(t)},to(t){h()(t)}};r={post(t,e,i,r){i=i||c.defaultFormCallback,r=r||c.defaultFormCallback,c.post(t,e,function(t){c.defaultFormCallback(t,{success:function(t){!0===i(t)&&c.defaultFormCallback(t)},error:function(t){!0!==r(t)&&c.defaultFormCallback(t)}})})},postRaw(t,e,i){c.post(t,e,function(t){i&&i(t)})}};s.a.prototype.$api=r,s.a.prototype.$url={buildParam(e){if(e=e||null){let t=[];for(var i in e)t.push(n.d.urlencode(i)+"="+n.d.urldecode(e[i]));e="?"+t.join("&")}return e||""},current(){var t=window.location;return`${t.pathname}${t.search}${t.hash}`},admin(t,e){return`${window.__msAdminRoot}${t}${this.buildParam(e)}`},web(t,e){return`${window.__msRoot}${t}${this.buildParam(e)}`},api(t,e){return`${window.__msRoot}api/${t}${this.buildParam(e)}`},cdn:t=>(t&&t.startsWith("/")&&(t=t.replace(/^[ \/]+/g,"")),`${window.__msCDN}${t}`)},s.a.prototype.$r={to(t){window.location.href=t},replace(t){window.location.replace=t}},s.a.prototype.$dialog=f,s.a.prototype.L=function(){let t=arguments[0],e=Array.from(arguments);return e.splice(0,1),window.lang&&window.lang[t]?e.length?n.c.sprintf(window.lang[t],...e):window.lang[t]:e.length?n.c.sprintf(t,...e):t};const d={Vue:s.a,Api:r,EventBus:u,makeStore:(t,e,i)=>(s.a.use(l.a),new l.a.Store({modules:i,state:{...t},mutations:{...e}})),QuickMount(t,e,i,r,n){if(r=r||{},!document.querySelector(t))return null;Array.isArray(i)||(i=[i]);let o={};i.forEach(t=>{o[t.name]=t});let a=null;r&&"Bootstrap"in r&&(a=r.Bootstrap);e=new s.a({el:t,...r,data:()=>({loading:!0}),created(){a&&a.created(this)},mounted(){this.loading=!1,u.$emit("EventAppMounted"),a&&a.mounted(this)},components:o,template:e});return n&&n(e),e}}},function(t,e,i){"use strict";var r;function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){var b,v,y,w=arguments,M=(b=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,y=/[^-+\dA-Z]/g,function(t,e,i,r){if(1!==w.length||"string"!==k(t)||/\d/.test(t)||(e=t,t=void 0),(t=t||0===t?t:new Date)instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");var n=(e=String(M.masks[e]||e||M.masks.default)).slice(0,4);"UTC:"!==n&&"GMT:"!==n||(e=e.slice(4),i=!0,"GMT:"===n&&(r=!0));function o(){return i?"getUTC":"get"}function a(){return t[o()+"Date"]()}function s(){return t[o()+"Day"]()}function u(){return t[o()+"Month"]()}function h(){return t[o()+"FullYear"]()}function l(){return t[o()+"Hours"]()}function f(){return t[o()+"Minutes"]()}function c(){return t[o()+"Seconds"]()}function d(){return t[o()+"Milliseconds"]()}function p(){return i?0:t.getTimezoneOffset()}function m(){return x(t)}var g={d:a,dd:function(){return _(a())},ddd:function(){return M.i18n.dayNames[s()]},DDD:function(){return S({y:h(),m:u(),d:a(),_:o(),dayName:M.i18n.dayNames[s()],short:!0})},dddd:function(){return M.i18n.dayNames[s()+7]},DDDD:function(){return S({y:h(),m:u(),d:a(),_:o(),dayName:M.i18n.dayNames[s()+7]})},m:function(){return u()+1},mm:function(){return _(u()+1)},mmm:function(){return M.i18n.monthNames[u()]},mmmm:function(){return M.i18n.monthNames[u()+12]},yy:function(){return String(h()).slice(2)},yyyy:function(){return _(h(),4)},h:function(){return l()%12||12},hh:function(){return _(l()%12||12)},H:l,HH:function(){return _(l())},M:f,MM:function(){return _(f())},s:c,ss:function(){return _(c())},l:function(){return _(d(),3)},L:function(){return _(Math.floor(d()/10))},t:function(){return l()<12?M.i18n.timeNames[0]:M.i18n.timeNames[1]},tt:function(){return l()<12?M.i18n.timeNames[2]:M.i18n.timeNames[3]},T:function(){return l()<12?M.i18n.timeNames[4]:M.i18n.timeNames[5]},TT:function(){return l()<12?M.i18n.timeNames[6]:M.i18n.timeNames[7]},Z:function(){return r?"GMT":i?"UTC":(String(t).match(v)||[""]).pop().replace(y,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(0>16&255,n[o++]=e>>8&255,n[o++]=255&e;return 2===i&&(e=u[t.charCodeAt(s)]<<2|u[t.charCodeAt(s+1)]>>4,n[o++]=255&e),1===i&&(e=u[t.charCodeAt(s)]<<10|u[t.charCodeAt(s+1)]<<4|u[t.charCodeAt(s+2)]>>2,n[o++]=e>>8&255,n[o++]=255&e),n},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,n=[],o=0,a=i-r;o>18&63]+s[r>>12&63]+s[r>>6&63]+s[63&r]);return n.join("")}(t,o,a>2]+s[e<<4&63]+"==")):2==r&&(e=(t[i-2]<<8)+t[i-1],n.push(s[e>>10]+s[e>>4&63]+s[e<<2&63]+"=")),n.join("")};for(var s=[],u=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=r.length;n>1,l=-7,f=i?n-1:0,c=i?-1:1,i=t[e+f];for(f+=c,o=i&(1<<-l)-1,i>>=-l,l+=s;0>=-l,l+=r;0>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,d=r?1:-1,o=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(e+=1<=a+l?f/r:f*Math.pow(2,1-l))*r&&(a++,r/=2),h<=a+l?(s=0,a=h):1<=a+l?(s=(e*r-1)*Math.pow(2,n),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,n),a=0));8<=n;t[i+c]=255&s,c+=d,s/=256,n-=8);for(a=a<>>0),n=this.head,o=0;n;)e=n.data,i=o,a.prototype.copy.call(e,r,i),o+=n.data.length,n=n.next;return r}},{key:"consume",value:function(t,e){var i;return tn.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e).data=n.slice(o);break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0==(t-=o)){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i).data=n.slice(o);break}++r}return this.length-=r,e}},{key:i,value:function(t,e){return n(this,function(r){for(var t=1;t>>27)+(h=r,l=n,f=o,0===(u=d)?h&l|~h&f:2===u?h&l|h&f|l&f:h^l^f)+a+e[c]+p[d],a=o,o=n,n=r<<30|r>>>2,r=i,i=d;this._a=i+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},function(t,e,i){var r=i(0),n=i(22),o=i(1).Buffer,m=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,n.call(this,64,56)}r(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)i[u]=t.readInt32BE(4*u);for(;u<80;++u)i[u]=(e=i[u-3]^i[u-8]^i[u-14]^i[u-16])<<1|e>>>31;for(var h,l,f,c,d=0;d<80;++d)var p=~~(d/20),p=0|(r<<5|r>>>27)+(l=n,f=o,c=a,0===(h=p)?l&f|~l&c:2===h?l&f|l&c|f&c:l^f^c)+s+i[d]+m[p],s=a,a=o,o=n<<30|n>>>2,n=r,r=p;this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},function(t,e,i){var r=i(0),n=i(74),o=i(22),a=i(1).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,i){var r=i(0),n=i(75),o=i(22),a=i(1).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var r=a.allocUnsafe(48);function t(t,e,i){r.writeInt32BE(t,i),r.writeInt32BE(e,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),r},t.exports=u},function(t,e,i){t.exports=r;var l=i(13).EventEmitter;function r(){l.call(this)}i(0)(r,l),r.Readable=i(45),r.Writable=i(150),r.Duplex=i(151),r.Transform=i(152),r.PassThrough=i(153),(r.Stream=r).prototype.pipe=function(e,t){var i=this;function r(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(i.on("end",a),i.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(t){if(h(),0===l.listenerCount(this,"error"))throw t}function h(){i.removeListener("data",r),e.removeListener("drain",n),i.removeListener("end",a),i.removeListener("close",s),i.removeListener("error",u),e.removeListener("error",u),i.removeListener("end",h),i.removeListener("close",h),e.removeListener("close",h)}return i.on("error",u),e.on("error",u),i.on("end",h),i.on("close",h),e.on("close",h),e.emit("pipe",i),e}},function(t,e){},function(t,e,i){"use strict";var o=i(1).Buffer,r=i(146);function n(){!function(t){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this),this.head=null,this.tail=null,this.length=0}t.exports=(n.prototype.push=function(t){t={data:t,next:null};0>>0),r=this.head,n=0;r;)e=n,r.data.copy(i,e),n+=r.data.length,r=r.next;return i},n),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,n,o){!function(t){var e=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function r(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new r(i.call(setTimeout,e,arguments),clearTimeout)},n.setInterval=function(){return new r(i.call(setInterval,e,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(e,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},o(148),n.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,n.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}.call(this,o(5))},function(t,e,i){!function(t,d){!function(i){"use strict";var r,e,n,t,o,a,s,u,h,l;function f(t){delete a[t]}function c(t){if(s)setTimeout(c,0,t);else{var i=a[t];if(i){s=!0;try{!function(){var t=i.callback,e=i.args;switch(e.length){case 0:t();break;case 1:t(e[0]);break;case 2:t(e[0],e[1]);break;case 3:t(e[0],e[1],e[2]);break;default:t.apply(void 0,e)}}()}finally{f(t),s=!1}}}}i.setImmediate||(o=1,s=!(a={}),u=i.document,h=(h=Object.getPrototypeOf&&Object.getPrototypeOf(i))&&h.setTimeout?h:i,l="[object process]"==={}.toString.call(i.process)?function(t){d.nextTick(function(){c(t)})}:function(){if(i.postMessage&&!i.importScripts){var t=!0,e=i.onmessage;return i.onmessage=function(){t=!1},i.postMessage("","*"),i.onmessage=e,t}}()?(n="setImmediate$"+Math.random()+"$",t=function(t){t.source===i&&"string"==typeof t.data&&0===t.data.indexOf(n)&&c(+t.data.slice(n.length))},i.addEventListener?i.addEventListener("message",t,!1):i.attachEvent("onmessage",t),function(t){i.postMessage(n+t,"*")}):i.MessageChannel?((e=new MessageChannel).port1.onmessage=function(t){c(t.data)},function(t){e.port2.postMessage(t)}):u&&"onreadystatechange"in u.createElement("script")?(r=u.documentElement,function(t){var e=u.createElement("script");e.onreadystatechange=function(){c(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):function(t){setTimeout(c,0,t)},h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i>o%8,t._prev=function(t,e){var i=t.length,r=-1,n=s.allocUnsafe(t.length);for(t=s.concat([t,s.from([e])]);++r>7;return n}(t._prev,i?r:n);return a}e.encrypt=function(t,e,i){for(var r=e.length,n=s.allocUnsafe(r),o=-1;++o>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function o(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(t){for(var e=-1;++e>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=a(n)},o.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);16<=this.cache.length;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},o.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=o},function(t,e,i){var r=i(93),n=i(1).Buffer,o=i(49),a=i(94),s=i(12),u=i(34),h=i(35);function l(t,e,i){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(e),this._prev=n.from(i),this._mode=t,this._autopadding=!0}function f(){this.cache=n.allocUnsafe(0)}function c(t,e,i){t=o[t.toLowerCase()];if(!t)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=n.from(i)),"GCM"!==t.mode&&i.length!==t.iv)throw new TypeError("invalid iv length "+i.length);if((e="string"==typeof e?n.from(e):e).length!==t.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===t.type?new a(t.module,e,i,!0):"auth"===t.type?new r(t.module,e,i,!0):new l(t.module,e,i)}i(0)(l,s),l.prototype._update=function(t){var e;this._cache.add(t);for(var i=[];e=this._cache.get(this._autopadding);)e=this._mode.decrypt(this,e),i.push(e);return n.concat(i)},l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||16>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this.strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function r(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i.strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this.strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function o(t,e,i){return(new s).mulp(t,e,i)}function s(t,e){this.x=t,this.y=e}Math.imul||(n=r),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?n:i<63?r:i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}:o)(this,t,e)},s.prototype.makeRBT=function(t){for(var e=new Array(t),i=g.prototype._countBits(t)-1,r=0;r>=1;return r},s.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a>>=1)i++;return 1<>>=13),n>>>=13;for(o=2*e;o>=26,e+=r/67108864|0,e+=n>>>26,this.words[i]=67108863&n}return 0!==e&&(this.words[i]=e,this.length++),this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r}return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this.strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modn=function(t){m(t<=67108863);for(var e=(1<<26)%t,i=0,r=this.length-1;0<=r;r--)i=(e*i+(0|this.words[r]))%t;return i},g.prototype.idivn=function(t){m(t<=67108863);for(var e=0,i=this.length-1;0<=i;i--){var r=(0|this.words[i])+67108864*e;this.words[i]=r/t|0,e=r%t}return this.strip()},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return u[t]=e},w.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new M(t)},e(M,w),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,S(16)(t))},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(m,t,g){!function(i){var r=g(96),o=new(g(97)),a=new r(24),s=new r(11),u=new r(10),h=new r(3),l=new r(7),f=g(95),t=g(19);function n(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._pub=new r(t),this}function c(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._priv=new r(t),this}m.exports=e;var d={};function e(t,e,i){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=n,this.setPrivateKey=c):this._primeCode=8}function p(t,e){t=new i(t.toArray());return e?t.toString(e):t}Object.defineProperty(e.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var i=e.toString("hex"),e=[i,t.toString(16)].join("_");if(e in d)return d[e];var r,n=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!o.test(t))return n+=1,d[e]=n+="02"===i||"05"===i?8:4;switch(o.test(t.shrn(1))||(n+=2),i){case"02":t.mod(a).cmp(s)&&(n+=8);break;case"05":(r=t.mod(u)).cmp(h)&&r.cmp(l)&&(n+=8);break;default:n+=4}return d[e]=n}(this.__prime,this.__gen)),this._primeCode}}),e.prototype.generateKeys=function(){return this._priv||(this._priv=new r(t(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},e.prototype.computeSecret=function(t){var e=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),t=new i(e.toArray()),e=this.getPrime();return t.length>>0),n=this.head,o=0;n;)e=n.data,i=o,a.prototype.copy.call(e,r,i),o+=n.data.length,n=n.next;return r}},{key:"consume",value:function(t,e){var i;return tn.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e).data=n.slice(o);break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0==(t-=o)){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i).data=n.slice(o);break}++r}return this.length-=r,e}},{key:i,value:function(t,e){return n(this,function(r){for(var t=1;t":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y),t=(e=0!==e.cmpn(0)?e.redMul(this.x.redSub(t.x).redInvm()):e).redSqr().redISub(this.x).redISub(t.x),e=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,e)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),t=t.redInvm(),e=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(t),t=e.redSqr().redISub(this.x.redAdd(this.x)),e=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,e)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new y(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,i){e=[this,e],i=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(e,i):this.curve._wnafMulAdd(1,e,i,2)},u.prototype.jmulAdd=function(t,e,i){e=[this,e],i=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(e,i,!0):this.curve._wnafMulAdd(1,e,i,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e,i=this.curve.point(this.x,this.y.redNeg());return t&&this.precomputed&&(e=this.precomputed,t=function(t){return t.neg()},i.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}),i},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(h,o.BasePoint),s.prototype.jpoint=function(t,e,i){return new h(this,t,e,i)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),t=this.y.redMul(e).redMul(t);return this.curve.point(i,t)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(i.redMul(this.z)),e=r.redSub(n),i=o.redSub(a);if(0===e.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();n=e.redSqr(),a=n.redMul(e),r=r.redMul(n),n=i.redSqr().redIAdd(a).redISub(r).redISub(r),a=i.redMul(r.redISub(n)).redISub(o.redMul(a)),e=this.z.redMul(t.z).redMul(e);return this.curve.jpoint(n,a,e)},h.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),t=i.redSub(r),e=n.redSub(o);if(0===t.cmpn(0))return 0!==e.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();r=t.redSqr(),o=r.redMul(t),i=i.redMul(r),r=e.redSqr().redIAdd(o).redISub(i).redISub(i),o=e.redMul(i.redISub(r)).redISub(n.redMul(o)),t=this.z.redMul(t);return this.curve.jpoint(r,o,t)},h.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,i=0;i":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,i){"use strict";var r=i(10),n=i(0),o=i(36),a=i(7);function s(t){o.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,i){o.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,o),(t.exports=s).prototype.validate=function(t){var e=t.normalize().x,t=e.redSqr(),e=t.redMul(e).redAdd(t.redMul(this.a)).redAdd(e);return 0===e.redSqrt().redSqr().cmp(e)},n(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),i=t.redSub(e),t=t.redMul(e),i=i.redMul(e.redAdd(this.curve.a24.redMul(i)));return this.curve.point(t,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),i=t.x.redSub(t.z).redMul(i),n=n.redMul(r),r=e.z.redMul(i.redAdd(n).redSqr()),n=e.x.redMul(i.redISub(n).redSqr());return this.curve.point(r,n)},u.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;0<=o;o--)0===n[o]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,i){"use strict";var r=i(7),o=i(10),n=i(0),a=i(36),s=r.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new o(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function h(t,e,i,r,n){a.BasePoint.call(this,t,"projective"),null===e&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(e,16),this.y=new o(i,16),this.z=r?new o(r,16):this.curve.one,this.t=n&&new o(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}n(u,a),(t.exports=u).prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,i,r){return this.point(t,e,i,r)},u.prototype.pointFromX=function(t,e){var i=(t=!(t=new o(t,16)).red?t.toRed(this.red):t).redSqr(),r=this.c2.redSub(this.a.redMul(i)),i=this.one.redSub(this.c2.redMul(this.d).redMul(i)),r=r.redMul(i.redInvm()),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");r=i.fromRed().isOdd();return(e&&!r||!e&&r)&&(i=i.redNeg()),this.point(t,i)},u.prototype.pointFromY=function(t,e){var i=(t=!(t=new o(t,16)).red?t.toRed(this.red):t).redSqr(),r=i.redSub(this.c2),i=i.redMul(this.d).redMul(this.c2).redSub(this.a),r=r.redMul(i.redInvm());if(0===r.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return i.fromRed().isOdd()!==e&&(i=i.redNeg()),this.point(i,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),i=t.y.redSqr(),t=e.redMul(this.a).redAdd(i),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(i)));return 0===t.cmp(i)},n(h,a.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,i,r){return new h(this,t,e,i,r)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=(i=this.z.redSqr()).redIAdd(i),r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),t=o.redSub(i),i=r.redSub(e),r=n.redMul(t),e=o.redMul(i),i=n.redMul(i),o=t.redMul(o);return this.curve.point(r,e,o,i)},h.prototype._projDbl=function(){var t,e,i,r,n,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();return o=this.curve.twisted?(n=(i=this.curve._mulA(s)).redAdd(u),this.zOne?(t=a.redSub(s).redSub(u).redMul(n.redSub(this.curve.two)),e=n.redMul(i.redSub(u)),n.redSqr().redSub(n).redSub(n)):(r=this.z.redSqr(),o=n.redSub(r).redISub(r),t=a.redSub(s).redISub(u).redMul(o),e=n.redMul(i.redSub(u)),n.redMul(o))):(i=s.redAdd(u),r=this.curve._mulC(this.z).redSqr(),o=i.redSub(r).redSub(r),t=this.curve._mulC(a.redISub(i)).redMul(o),e=this.curve._mulC(i).redMul(s.redISub(u)),i.redMul(o)),this.curve.point(t,e,o)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),t=n.redSub(r),n=n.redAdd(r),r=i.redAdd(e),i=o.redMul(t),e=n.redMul(r),r=o.redMul(r),n=t.redMul(n);return this.curve.point(i,e,n,r)},h.prototype._projAdd=function(t){var e,i=this.z.redMul(t.z),r=i.redSqr(),n=this.x.redMul(t.x),o=this.y.redMul(t.y),a=this.curve.d.redMul(n).redMul(o),s=r.redSub(a),a=r.redAdd(a),t=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(o),t=i.redMul(s).redMul(t),a=this.curve.twisted?(e=i.redMul(a).redMul(o.redSub(this.curve._mulA(n))),s.redMul(a)):(e=i.redMul(a).redMul(o.redSub(n)),this.curve._mulC(s).redMul(a));return this.curve.point(t,e,a)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},h.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),0<=i.cmp(this.curve.p))return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},function(t,e,i){"use strict";e.sha1=i(196),e.sha224=i(197),e.sha256=i(107),e.sha384=i(198),e.sha512=i(108)},function(t,e,i){"use strict";var r=i(9),n=i(30),i=i(106),l=r.rotl32,f=r.sum32,c=r.sum32_5,d=i.ft_1,o=n.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(a,o),(t.exports=a).blockSize=512,a.outSize=160,a.hmacStrength=80,a.padLength=64,a.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;rthis.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e>1;if(0<=a.cmp(this.curve.p.umod(this.curve.n))&&i)throw new Error("Unable to find sencond key candinate");a=i?this.curve.pointFromX(a.add(this.curve.n),t):this.curve.pointFromX(a,t),e=e.r.invm(n),o=n.sub(o).mul(e).umod(n),n=r.mul(e).umod(n);return this.g.mulAdd(o,a,n)},u.prototype.getKeyRecoveryParam=function(t,e,i,r){if(null!==(e=new p(e,r)).recoveryParam)return e.recoveryParam;for(var n,o=0;o<4;o++){try{n=this.recoverPubKey(t,e,o)}catch(t){continue}if(n.eq(i))return o}throw new Error("Unable to find valid recovery factor")}},function(t,e,i){"use strict";var r=i(57),o=i(104),n=i(6);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=o.toArray(t.entropy,t.entropyEnc||"hex"),i=o.toArray(t.nonce,t.nonceEnc||"hex"),t=o.toArray(t.pers,t.persEnc||"hex");n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,t)}(t.exports=a).prototype._init=function(t,e,i){i=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},a.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=i,i=e,e=null),i&&(i=o.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length"}},function(t,e,i){"use strict";var n=i(10),o=i(7),r=o.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(r(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0==r||4>>=0;return!(n<=127)&&(e.place=a,n)}function h(t){for(var e=0,i=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|i);--i;)t.push(e>>>(i<<3)&255);t.push(e)}}(t.exports=a).prototype._importDER=function(t,e){t=o.toArray(t,e);var i=new s;if(48!==t[i.place++])return!1;var r=u(t,i);if(!1===r)return!1;if(r+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;e=u(t,i);if(!1===e)return!1;r=t.slice(i.place,e+i.place);if(i.place+=e,2!==t[i.place++])return!1;e=u(t,i);if(!1===e)return!1;if(t.length!==e+i.place)return!1;i=t.slice(i.place,e+i.place);if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}return this.r=new n(r),this.s=new n(i),!(this.recoveryParam=null)},a.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=h(e),i=h(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];l(r,e.length),(r=r.concat(e)).push(2),l(r,i.length);e=r.concat(i),r=[48];return l(r,e.length),r=r.concat(e),o.encode(r,t)}},function(t,e,i){"use strict";var r=i(57),n=i(56),o=i(7),a=o.assert,s=o.parseBytes,u=i(207),h=i(208);function l(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(t);t=n[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}(t.exports=l).prototype.sign=function(t,e){t=s(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),e=this.encodePoint(n),i=this.hashInt(e,i.pubBytes(),t).mul(i.priv()),i=r.add(i).umod(this.curve.n);return this.makeSignature({R:n,S:i,Rencoded:e})},l.prototype.verify=function(t,e,i){t=s(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),t=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(t)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=e)throw new Error("invalid sig")}t.exports=function(t,e,i,r,n){var u=p(i);if("ec"===u.type){if("ecdsa"!==r&&"ecdsa/rsa"!==r)throw new Error("wrong public key type");return function(t,e,i){var r=m[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));r=new d(r),i=i.data.subjectPrivateKey.data;return r.verify(e,t,i)}(t,e,u)}if("dsa"===u.type){if("dsa"!==r)throw new Error("wrong public key type");return function(t,e){var i=u.data.p,r=u.data.q,n=u.data.g,o=u.data.pub_key,a=p.signature.decode(t,"der"),s=a.s,t=a.r;g(s,r),g(t,r);a=c.mont(i),s=s.invm(r);return 0===n.toRed(a).redPow(new c(e).mul(s).mod(r)).fromRed().mul(o.toRed(a).redPow(t.mul(s).mod(r)).fromRed()).mod(i).mod(r).cmp(t)}(t,e)}if("rsa"!==r&&"ecdsa/rsa"!==r)throw new Error("wrong public key type");e=f.concat([n,e]);for(var o=u.modulus.byteLength(),a=[1],s=0;e.length+a.length+2>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);else if("le"===i)for(n=r=0;r>>26-a&67108863,26<=(a+=24)&&(a-=26,n++);return this.strip()},g.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i>>26-n&4194303,26<=(n+=24)&&(n-=26,o++);i+6!==e&&(r=a(t,e,i+6),this.words[o]|=r<>>26-n&4194303),this.strip()},g.prototype._parseBase=function(t,e,i){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=e)r++;for(var n=n/e|0,o=t.length-i,a=o%--r,s=Math.min(o,o-a)+i,u=0,h=i;h"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function r(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0,r=(i.length=r)-1|0,n=(0|t.words[0])*(0|e.words[0]),o=n/67108864|0;i.words[0]=67108863&n;for(var a=1;a>>26,u=67108863&o,h=Math.min(a,e.length-1),l=Math.max(0,a-t.length+1);l<=h;l++)s+=(n=(0|t.words[a-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&n;i.words[a]=0|u,o=0|s}return 0!==o?i.words[a]=0|o:i.length--,i.strip()}g.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var i=0,r=0,n=0;n>>24-i&16777215)||n!==this.length-1?c[6-a.length]+a+s:a+s;26<=(i+=2)&&(i-=26,n--)}for(0!==r&&(s=r.toString(16)+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var u=d[t],h=p[t];s="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(h).toString(t);s=(l=l.idivn(h)).isZero()?f+s:c[u-f.length]+f+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}m(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},g.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},g.prototype.bitLength=function(){var t=this.words[this.length-1],t=this._countBits(t);return 26*(this.length-1)+t},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},g.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},g.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,i=0;it.length?this.clone().iand(t):t.clone().iand(this)},g.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},g.prototype.iuxor=function(t){for(var e,i=this.length>t.length?(e=this,t):(e=t,this),r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},g.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},g.prototype.inotn=function(t){m("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26),t=t%26;this._expand(e),0>26-t),this.strip()},g.prototype.notn=function(t){return this.clone().inotn(t)},g.prototype.setn=function(t,e){m("number"==typeof t&&0<=t);var i=t/26|0,t=t%26;return this._expand(1+i),this.words[i]=e?this.words[i]|1<t.length?(i=this,t):(i=t,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},g.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,h=0|r[1],l=8191&h,f=h>>>13,c=0|r[2],d=8191&c,p=c>>>13,m=0|r[3],g=8191&m,b=m>>>13,v=0|r[4],y=8191&v,w=v>>>13,M=0|r[5],_=8191&M,S=M>>>13,x=0|r[6],E=8191&x,k=x>>>13,A=0|r[7],R=8191&A,T=A>>>13,C=0|r[8],I=8191&C,O=C>>>13,D=0|r[9],B=8191&D,L=D>>>13,P=0|n[0],j=8191&P,U=P>>>13,N=0|n[1],F=8191&N,q=N>>>13,z=0|n[2],H=8191&z,$=z>>>13,W=0|n[3],Z=8191&W,V=W>>>13,K=0|n[4],Y=8191&K,G=K>>>13,X=0|n[5],Q=8191&X,J=X>>>13,a=0|n[6],h=8191&a,c=a>>>13,m=0|n[7],v=8191&m,M=m>>>13,x=0|n[8],A=8191&x,C=x>>>13,r=0|n[9],D=8191&r,P=r>>>13;i.negative=t.negative^e.negative,i.length=19;var W=(0+Math.imul(s,j)|0)+((8191&(z=Math.imul(s,U)+Math.imul(u,j)|0))<<13)|0,tt=(Math.imul(u,U)+(z>>>13)|0)+(W>>>26)|0;W&=67108863;N=Math.imul(l,j),z=Math.imul(l,U)+Math.imul(f,j)|0,K=Math.imul(f,U),X=(tt+(N+Math.imul(s,F)|0)|0)+((8191&(z=(z+Math.imul(s,q)|0)+Math.imul(u,F)|0))<<13)|0;tt=((K+Math.imul(u,q)|0)+(z>>>13)|0)+(X>>>26)|0,X&=67108863,N=Math.imul(d,j),z=Math.imul(d,U)+Math.imul(p,j)|0,K=Math.imul(p,U),N=N+Math.imul(l,F)|0,z=(z+Math.imul(l,q)|0)+Math.imul(f,F)|0,K=K+Math.imul(f,q)|0;a=(tt+(N+Math.imul(s,H)|0)|0)+((8191&(z=(z+Math.imul(s,$)|0)+Math.imul(u,H)|0))<<13)|0;tt=((K+Math.imul(u,$)|0)+(z>>>13)|0)+(a>>>26)|0,a&=67108863,N=Math.imul(g,j),z=Math.imul(g,U)+Math.imul(b,j)|0,K=Math.imul(b,U),N=N+Math.imul(d,F)|0,z=(z+Math.imul(d,q)|0)+Math.imul(p,F)|0,K=K+Math.imul(p,q)|0,N=N+Math.imul(l,H)|0,z=(z+Math.imul(l,$)|0)+Math.imul(f,H)|0,K=K+Math.imul(f,$)|0;m=(tt+(N+Math.imul(s,Z)|0)|0)+((8191&(z=(z+Math.imul(s,V)|0)+Math.imul(u,Z)|0))<<13)|0;tt=((K+Math.imul(u,V)|0)+(z>>>13)|0)+(m>>>26)|0,m&=67108863,N=Math.imul(y,j),z=Math.imul(y,U)+Math.imul(w,j)|0,K=Math.imul(w,U),N=N+Math.imul(g,F)|0,z=(z+Math.imul(g,q)|0)+Math.imul(b,F)|0,K=K+Math.imul(b,q)|0,N=N+Math.imul(d,H)|0,z=(z+Math.imul(d,$)|0)+Math.imul(p,H)|0,K=K+Math.imul(p,$)|0,N=N+Math.imul(l,Z)|0,z=(z+Math.imul(l,V)|0)+Math.imul(f,Z)|0,K=K+Math.imul(f,V)|0;x=(tt+(N+Math.imul(s,Y)|0)|0)+((8191&(z=(z+Math.imul(s,G)|0)+Math.imul(u,Y)|0))<<13)|0;tt=((K+Math.imul(u,G)|0)+(z>>>13)|0)+(x>>>26)|0,x&=67108863,N=Math.imul(_,j),z=Math.imul(_,U)+Math.imul(S,j)|0,K=Math.imul(S,U),N=N+Math.imul(y,F)|0,z=(z+Math.imul(y,q)|0)+Math.imul(w,F)|0,K=K+Math.imul(w,q)|0,N=N+Math.imul(g,H)|0,z=(z+Math.imul(g,$)|0)+Math.imul(b,H)|0,K=K+Math.imul(b,$)|0,N=N+Math.imul(d,Z)|0,z=(z+Math.imul(d,V)|0)+Math.imul(p,Z)|0,K=K+Math.imul(p,V)|0,N=N+Math.imul(l,Y)|0,z=(z+Math.imul(l,G)|0)+Math.imul(f,Y)|0,K=K+Math.imul(f,G)|0;n=(tt+(N+Math.imul(s,Q)|0)|0)+((8191&(z=(z+Math.imul(s,J)|0)+Math.imul(u,Q)|0))<<13)|0;tt=((K+Math.imul(u,J)|0)+(z>>>13)|0)+(n>>>26)|0,n&=67108863,N=Math.imul(E,j),z=Math.imul(E,U)+Math.imul(k,j)|0,K=Math.imul(k,U),N=N+Math.imul(_,F)|0,z=(z+Math.imul(_,q)|0)+Math.imul(S,F)|0,K=K+Math.imul(S,q)|0,N=N+Math.imul(y,H)|0,z=(z+Math.imul(y,$)|0)+Math.imul(w,H)|0,K=K+Math.imul(w,$)|0,N=N+Math.imul(g,Z)|0,z=(z+Math.imul(g,V)|0)+Math.imul(b,Z)|0,K=K+Math.imul(b,V)|0,N=N+Math.imul(d,Y)|0,z=(z+Math.imul(d,G)|0)+Math.imul(p,Y)|0,K=K+Math.imul(p,G)|0,N=N+Math.imul(l,Q)|0,z=(z+Math.imul(l,J)|0)+Math.imul(f,Q)|0,K=K+Math.imul(f,J)|0;r=(tt+(N+Math.imul(s,h)|0)|0)+((8191&(z=(z+Math.imul(s,c)|0)+Math.imul(u,h)|0))<<13)|0;tt=((K+Math.imul(u,c)|0)+(z>>>13)|0)+(r>>>26)|0,r&=67108863,N=Math.imul(R,j),z=Math.imul(R,U)+Math.imul(T,j)|0,K=Math.imul(T,U),N=N+Math.imul(E,F)|0,z=(z+Math.imul(E,q)|0)+Math.imul(k,F)|0,K=K+Math.imul(k,q)|0,N=N+Math.imul(_,H)|0,z=(z+Math.imul(_,$)|0)+Math.imul(S,H)|0,K=K+Math.imul(S,$)|0,N=N+Math.imul(y,Z)|0,z=(z+Math.imul(y,V)|0)+Math.imul(w,Z)|0,K=K+Math.imul(w,V)|0,N=N+Math.imul(g,Y)|0,z=(z+Math.imul(g,G)|0)+Math.imul(b,Y)|0,K=K+Math.imul(b,G)|0,N=N+Math.imul(d,Q)|0,z=(z+Math.imul(d,J)|0)+Math.imul(p,Q)|0,K=K+Math.imul(p,J)|0,N=N+Math.imul(l,h)|0,z=(z+Math.imul(l,c)|0)+Math.imul(f,h)|0,K=K+Math.imul(f,c)|0;t=(tt+(N+Math.imul(s,v)|0)|0)+((8191&(z=(z+Math.imul(s,M)|0)+Math.imul(u,v)|0))<<13)|0;tt=((K+Math.imul(u,M)|0)+(z>>>13)|0)+(t>>>26)|0,t&=67108863,N=Math.imul(I,j),z=Math.imul(I,U)+Math.imul(O,j)|0,K=Math.imul(O,U),N=N+Math.imul(R,F)|0,z=(z+Math.imul(R,q)|0)+Math.imul(T,F)|0,K=K+Math.imul(T,q)|0,N=N+Math.imul(E,H)|0,z=(z+Math.imul(E,$)|0)+Math.imul(k,H)|0,K=K+Math.imul(k,$)|0,N=N+Math.imul(_,Z)|0,z=(z+Math.imul(_,V)|0)+Math.imul(S,Z)|0,K=K+Math.imul(S,V)|0,N=N+Math.imul(y,Y)|0,z=(z+Math.imul(y,G)|0)+Math.imul(w,Y)|0,K=K+Math.imul(w,G)|0,N=N+Math.imul(g,Q)|0,z=(z+Math.imul(g,J)|0)+Math.imul(b,Q)|0,K=K+Math.imul(b,J)|0,N=N+Math.imul(d,h)|0,z=(z+Math.imul(d,c)|0)+Math.imul(p,h)|0,K=K+Math.imul(p,c)|0,N=N+Math.imul(l,v)|0,z=(z+Math.imul(l,M)|0)+Math.imul(f,v)|0,K=K+Math.imul(f,M)|0;e=(tt+(N+Math.imul(s,A)|0)|0)+((8191&(z=(z+Math.imul(s,C)|0)+Math.imul(u,A)|0))<<13)|0;tt=((K+Math.imul(u,C)|0)+(z>>>13)|0)+(e>>>26)|0,e&=67108863,N=Math.imul(B,j),z=Math.imul(B,U)+Math.imul(L,j)|0,K=Math.imul(L,U),N=N+Math.imul(I,F)|0,z=(z+Math.imul(I,q)|0)+Math.imul(O,F)|0,K=K+Math.imul(O,q)|0,N=N+Math.imul(R,H)|0,z=(z+Math.imul(R,$)|0)+Math.imul(T,H)|0,K=K+Math.imul(T,$)|0,N=N+Math.imul(E,Z)|0,z=(z+Math.imul(E,V)|0)+Math.imul(k,Z)|0,K=K+Math.imul(k,V)|0,N=N+Math.imul(_,Y)|0,z=(z+Math.imul(_,G)|0)+Math.imul(S,Y)|0,K=K+Math.imul(S,G)|0,N=N+Math.imul(y,Q)|0,z=(z+Math.imul(y,J)|0)+Math.imul(w,Q)|0,K=K+Math.imul(w,J)|0,N=N+Math.imul(g,h)|0,z=(z+Math.imul(g,c)|0)+Math.imul(b,h)|0,K=K+Math.imul(b,c)|0,N=N+Math.imul(d,v)|0,z=(z+Math.imul(d,M)|0)+Math.imul(p,v)|0,K=K+Math.imul(p,M)|0,N=N+Math.imul(l,A)|0,z=(z+Math.imul(l,C)|0)+Math.imul(f,A)|0,K=K+Math.imul(f,C)|0;s=(tt+(N+Math.imul(s,D)|0)|0)+((8191&(z=(z+Math.imul(s,P)|0)+Math.imul(u,D)|0))<<13)|0;tt=((K+Math.imul(u,P)|0)+(z>>>13)|0)+(s>>>26)|0,s&=67108863,N=Math.imul(B,F),z=Math.imul(B,q)+Math.imul(L,F)|0,K=Math.imul(L,q),N=N+Math.imul(I,H)|0,z=(z+Math.imul(I,$)|0)+Math.imul(O,H)|0,K=K+Math.imul(O,$)|0,N=N+Math.imul(R,Z)|0,z=(z+Math.imul(R,V)|0)+Math.imul(T,Z)|0,K=K+Math.imul(T,V)|0,N=N+Math.imul(E,Y)|0,z=(z+Math.imul(E,G)|0)+Math.imul(k,Y)|0,K=K+Math.imul(k,G)|0,N=N+Math.imul(_,Q)|0,z=(z+Math.imul(_,J)|0)+Math.imul(S,Q)|0,K=K+Math.imul(S,J)|0,N=N+Math.imul(y,h)|0,z=(z+Math.imul(y,c)|0)+Math.imul(w,h)|0,K=K+Math.imul(w,c)|0,N=N+Math.imul(g,v)|0,z=(z+Math.imul(g,M)|0)+Math.imul(b,v)|0,K=K+Math.imul(b,M)|0,N=N+Math.imul(d,A)|0,z=(z+Math.imul(d,C)|0)+Math.imul(p,A)|0,K=K+Math.imul(p,C)|0;l=(tt+(N+Math.imul(l,D)|0)|0)+((8191&(z=(z+Math.imul(l,P)|0)+Math.imul(f,D)|0))<<13)|0;tt=((K+Math.imul(f,P)|0)+(z>>>13)|0)+(l>>>26)|0,l&=67108863,N=Math.imul(B,H),z=Math.imul(B,$)+Math.imul(L,H)|0,K=Math.imul(L,$),N=N+Math.imul(I,Z)|0,z=(z+Math.imul(I,V)|0)+Math.imul(O,Z)|0,K=K+Math.imul(O,V)|0,N=N+Math.imul(R,Y)|0,z=(z+Math.imul(R,G)|0)+Math.imul(T,Y)|0,K=K+Math.imul(T,G)|0,N=N+Math.imul(E,Q)|0,z=(z+Math.imul(E,J)|0)+Math.imul(k,Q)|0,K=K+Math.imul(k,J)|0,N=N+Math.imul(_,h)|0,z=(z+Math.imul(_,c)|0)+Math.imul(S,h)|0,K=K+Math.imul(S,c)|0,N=N+Math.imul(y,v)|0,z=(z+Math.imul(y,M)|0)+Math.imul(w,v)|0,K=K+Math.imul(w,M)|0,N=N+Math.imul(g,A)|0,z=(z+Math.imul(g,C)|0)+Math.imul(b,A)|0,K=K+Math.imul(b,C)|0;d=(tt+(N+Math.imul(d,D)|0)|0)+((8191&(z=(z+Math.imul(d,P)|0)+Math.imul(p,D)|0))<<13)|0;tt=((K+Math.imul(p,P)|0)+(z>>>13)|0)+(d>>>26)|0,d&=67108863,N=Math.imul(B,Z),z=Math.imul(B,V)+Math.imul(L,Z)|0,K=Math.imul(L,V),N=N+Math.imul(I,Y)|0,z=(z+Math.imul(I,G)|0)+Math.imul(O,Y)|0,K=K+Math.imul(O,G)|0,N=N+Math.imul(R,Q)|0,z=(z+Math.imul(R,J)|0)+Math.imul(T,Q)|0,K=K+Math.imul(T,J)|0,N=N+Math.imul(E,h)|0,z=(z+Math.imul(E,c)|0)+Math.imul(k,h)|0,K=K+Math.imul(k,c)|0,N=N+Math.imul(_,v)|0,z=(z+Math.imul(_,M)|0)+Math.imul(S,v)|0,K=K+Math.imul(S,M)|0,N=N+Math.imul(y,A)|0,z=(z+Math.imul(y,C)|0)+Math.imul(w,A)|0,K=K+Math.imul(w,C)|0;g=(tt+(N+Math.imul(g,D)|0)|0)+((8191&(z=(z+Math.imul(g,P)|0)+Math.imul(b,D)|0))<<13)|0;tt=((K+Math.imul(b,P)|0)+(z>>>13)|0)+(g>>>26)|0,g&=67108863,N=Math.imul(B,Y),z=Math.imul(B,G)+Math.imul(L,Y)|0,K=Math.imul(L,G),N=N+Math.imul(I,Q)|0,z=(z+Math.imul(I,J)|0)+Math.imul(O,Q)|0,K=K+Math.imul(O,J)|0,N=N+Math.imul(R,h)|0,z=(z+Math.imul(R,c)|0)+Math.imul(T,h)|0,K=K+Math.imul(T,c)|0,N=N+Math.imul(E,v)|0,z=(z+Math.imul(E,M)|0)+Math.imul(k,v)|0,K=K+Math.imul(k,M)|0,N=N+Math.imul(_,A)|0,z=(z+Math.imul(_,C)|0)+Math.imul(S,A)|0,K=K+Math.imul(S,C)|0;y=(tt+(N+Math.imul(y,D)|0)|0)+((8191&(z=(z+Math.imul(y,P)|0)+Math.imul(w,D)|0))<<13)|0;tt=((K+Math.imul(w,P)|0)+(z>>>13)|0)+(y>>>26)|0,y&=67108863,N=Math.imul(B,Q),z=Math.imul(B,J)+Math.imul(L,Q)|0,K=Math.imul(L,J),N=N+Math.imul(I,h)|0,z=(z+Math.imul(I,c)|0)+Math.imul(O,h)|0,K=K+Math.imul(O,c)|0,N=N+Math.imul(R,v)|0,z=(z+Math.imul(R,M)|0)+Math.imul(T,v)|0,K=K+Math.imul(T,M)|0,N=N+Math.imul(E,A)|0,z=(z+Math.imul(E,C)|0)+Math.imul(k,A)|0,K=K+Math.imul(k,C)|0;_=(tt+(N+Math.imul(_,D)|0)|0)+((8191&(z=(z+Math.imul(_,P)|0)+Math.imul(S,D)|0))<<13)|0;tt=((K+Math.imul(S,P)|0)+(z>>>13)|0)+(_>>>26)|0,_&=67108863,N=Math.imul(B,h),z=Math.imul(B,c)+Math.imul(L,h)|0,K=Math.imul(L,c),N=N+Math.imul(I,v)|0,z=(z+Math.imul(I,M)|0)+Math.imul(O,v)|0,K=K+Math.imul(O,M)|0,N=N+Math.imul(R,A)|0,z=(z+Math.imul(R,C)|0)+Math.imul(T,A)|0,K=K+Math.imul(T,C)|0;E=(tt+(N+Math.imul(E,D)|0)|0)+((8191&(z=(z+Math.imul(E,P)|0)+Math.imul(k,D)|0))<<13)|0;tt=((K+Math.imul(k,P)|0)+(z>>>13)|0)+(E>>>26)|0,E&=67108863,N=Math.imul(B,v),z=Math.imul(B,M)+Math.imul(L,v)|0,K=Math.imul(L,M),N=N+Math.imul(I,A)|0,z=(z+Math.imul(I,C)|0)+Math.imul(O,A)|0,K=K+Math.imul(O,C)|0;R=(tt+(N+Math.imul(R,D)|0)|0)+((8191&(z=(z+Math.imul(R,P)|0)+Math.imul(T,D)|0))<<13)|0;tt=((K+Math.imul(T,P)|0)+(z>>>13)|0)+(R>>>26)|0,R&=67108863,N=Math.imul(B,A),z=Math.imul(B,C)+Math.imul(L,A)|0,K=Math.imul(L,C);I=(tt+(N+Math.imul(I,D)|0)|0)+((8191&(z=(z+Math.imul(I,P)|0)+Math.imul(O,D)|0))<<13)|0;tt=((K+Math.imul(O,P)|0)+(z>>>13)|0)+(I>>>26)|0,I&=67108863;D=(tt+Math.imul(B,D)|0)+((8191&(z=Math.imul(B,P)+Math.imul(L,D)|0))<<13)|0;return tt=(Math.imul(L,P)+(z>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=W,o[1]=X,o[2]=a,o[3]=m,o[4]=x,o[5]=n,o[6]=r,o[7]=t,o[8]=e,o[9]=s,o[10]=l,o[11]=d,o[12]=g,o[13]=y,o[14]=_,o[15]=E,o[16]=R,o[17]=I,o[18]=D,0!=tt&&(o[19]=tt,i.length++),i};function o(t,e,i){return(new s).mulp(t,e,i)}function s(t,e){this.x=t,this.y=e}Math.imul||(n=r),g.prototype.mulTo=function(t,e){var i=this.length+t.length;return(10===this.length&&10===t.length?n:i<63?r:i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}:o)(this,t,e)},s.prototype.makeRBT=function(t){for(var e=new Array(t),i=g.prototype._countBits(t)-1,r=0;r>=1;return r},s.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a>>=1)i++;return 1<>>=13),n>>>=13;for(o=2*e;o>=26,e+=r/67108864|0,e+=n>>>26,this.words[i]=67108863&n}return 0!==e&&(this.words[i]=e,this.length++),this},g.prototype.muln=function(t){return this.clone().imuln(t)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r}return e}(t);if(0===e.length)return new g(1);for(var i=this,r=0;r>>26-e<<26-e;if(0!=e){for(var n=0,o=0;o>>26-e}n&&(this.words[o]=n,this.length++)}if(0!=i){for(o=this.length-1;0<=o;o--)this.words[o+i]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,u=0;u>>n,h=l&a}return s&&0!==h&&(s.words[s.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(t,e,i){return m(0===this.negative),this.iushrn(t,e,i)},g.prototype.shln=function(t){return this.clone().ishln(t)},g.prototype.ushln=function(t){return this.clone().iushln(t)},g.prototype.shrn=function(t){return this.clone().ishrn(t)},g.prototype.ushrn=function(t){return this.clone().iushrn(t)},g.prototype.testn=function(t){m("number"==typeof t&&0<=t);var e=t%26,t=(t-e)/26;return!(this.length<=t||!(this.words[t]&1<>>e<>26)-(s/67108864|0);this.words[o+i]=67108863&a}for(;o>26,this.words[o+i]=67108863&a;if(0===n)return this.strip();for(m(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(t,e){this.length,t.length;var i,r=this.clone(),n=t,o=0|n.words[n.length-1];0!=(i=26-this._countBits(o))&&(n=n.ushln(i),r.iushln(i),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var u=0;uthis.length||this.cmp(t)<0?{div:new g(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new g(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new g(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,n,o},g.prototype.div=function(t){return this.divmod(t,"div",!1).div},g.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},g.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},g.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),t=t.andln(1),r=i.cmp(r);return r<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},g.prototype.modn=function(t){m(t<=67108863);for(var e=(1<<26)%t,i=0,r=this.length-1;0<=r;r--)i=(e*i+(0|this.words[r]))%t;return i},g.prototype.idivn=function(t){m(t<=67108863);for(var e=0,i=this.length-1;0<=i;i--){var r=(0|this.words[i])+67108864*e;this.words[i]=r/t|0,e=r%t}return this.strip()},g.prototype.divn=function(t){return this.clone().idivn(t)},g.prototype.egcd=function(t){m(0===t.negative),m(!t.isZero());for(var e=this,i=t.clone(),e=0!==e.negative?e.umod(t):e.clone(),r=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++s;for(var u=i.clone(),h=e.clone();!e.isZero();){for(var l=0,f=1;0==(e.words[0]&f)&&l<26;++l,f<<=1);if(0>>26;n&=67108863,this.words[r]=n}return 0!==i&&(this.words[r]=i,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1t.length)return 1;if(this.lengththis.n;);t=e>>22,n=o}0===(t.words[r-10]=n>>>=22)&&10>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},g._prime=function(t){if(u[t])return u[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return u[t]=e},w.prototype._verify1=function(t){m(0===t.negative,"red works only with positives"),m(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){m(0==(t.negative|e.negative),"red works only with positives"),m(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);e=t.add(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);e=t.iadd(e);return 0<=e.cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){this._verify2(t,e);e=t.sub(e);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);e=t.isub(e);return e.cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(m(e%2==1),3===e){e=this.m.add(new g(1)).iushrn(2);return this.pow(t,e)}for(var i=this.m.subn(1),r=0;!i.isZero()&&0===i.andln(1);)r++,i.iushrn(1);m(!i.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var u=this.pow(s,i),h=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),f=r;0!==l.cmp(n);){for(var c=l,d=0;0!==c.cmp(n);d++)c=c.redSqr();m(d>h&1;n!==i[0]&&(n=this.sqr(n)),0!=l||0!==o?(o<<=1,o|=l,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[o]),o=a=0)):a=0}s=26}return n},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){t=t.clone();return t.red=null,t},g.mont=function(t){return new M(t)},e(M,w),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){t=this.imod(t.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;t=t.imul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new g(0)._forceRed(this);t=t.mul(e),e=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=t.isub(e).iushrn(this.shift),e=t;return 0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(this)}.call(this,S(16)(t))},function(t,e){},function(t,i,e){i.publicEncrypt=e(224),i.privateDecrypt=e(226),i.privateEncrypt=function(t,e){return i.publicEncrypt(t,e,!0)},i.publicDecrypt=function(t,e){return i.privateDecrypt(t,e,!0)}},function(t,e,i){var o=i(37),u=i(19),h=i(27),l=i(116),f=i(117),c=i(62),a=i(118),d=i(53),p=i(1).Buffer;t.exports=function(t,e,i){var r,n=t.padding||(i?1:4),s=o(t);if(4===n)r=function(t){var e=s.modulus.byteLength(),i=t.length,r=h("sha1").update(p.alloc(0)).digest(),n=r.length,o=2*n;if(e-o-2n||0<=new a(e).cmp(s.modulus))throw new Error("decryption error");t=i?c(new a(e),s):l(e,s),e=d.alloc(n-t.length);if(t=d.concat([e,t],n),4===r)return function(t){var e=s.modulus.byteLength(),i=f("sha1").update(d.alloc(0)).digest(),r=i.length;if(0!==t[0])throw new Error("decryption error");var n=t.slice(1,r+1),t=t.slice(r+1),n=h(n,u(t,r)),o=h(t,u(n,e-r-1));if(function(t,e){t=d.from(t),e=d.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));for(var n=-1;++n=t.length){n++;break}var o=t.slice(2,r-1);if(("0002"!==i.toString("hex")&&!e||"0001"!==i.toString("hex")&&e)&&n++,o.length<8&&n++,n)throw new Error("decryption error");return t.slice(r)}(t,i);if(3===r)return t;throw new Error("unknown padding")}},function(t,i,d){"use strict";!function(n,o){function t(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var e=d(1),a=d(19),s=e.Buffer,r=e.kMaxLength,u=n.crypto||n.msCrypto,h=Math.pow(2,32)-1;function l(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(h{r=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),r?(void 0===i[t]&&(i[t]={}),i[t][r[1]]=e):i[t]=e};case"bracket":return(t,e,i)=>{r=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),r?void 0!==i[t]?i[t]=[].concat(i[t],e):i[t]=[e]:i[t]=e};case"comma":case"separator":return(t,e,i)=>{var r="string"==typeof e&&e.includes(o.arrayFormatSeparator),n="string"==typeof e&&!r&&l(e,o).includes(o.arrayFormatSeparator);e=n?l(e,o):e;e=r||n?e.split(o.arrayFormatSeparator).map(t=>l(t,o)):null===e?e:l(e,o);i[t]=e};default:return(t,e,i)=>{void 0!==i[t]?i[t]=[].concat(i[t],e):i[t]=e}}}(i),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const o of t.split("&"))if(""!==o){let[t,e]=s(i.decode?o.replace(/\+/g," "):o,"=");e=void 0===e?null:["comma","separator"].includes(i.arrayFormat)?e:l(e,i),r(l(t,i),e,n)}for(const t of Object.keys(n)){const r=n[t];if("object"==typeof r&&null!==r)for(const t of Object.keys(r))r[t]=c(r[t],i);else n[t]=c(r,i)}return!1===i.sort?n:(!0===i.sort?Object.keys(n).sort():Object.keys(n).sort(i.sort)).reduce((t,e)=>{var i=n[e];return Boolean(i)&&"object"==typeof i&&!Array.isArray(i)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(i):t[e]=i,t},Object.create(null))}a.extract=n,a.parse=d,a.stringify=(i,r)=>{if(!i)return"";u((r=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},r)).arrayFormatSeparator);const t=t=>r.skipNull&&null==i[t]||r.skipEmptyString&&""===i[t],n=function(n){switch(n.arrayFormat){case"index":return r=>(t,e)=>{const i=t.length;return void 0===e||n.skipNull&&null===e||n.skipEmptyString&&""===e?t:null===e?[...t,[h(r,n),"[",i,"]"].join("")]:[...t,[h(r,n),"[",h(i,n),"]=",h(e,n)].join("")]};case"bracket":return i=>(t,e)=>void 0===e||n.skipNull&&null===e||n.skipEmptyString&&""===e?t:null===e?[...t,[h(i,n),"[]"].join("")]:[...t,[h(i,n),"[]=",h(e,n)].join("")];case"comma":case"separator":return i=>(t,e)=>null==e||0===e.length?t:0===t.length?[[h(i,n),"=",h(e,n)].join("")]:[[t,h(e,n)].join(n.arrayFormatSeparator)];default:return i=>(t,e)=>void 0===e||n.skipNull&&null===e||n.skipEmptyString&&""===e?t:null===e?[...t,h(i,n)]:[...t,[h(i,n),"=",h(e,n)].join("")]}}(r),e={};for(const r of Object.keys(i))t(r)||(e[r]=i[r]);const o=Object.keys(e);return!1!==r.sort&&o.sort(r.sort),o.map(t=>{const e=i[t];return void 0===e?"":null===e?h(t,r):Array.isArray(e)?e.reduce(n(t),[]).join("&"):h(t,r)+"="+h(e,r)}).filter(t=>0{e=Object.assign({decode:!0},e);const[i,r]=s(t,"#");return Object.assign({url:i.split("?")[0]||"",query:d(n(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:l(r,e)}:{})},a.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0},e);var i=f(t.url).split("?")[0]||"",r=a.extract(t.url),r=a.parse(r,{sort:!1}),r=Object.assign(r,t.query);let n=a.stringify(r,e);n=n&&"?"+n;let o=function(t){let e="";var i=t.indexOf("#");return-1!==i&&(e=t.slice(i)),e}(t.url);return t.fragmentIdentifier&&(o="#"+h(t.fragmentIdentifier,e)),`${i}${n}${o}`},a.pick=(t,e,i)=>{i=Object.assign({parseFragmentIdentifier:!0},i);var{url:r,query:n,fragmentIdentifier:t}=a.parseUrl(t,i);return a.stringifyUrl({url:r,query:o(n,e),fragmentIdentifier:t},i)},a.exclude=(t,i,e)=>{var r=Array.isArray(i)?t=>!i.includes(t):(t,e)=>!i(t,e);return a.pick(t,r,e)}},function(t,e,i){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,i){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),s=new RegExp("(%[a-f0-9]{2})+","gi");function u(e){try{return decodeURIComponent(e)}catch(t){for(var i=e.match(n),r=1;r{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];var i=t.indexOf(e);return-1===i?[t]:[t.slice(0,i),t.slice(i+e.length)]}},function(t,e,i){"use strict";t.exports=function(t,e){for(var i={},r=Object.keys(t),n=Array.isArray(e),o=0;o>>24)|4278255360&(i[s]<<24|i[s]>>>8);i[t>>>5]|=128<>>9<<4)]=t;for(var u=g._ff,h=g._gg,l=g._hh,f=g._ii,s=0;s>>0,n=n+d>>>0,o=o+p>>>0,a=a+m>>>0}return b.endian([r,n,o,a])})._ff=function(t,e,i,r,n,o,a){a=t+(e&i|~e&r)+(n>>>0)+a;return(a<>>32-o)+e},g._gg=function(t,e,i,r,n,o,a){a=t+(e&r|i&~r)+(n>>>0)+a;return(a<>>32-o)+e},g._hh=function(t,e,i,r,n,o,a){a=t+(e^i^r)+(n>>>0)+a;return(a<>>32-o)+e},g._ii=function(t,e,i,r,n,o,a){a=t+(i^(e|~r))+(n>>>0)+a;return(a<>>32-o)+e},g._blocksize=16,g._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);t=b.wordsToBytes(g(t,e));return e&&e.asBytes?t:e&&e.asString?w.bytesToString(t):b.bytesToHex(t)}},function(t,e){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i={rotl:function(t,e){return t<>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&i.rotl(t,8)|4278255360&i.rotl(t,24);for(var e=0;e>>5]|=t[i]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],i=0;i<32*t.length;i+=8)e.push(t[i>>>5]>>>24-i%32&255);return e},bytesToHex:function(t){for(var e=[],i=0;i>>4).toString(16)),e.push((15&t[i]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],i=0;i>>6*(3-n)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],i=0,r=0;i>>6-2*r);return e}};t.exports=i},function(t,e){function i(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(i(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))||!!t._isBuffer);var e}},function(e,i,r){var n;!function(){"use strict";var d={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function p(t){return function(t,e){var i,r,n,o,a,s,u,h,l=1,f=t.length,c="";for(r=0;r>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}d.json.test(o.type)?c+=i:(!d.number.test(o.type)||u&&!o.sign?h="":(h=u?"+":"-",i=i.toString().replace(d.sign,"")),a=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",s=o.width-(h+i).length,s=o.width&&0({View:!0,Upload:!0,Delete:!0,"Add/Edit":!0})}},data:()=>({visible:!1,tab:"list",currentCategoryId:0,fileVisible:!1,smallWindow:t(window).width()<600,menuShow:!1,fileEdit:{categoryId:0},fileEditLoading:!1,categoryLoading:!1,categoryVisible:!1,categoryListAll:[],categoryListParent:[],categoryEdit:{id:0,pid:0,title:""},categoryEditLoading:!1,categoryTreeAll:[],categoryTreeParent:[],categoryFilter:"",records:[],listLoading:!1,page:1,pageSize:10,total:0,input:{path:""},reverseSelectOrder:!1}),watch:{categoryFilter(t){this.$refs.$categoryTreeAll.filter(t)}},computed:{apiUrl(){return this.url+"/"+this.category},listChecked(){return this.records.filter(t=>t.checked)},listCheckedIds(){return this.listChecked.map(t=>t.id)}},mounted(){"flat"===this.mode&&this.permission.View&&this.doCategoryList()},methods:{categoryFilterCallback:(t,e)=>!t||-1!==e.name.indexOf(t),isImage:t=>["jpg","png","gif","jpeg","webp"].includes(t.type),show(){this.visible=!0,this.doCategoryList()},hide(){this.visible=!1},doClickItem(t){const e=this.records[t];if(!e.checked)return this.listChecked.lengtht.checked=!1),void(e.checked=!0)):void r.a.tipError(this.L("Select %d item(s) at most",this.max));e.checked=!1},doFileEdit(){this.fileEdit.categoryId=this.currentCategoryId,this.fileVisible=!0},doFileEditSubmit(){const t=this.listCheckedIds;0!==t.length&&(this.fileEditLoading=!0,this.$api.post(this.apiUrl,n.b.extend(this.fileEdit,{id:t.join(","),action:"fileEdit"}),t=>{r.a.tipSuccess(this.L("Edit Success")),this.fileEditLoading=!1,this.fileVisible=!1,this.doList()},t=>{this.fileEditLoading=!1}))},doFileDelete(){const t=this.listCheckedIds;0!==t.length&&r.a.confirm(this.L("Confirm Delete ?"),()=>{r.a.loadingOn(),this.$api.post(this.apiUrl,n.b.extend({id:t.join(",")},{action:"fileDelete"}),t=>{r.a.loadingOff(),r.a.tipSuccess(this.L("Delete Success")),this.doList(1)},t=>{r.a.loadingOff()})})},doCategoryAdd(){this.currentCategoryId<0||(this.categoryEdit.id=0,this.categoryEdit.pid=this.currentCategoryId,this.categoryEdit.title="",this.categoryVisible=!0,this.categoryEditLoading=!1)},doCategoryEdit(){var t;this.currentCategoryId<=0||1===(t=this.categories.filter(t=>t.id===this.currentCategoryId)).length&&(t=t[0],this.categoryEdit.id=t.id,this.categoryEdit.pid=t.pid,this.categoryEdit.title=t.name,this.categoryVisible=!0,this.categoryEditLoading=!1)},doCategoryDelete(){this.currentCategoryId<=0||r.a.confirm(this.L("Confirm Delete ?"),()=>{this.$api.post(this.apiUrl,n.b.extend({id:this.currentCategoryId},{action:"categoryDelete"}),t=>{r.a.tipSuccess(this.L("Delete Success")),this.currentCategoryId=0,this.doCategoryList()})})},doCategoryEditSubmit(){this.categoryEditLoading=!0,this.$api.post(this.apiUrl,n.b.extend(this.categoryEdit,{action:"categoryEdit"}),t=>{r.a.tipSuccess(this.L("Add Success")),this.categoryEditLoading=!1,this.categoryVisible=!1,this.currentCategoryId=0,this.doCategoryList()},t=>{this.categoryEditLoading=!1})},doCategoryList(){this.categoryLoading=!0,this.$api.post(this.apiUrl,{action:"category"},t=>{this.categoryLoading=!1,this.categoryTreeAll=t.data.categoryTreeAll,this.categoryListAll=t.data.categoryListAll,this.categoryTreeParent=t.data.categoryTreeParent,this.categoryListParent=t.data.categoryListParent,this.categories=t.data.categories,this.$nextTick(()=>{this.$refs.$categoryTreeAll.setCurrentKey(this.currentCategoryId)}),this.doList(1)},t=>{this.categoryLoading=!1})},doCategorySelect(t){this.menuShow=!1,this.currentCategoryId=t.id,this.doList(1)},doList(t){t=t||this.page,this.page=t,this.listLoading=!0,this.$api.post(this.apiUrl,{action:"list",page:t,categoryId:this.currentCategoryId},t=>{this.tab="list";let e=t.data.records;e.map(t=>(t.checked=!1,t)),this.records=e,this.total=t.data.total,this.pageSize=t.data.pageSize,this.$nextTick(()=>{this.listLoading=!1})})},onUploadButtonSuccess(t){this.$api.post(this.apiUrl,{action:"save",path:t.path,name:t.name,size:t.size,categoryId:this.currentCategoryId},t=>{this.doList(1)})},doSubmit(){if("input"===this.tab){if(!this.input.path)return void r.a.tipError(this.L("Please Input"));const t=[];return t.push({category:this.category,name:"",path:this.input.path,fullPath:this.input.path,type:""}),this.$emit("on-select",t),void(this.visible=!1)}let t=this.listChecked.map(t=>({category:t.category,filename:t.filename,path:t.path,fullPath:t.fullPath,type:t.type}));t.lengththis.max?r.a.tipError(this.L("Select %d item(s) at most",this.max)):(this.reverseSelectOrder&&t.reverse(),this.$emit("on-select",t),this.visible=!1)}}}}.call(this,a(39))},function(t,r,n){"use strict";!function(t){var e=n(26),i=n(11);r.a={name:"RichEditor",mixins:[e.a,e.b],props:{editorOption:{type:Object,default:()=>({})}},data:()=>({id:null,editor:null,editorReady:!1,ignoreChangedContent:null}),watch:{data:{handler(t,e){this.ignoreChangedContent&&this.ignoreChangedContent===t?this.ignoreChangedContent=null:this.setContent(t)},immediate:!0}},mounted(){this.id=i.c.randomString(),t(this.$refs.editor).attr("id",this.id),this.$nextTick(()=>{this.editor=MS.editor.basic(this.id,{ready:()=>{this.editorReady=!0}},Object.assign({zIndex:1e4},this.editorOption)),this.editor.on("contentchange",()=>{var t=this.editor.getContent();console.log("RichEditor.contentchange",t),this.currentData=t,this.ignoreChangedContent=t})})},beforeDestroy(){this.editor&&(this.editor.destroy(),this.editor=null)},methods:{setContent(t){this.editorReady?this.editor.setContent(t):setTimeout(()=>{this.setContent(t)},100)}}}}.call(this,n(39))},,,function(t,e,i){var r=function(i){return r={"01f9":function(t,e,i){"use strict";function v(){return this}var y=i("2d00"),w=i("5ca1"),M=i("2aba"),_=i("32e9"),S=i("84f2"),x=i("41a0"),E=i("7f20"),k=i("38fd"),A=i("2b4c")("iterator"),R=!([].keys&&"next"in[].keys());t.exports=function(t,e,i,r,n,o,a){x(i,e,r);function s(t){if(!R&&t in p)return p[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}}var u,h,l,f=e+" Iterator",c="values"==n,d=!1,p=t.prototype,m=p[A]||p["@@iterator"]||n&&p[n],g=m||s(n),b=n?c?s("entries"):g:void 0,r="Array"==e&&p.entries||m;if(r&&(l=k(r.call(new t)))!==Object.prototype&&l.next&&(E(l,f,!0),y||"function"==typeof l[A]||_(l,A,v)),c&&m&&"values"!==m.name&&(d=!0,g=function(){return m.call(this)}),y&&!a||!R&&!d&&p[A]||_(p,A,g),S[e]=g,S[f]=v,n)if(u={values:c?g:s("values"),keys:o?g:s("keys"),entries:b},a)for(h in u)h in p||M(p,h,u[h]);else w(w.P+w.F*(R||d),e,u);return u}},"02f4":function(t,e,i){var a=i("4588"),s=i("be13");t.exports=function(o){return function(t,e){var i,r=String(s(t)),n=a(e),t=r.length;return n<0||t<=n?o?"":void 0:(e=r.charCodeAt(n))<55296||56319")}),g=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};t="ab".split(t);return 2===t.length&&"a"===t[0]&&"b"===t[1]}();t.exports=function(i,t,e){var o,r,n=c(i),a=!l(function(){var t={};return t[n]=function(){return 7},7!=""[i](t)}),s=a?!l(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===i&&(e.constructor={},e.constructor[p]=function(){return e}),e[n](""),!t}):void 0;a&&s&&("replace"!==i||m)&&("split"!==i||g)||(o=/./[n],e=(s=e(f,n,""[i],function(t,e,i,r,n){return e.exec===d?a&&!n?{done:!0,value:o.call(e,i,r)}:{done:!0,value:t.call(i,e,r)}:{done:!1}}))[0],r=s[1],u(String.prototype,i,e),h(RegExp.prototype,n,2==t?function(t,e){return r.call(t,this,e)}:function(t){return r.call(t,this)}))}},"230e":function(t,e,i){var r=i("d3f4"),n=i("7726").document,o=r(n)&&r(n.createElement);t.exports=function(t){return o?n.createElement(t):{}}},"23c6":function(t,e,i){var r=i("2d95"),n=i("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(t=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),n))?t:o?r(e):"Object"==(t=r(e))&&"function"==typeof e.callee?"Arguments":t}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,i){var o=i("7726"),a=i("32e9"),s=i("69a8"),u=i("ca5a")("src"),r=i("fa5b"),h=(""+r).split("toString");i("8378").inspectSource=function(t){return r.call(t)},(t.exports=function(t,e,i,r){var n="function"==typeof i;n&&(s(i,"name")||a(i,"name",e)),t[e]!==i&&(n&&(s(i,u)||a(i,u,t[e]?""+t[e]:h.join(String(e)))),t===o?t[e]=i:r?t[e]?t[e]=i:a(t,e,i):(delete t[e],a(t,e,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||r.call(this)})},"2aeb":function(t,e,i){function r(){}var n=i("cb7c"),o=i("1495"),a=i("e11e"),s=i("613b")("IE_PROTO"),u=function(){var t=i("230e")("iframe"),e=a.length;for(t.style.display="none",i("fab2").appendChild(t),t.src="javascript:",(t=t.contentWindow.document).open(),t.write(" - + diff --git a/public/asset/vendor/ueditor/dialogs/audio/audio.html b/public/asset/vendor/ueditor/dialogs/audio/audio.html index c86e236d1..e48cf8f1e 100644 --- a/public/asset/vendor/ueditor/dialogs/audio/audio.html +++ b/public/asset/vendor/ueditor/dialogs/audio/audio.html @@ -74,7 +74,7 @@ - + diff --git a/public/asset/vendor/ueditor/dialogs/image/image.html b/public/asset/vendor/ueditor/dialogs/image/image.html index a1ea5acfe..1b56bb6b2 100644 --- a/public/asset/vendor/ueditor/dialogs/image/image.html +++ b/public/asset/vendor/ueditor/dialogs/image/image.html @@ -9,7 +9,7 @@ - + diff --git a/public/asset/vendor/ueditor/dialogs/video/video.html b/public/asset/vendor/ueditor/dialogs/video/video.html index 12f00c1cd..f88413b64 100644 --- a/public/asset/vendor/ueditor/dialogs/video/video.html +++ b/public/asset/vendor/ueditor/dialogs/video/video.html @@ -100,7 +100,7 @@ - + diff --git a/public/asset/vendor/ueditor/dialogs/wordimage/wordimage.html b/public/asset/vendor/ueditor/dialogs/wordimage/wordimage.html index f183b3383..600868dfe 100644 --- a/public/asset/vendor/ueditor/dialogs/wordimage/wordimage.html +++ b/public/asset/vendor/ueditor/dialogs/wordimage/wordimage.html @@ -130,7 +130,7 @@ - + - + diff --git a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/audio/audio.html b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/audio/audio.html index c86e236d1..e48cf8f1e 100644 --- a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/audio/audio.html +++ b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/audio/audio.html @@ -74,7 +74,7 @@ - + diff --git a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/image/image.html b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/image/image.html index a1ea5acfe..1b56bb6b2 100644 --- a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/image/image.html +++ b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/image/image.html @@ -9,7 +9,7 @@ - + diff --git a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/video/video.html b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/video/video.html index 12f00c1cd..f88413b64 100644 --- a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/video/video.html +++ b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/video/video.html @@ -100,7 +100,7 @@ - + diff --git a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/wordimage/wordimage.html b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/wordimage/wordimage.html index f183b3383..600868dfe 100644 --- a/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/wordimage/wordimage.html +++ b/vendor/modstart/modstart/asset/vendor/ueditor/dialogs/wordimage/wordimage.html @@ -130,7 +130,7 @@ - + - + diff --git a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/audio/audio.html b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/audio/audio.html index c86e236d1..e48cf8f1e 100644 --- a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/audio/audio.html +++ b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/audio/audio.html @@ -74,7 +74,7 @@ - + diff --git a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/image/image.html b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/image/image.html index a1ea5acfe..1b56bb6b2 100644 --- a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/image/image.html +++ b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/image/image.html @@ -9,7 +9,7 @@ - + diff --git a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/video/video.html b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/video/video.html index 12f00c1cd..f88413b64 100644 --- a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/video/video.html +++ b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/video/video.html @@ -100,7 +100,7 @@ - + diff --git a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/wordimage/wordimage.html b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/wordimage/wordimage.html index f183b3383..600868dfe 100644 --- a/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/wordimage/wordimage.html +++ b/vendor/modstart/modstart/resources/asset/src/vendor/ueditor/dialogs/wordimage/wordimage.html @@ -130,7 +130,7 @@ - +