/** * CyberChef - The Cyber Swiss Army Knife * * @copyright Crown Copyright 2016 * @license Apache-2.0 * * Copyright 2016 Crown Copyright * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1506)}([function(e,t,r){"use strict";var n=r(15),i=r.n(n),o=r(10),s=r(7),a=r(19),u=r(18);function f(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){f(o,n,i,s,a,"next",e)}function a(e){f(o,n,i,s,a,"throw",e)}s(void 0)})}}function h(e,t){for(var r=0;r65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),r=e.charCodeAt(1);if(t>=55296&&t<56320&&r>=56320&&r<57344)return 1024*(t-55296)+r-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(t);return n.fill(r),Array.prototype.map.call(e,function(e,t){n[t]=e}),n}},{key:"truncate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-r.length)+r),e}},{key:"hex",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(r,"0")}},{key:"bin",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"object"==typeof window&&window.app&&!window.app.options.treatAsUtf8&&(t=e.byteArrayToChars(e.strToByteArray(t)));return t=t.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),r||(t=t.replace(/[\x09-\x10\x0D\u2028\u2029]/g,".")),t}},{key:"parseEscapedChars",value:function(e){return e.replace(/(\\)?\\([bfnrtv0'"]|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\})/g,function(e,t,r){if("\\"===t)return"\\"+r;switch(r[0]){case"0":return"\0";case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(r.substr(1),16));case"u":return"{"===r[1]?String.fromCodePoint(parseInt(r.slice(2,-1),16)):String.fromCharCode(parseInt(r.substr(1),16))}})}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var r=[],n=0;n255)return e.strToUtf8ByteArray(t);return n}},{key:"strToUtf8ByteArray",value:function(t){var r=i.a.encode(t);return t.length!==r.length&&("function"==typeof importScripts?self.setOption("attemptHighlight",!1):"object"==typeof window&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(r)}},{key:"strToCharcode",value:function(t){for(var r=[],n=0;n=55296&&i<56320){var o=t[n+1].charCodeAt(0);o>=56320&&o<57344&&(i=e.ord(t[n]+t[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(t){var r=e.byteArrayToChars(t);try{var n=i.a.decode(r);return r.length!==n.length&&("function"==typeof importScripts?self.setOption("attemptHighlight",!1):"object"==typeof window&&(window.app.options.attemptHighlight=!1)),n}catch(e){return r}}},{key:"byteArrayToChars",value:function(e){if(!e)return"";for(var t="",r=0;r1&&void 0!==arguments[1])||arguments[1],n=Array.prototype.slice.call(new Uint8Array(t));return r?e.byteArrayToUtf8(n):e.byteArrayToChars(n)}},{key:"parseCSV",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,s=!1,a="",u=[],f=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var c=0;c=0?(u.push(a),a=""):!s&&i.indexOf(t)>=0?(u.push(a),a="",f.push(u),u=[],i.indexOf(r)>=0&&r!==t&&c++):a+=t:s=!0;return u.length&&(u.push(a),f.push(u)),f}},{key:"stripHtmlTags",value:function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=e.replace(/<(script|style)[^>]*>.*<\/(script|style)>/gim,"")),e.replace(/<[^>]+>/g,"")}},{key:"escapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`"};return e.replace(/[&<>"'\/`]/g,function(e){return t[e]})}},{key:"unescapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`"};return e.replace(/&#?x?[a-z0-9]{2,4};/gi,function(e){return t[e]||e})}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,function(e){return t[e]||e})}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",o="",s="";return e.forEach(function(e){n=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=e.disabled?"/disabled":"",s=e.breakpoint?"/breakpoint":"",r+="".concat(n,"(").concat(i).concat(o).concat(s,")"),t&&(r+="\n")}),r}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,r;e=e.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)\/'])*)(\/[^)]+)?\)/g,i=[];t=n.exec(e);){r="["+(r=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|[^\\]\\\\)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:t[1].replace(/_/g," "),args:JSON.parse(r)};t[3]&&t[3].indexOf("disabled")>0&&(o.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:function(){var t=c(regeneratorRuntime.mark(function t(r){var n,i,s,a,u;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=function(t){return"
\n
\n
\n ".concat(e.escapeHtml(t.name),"\n
\n
\n
")},i=function(t,r){if(r.startsWith("image")){var n="data:";return n+=r+";",""}return"
".concat(e.escapeHtml(e.arrayBufferToStr(t.buffer)),"
")},s=function(){var t=c(regeneratorRuntime.mark(function t(r,n){var o,s,a;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.readFile(r);case 2:return o=t.sent,s=new Blob([o],{type:"octet/stream"}),a="
\n
\n
\n \n \n ").concat(r.size.toLocaleString(),' bytes\n \n save\n \n \n
\n
\n
\n
\n ").concat(i(o,r.type),"\n
\n
\n
"),t.abrupt("return",a);case 6:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}(),a="
\n ".concat(r.length,' file(s) found\n
'),u=0;case 5:if(!(u=e.size)t(i);else{var r=e.slice(o,o+10485760);n.readAsArrayBuffer(r)}};n.onload=function(e){i.set(new Uint8Array(n.result),o),o+=10485760,s()},n.onerror=function(e){r(n.error.message)},s()})}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(t,r){return r?e.gcd(r,t%r):t}},{key:"modInv",value:function(e,t){e%=t;for(var r=1;r>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))})},function(e,t,r){"use strict";var n=r(9),i=r(0),o=r(7);function s(e,t){for(var r=0;r0||e===t?t:t-1}function g(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nf^r?1:-1;for(a=(u=i.length)<(f=o.length)?u:f,s=0;so[s]^r?1:-1;return u==f?0:u>f^r?1:-1}function v(e,t,r,n){if(er||e!==(e<0?a(e):u(e)))throw Error(f+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return b(e.e/l)==t&&e.c[t]%2!=0}function k(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t=10;h/=10,f++);return b.e=f,void(b.c=[e])}y=String(e)}else{if(y=String(e),!s.test(y))return i(b,y,d);b.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(f=y.indexOf("."))>-1&&(y=y.replace(".","")),(h=y.search(/e/i))>0?(f<0&&(f=h),f+=+y.slice(h+1),y=y.substring(0,h)):f<0&&(f=y.length)}else{if(v(t,2,j.length,"Base"),y=String(e),10==t)return Z(b=new K(e instanceof K?e:y),I+b.e+1,U);if(d="number"==typeof e){if(0*e!=0)return i(b,y,d,t);if(b.s=1/e<0?(y=y.slice(1),-1):1,K.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(c+e);d=!1}else b.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=j.slice(0,t),f=h=0,_=y.length;h<_;h++)if(r.indexOf(o=y.charAt(h))<0){if("."==o){if(h>f){f=_;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,h=-1,f=0;continue}return i(b,String(e),d,t)}(f=(y=n(y,t,10,b.s)).indexOf("."))>-1?y=y.replace(".",""):f=y.length}for(h=0;48===y.charCodeAt(h);h++);for(_=y.length;48===y.charCodeAt(--_););if(y=y.slice(h,++_)){if(_-=h,d&&K.DEBUG&&_>15&&(e>p||e!==u(e)))throw Error(c+b.s*e);if((f=f-h-1)>F)b.c=b.e=null;else if(f=T)?k(u,s):E(u,s,"0");else if(o=(e=Z(new K(e),t,r)).e,a=(u=g(e.c)).length,1==n||2==n&&(t<=o||o<=R)){for(;aa){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function H(e,t){for(var r,n=1,i=new K(e[0]);n=10;i/=10,n++);return(r=n+r*l-1)>F?e.c=e.e=null:r=10;f/=10,i++);if((o=t-i)<0)o+=l,s=t,_=(c=y[p=0])/b[i-s-1]%10|0;else if((p=a((o+1)/l))>=y.length){if(!n)break e;for(;y.length<=p;y.push(0));c=_=0,i=1,s=(o%=l)-l+1}else{for(c=f=y[p],i=1;f>=10;f/=10,i++);_=(s=(o%=l)-l+i)<0?0:c/b[i-s-1]%10|0}if(n=n||t<0||null!=y[p+1]||(s<0?c:c%b[i-s-1]),n=r<4?(_||n)&&(0==r||r==(e.s<0?3:2)):_>5||5==_&&(4==r||n||6==r&&(o>0?s>0?c/b[i-s]:0:y[p-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=b[(l-t%l)%l],e.e=-t||0):y[0]=e.e=0,e;if(0==o?(y.length=p,f=1,p--):(y.length=p+1,f=b[l-o],y[p]=s>0?u(c/b[i-s]%b[s])*f:0),n)for(;;){if(0==p){for(o=1,s=y[0];s>=10;s/=10,o++);for(s=y[0]+=f,f=1;s>=10;s/=10,f++);o!=f&&(e.e++,y[0]==h&&(y[0]=1));break}if(y[p]+=f,y[p]!=h)break;y[p--]=0,f=1}for(o=y.length;0===y[--o];y.pop());}e.e>F?e.c=e.e=null:e.e=T?k(t,r):E(t,r,"0"),e.s<0?"-"+t:t)}return K.clone=e,K.ROUND_UP=0,K.ROUND_DOWN=1,K.ROUND_CEIL=2,K.ROUND_FLOOR=3,K.ROUND_HALF_UP=4,K.ROUND_HALF_DOWN=5,K.ROUND_HALF_EVEN=6,K.ROUND_HALF_CEIL=7,K.ROUND_HALF_FLOOR=8,K.EUCLID=9,K.config=K.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,y,t),I=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),U=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-y,0,t),v(r[1],0,y,t),R=r[0],T=r[1]):(v(r,-y,y,t),R=-(T=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)v(r[0],-y,-1,t),v(r[1],1,y,t),C=r[0],F=r[1];else{if(v(r,-y,y,t),!r)throw Error(f+t+" cannot be zero: "+r);C=-(F=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(f+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw O=!r,Error(f+"crypto unavailable");O=r}else O=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),z=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,y,t),L=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(f+t+" not an object: "+r);N=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(f+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:I,ROUNDING_MODE:U,EXPONENTIAL_AT:[R,T],RANGE:[C,F],CRYPTO:O,MODULO_MODE:z,POW_PRECISION:L,FORMAT:N,ALPHABET:j}},K.isBigNumber=function(e){return e instanceof K||e&&!0===e._isBigNumber||!1},K.maximum=K.max=function(){return H(arguments,M.lt)},K.minimum=K.min=function(){return H(arguments,M.gt)},K.random=(o=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,s,c=0,h=[],p=new K(P);if(null==e?e=I:v(e,0,y),i=a(e/l),O)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(h.push(s%1e14),c+=2);c=i/2}else{if(!crypto.randomBytes)throw O=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(i*=7);c=9e15?crypto.randomBytes(7).copy(t,c):(h.push(s%1e14),c+=7);c=i/7}if(!O)for(;c=10;s/=10,c++);cr-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(t,n,i,o,s){var a,u,f,c,h,l,p,d,_=t.indexOf("."),y=I,b=U;for(_>=0&&(c=L,L=0,t=t.replace(".",""),l=(d=new K(n)).pow(t.length-_),L=c,d.c=e(E(g(l.c),l.e,"0"),10,i,"0123456789"),d.e=d.c.length),f=c=(p=e(t,n,i,s?(a=j,"0123456789"):(a="0123456789",j))).length;0==p[--c];p.pop());if(!p[0])return a.charAt(0);if(_<0?--f:(l.c=p,l.e=f,l.s=o,p=(l=r(l,d,y,b,i)).c,h=l.r,f=l.e),_=p[u=f+y+1],c=i/2,h=h||u<0||null!=p[u+1],h=b<4?(null!=_||h)&&(0==b||b==(l.s<0?3:2)):_>c||_==c&&(4==b||h||6==b&&1&p[u-1]||b==(l.s<0?8:7)),u<1||!p[0])t=h?E(a.charAt(1),-y,a.charAt(0)):a.charAt(0);else{if(p.length=u,h)for(--i;++p[--u]>i;)p[u]=0,u||(++f,p=[1].concat(p));for(c=p.length;!p[--c];);for(_=0,t="";_<=c;t+=a.charAt(p[_++]));t=E(t,f,a.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,f=t%_,c=t/_|0;for(e=e.slice();u--;)a=((i=f*(o=e[u]%_)+(n=c*o+(s=e[u]/_|0)*f)%_*_+a)/r|0)+(n/_|0)+c*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,o,s,a){var f,c,p,d,_,y,g,m,v,w,k,E,x,S,A,B,D,M=n.s==i.s?1:-1,P=n.c,I=i.c;if(!(P&&P[0]&&I&&I[0]))return new K(n.s&&i.s&&(P?!I||P[0]!=I[0]:I)?P&&0==P[0]||!I?0*M:M/0:NaN);for(v=(m=new K(M)).c=[],M=o+(c=n.e-i.e)+1,a||(a=h,c=b(n.e/l)-b(i.e/l),M=M/l|0),p=0;I[p]==(P[p]||0);p++);if(I[p]>(P[p]||0)&&c--,M<0)v.push(1),d=!0;else{for(S=P.length,B=I.length,p=0,M+=2,(_=u(a/(I[0]+1)))>1&&(I=e(I,_,a),P=e(P,_,a),B=I.length,S=P.length),x=B,k=(w=P.slice(0,B)).length;k=a/2&&A++;do{if(_=0,(f=t(I,w,B,k))<0){if(E=w[0],B!=k&&(E=E*a+(w[1]||0)),(_=u(E/A))>1)for(_>=a&&(_=a-1),g=(y=e(I,_,a)).length,k=w.length;1==t(y,w,g,k);)_--,r(y,B=10;M/=10,p++);Z(m,o+(m.e=p+c*l-1)+1,s,d)}else m.e=c,m.r=+d;return m}}(),x=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,A=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,D=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(D,"");if(B.test(o))e.s=isNaN(o)?null:o<0?-1:1,e.c=e.e=null;else{if(!r&&(o=o.replace(x,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(S,"$1").replace(A,"0.$1")),t!=o))return new K(o,i);if(K.DEBUG)throw Error(f+"Not a"+(n?" base "+n:"")+" number: "+t);e.c=e.e=e.s=null}},M.absoluteValue=M.abs=function(){var e=new K(this);return e.s<0&&(e.s=1),e},M.comparedTo=function(e,t){return m(this,new K(e,t))},M.decimalPlaces=M.dp=function(e,t){var r,n,i,o=this;if(null!=e)return v(e,0,y),null==t?t=U:v(t,0,8),Z(new K(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-b(this.e/l))*l,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},M.dividedBy=M.div=function(e,t){return r(this,new K(e,t),I,U)},M.dividedToIntegerBy=M.idiv=function(e,t){return r(this,new K(e,t),0,1)},M.exponentiatedBy=M.pow=function(e,t){var r,n,i,o,s,c,h,p,d=this;if((e=new K(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+V(e));if(null!=t&&(t=new K(t)),s=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new K(Math.pow(+V(d),s?2-w(e):+V(e))),t?p.mod(t):p;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new K(NaN);(n=!c&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return o=d.s<0&&w(e)?-0:0,d.e>-1&&(o=1/o),new K(c?1/o:o);L&&(o=a(L/l+2))}for(s?(r=new K(.5),c&&(e.s=1),h=w(e)):h=(i=Math.abs(+V(e)))%2,p=new K(P);;){if(h){if(!(p=p.times(d)).c)break;o?p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}if(i){if(0===(i=u(i/2)))break;h=i%2}else if(Z(e=e.times(r),e.e+1,1),e.e>14)h=w(e);else{if(0==(i=+V(e)))break;h=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}return n?p:(c&&(p=P.div(p)),t?p.mod(t):o?Z(p,L,U,void 0):p)},M.integerValue=function(e){var t=new K(this);return null==e?e=U:v(e,0,8),Z(t,t.e+1,e)},M.isEqualTo=M.eq=function(e,t){return 0===m(this,new K(e,t))},M.isFinite=function(){return!!this.c},M.isGreaterThan=M.gt=function(e,t){return m(this,new K(e,t))>0},M.isGreaterThanOrEqualTo=M.gte=function(e,t){return 1===(t=m(this,new K(e,t)))||0===t},M.isInteger=function(){return!!this.c&&b(this.e/l)>this.c.length-2},M.isLessThan=M.lt=function(e,t){return m(this,new K(e,t))<0},M.isLessThanOrEqualTo=M.lte=function(e,t){return-1===(t=m(this,new K(e,t)))||0===t},M.isNaN=function(){return!this.s},M.isNegative=function(){return this.s<0},M.isPositive=function(){return this.s>0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new K(e,t)).s,!a||!t)return new K(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/l,f=e.e/l,c=s.c,p=e.c;if(!u||!f){if(!c||!p)return c?(e.s=-t,e):new K(p?s:NaN);if(!c[0]||!p[0])return p[0]?(e.s=-t,e):new K(c[0]?s:3==U?-0:0)}if(u=b(u),f=b(f),c=c.slice(),a=u-f){for((o=a<0)?(a=-a,i=c):(f=u,i=p),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=c.length)<(t=p.length))?a:t,a=t=0;t0)for(;t--;c[r++]=0);for(t=h-1;n>a;){if(c[--n]=0;){for(r=0,d=E[i]%v,y=E[i]/v|0,o=i+(s=u);o>i;)r=((f=d*(f=k[--s]%v)+(a=y*f+(c=k[s]/v|0)*d)%v*v+g[o]+r)/m|0)+(a/v|0)+y*c,g[o--]=f%m;g[o]=r}return r?++n:g.splice(0,1),G(e,g,n)},M.negated=function(){var e=new K(this);return e.s=-e.s||null,e},M.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new K(e,t)).s,!i||!t)return new K(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/l,s=e.e/l,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new K(i/0);if(!a[0]||!u[0])return u[0]?e:new K(a[0]?n:0*i)}if(o=b(o),s=b(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/h|0,a[t]=h===a[t]?0:a[t]%h;return i&&(a=[i].concat(a),++s),G(e,a,s)},M.precision=M.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return v(e,1,y),null==t?t=U:v(t,0,8),Z(new K(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*l+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},M.shiftedBy=function(e){return v(e,-p,p),this.times("1e"+e)},M.squareRoot=M.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,f=s.e,c=I+4,h=new K("0.5");if(1!==u||!a||!a[0])return new K(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+V(s)))||u==1/0?(((t=g(a)).length+f)%2==0&&(t+="0"),u=Math.sqrt(+t),f=b((f+1)/2)-(f<0||f%2),n=new K(t=u==1/0?"1e"+f:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+f)):n=new K(u+""),n.c[0])for((u=(f=n.e)+c)<3&&(u=0);;)if(o=n,n=h.times(o.plus(r(s,o,c,1))),g(o.c).slice(0,u)===(t=g(n.c)).slice(0,u)){if(n.e0&&_>0){for(o=_%a||a,h=d.substr(0,o);o<_;o+=a)h+=c+d.substr(o,a);u>0&&(h+=c+d.slice(o)),p&&(h="-"+h)}n=l?h+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):h}return(r.prefix||"")+n+(r.suffix||"")},M.toFraction=function(e){var t,n,i,o,s,a,u,c,h,p,_,y,b=this,m=b.c;if(null!=e&&(!(u=new K(e)).isInteger()&&(u.c||1!==u.s)||u.lt(P)))throw Error(f+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+V(u));if(!m)return new K(b);for(t=new K(P),h=n=new K(P),i=c=new K(P),y=g(m),s=t.e=y.length-b.e-1,t.c[0]=d[(a=s%l)<0?l+a:a],e=!e||u.comparedTo(t)>0?s>0?t:h:u,a=F,F=1/0,u=new K(y),c.c[0]=0;p=r(u,t,0,1),1!=(o=n.plus(p.times(i))).comparedTo(e);)n=i,i=o,h=c.plus(p.times(o=h)),c=o,t=u.minus(p.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),c=c.plus(o.times(h)),n=n.plus(o.times(i)),c.s=h.s=b.s,_=r(h,i,s*=2,U).minus(b).abs().comparedTo(r(c,n,s,U).minus(b).abs())<1?[h,i]:[c,n],F=a,_},M.toNumber=function(){return+V(this)},M.toPrecision=function(e,t){return null!=e&&v(e,1,y),q(this,e,t,2)},M.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=R||o>=T?k(g(r.c),o):E(g(r.c),o,"0"):10===e?t=E(g((r=Z(new K(r),I+o+1,U)).c),r.e,"0"):(v(e,2,j.length,"Base"),t=n(E(g(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},M.valueOf=M.toJSON=function(){return V(this)},M._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(M[Symbol.toStringTag]="BigNumber",M[Symbol.for("nodejs.util.inspect.custom")]=M.valueOf),null!=t&&K.set(t),K}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=r(58),i=r(59),o=r(60);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(n)return N(e).length;t=(""+t).toLowerCase(),n=!0}}function _(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;li&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return D(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),f=this.slice(n,i),c=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return m(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function T(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function C(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,r,n,o){return o||C(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return o||C(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||U(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):T(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);U(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);U(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):T(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function j(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(17))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";r.d(t,"d",function(){return i}),r.d(t,"e",function(){return o}),r.d(t,"c",function(){return s}),r.d(t,"b",function(){return a}),r.d(t,"a",function(){return u});var n=r(0); /** * Hexadecimal functions. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2016 * @license Apache-2.0 */function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!e)return"";for(var n="",i=0;i>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("None"!==t){var i="Auto"===t?/[^a-f\d]/gi:n.a.regexRep(t);e=e.replace(i,"")}for(var o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=[],this.type=e.BYTE_ARRAY,t&&t.hasOwnProperty("value")&&t.hasOwnProperty("type")&&this.set(t.value,t.type)}var t,r,o;return t=e,r=[{key:"set",value:function(t,r){if("string"==typeof r&&(r=e.typeEnum(r)),u.a.debug("Dish type: "+e.enumLookup(r)),this.value=t,this.type=r,!this.valid()){var o=n.a.truncate(JSON.stringify(this.value),13);throw new i.a("Data is not a valid ".concat(e.enumLookup(r),": ").concat(o))}}},{key:"get",value:function(){var t=c(regeneratorRuntime.mark(function t(r){var n,i=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],"string"==typeof r&&(r=e.typeEnum(r)),this.type===r){t.next=5;break}return t.next=5,this._translate(r,n);case 5:return t.abrupt("return",this.value);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"_translate",value:function(){var t=c(regeneratorRuntime.mark(function t(r){var o,a,f=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o=f.length>1&&void 0!==f[1]&&f[1],u.a.debug("Translating Dish from ".concat(e.enumLookup(this.type)," to ").concat(e.enumLookup(r))),a=o?n.a.byteArrayToChars:n.a.byteArrayToUtf8,t.prev=3,t.t0=this.type,t.next=t.t0===e.STRING?7:t.t0===e.NUMBER?9:t.t0===e.HTML?11:t.t0===e.ARRAY_BUFFER?13:t.t0===e.BIG_NUMBER?15:t.t0===e.JSON?17:t.t0===e.FILE?19:t.t0===e.LIST_FILE?24:30;break;case 7:return this.value=this.value?n.a.strToByteArray(this.value):[],t.abrupt("break",31);case 9:return this.value="number"==typeof this.value?n.a.strToByteArray(this.value.toString()):[],t.abrupt("break",31);case 11:return this.value=this.value?n.a.strToByteArray(n.a.unescapeHtml(n.a.stripHtmlTags(this.value,!0))):[],t.abrupt("break",31);case 13:return this.value=Array.prototype.slice.call(new Uint8Array(this.value)),t.abrupt("break",31);case 15:return this.value=s.a.isBigNumber(this.value)?n.a.strToByteArray(this.value.toFixed()):[],t.abrupt("break",31);case 17:return this.value=this.value?n.a.strToByteArray(JSON.stringify(this.value,null,4)):[],t.abrupt("break",31);case 19:return t.next=21,n.a.readFile(this.value);case 21:return this.value=t.sent,this.value=Array.prototype.slice.call(this.value),t.abrupt("break",31);case 24:return t.next=26,Promise.all(this.value.map(function(){var e=c(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.a.readFile(t));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()));case 26:return this.value=t.sent,this.value=this.value.map(function(e){return Array.prototype.slice.call(e)}),this.value=[].concat.apply([],this.value),t.abrupt("break",31);case 30:return t.abrupt("break",31);case 31:t.next=36;break;case 33:throw t.prev=33,t.t1=t.catch(3),new i.a("Error translating from ".concat(e.enumLookup(this.type)," to byteArray: ").concat(t.t1));case 36:this.type=e.BYTE_ARRAY,t.prev=37,t.t2=r,t.next=t.t2===e.STRING?41:t.t2===e.HTML?41:t.t2===e.NUMBER?44:t.t2===e.ARRAY_BUFFER?47:t.t2===e.BIG_NUMBER?50:t.t2===e.JSON?53:t.t2===e.FILE?56:t.t2===e.LIST_FILE?58:61;break;case 41:return this.value=this.value?a(this.value):"",this.type=e.STRING,t.abrupt("break",62);case 44:return this.value=this.value?parseFloat(a(this.value)):0,this.type=e.NUMBER,t.abrupt("break",62);case 47:return this.value=new Uint8Array(this.value).buffer,this.type=e.ARRAY_BUFFER,t.abrupt("break",62);case 50:try{this.value=new s.a(a(this.value))}catch(e){this.value=new s.a(NaN)}return this.type=e.BIG_NUMBER,t.abrupt("break",62);case 53:return this.value=JSON.parse(a(this.value)),this.type=e.JSON,t.abrupt("break",62);case 56:return this.value=new File(this.value,"unknown"),t.abrupt("break",62);case 58:return this.value=[new File(this.value,"unknown")],this.type=e.LIST_FILE,t.abrupt("break",62);case 61:return t.abrupt("break",62);case 62:t.next=67;break;case 64:throw t.prev=64,t.t3=t.catch(37),new i.a("Error translating from byteArray to ".concat(e.enumLookup(r),": ").concat(t.t3));case 67:case"end":return t.stop()}},t,this,[[3,33],[37,64]])}));return function(e){return t.apply(this,arguments)}}()},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Array))return!1;for(var t=0;t255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:return s.a.isBigNumber(this.value);case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(e,t){return e&&t instanceof File},!0);default:return!1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map(function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})}),this.type);break;default:throw new i.a("Cannot clone Dish, unknown type")}return t}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce(function(e,t){return e+t.size},0);default:return-1}}}],o=[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":return e.JSON;case"file":return e.FILE;case"list":return e.LIST_FILE;default:throw new i.a("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List";default:throw new i.a("Invalid data type enum. No matching type.")}}}],r&&h(t.prototype,r),o&&h(t,o),e}();l.BYTE_ARRAY=0,l.STRING=1,l.NUMBER=2,l.HTML=3,l.ARRAY_BUFFER=4,l.BIG_NUMBER=5,l.JSON=6,l.FILE=7,l.LIST_FILE=8,t.a=l},function(e,t,r){"use strict";r.d(t,"c",function(){return i}),r.d(t,"b",function(){return o}),r.d(t,"a",function(){return s});var n=r(0); /** * Base64 functions. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2016 * @license Apache-2.0 */function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";"string"==typeof e&&(e=n.a.strToByteArray(e)),t=n.a.expandAlphRange(t).join("");for(var r,i,o,s,a,u,f,c="",h=0;h>2,a=(3&r)<<4|(i=e[h++])>>4,u=(15&i)<<2|(o=e[h++])>>6,f=63&o,isNaN(i)?u=f=64:isNaN(o)&&(f=64),c+=t.charAt(s)+t.charAt(a)+t.charAt(u)+t.charAt(f);return c}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return"string"===r?"":[];t=t||"A-Za-z0-9+/=",t=n.a.expandAlphRange(t).join("");var o,s,a,u,f,c,h=[],l=0;if(i){var p=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(p,"")}for(;l>4,s=(15&u)<<4|(f=-1===(f=t.indexOf(e.charAt(l++)||"="))?64:f)>>2,a=(3&f)<<6|(c=-1===(c=t.indexOf(e.charAt(l++)||"="))?64:c),h.push(o),64!==f&&h.push(s),64!==c&&h.push(a);return"string"===r?n.a.byteArrayToUtf8(h):h}var s=[{name:"Standard (RFC 4648): A-Za-z0-9+/=",value:"A-Za-z0-9+/="},{name:"URL safe (RFC 4648 §5): A-Za-z0-9-_",value:"A-Za-z0-9-_"},{name:"Filename safe: A-Za-z0-9+-=",value:"A-Za-z0-9+\\-="},{name:"itoa64: ./0-9A-Za-z=",value:"./0-9A-Za-z="},{name:"XML: A-Za-z0-9_.",value:"A-Za-z0-9_."},{name:"y64: A-Za-z0-9._-",value:"A-Za-z0-9._-"},{name:"z64: 0-9a-zA-Z+/=",value:"0-9a-zA-Z+/="},{name:"Radix-64 (RFC 4880): 0-9A-Za-z+/=",value:"0-9A-Za-z+/="},{name:"Uuencoding: [space]-_",value:" -_"},{name:"Xxencoding: +-0-9A-Za-z",value:"+\\-0-9A-Za-z"},{name:"BinHex: !-,-0-689@A-NP-VX-Z[`a-fh-mp-r",value:"!-,-0-689@A-NP-VX-Z[`a-fh-mp-r"},{name:"ROT13: N-ZA-Mn-za-m0-9+/=",value:"N-ZA-Mn-za-m0-9+/="},{name:"UNIX crypt: ./0-9A-Za-z",value:"./0-9A-Za-z"}]},,function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t} /** * Custom error type for handling Dish type errors. * i.e. where the Dish cannot be successfully translated between types * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2018 * @license Apache-2.0 */var u=function(e){function t(){var e,r,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=arguments.length,f=new Array(u),c=0;c=0&&n<=u.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(a=n,!1!==o&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[f]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(f)+"="+n+";"}catch(e){}}(n),i.call(u,n,e),typeof console===t&&n=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function a(e,t){return i(e>>t&63|128)}function u(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(s(e),t=i(e>>12&15|224),t+=a(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=a(e,12),t+=a(e,6)),t+=i(63&e|128)}function f(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|f()<<6|f())>=2048)return s(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(a)}}(t)},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=r(355).Buffer}catch(e){}function a(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],c=[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],h=[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 l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,h=67108863&u,l=Math.min(f,t.length-1),p=Math.max(0,f-e.length+1);p<=l;p++){var d=f-p|0;c+=(s=(i=0|e.words[d])*(o=0|t.words[p])+h)/67108864|0,h=67108863&s}r.words[f]=0|h,u=0|c}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=c[e],p=h[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var _=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?_+r:f[l-_.length]+_+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,f=new e(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,p=0|s[1],d=8191&p,_=p>>>13,y=0|s[2],b=8191&y,g=y>>>13,m=0|s[3],v=8191&m,w=m>>>13,k=0|s[4],E=8191&k,x=k>>>13,S=0|s[5],A=8191&S,B=S>>>13,D=0|s[6],M=8191&D,P=D>>>13,I=0|s[7],U=8191&I,R=I>>>13,T=0|s[8],C=8191&T,F=T>>>13,O=0|s[9],z=8191&O,L=O>>>13,N=0|a[0],j=8191&N,K=N>>>13,q=0|a[1],H=8191&q,G=q>>>13,Z=0|a[2],V=8191&Z,Y=Z>>>13,W=0|a[3],X=8191&W,J=W>>>13,$=0|a[4],Q=8191&$,ee=$>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,fe=ae>>>13,ce=0|a[8],he=8191&ce,le=ce>>>13,pe=0|a[9],de=8191&pe,_e=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(f+(n=Math.imul(h,j))|0)+((8191&(i=(i=Math.imul(h,K))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,K))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,K))+Math.imul(_,j)|0,o=Math.imul(_,K);var be=(f+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,j),i=(i=Math.imul(b,K))+Math.imul(g,j)|0,o=Math.imul(g,K),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,G)|0;var ge=(f+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,K))+Math.imul(w,j)|0,o=Math.imul(w,K),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Y)|0;var me=(f+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,K))+Math.imul(x,j)|0,o=Math.imul(x,K),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,J)|0;var ve=(f+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(A,j),i=(i=Math.imul(A,K))+Math.imul(B,j)|0,o=Math.imul(B,K),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(b,X)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0;var we=(f+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,K))+Math.imul(P,j)|0,o=Math.imul(P,K),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(B,H)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,Y)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0;var ke=(f+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,j),i=(i=Math.imul(U,K))+Math.imul(R,j)|0,o=Math.imul(R,K),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(d,oe)|0,i=(i=i+Math.imul(d,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0;var Ee=(f+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(l,ue)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(C,j),i=(i=Math.imul(C,K))+Math.imul(F,j)|0,o=Math.imul(F,K),n=n+Math.imul(U,H)|0,i=(i=i+Math.imul(U,G)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0,n=n+Math.imul(d,ue)|0,i=(i=i+Math.imul(d,fe)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,fe)|0;var xe=(f+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(z,j),i=(i=Math.imul(z,K))+Math.imul(L,j)|0,o=Math.imul(L,K),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(F,H)|0,o=o+Math.imul(F,G)|0,n=n+Math.imul(U,V)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,n=n+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,fe)|0,n=n+Math.imul(d,he)|0,i=(i=i+Math.imul(d,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var Se=(f+(n=n+Math.imul(h,de)|0)|0)+((8191&(i=(i=i+Math.imul(h,_e)|0)+Math.imul(l,de)|0))<<13)|0;f=((o=o+Math.imul(l,_e)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(z,H),i=(i=Math.imul(z,G))+Math.imul(L,H)|0,o=Math.imul(L,G),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(F,V)|0,o=o+Math.imul(F,Y)|0,n=n+Math.imul(U,X)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,fe)|0,n=n+Math.imul(b,he)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(g,he)|0,o=o+Math.imul(g,le)|0;var Ae=(f+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,_e)|0)+Math.imul(_,de)|0))<<13)|0;f=((o=o+Math.imul(_,_e)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(z,V),i=(i=Math.imul(z,Y))+Math.imul(L,V)|0,o=Math.imul(L,Y),n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(F,X)|0,o=o+Math.imul(F,J)|0,n=n+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(v,he)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(w,he)|0,o=o+Math.imul(w,le)|0;var Be=(f+(n=n+Math.imul(b,de)|0)|0)+((8191&(i=(i=i+Math.imul(b,_e)|0)+Math.imul(g,de)|0))<<13)|0;f=((o=o+Math.imul(g,_e)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(z,X),i=(i=Math.imul(z,J))+Math.imul(L,X)|0,o=Math.imul(L,J),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,ee)|0,n=n+Math.imul(U,re)|0,i=(i=i+Math.imul(U,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(E,he)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var De=(f+(n=n+Math.imul(v,de)|0)|0)+((8191&(i=(i=i+Math.imul(v,_e)|0)+Math.imul(w,de)|0))<<13)|0;f=((o=o+Math.imul(w,_e)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(z,Q),i=(i=Math.imul(z,ee))+Math.imul(L,Q)|0,o=Math.imul(L,ee),n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(F,re)|0,o=o+Math.imul(F,ne)|0,n=n+Math.imul(U,oe)|0,i=(i=i+Math.imul(U,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,fe)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,le)|0;var Me=(f+(n=n+Math.imul(E,de)|0)|0)+((8191&(i=(i=i+Math.imul(E,_e)|0)+Math.imul(x,de)|0))<<13)|0;f=((o=o+Math.imul(x,_e)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(z,re),i=(i=Math.imul(z,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,se)|0)+Math.imul(F,oe)|0,o=o+Math.imul(F,se)|0,n=n+Math.imul(U,ue)|0,i=(i=i+Math.imul(U,fe)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,fe)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(P,he)|0,o=o+Math.imul(P,le)|0;var Pe=(f+(n=n+Math.imul(A,de)|0)|0)+((8191&(i=(i=i+Math.imul(A,_e)|0)+Math.imul(B,de)|0))<<13)|0;f=((o=o+Math.imul(B,_e)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,oe),i=(i=Math.imul(z,se))+Math.imul(L,oe)|0,o=Math.imul(L,se),n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(F,ue)|0,o=o+Math.imul(F,fe)|0,n=n+Math.imul(U,he)|0,i=(i=i+Math.imul(U,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var Ie=(f+(n=n+Math.imul(M,de)|0)|0)+((8191&(i=(i=i+Math.imul(M,_e)|0)+Math.imul(P,de)|0))<<13)|0;f=((o=o+Math.imul(P,_e)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(z,ue),i=(i=Math.imul(z,fe))+Math.imul(L,ue)|0,o=Math.imul(L,fe),n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(F,he)|0,o=o+Math.imul(F,le)|0;var Ue=(f+(n=n+Math.imul(U,de)|0)|0)+((8191&(i=(i=i+Math.imul(U,_e)|0)+Math.imul(R,de)|0))<<13)|0;f=((o=o+Math.imul(R,_e)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(z,he),i=(i=Math.imul(z,le))+Math.imul(L,he)|0,o=Math.imul(L,le);var Re=(f+(n=n+Math.imul(C,de)|0)|0)+((8191&(i=(i=i+Math.imul(C,_e)|0)+Math.imul(F,de)|0))<<13)|0;f=((o=o+Math.imul(F,_e)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Te=(f+(n=Math.imul(z,de))|0)+((8191&(i=(i=Math.imul(z,_e))+Math.imul(L,de)|0))<<13)|0;return f=((o=Math.imul(L,_e))+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ye,u[1]=be,u[2]=ge,u[3]=me,u[4]=ve,u[5]=we,u[6]=ke,u[7]=Ee,u[8]=xe,u[9]=Se,u[10]=Ae,u[11]=Be,u[12]=De,u[13]=Me,u[14]=Pe,u[15]=Ie,u[16]=Ue,u[17]=Re,u[18]=Te,0!==f&&(u[19]=f,r.length++),r};function d(e,t,r){return(new _).mulp(e,t,r)}function _(e,t){this.x=e,this.y=t}Math.imul||(p=l),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):d(this,e,t)},_.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},_.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var l=0,p=1;0==(t.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,_=1;0==(r.words[0]&_)&&d<26;++d,_<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,c=1;0==(t.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(g,b),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new m;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return y[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),l=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),d=s;0!==p.cmp(a);){for(var _=p,y=0;0!==_.cmp(a);y++)_=_.redSqr();n(y=0;n--){for(var f=t.words[n],c=u-1;c>=0;c--){var h=f>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,k),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(74)(e))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r.d(t,"b",function(){return i}),r.d(t,"a",function(){return o});var n=r(0); /** * Binary functions. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2018 * @license Apache-2.0 */function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(!e)return"";t=n.a.charRep(t);for(var i="",o=0;o1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,i=n.a.regexRep(t);e=e.replace(i,"");for(var o=[],s=0;s1&&void 0!==arguments[1]?arguments[1]:"Auto";t=n.a.charRep(t);var r=[],i=e.split(t);""===i[i.length-1]&&(i=i.slice(0,i.length-1));for(var o=0;o1)for(var r=1;r=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var u=0,f=t;return u+=(f=f+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,u,f){var c=0,h=t;return c+=(h=h+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,u,f){return t+n+o+a+f>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";var n=r(45),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var o=r(39);o.inherits=r(6);var s=r(93),a=r(66);o.inherits(h,s);for(var u=i(a.prototype),f=0;f65536)throw new Error("requested too many random bytes");var s=new t.Uint8Array(e);e>0&&o.getRandomValues(s);var a=i.from(s.buffer);if("function"==typeof r)return n.nextTick(function(){r(null,a)});return a}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(17),r(21))},function(e,t,r){var n=r(8).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h=[].slice;c=r(62),n=r(24).const,t.BaseError=e=function(e,t){return"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e||"Error"},c.inherits(e,Error),e.prototype.name="BaseError",f=function(e){return e[0].toUpperCase()+e.slice(1).toLowerCase()},i=function(e){var t;return function(){var r,n,i,o;for(o=[],r=0,n=(i=e.split(/_/)).length;r1?n-1:0),s=1;s=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o0?n-4:n,h=0;h>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===s&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,a[u++]=255&t);1===s&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t);return a},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,h=r?i-1:0,l=r?-1:1,p=e[t+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,f-=8);e[r+p-d]|=128*_}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},,function(e,t,r){(function(e,n){var i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function f(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=c(e,i,n)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(_(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(k(r))return h(r)}var f,v="",x=!1,S=["{","}"];(p(r)&&(x=!0,S=["[","]"]),E(r))&&(v=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(v=" "+RegExp.prototype.toString.call(r)),w(r)&&(v=" "+Date.prototype.toUTCString.call(r)),k(r)&&(v=" "+h(r)),0!==s.length||x&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),f=x?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(f,v,S)):S[0]+v+S[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),B(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=_(r)?c(e,u.value,null):c(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),g(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function _(e){return null===e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function g(e){return void 0===e}function m(e){return v(e)&&"[object RegExp]"===x(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===x(e)}function k(e){return v(e)&&("[object Error]"===x(e)||e instanceof Error)}function E(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(o)&&(o=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=_,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=m,t.isObject=v,t.isDate=w,t.isError=k,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(173);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":"),[e.getDate(),A[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6),t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(17),r(21))},,function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,s,a,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(o(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(f=r.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,o,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(a=s;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){(t=e.exports=r(93)).Stream=t,t.Readable=t,t.Writable=r(66),t.Duplex=r(27),t.Transform=r(96),t.PassThrough=r(168)},function(e,t,r){"use strict";(function(t){var n=r(45);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var o,s=n.nextTick;y.WritableState=_;var a=r(39);a.inherits=r(6);var u={deprecate:r(167)},f=r(94),c=r(8).Buffer,h=t.Uint8Array||function(){};var l,p=r(95);function d(){}function _(e,t){o=o||r(27),e=e||{};var a=t instanceof o;this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,f=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:a&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),k(e,t))}(e,r,i,t,o);else{var a=v(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||m(e,r),i?s(g,e,r,a,o):g(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function y(e){if(o=o||r(27),!(l.call(y,this)||this instanceof o))return new y(e);this._writableState=new _(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function b(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function g(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function m(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,b(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,h=r.callback;if(b(e,t,!1,t.objectMode?1:f.length,f,c,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),k(e,t)})}function k(e,t){var r=v(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}a.inherits(y,f),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===y&&(e&&e._writableState instanceof _)}})):l=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,c.isBuffer(i)||i instanceof h);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=d),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(a||function(e,t,r,i){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),n.nextTick(i,s),o=!1),o}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(17))},function(e,t,r){var n=r(8).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^c[d>>>16&255]^h[_>>>8&255]^l[255&y]^t[b++],s=f[d>>>24]^c[_>>>16&255]^h[y>>>8&255]^l[255&p]^t[b++],a=f[_>>>24]^c[y>>>16&255]^h[p>>>8&255]^l[255&d]^t[b++],u=f[y>>>24]^c[p>>>16&255]^h[d>>>8&255]^l[255&_]^t[b++],p=o,d=s,_=a,y=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[_>>>8&255]<<8|n[255&y])^t[b++],s=(n[d>>>24]<<24|n[_>>>16&255]<<16|n[y>>>8&255]<<8|n[255&p])^t[b++],a=(n[_>>>24]<<24|n[y>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^t[b++],u=(n[y>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&_])^t[b++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var f=a^a<<1^a<<2^a<<3^a<<4;f=f>>>8^255&f^99,r[s]=f,n[f]=s;var c=e[s],h=e[c],l=e[h],p=257*e[f]^16843008*f;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*l^65537*h^257*c^16843008*s,o[0][f]=p<<24|p>>>8,o[1][f]=p<<16|p>>>16,o[2][f]=p<<8|p>>>24,o[3][f]=p,0===s?s=a=1:(s=c^e[e[e[l^c]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function f(e){this._key=i(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-t]^s}for(var f=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},f.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},f.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=f},function(e,t,r){var n=r(8).Buffer,i=r(84);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),f=n.alloc(0);s>0||o>0;){var c=new i;c.update(f),c.update(e),t&&c.update(t),f=c.digest();var h=0;if(s>0){var l=a.length-s;h=Math.min(s,f.length),f.copy(a,l,0,h),s-=h}if(h0){var p=u.length-o,d=Math.min(o,f.length-h);f.copy(u,p,h,h+d),o-=d}}return f.fill(0),{key:a,iv:u}}},function(e,t,r){"use strict";var n=t;n.base=r(363),n.short=r(364),n.mont=r(365),n.edwards=r(366)},function(e,t,r){(function(t){var n=r(382),i=r(394),o=r(395),s=r(88),a=r(125);function u(e){var r;"object"!=typeof e||t.isBuffer(e)||(r=e.passphrase,e=e.key),"string"==typeof e&&(e=new t(e));var u,f,c=o(e,r),h=c.tag,l=c.data;switch(h){case"CERTIFICATE":f=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=n.PublicKey.decode(l,"der")),u=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=n.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"ENCRYPTED PRIVATE KEY":l=function(e,r){var n=e.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=i[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,h=parseInt(u.split("-")[1],10)/8,l=a.pbkdf2Sync(r,n,o,h),p=s.createDecipheriv(u,l,f),d=[];return d.push(p.update(c)),d.push(p.final()),t.concat(d)}(l=n.EncryptedPrivateKey.decode(l,"der"),r);case"PRIVATE KEY":switch(u=(f=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:n.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=n.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+h);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}e.exports=u,u.signature=n.signature}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a;for(i in s=r(724))o=s[i],t[i]=o;for(i in a=r(1405))o=a[i],t[i]=o;t.prng=r(726),t.Buffer=e,t.WordArray=r(72).WordArray,t.util=r(110),t.ciphers={AES:r(591).AES,TwoFish:r(592).TwoFish,Salsa20:r(454).Salsa20},t.hash={SHA1:r(1406).SHA1,SHA224:r(1407).SHA224,SHA256:r(593).SHA256,SHA384:r(1408).SHA384,SHA512:r(403).SHA512,SHA3:r(594).SHA3,MD5:r(1409).MD5,RIPEMD160:r(1410).RIPEMD160},t.modes={CTR:r(503)},t.scrypt=r(725).scrypt,t.pbkdf2=r(595).pbkdf2,t.hmac=n=r(422),t.HMAC_SHA256=n.HMAC_SHA256,t.HMAC=n.HMAC}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a;a=r(110),i=function(e){var t,r,n,i;for(r=new Uint8Array(e.length),t=n=0,i=e.length;0<=i?ni;t=0<=i?++n:--n)r[t]=e.readUInt8(t);return r},s=function(t){var r,n,i,o;for(n=new e(t.length),r=i=0,o=t.length;0<=o?io;r=0<=o?++i:--i)n.writeUInt8(t[r],r);return n},o=function(e){return e>>>24&255|(e>>>16&255)<<8|(e>>>8&255)<<16|(255&e)<<24},t.WordArray=n=function(){function t(e,t){this.words=e||[],this.sigBytes=null!=t?t:4*this.words.length}return t.prototype.concat=function(e){var t,r,n,i,o;if(i=e.words,n=e.sigBytes,this.clamp(),this.sigBytes%4)for(t=o=0;0<=n?on;t=0<=n?++o:--o)r=i[t>>>2]>>>24-t%4*8&255,this.words[this.sigBytes+t>>>2]|=r<<24-(this.sigBytes+t)%4*8;else this.words=this.words.concat(i);return this.sigBytes+=n,this},t.prototype.clamp=function(){return this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this},t.prototype.clone=function(){return new t(this.words.slice(0),this.sigBytes)},t.prototype.to_buffer=function(){var t,r,n,i,o,s,u;for(r=new e(this.sigBytes),n=0,o=0,s=(u=this.words).length;o=4&&(i=a.fixup_uint32(i),r.writeUInt32BE(i,n),n+=4);for(;n>>2]>>>24-n%4*8&255,r.writeUInt8(t,n),n++;return r},t.prototype.endian_reverse=function(){var e,t,r,n,i;for(e=r=0,n=(i=this.words).length;r0?ei;r=e+=n)o.push(new t(this.words.slice(r,r+n)));return o}.call(this)},t.prototype.to_utf8=function(){return this.to_buffer().toString("utf8")},t.prototype.to_hex=function(){return this.to_buffer().toString("hex")},t.prototype.to_ui8a=function(){return i(this.to_buffer())},t.alloc=function(r){return e.isBuffer(r)?t.from_buffer(r):"object"==typeof r&&r instanceof t?r:"string"==typeof r?t.from_hex(r):null},t.from_buffer=function(e){var r,n,i;for(i=[],n=0;e.length-n>=4;)i.push(e.readUInt32BE(n)),n+=4;if(n=4;)i.push(e.readUInt32LE(n)),n+=4;if(ni;n=0<=i?++u:--u)s=this.words[r+n]^e.words[o+n],this.words[r+n]=a.fixup_uint32(s);return this},t.prototype.truncate=function(e){var r;if(!(e<=this.sigBytes))throw new Error("Cannot truncate: "+e+" > "+this.sigBytes);return r=Math.ceil(e/4),new t(this.words.slice(0,r),e)},t.prototype.unshift=function(e){var r;return this.words.length>=e?(r=this.words.splice(0,e),this.sigBytes-=4*e,new t(r)):null},t.prototype.is_scrubbed=function(){var e,t,r;for(e=0,t=(r=this.words).length;e>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},,,,function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h,l,p,d;f=r(24),e=r(402).BigInteger,p=r(71),u=p.WordArray,h=p.prng,c=h.native_rng,n=r(727).Lock,o=function(){function t(){}return t.prototype.nextBytes=function(e){var t,r,n,i,o,s;for(s=[],n=i=0,o=(t=c(e.length)).length;i0&&r.compareTo(t)<0)return r},t}(),l=null,i=function(){return null==l&&(l=new o),l},a=function(){function t(){this.buf=null,this.lock=new n}return t.prototype.random_word=function(e){var t,r,n;r=f.findDeferral(arguments),function(e){n=new f.Deferrals(e,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word"}),h.generate(4,n.defer({assign_fn:function(){return t=arguments[0]},lineno:49})),n._fulfill()}(function(){return e(t.to_buffer().readUInt32BE(0))})},t.prototype.random_double=function(e){var t,r,n;r=f.findDeferral(arguments),function(e){n=new f.Deferrals(e,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_double"}),h.generate(8,n.defer({assign_fn:function(){return t=arguments[0]},lineno:55})),n._fulfill()}(function(){return e(t.to_buffer().readDoubleBE(0))})},t.prototype.rand_0_1=function(e){var t,r,n,i,o,s;i=f.findDeferral(arguments),(s=this,function(e){o=new f.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.rand_0_1"}),s.random_word(o.defer({assign_fn:function(){return r=arguments[0]},lineno:61})),o._fulfill()})(function(s){return function(){o=new f.Deferrals(function(){return t=r*Math.pow(2,-32)+n*Math.pow(2,-64),e(t)},{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.rand_0_1"}),s.random_word(o.defer({assign_fn:function(){return n=arguments[0]},lineno:62})),o._fulfill()}}(this))},t.prototype.random_zn=function(t,r){var n,i,o,s,a;o=f.findDeferral(arguments),n=!0,i=!1,(a=this,function(r){var u;(u=function(r){var c;if(c=function(){return f.trampoline(function(){return u(r)})},!n)return r();s=new f.Deferrals(function(){return c(n=i.compareTo(e.ONE)<=0||i.compareTo(t)>=0)},{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_zn"}),a.random_nbit(t.bitLength(),s.defer({assign_fn:function(){return i=arguments[0]},lineno:72})),s._fulfill()})(r)})(function(){return r(i)})},t.prototype.nextBytes=function(e){var t,r,n,i;for(i=[],t=r=0,n=e.length;0<=n?rn;t=0<=n?++r:--r)i.push(e[t]=this.buf[t]);return i},t.prototype.random_word_array=function(e,t){var r,n,i,o,s,a,c;s=f.findDeferral(arguments),o=new u,(c=this,function(e){a=new f.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word_array"}),c.lock.acquire(a.defer({lineno:88})),a._fulfill()})(function(u){return function(){var c;(c=function(t){var u,l;if(u=t,l=function(){return f.trampoline(function(){return c(t)})},!((n=e-o.sigBytes)>0))return u();i=Math.min(512,n),a=new f.Deferrals(function(){return l(o=o.concat(r))},{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word_array"}),h.generate(i,a.defer({assign_fn:function(){return r=arguments[0]},lineno:91})),a._fulfill()})(function(){return u.lock.release(),t(o)})}}(this))},t.prototype.random_bytes=function(e,t){var r,n,i,o;n=f.findDeferral(arguments),(o=this,function(t){i=new f.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_bytes"}),o.random_word_array(e,i.defer({assign_fn:function(){return r=arguments[0]},lineno:99})),i._fulfill()})(function(){return t(r.to_buffer())})},t.prototype.random_nbit=function(t,r){var n,i,o,s,a,u;s=f.findDeferral(arguments),n=1+(t>>3),(u=this,function(e){a=new f.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_nbit"}),u.random_bytes(n,a.defer({assign_fn:function(){return o=arguments[0]},lineno:106})),a._fulfill()})(function(n){return function(){a=new f.Deferrals(function(){return n.buf=o,i=e.random_nbit(t,n),n.lock.release(),r(i)},{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_nbit"}),n.lock.acquire(a.defer({lineno:107})),a._fulfill()}}(this))},t}(),d=null,s=function(){return null==d&&(d=new a),d},t.MRF=i,t.SRF=s}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h,l,p,d;for(a in e=r(25).openpgp,h=r(71),n=h.WordArray,i=h.hash,s=function(e,t,r,n){return e.type=n,e.algname=r,e.output_length=t.output_size,e.klass=t,e},u=function(e,t,r){return null!=e?s(function(t){return(new e).bufhash(t)},e,t,r):null},f=function(e,t,r){return function(){var i,o;return i=new e,(o=function(e){return i.clone().finalize(null!=e?n.from_buffer(e):null).to_buffer()}).update=function(e){return null!=e&&i.update(n.from_buffer(e)),this},s(o,e,t,r)}},p={},t.streamers=c={},d=e.hash_algorithms)l=d[a],p[l]=a,t[a]=u(i[a],a,l),c[a]=f(i[a],a,l);t.alloc=o=function(e){var t,r,n;return n=null,null!=(r=p[e])&&(t=i[r]),null!=t&&(n=u(t,r,e)),n},t.alloc_or_throw=function(e){var t;if(!(t=o(e)))throw new Error("unknown hash type: "+e);return t}}).call(this)},,,,function(e,t,r){"use strict";var n=r(6),i=r(119),o=r(8).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function f(e,t,r,n,i,o,s){return u(e+(t&r|~t&n)+i+o|0,s)+t|0}function c(e,t,r,n,i,o,s){return u(e+(t&n|r&~n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return u(e+(t^r^n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return u(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=f(r,n,i,o,e[0],3614090360,7),o=f(o,r,n,i,e[1],3905402710,12),i=f(i,o,r,n,e[2],606105819,17),n=f(n,i,o,r,e[3],3250441966,22),r=f(r,n,i,o,e[4],4118548399,7),o=f(o,r,n,i,e[5],1200080426,12),i=f(i,o,r,n,e[6],2821735955,17),n=f(n,i,o,r,e[7],4249261313,22),r=f(r,n,i,o,e[8],1770035416,7),o=f(o,r,n,i,e[9],2336552879,12),i=f(i,o,r,n,e[10],4294925233,17),n=f(n,i,o,r,e[11],2304563134,22),r=f(r,n,i,o,e[12],1804603682,7),o=f(o,r,n,i,e[13],4254626195,12),i=f(i,o,r,n,e[14],2792965006,17),r=c(r,n=f(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=h(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=h(o,r,n,i,e[8],2272392833,11),i=h(i,o,r,n,e[11],1839030562,16),n=h(n,i,o,r,e[14],4259657740,23),r=h(r,n,i,o,e[1],2763975236,4),o=h(o,r,n,i,e[4],1272893353,11),i=h(i,o,r,n,e[7],4139469664,16),n=h(n,i,o,r,e[10],3200236656,23),r=h(r,n,i,o,e[13],681279174,4),o=h(o,r,n,i,e[0],3936430074,11),i=h(i,o,r,n,e[3],3572445317,16),n=h(n,i,o,r,e[6],76029189,23),r=h(r,n,i,o,e[9],3654602809,4),o=h(o,r,n,i,e[12],3873151461,11),i=h(i,o,r,n,e[15],530742520,16),r=l(r,n=h(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=l(o,r,n,i,e[7],1126891415,10),i=l(i,o,r,n,e[14],2878612391,15),n=l(n,i,o,r,e[5],4237533241,21),r=l(r,n,i,o,e[12],1700485571,6),o=l(o,r,n,i,e[3],2399980690,10),i=l(i,o,r,n,e[10],4293915773,15),n=l(n,i,o,r,e[1],2240044497,21),r=l(r,n,i,o,e[8],1873313359,6),o=l(o,r,n,i,e[15],4264355552,10),i=l(i,o,r,n,e[6],2734768916,15),n=l(n,i,o,r,e[13],1309151649,21),r=l(r,n,i,o,e[4],4149444226,6),o=l(o,r,n,i,e[11],3174756917,10),i=l(i,o,r,n,e[2],718787259,15),n=l(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";var n=r(5).Buffer,i=r(6),o=r(119),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(e,t){return e<>>32-t}function _(e,t,r,n,i,o,s,a){return d(e+(t^r^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return d(e+(t&r|~t&n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return d(e+((t|~r)^n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return d(e+(t&n|r&~n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return d(e+(t^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,v=0|this._a,w=0|this._b,k=0|this._c,E=0|this._d,x=0|this._e,S=0;S<80;S+=1){var A,B;S<16?(A=_(r,n,i,o,p,e[a[S]],h[0],f[S]),B=m(v,w,k,E,x,e[u[S]],l[0],c[S])):S<32?(A=y(r,n,i,o,p,e[a[S]],h[1],f[S]),B=g(v,w,k,E,x,e[u[S]],l[1],c[S])):S<48?(A=b(r,n,i,o,p,e[a[S]],h[2],f[S]),B=b(v,w,k,E,x,e[u[S]],l[2],c[S])):S<64?(A=g(r,n,i,o,p,e[a[S]],h[3],f[S]),B=y(v,w,k,E,x,e[u[S]],l[3],c[S])):(A=m(r,n,i,o,p,e[a[S]],h[4],f[S]),B=_(v,w,k,E,x,e[u[S]],l[4],c[S])),r=p,p=o,o=d(i,10),i=n,n=A,v=x,x=E,E=d(k,10),k=w,w=B}var D=this._b+i+E|0;this._b=this._c+o+x|0,this._c=this._d+p+v|0,this._d=this._e+r+w|0,this._e=this._a+n+k|0,this._a=D},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=p},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(330),t.sha1=r(331),t.sha224=r(332),t.sha256=r(120),t.sha384=r(333),t.sha512=r(121)},function(e,t,r){"use strict";t.utils=r(339),t.Cipher=r(340),t.DES=r(341),t.CBC=r(342),t.EDE=r(343)},function(e,t,r){var n=r(344),i=r(352),o=r(131);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,r){var n={ECB:r(345),CBC:r(346),CFB:r(347),CFB8:r(348),CFB1:r(349),OFB:r(350),CTR:r(129),GCM:r(129)},i=r(131);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},function(e,t,r){(function(t){var n=r(16),i=r(41);function o(e,r){var i=function(e){var t=s(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),o=r.modulus.byteLength(),a=(n.mont(r.modulus),new n(e).mul(i.blinder).umod(r.modulus)),u=a.toRed(n.mont(r.prime1)),f=a.toRed(n.mont(r.prime2)),c=r.coefficient,h=r.prime1,l=r.prime2,p=u.redPow(r.exponent1),d=f.redPow(r.exponent2);p=p.fromRed(),d=d.fromRed();var _=p.isub(d).imul(c).umod(h);return _.imul(l),d.iadd(_),new t(d.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function s(e){for(var t=e.modulus.byteLength(),r=new n(i(t));r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}e.exports=o,o.getr=s}).call(this,r(5).Buffer)},function(e,t,r){var n=t;n.utils=r(26),n.common=r(51),n.sha=r(368),n.ripemd=r(372),n.hmac=r(373),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},,function(e,t,r){"use strict";(function(t,n){var i=r(45);e.exports=m;var o,s=r(163);m.ReadableState=g;r(64).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=r(94),f=r(8).Buffer,c=t.Uint8Array||function(){};var h=r(39);h.inherits=r(6);var l=r(164),p=void 0;p=l&&l.debuglog?l.debuglog("stream"):function(){};var d,_=r(165),y=r(95);h.inherits(m,u);var b=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var n=t instanceof(o=o||r(27));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new _,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(75).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function m(e){if(o=o||r(27),!(this instanceof m))return new m(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function v(e,t,r,n,i){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,x(e)}(e,s)):(i||(o=function(e,t){var r;n=t,f.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):A(e,s)):w(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){p("emit readable"),e.emit("readable"),P(e)}function A(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(B,e,t))}function B(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=f.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function U(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function T(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):x(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:m;function f(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",b),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",_),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){p("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",f);var h=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",h);var l=!1;var d=!1;function _(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==T(o.pipes,e))&&!l&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===a(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",g),m()}function g(){p("onfinish"),e.removeListener("close",b),m()}function m(){p("unpipe"),r.unpipe(e)}return r.on("data",_),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",b),e.once("finish",g),e.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o * @license MIT */ function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;f--)if(c[f]!==h[f])return!1;for(f=c.length-1;f>=0;f--)if(u=c[f],!g(e[u],t[u],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&y(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&i&&!r;if((!e&&o.isError(i)&&s&&v(i,r)||a)&&y(i,r,"Got unwanted exception"+n),e&&i&&r&&!v(i,r)||!e&&i)throw i}h.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(_((t=this).actual),128)+" "+t.operator+" "+d(_(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){var a=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=b,h.equal=function(e,t,r){e!=t&&y(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&y(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){g(e,t,!1)||y(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){g(e,t,!0)||y(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){g(e,t,!1)&&y(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){g(t,r,!0)&&y(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&y(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&y(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){w(!0,e,t,r)},h.doesNotThrow=function(e,t,r){w(!1,e,t,r)},h.ifError=function(e){if(e)throw e};var k=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(17))},function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;os||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e},t.scrub_buffer=function(e){var t,r;for(r=e.length>>2,t=0;to;r=0<=o?++i:--i)n.writeUInt8(t.readUInt8(r),r);return n},t.scrub_vec=function(e){var t,r,n;for(t=r=0,n=e.length;0<=n?rn;t=0<=n?++r:--r)e[t]=0;return!1},t.default_delay=i=function(e,t,r){var i,s;i=o.findDeferral(arguments),function(e){null!=n?function(e){s=new o.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),n(s.defer({lineno:45})),s._fulfill()}(e):function(e){s=new o.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),setTimeout(s.defer({lineno:47}),1),s._fulfill()}(e)}(function(){return r()})},t.buffer_cmp_ule=function(e,t){var r,n,i,o,s,a;for(i=o=0,r=e.length,n=t.length;in-o)return 1;if(n-o>r-i)return-1;for(;i0))return e();p=Math.min(l,h),b(c,c+p),n(c),v=new o.Deferrals(function(){return r(c+=p)},{parent:m,filename:"/Users/max/src/keybase/triplesec/src/util.iced",funcname:"bulk"}),u(c,y,v.defer({lineno:105})),v._fulfill()})(e)}(function(){return n(y),_=f(),s(_)})}}).call(this)}).call(this,r(5).Buffer,r(449).setImmediate)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d;l=(d=r(402)).nbv,f=d.nbi,n=d.BigInteger,c=d.nbits,r(28).buffer_to_ui8a,h=function(e,t){return null==t&&(t=10),f().fromString(e,t)},s=function(e){return e.toByteArray().length},p=function(t){var r,n,i;return i=8*((r=t.toByteArray()).length-1)+c(r[0]),(n=new e(2)).writeUInt16BE(i,0),e.concat([n,new e(r)])},a=function(t){var r,n,i,o,s;return r=i=null,t.length<2?r=new Error("need at least 2 bytes; got "+t.length):(n=new e(t.slice(0,2)),t=t.slice(2),o=n.readUInt16BE(0),s=Math.ceil(o/8),t.lengthi;0<=i?++e:--e)t.push(0);return t}()),e.concat([s,new e(n)])},o=function(e,t){var r,n,i,o,s,a,u;for(o=t>>3,i=(1<<(s=t%8))-1,n=a=u=(e=e.slice(0,e.length-o)).length-1;u<=0?a<=0:a>=0;n=u<=0?++a:--a)r=e.readUInt8(n)>>s,n>0&&(r|=(e.readUInt8(n-1)&i)<<8-s),e.writeUInt8(r,n);return e},i=function(e,t){var r,n,i,o;return 8*e.length<=t?f().fromBuffer(e):(n=(t>>3)+((i=t%8)?1:0),r=e.slice(0,n),o=f().fromBuffer(r),i>0&&(o=o.shiftRight(8-i)),o)},t.toMPI=p,t.nbs=h,t.mpi_from_buffer=a,t.mpi_to_padded_octets=u,t.buffer_shift_right=o,t.bn_from_left_n_bits=i,n.prototype.to_mpi_buffer=function(){return p(this)},n.prototype.mpi_byte_length=function(){return s(this)},n.prototype.to_padded_octets=function(e){return u(this,e)},t.BigInteger=n,t.nbi=f,t.nbv=l,t.nbits=c}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(41),t.createHash=t.Hash=r(49),t.createHmac=t.Hmac=r(122);var n=r(335),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(125);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(337);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=r(354);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var f=r(359);t.createSign=f.createSign,t.Sign=f.Sign,t.createVerify=f.createVerify,t.Verify=f.Verify,t.createECDH=r(397);var c=r(398);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var h=r(401);t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},,,,,,,function(e,t,r){"use strict";var n=r(8).Buffer,i=r(48).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(6)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){var n=r(6),i=r(42),o=r(8).Buffer,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],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,_=0|this._g,y=0|this._h,b=0;b<16;++b)r[b]=e.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((t=r[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[b-7]+p(r[b-15])+r[b-16];for(var g=0;g<64;++g){var m=y+l(u)+f(u,d,_)+s[g]+r[g]|0,v=h(n)+c(n,i,o)|0;y=_,_=d,d=u,u=a+m|0,a=o,o=i,i=n,n=m+v|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=_+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var n=r(6),i=r(42),o=r(8).Buffer,s=[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 u(){this.init(),this._w=a,i.call(this,128,112)}function f(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0>>0?1:0}n(u,i),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,g=0|this._gh,m=0|this._hh,v=0|this._al,w=0|this._bl,k=0|this._cl,E=0|this._dl,x=0|this._el,S=0|this._fl,A=0|this._gl,B=0|this._hl,D=0;D<32;D+=2)t[D]=e.readInt32BE(4*D),t[D+1]=e.readInt32BE(4*D+4);for(;D<160;D+=2){var M=t[D-30],P=t[D-30+1],I=p(M,P),U=d(P,M),R=_(M=t[D-4],P=t[D-4+1]),T=y(P,M),C=t[D-14],F=t[D-14+1],O=t[D-32],z=t[D-32+1],L=U+F|0,N=I+C+b(L,U)|0;N=(N=N+R+b(L=L+T|0,T)|0)+O+b(L=L+z|0,z)|0,t[D]=N,t[D+1]=L}for(var j=0;j<160;j+=2){N=t[j],L=t[j+1];var K=c(r,n,i),q=c(v,w,k),H=h(r,v),G=h(v,r),Z=l(a,x),V=l(x,a),Y=s[j],W=s[j+1],X=f(a,u,g),J=f(x,S,A),$=B+V|0,Q=m+Z+b($,B)|0;Q=(Q=(Q=Q+X+b($=$+J|0,J)|0)+Y+b($=$+W|0,W)|0)+N+b($=$+L|0,L)|0;var ee=G+q|0,te=H+K+b(ee,G)|0;m=g,B=A,g=u,A=S,u=a,S=x,a=o+Q+b(x=E+$|0,E)|0,o=i,E=k,i=n,k=w,n=r,w=v,r=Q+te+b(v=$+ee|0,$)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+x|0,this._fl=this._fl+S|0,this._gl=this._gl+A|0,this._hl=this._hl+B|0,this._ah=this._ah+r+b(this._al,v)|0,this._bh=this._bh+n+b(this._bl,w)|0,this._ch=this._ch+i+b(this._cl,k)|0,this._dh=this._dh+o+b(this._dl,E)|0,this._eh=this._eh+a+b(this._el,x)|0,this._fh=this._fh+u+b(this._fl,S)|0,this._gh=this._gh+g+b(this._gl,A)|0,this._hh=this._hh+m+b(this._hl,B)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+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),e},e.exports=u},function(e,t,r){"use strict";var n=r(6),i=r(334),o=r(32),s=r(8).Buffer,a=r(123),u=r(85),f=r(86),c=s.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:f(e)).update(t).digest():t.lengthr||o!=o)throw new TypeError("Bad key length")}}).call(this,r(5).Buffer)},function(e,t,r){var n;n="utf-8",e.exports=n},function(e,t,r){var n=r(123),i=r(85),o=r(86),s=r(126),a=r(127),u=r(8).Buffer,f=u.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),a="sha512"===e||"sha384"===e?128:64;t.length>a?t=s(t):t.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(f))for(;r.mod(c).cmp(h);)r.iadd(p)}else for(;r.mod(o).cmp(l);)r.iadd(p);if(y(d=r.shrn(1))&&y(r)&&b(d)&&b(r)&&s.test(d)&&s.test(r))return r}}},function(e,t,r){var n=r(16),i=r(136);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),u=0;!a.testn(u);u++);for(var f=e.shrn(u),c=a.toRed(o);t>0;t--){var h=this._randrange(new n(2),a);r&&r(h);var l=h.toRed(o).redPow(f);if(0!==l.cmp(s)&&0!==l.cmp(c)){for(var p=1;p0;t--){var c=this._randrange(new n(2),s),h=e.gcd(c);if(0!==h.cmpn(1))return h;var l=c.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(f)){for(var p=1;p>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=r(26).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(26),i=r(51),o=r(138),s=r(23),a=n.sum32,u=n.sum32_4,f=n.sum32_5,c=o.ch32,h=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,_=o.g1_256,y=i.BlockHash,b=[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 g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(g,y),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function h(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,f=n.length;f>=256;f>>=8)u++;(o=new i(2+u))[0]=s,o[1]=128|u;f=1+u;for(var c=n.length;c>0;f--,c>>=8)o[f]=255&c;return this._createEncoderBuffer([o,n])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;s>>=7)o++}var a=new i(o),u=a.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s}return this._createEncoderBuffer(a)},f.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.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&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0?ca;u=c+=h)this._doProcessBlock(n,u);f=n.splice(0,a),t.sigBytes-=o}return new s(f,o)},e.prototype.copy_to=function(e){return e._data=this._data.clone(),e._nDataBytes=this._nDataBytes},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(),i=function(e){function t(){t.__super__.constructor.call(this)}return function(e,t){for(var r in t)u.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.prototype.reset=function(){return t.__super__.reset.call(this),this._doReset(),this},t.prototype.update=function(e){return this._append(e),this._process(),this},t.prototype.finalize=function(e){return e&&this._append(e),this._doFinalize()},t.prototype.bufhash=function(e){var t,r,n;return r=s.from_buffer(e),t=(n=this.finalize(r)).to_buffer(),r.scrub(),n.scrub(),t},t}(),t.BlockCipher=e=function(){function e(e){}return e.prototype.encryptBlock=function(e,t){},e}(),o=function(){function e(){}return e.prototype.encryptBlock=function(e,t){var r,n;return null==t&&(t=0),n=this.get_pad(),r=Math.min(e.words.length-t,this.bsiw),e.xor(n,{dst_offset:t,n_words:r}),n.scrub(),this.bsiw},e.prototype.encrypt=function(e){var t,r,n,i;for(t=r=0,n=e.words.length,i=this.bsiw;i>0?rn;t=r+=i)this.encryptBlock(e,t);return e},e.prototype.bulk_encrypt=function(e,t){var r,n,i,o,s,u;return n=e.input,i=e.progress_hook,s=e.what,o={update:(u=this,function(e,t){var r,i,o,s;for(s=[],r=i=e,o=u.bsiw;o>0?it;r=i+=o)s.push(u.encryptBlock(n,r));return s}),finalize:function(){return n},default_n:1024*this.bsiw},r={progress_hook:i,cb:t,what:s},a.bulk(n.sigBytes,o,r)},e}(),t.BlockCipher=e,t.Hasher=i,t.BufferedBlockAlgorithm=n,t.StreamCipher=o}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h;f=r(24),c=r(25),n=c.openpgp,i=c.kb,h=r(80),o=h.SHA256,h.SHA512,a=r(111),u=r(174).util.bufeq_secure,s=r(79).SRF,t.BaseKey=function(){function t(){}return t.alloc=function(e,t,r){var n,i,o,s,u,f,c;for(null==r&&(r={}),o=t.length,n=null,s=0,u=(f=e.ORDER).length;so)return e(n=new Error("Can't hide > "+o+" bits; got "+r));c=o-r+l,function(e){d=new f.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/basekeypair.iced",funcname:"BaseKeyPair.hide"}),s().random_nbit(c,d.defer({assign_fn:function(){return u=arguments[0]},lineno:127})),d._fulfill()}(function(){return e(h=u.multiply(a).add(i))})}(function(){return t(n,h)})},t.prototype.validity_check=function(e){return this.pub.validity_check(e)},t.prototype._dsa_verify_update_and_check_hash=function(t,r){var n,i,o,s,a,u,c,h,l,p;c=f.findDeferral(arguments),u=t.sig,n=t.data,s=t.hasher,o=t.hash,a=t.klass,i=null,e.isBuffer(u)&&(l=a.read_sig_from_buf(u),i=l[0],u=l[1]),o||(o=s(n)),(p=this,function(e){if(2!==u.length)return e(i=new Error("Need an [r,s] pair for a DSA-style signature"));!function(e){h=new f.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/basekeypair.iced",funcname:"BaseKeyPair._dsa_verify_update_and_check_hash"}),p.pub.verify(u,o,h.defer({assign_fn:function(){return i=arguments[0],arguments[1]},lineno:148})),h._fulfill()}(e)})(function(){return r(i)})},t}()}).call(this)}).call(this,r(5).Buffer)},,,,,function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t){},function(e,t,r){"use strict";var n=r(8).Buffer,i=r(166);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,i=a,t.copy(r,i),a+=s.data.length,s=s.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(17))},function(e,t,r){"use strict";e.exports=o;var n=r(96),i=r(39);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(6),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(66)},function(e,t,r){e.exports=r(27)},function(e,t,r){e.exports=r(65).Transform},function(e,t,r){e.exports=r(65).PassThrough},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,r){(function(){t.armor=r(1412),t.util=r(728),t.userid=r(1413)}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o;o=r(455),r(25).openpgp,i=r(507),n=function(){function t(){this._psc=new i.Collection}return t.prototype.frame_packet=function(t,r){var n;return n=[new e([192|t]),o.encode_length(r.length),r],e.concat(n)},t.prototype.set=function(e){var t,r,n;for(t in n=[],e)r=e[t],n.push(this[t]=r);return n},t.prototype.is_signature=function(){return!1},t.prototype.is_key_material=function(){return!1},t.prototype.is_duplicate_primary=function(){return!1},t.prototype.to_userid=function(){return null},t.prototype.to_user_attribute=function(){return null},t.prototype.to_literal=function(){return null},t.prototype.to_esk_packet=function(){return null},t.prototype.to_enc_data_packet=function(){return null},t.prototype.replay=function(){return this.frame_packet(this.tag,this.raw)},t.prototype.inflate=function(e){return e(null,null)},t.prototype.push_sig=function(e){return this._psc.push(e)},t.prototype.get_psc=function(){return this._psc},t.prototype.clear_psc=function(){return this._psc.clear()},t.prototype.get_data_signer=function(){return this.get_psc().get_data_signer()},t.prototype.get_data_signers=function(){return this.get_psc().get_data_signers()},t.prototype.get_signed_userids=function(){return[]},t.prototype.get_subkey_binding=function(){return null},t.prototype.is_self_signed=function(){return!1},t}(),t.Packet=n}).call(this)}).call(this,r(5).Buffer)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,i){var o=n,s=i+r;e^=-1;for(var a=i;a>>8^o[255&(e^t[a])];return-1^e}},function(e,t,r){(function(e){(function(){var r;r=function(){function t(t,r){if(this.buf=t,this.start=null!=r?r:0,!e.isBuffer(this.buf))throw new Error("need a Buffer!");this.i=this.start,this._end=null}return t.prototype.clamp=function(e){var t;return t=this._end,this._end=this.i+e,t},t.prototype.unclamp=function(e){return this.start=this.i,this._end=e},t.prototype.len=function(){return this.buf.length-this.start},t.prototype.rem=function(){return this.buf.length-this.i},t.prototype.offset=function(){return this.i-this.start},t.prototype.check=function(){if(this._end&&this.i>this._end||this.i>this.buf.length)throw new Error("read off the end of the packet @"+this.i+"/"+this.buf.length+"/"+this._end)},t.prototype.read_uint8=function(){var e;return e=this.buf.readUInt8(this.i++),this.check(),e},t.prototype.read_uint16=function(){var e;return e=this.buf.readUInt16BE(this.i),this.i+=2,this.check(),e},t.prototype.read_uint32=function(){var e;return e=this.buf.readUInt32BE(this.i),this.i+=4,this.check(),e},t.prototype.read_buffer_at_most=function(e){return this.read_buffer(Math.min(e,this.rem()))},t.prototype.read_buffer=function(e){var t;return t=this.buf.slice(this.i,this.i+e),this.i+=e,this.check(),t},t.prototype.end=function(){return this._end||this.buf.length},t.prototype.peek_rest_to_buffer=function(){return this.buf.slice(this.i,this.end())},t.prototype.consume_rest_to_buffer=function(){var e;return e=this.peek_rest_to_buffer(),this.i=this.end(),e},t.prototype.advance=function(e){return null==e&&(e=1),this.i+=e},t.prototype.peek_to_buffer=function(e){return this.buf.slice(this.i,this.i+e)},t.prototype.peek_uint8=function(){return this.buf.readUInt8(this.i)},t.prototype.peek_uint16=function(){return this.buf.readUInt16BE(this.i)},t.prototype.read_string=function(){return this.read_buffer(this.read_uint8())},t.prototype.read_v4_length=function(){var e,t;return e=!1,[(t=this.peek_uint8())<192?(this.advance(1),t):t<224?this.read_uint16()-49152+192:t<255?(this.advance(1),1<<(31&t)):(this.advance(1),e=!0,this.read_uint32()),e]},t}(),t.SlicerBuffer=r}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u={}.hasOwnProperty;a=r(28),s=a.katch,a.bufeq_fast,a.uint_to_buffer,e=r(25),n=r(598),o=r(174).armor,t.encode=function(t,r){var i;return i=e.openpgp.message_types,t=function(){switch(t){case i.public_key:return"PUBLIC KEY BLOCK";case i.private_key:return"PRIVATE KEY BLOCK";case i.signature:return"SIGNATURE";case i.generic:return"MESSAGE";default:throw new Error("Cannot encode tag type "+t)}}(),o.encode(n,t,r)},i=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)u.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,o.Parser),r.prototype.parse_type=function(){var t;return t=e.openpgp.message_types,this.ret.type=function(){switch(this.type){case"PUBLIC KEY BLOCK":return t.public_key;case"PRIVATE KEY BLOCK":return t.private_key;case"SIGNED MESSAGE":if(this.ret.clearsign)return t.clearsign;throw new Error("Signed message, but not clear-signed");case"SIGNATURE":return t.signature;case"MESSAGE":return t.generic;default:throw new Error("Unknown message type: "+this.type)}}.call(this),this.ret.fields.type=this.type},r}(),t.Message=o.Message,t.decode=function(e){return s(function(){return new i(e).parse()})},t.mdecode=function(e){return s(function(){return new i(e).mparse()})},t.decode_strict=function(e){return s(function(){return new i(e,{strict:!0}).parse()})}}).call(this)},,,,,,,,,,,,,,,,,,,function(e,t,r){var n=r(6),i=r(42),o=r(8).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var p=~~(l/20),d=0|((t=n)<<5|t>>>27)+c(p,i,o,a)+u+r[l]+s[p];u=a,a=o,o=f(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(6),i=r(42),o=r(8).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var p=0;p<80;++p){var d=~~(p/20),_=f(n)+h(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=c(i),i=n,n=_}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(6),i=r(120),o=r(42),s=r(8).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),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 e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){var n=r(6),i=r(121),o=r(42),s=r(8).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),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 e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+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),e},e.exports=u},function(e,t,r){"use strict";var n=r(6),i=r(8).Buffer,o=r(32),s=i.alloc(128),a=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[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];t.pc2=function(e,t,r,i){for(var o=0,s=0,a=n.length>>>1,u=0;u>>n[u]&1;for(u=a;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[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];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[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];t.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=s.r28shl(r,a),i=s.r28shl(i,a),s.pc2(r,i,e.keys,o)}},f.prototype._update=function(e,t,r,n){var i=this._desState,o=s.readUInt32BE(e,t),a=s.readUInt32BE(e,t+4);s.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],s.writeUInt32BE(r,o,n),s.writeUInt32BE(r,a,n+4)},f.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=l}s.rip(a,o,n,i)},f.prototype._decrypt=function(e,t,r,n,i){for(var o=r,a=t,u=e.keys.length-2;u>=0;u-=2){var f=e.keys[u],c=e.keys[u+1];s.expand(o,e.tmp,0),f^=e.tmp[0],c^=e.tmp[1];var h=s.substitute(f,c),l=o;o=(a^s.permute(h))>>>0,a=l}s.rip(o,a,n,i)}},function(e,t,r){"use strict";var n=r(23),i=r(6),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(132),i=r(8).Buffer,o=r(89),s=r(133),a=r(32),u=r(67),f=r(68);function c(e,t,r){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function l(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new c(a.module,t,r)}r(6)(c,a),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){(function(e){var n=r(134),i=r(357),o=r(358);var s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,a,u){return e.isBuffer(i)||void 0===s[i]?t(r,"binary",i,a):(i=i||"binary",u=u||"binary",a=a||new e([2]),e.isBuffer(a)||(a=new e(a,u)),"number"==typeof r?new o(n(r,a),a,!0):(e.isBuffer(r)||(r=new e(r,i)),new o(r,a,!0)))}}).call(this,r(5).Buffer)},function(e,t){},function(e,t){},function(e){e.exports={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(e,t,r){(function(t){var n=r(16),i=new(r(135)),o=new n(24),s=new n(11),a=new n(10),u=new n(3),f=new n(7),c=r(134),h=r(41);function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function p(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=_;var d={};function _(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=p):this._primeCode=8}function y(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(_.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in d)return d[n];var h,l=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return l+=1,l+="02"===r||"05"===r?8:4,d[n]=l,l;switch(i.test(e.shrn(1))||(l+=2),r){case"02":e.mod(o).cmp(s)&&(l+=8);break;case"05":(h=e.mod(a)).cmp(u)&&h.cmp(f)&&(l+=8);break;default:l+=4}return d[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),_.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},_.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),o=this.getPrime();if(i.length0&&r.ishrn(n),r}function h(e,r,i){var o,s;do{for(o=new t(0);8*o.length=0;){var o;if(i.isOdd()){var s=i.andln(n-1);o=s>(n>>1)-1?(n>>1)-s:s,i.isubn(o)}else o=0;r.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u0||t.cmpn(-i)>0;){var o,s,a,u=e.andln(3)+n&3,f=t.andln(3)+i&3;3===u&&(u=-1),3===f&&(f=-1),o=0==(1&u)?0:3!=(a=e.andln(7)+n&7)&&5!==a||2!==f?u:-u,r[0].push(o),s=0==(1&f)?0:3!=(a=t.andln(7)+i&7)&&5!==a||2!==u?f:-f,r[1].push(s),2*n===o+1&&(n=1-n),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";var n=r(16),i=r(20).utils,o=i.getNAF,s=i.getJSF,a=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1),i=(1<=u;t--)f=(f<<1)+n[t];s.push(f)}for(var c=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u=0;f--){for(t=0;f>=0&&0===s[f];f--)t++;if(f>=0&&t++,u=u.dblp(t),f<0)break;var c=s[f];a(0!==c),u="affine"===e.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,c=0,h=0;h=1;h-=2){var p=h-1,d=h;if(1===a[p]&&1===a[d]){var _=[t[p],null,null,t[d]];0===t[p].y.cmp(t[d].y)?(_[1]=t[p].add(t[d]),_[2]=t[p].toJ().mixedAdd(t[d].neg())):0===t[p].y.cmp(t[d].y.redNeg())?(_[1]=t[p].toJ().mixedAdd(t[d]),_[2]=t[p].add(t[d].neg())):(_[1]=t[p].toJ().mixedAdd(t[d]),_[2]=t[p].toJ().mixedAdd(t[d].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[p],r[d]);c=Math.max(b[0].length,c),f[p]=new Array(c),f[d]=new Array(c);for(var g=0;g=0;h--){for(var E=0;h>=0;){var x=!0;for(g=0;g=0&&E++,w=w.dblp(E),h<0)break;for(g=0;g0?S=u[g][A-1>>1]:A<0&&(S=u[g][-A-1>>1].neg()),w="affine"===S.type?w.mixedAdd(S):w.add(S))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(s=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:i},{a:s,b:a}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),f=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:u.add(f).neg()}},f.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(h,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new h(this,e,t,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),h=n.redMul(f),l=u.redSqr().redIAdd(c).redISub(h).redISub(h),p=u.redMul(h.redISub(l)).redISub(o.redMul(c)),d=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(l,p,d)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),c=r.redMul(u),h=a.redSqr().redIAdd(f).redISub(c).redISub(c),l=a.redMul(c.redISub(h)).redISub(i.redMul(f)),p=this.z.redMul(s);return this.curve.jpoint(h,l,p)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(69),i=r(16),o=r(6),s=n.base,a=r(20).utils;function u(e){s.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){s.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,s),e.exports=u,u.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},o(f,s.BasePoint),u.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},u.prototype.point=function(e,t){return new f(this,e,t)},u.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(69),i=r(20),o=r(16),s=r(6),a=n.base,u=i.utils.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,i){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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(t,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=i&&new o(i,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()))))}s(f,a),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(i.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(t&&!u||!t&&u)&&(a=a.redNeg()),this.point(e,a)},f.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(i.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},s(c,a.BasePoint),f.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),u=i.redMul(s),f=o.redMul(a),c=i.redMul(a),h=s.redMul(o);return this.curve.point(u,f,h,c)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(i)).redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),u=s.redSub(a).redISub(a);e=n.redSub(i).redISub(o).redMul(u),t=s.redMul(f.redSub(o)),r=s.redMul(u)}}else{var f=i.redAdd(o);a=this.curve._mulC(this.z).redSqr(),u=f.redSub(a).redSub(a);e=this.curve._mulC(n.redISub(f)).redMul(u),t=this.curve._mulC(f).redMul(i.redISub(o)),r=f.redMul(u)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(t),f=o.redMul(s),c=a.redMul(u),h=o.redMul(u),l=s.redMul(a);return this.curve.point(f,c,l,h)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),f=i.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=n.redMul(u).redMul(c);return this.curve.twisted?(t=n.redMul(f).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(f)):(t=n.redMul(f).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(f)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";var n,i=t,o=r(91),s=r(20),a=s.utils.assert;function u(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,f("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:o.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"]}),f("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:o.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(374)}catch(e){n=void 0}f("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){"use strict";t.sha1=r(369),t.sha224=r(370),t.sha256=r(139),t.sha384=r(371),t.sha512=r(140)},function(e,t,r){"use strict";var n=r(26),i=r(51),o=r(138),s=n.rotl32,a=n.sum32,u=n.sum32_5,f=o.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return a.iaddn(1),this.keyFromPrivate(a)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),f=e.toArray("be",s),c=new i({hash:this.hash,entropy:a,nonce:f,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var p=o.k?o.k(l):new n(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(h)>=0)){var d=this.g.mul(p);if(!d.isInfinity()){var _=d.getX(),y=_.umod(this.n);if(0!==y.cmpn(0)){var b=p.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==_.cmp(y)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),g^=1),new u({r:y,s:b,recoveryParam:g})}}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,f=s.invm(this.n),c=f.mul(e).umod(this.n),h=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){s((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),f=t.r,c=t.s,h=1&r,l=r>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");f=l?this.curve.pointFromX(f.add(this.curve.n),h):this.curve.pointFromX(f,h);var p=t.r.invm(o),d=o.sub(a).mul(p).umod(o),_=c.mul(p).umod(o);return this.g.mulAdd(d,f,_)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(91),i=r(137),o=r(23);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(16),i=r(20).utils,o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,s=t.place;o>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;if(u(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=u(e,r),s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var f=u(e,r);if(e.length!==f+r.place)return!1;var c=e.slice(r.place,f+r.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(s),this.s=new n(c),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,e)}},function(e,t,r){"use strict";var n=r(91),i=r(20),o=i.utils,s=o.assert,a=o.parseBytes,u=r(380),f=r(381);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=t)throw new Error("invalid sig")}e.exports=function(e,r,u,f,c){var h=o(u);if("ec"===h.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),a=r.data.subjectPrivateKey.data;return o.verify(t,e,a)}(e,r,h)}if("dsa"===h.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,s=r.data.q,u=r.data.g,f=r.data.pub_key,c=o.signature.decode(e,"der"),h=c.s,l=c.r;a(h,s),a(l,s);var p=n.mont(i),d=h.invm(s);return 0===u.toRed(p).redPow(new n(t).mul(d).mod(s)).fromRed().mul(f.toRed(p).redPow(l.mul(d).mod(s)).fromRed()).mod(i).mod(s).cmp(l)}(e,r,h)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");r=t.concat([c,r]);for(var l=h.modulus.byteLength(),p=[1],d=0;r.length+p.length+2r-l-2)throw new Error("message too long");var p=h.alloc(r-n-l-2),d=r-c-1,_=i(c),y=a(h.concat([f,p,h.alloc(1,1),t],d),s(_,d)),b=a(_,s(y,c));return new u(h.concat([h.alloc(1),b,y],r))}(d,t);else if(1===l)p=function(e,t,r){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");n=r?h.alloc(s-o-3,255):function(e){var t,r=h.allocUnsafe(e),n=0,o=i(2*e),s=0;for(;n=0)throw new Error("data too long for modulus")}return r?c(p,d):f(p,d)}},function(e,t,r){var n=r(70),i=r(146),o=r(147),s=r(16),a=r(90),u=r(49),f=r(148),c=r(8).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var l,p=n(e),d=p.modulus.byteLength();if(t.length>d||new s(t).cmp(p.modulus)>=0)throw new Error("decryption error");l=r?f(new s(t),p):a(t,p);var _=c.alloc(d-l.length);if(l=c.concat([_,l],d),4===h)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(c.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),f=t.slice(s+1),h=o(a,i(f,s)),l=o(f,i(h,r-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var s=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,l,r);if(3===h)return l;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(8),s=(r(41),o.Buffer),a=o.kMaxLength,u=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function c(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>a||e>t)throw new RangeError("offset out of range")}function h(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>a)throw new RangeError("buffer too small")}function l(e,t,r,i){var o=e.buffer,s=new Uint8Array(o,t,r);return u.getRandomValues(s),i?void n.nextTick(function(){i(null,e)}):e}u&&u.getRandomValues?(t.randomFill=function(t,r,n,i){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return c(r,t.length),h(n,r,t.length),l(t,r,n,i)},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(r,t.length),void 0===n&&(n=t.length-r);return h(n,r,t.length),l(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(17),r(21))},function(e,t,r){var n=r(723).engine;for(var i in syms=r(n?1401:1400),syms)t[i]=syms[i]},function(e,t,r){(function(){var e,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(72),o=u.X64Word,s=u.X64WordArray,n=r(157).Hasher,e=function(){function e(){this.K=this.convert([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]),this.I=new s(this.convert([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])),this.W=function(){var e,t;for(t=[],e=0;e<80;++e)t.push(new o(0,0));return t}()}return e.convert=function(e){var t,r,n,i;for(i=[],t=r=0,n=e.length;r>>1|(te=Q.low)<<31)^(ee>>>8|te<<24)^ee>>>7,$=(te>>>1|ee<<31)^(te>>>8|ee<<24)^(te>>>7|ee<<25),re=((oe=(ie=P[he-2]).high)>>>19|(se=ie.low)<<13)^(oe<<3|se>>>29)^oe>>>6,ne=(se>>>19|oe<<13)^(se<<3|oe>>>29)^(se>>>6|oe<<26),C=(C=(C=J+(T=P[he-7]).high+((F=$+T.low)>>>0<$>>>0?1:0))+re+((F+=ne)>>>0>>0?1:0))+(U=P[he-16]).high+((F+=R=U.low)>>>0>>0?1:0),I.high=C,I.low=F),K=V&W^~V&ae,q=Y&X^~Y&ue,le=O&L^O&j^L&j,pe=z&N^z&H^N&H,de=(O>>>28|z<<4)^(O<<30|z>>>2)^(O<<25|z>>>7),_e=(z>>>28|O<<4)^(z<<30|O>>>2)^(z<<25|O>>>7),ye=fe+((V>>>14|Y<<18)^(V>>>18|Y<<14)^(V<<23|Y>>>9))+((be=ce+((Y>>>14|V<<18)^(Y>>>18|V<<14)^(Y<<23|V>>>9)))>>>0>>0?1:0),fe=ae,ce=ue,ae=W,ue=X,W=V,X=Y,V=G+(ye=(ye=(ye=ye+K+((be+=q)>>>0>>0?1:0))+(D=a.K[he]).high+((be+=M=D.low)>>>0>>0?1:0))+C+((be+=F)>>>0>>0?1:0))+((Y=Z+be|0)>>>0>>0?1:0)|0,G=j,Z=H,j=L,H=N,L=O,N=z,O=ye+(de+le+((ge=_e+pe)>>>0<_e>>>0?1:0))+((z=be+ge|0)>>>0>>0?1:0)|0;return o=n.low=o+z,n.high=i+O+(o>>>0>>0?1:0),f=s.low=f+N,s.high=u+L+(f>>>0>>0?1:0),l=c.low=l+H,c.high=h+j+(l>>>0>>0?1:0),_=p.low=_+Z,p.high=d+G+(_>>>0>>0?1:0),g=y.low=g+Y,y.high=b+V+(g>>>0>>0?1:0),w=m.low=w+X,m.high=v+W+(w>>>0>>0?1:0),x=k.low=x+ue,k.high=E+ae+(x>>>0>>0?1:0),B=S.low=B+ce,S.high=A+fe+(B>>>0>>0?1:0)},t.prototype._doFinalize=function(){var e,t,r;return e=this._data.words,r=8*this._nDataBytes,e[(t=8*this._data.sigBytes)>>>5]|=128<<24-t%32,e[30+(t+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(t+128>>>10<<5)]=r,this._data.sigBytes=4*e.length,this._process(),this._hash.toX32()},t.prototype.copy_to=function(e){return t.__super__.copy_to.call(this,e),e._hash=this._hash.clone()},t.prototype.clone=function(){var e;return e=new t,this.copy_to(e),e},t}(),t.transform=function(e){var t;return t=(new i).finalize(e),e.scrub(),t}}).call(this)},,,,,,,,,,,,,,,,,,,function(e,t,r){(function(){var e,n,i,o,s,a,u,f={}.hasOwnProperty;s=r(24),i=r(403).SHA512,n=r(593).SHA256,u=r(110),e=function(){function e(e,t){var r,n,o;for(null==t&&(t=i),this.key=e.clone(),this.hasher=new t,this.hasherBlockSize=this.hasher.blockSize,this.hasherBlockSizeBytes=4*this.hasherBlockSize,this.key.sigBytes>this.hasherBlockSizeBytes&&(this.key=this.hasher.finalize(this.key)),this.key.clamp(),this._oKey=this.key.clone(),this._iKey=this.key.clone(),r=n=0,o=this.hasherBlockSize;0<=o?no;r=0<=o?++n:--n)this._oKey.words[r]^=1549556828,this._iKey.words[r]^=909522486;this._oKey.sigBytes=this._iKey.sigBytes=this.hasherBlockSizeBytes,this.reset()}return e.outputSize=64,e.prototype.outputSize=e.outputSize,e.prototype.get_output_size=function(){return this.hasher.output_size},e.prototype.reset=function(){return this.hasher.reset().update(this._iKey)},e.prototype.update=function(e){return this.hasher.update(e),this},e.prototype.finalize=function(e){var t,r,n;return t=this.hasher.finalize(e),this.hasher.reset(),r=this._oKey.clone().concat(t),n=this.hasher.finalize(r),t.scrub(),r.scrub(),n},e.prototype.scrub=function(){return this.key.scrub(),this._iKey.scrub(),this._oKey.scrub()},e}(),a=function(t){var r,n,i,o,s;return o=t.key,i=t.input,n=t.hash_class,s=(r=new e(o,n)).finalize(i.clamp()),r.scrub(),s},o=function(t,r){var n,i,o,a,f,c,h,l,p,d;p=s.findDeferral(arguments),o=t.key,i=t.input,f=t.progress_hook,a=t.klass,l=t.what,a||(a=e),l||(l="hmac_sha512"),n=new a(o),i.clamp(),h={update:function(e,t){return n.update(i.slice(e,t))},finalize:function(){return n.finalize()},default_n:1e3*n.hasherBlockSize},function(e){d=new s.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/hmac.iced"}),u.bulk(i.sigBytes,h,{what:l,progress_hook:f,cb:d.defer({assign_fn:function(){return c=arguments[0]},lineno:137})}),d._fulfill()}(function(){return n.scrub(),r(c)})},t.HMAC_SHA256=function(t){function r(e){r.__super__.constructor.call(this,e,n)}return function(e,t){for(var r in t)f.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,e),r}(),t.HMAC=e,t.sign=a,t.bulk_sign=o}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B,D,M,P,I,U,R,T,C,F,O,z,L,N,j,K,q,H,G,Z,V,Y,W,X,J,$,Q,ee,te,re={}.hasOwnProperty,ne=function(e,t){for(var r in t)re.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};V=r(24),$=function(){},y=r(175).Packet,n=r(25).openpgp,M=n.sig_subpacket,Q=r(455),Z=Q.encode_length,Q.make_time_packet,ee=r(28),J=ee.unix_time,X=ee.uint_to_buffer,G=ee.bufeq_secure,te=r(80),K=te.alloc_or_throw,I=te.SHA512,P=te.SHA1,H=r(424),r(62),W=r(507),q=r(97),z=r(310).SlicerBuffer,Y=r(43).make_esc,C=function(t){function r(e){this.key=e.key,this.hasher=e.hasher,this.key_id=e.key_id,this.sig_data=e.sig_data,this.public_key_class=e.public_key_class,this.signed_hash_value_hash=e.signed_hash_value_hash,this.time=e.time,this.sig=e.sig,this.type=e.type,this.version=e.version,null==this.hasher&&(this.hasher=I),this._framed_output=null}return ne(r,y),r.prototype.is_signature=function(){return!0},r.prototype.get_key_id=function(){return this.key_id},r.prototype.get_key_flags=function(){return 0},r.prototype.get_key_expires=function(){return 0},r.prototype.get_issuer_key_id=function(){return this.key_id},r.prototype.get_issuer_fingerprint=function(){return null},r.prototype.when_generated=function(){return this.time},r.prototype.time_of_primary_uid_sig=function(){return null},r.prototype.gen_prefix=function(){return e.concat([new e([n.versions.signature.V3,this.type],X(32,this.time),this.key_id,new e([this.key.type,this.hasher.type]))])},r.prototype.prepare_payload=function(t){var r,n;return(r=function(){var e,r,i;for(i=[],e=0,r=t.length;e1?(c=new Error("Only expecting one (or no) UserID-style packet(s) in a self-sig (got "+d+")"),[]):[this.primary].concat(t);case s.subkey_binding:case s.primary_binding:case s.subkey_revocation:return _=[],1!==t.length?c=new Error("Wrong number of data packets; expected only 1"):null==this.primary?c=new Error("Need a primary key for subkey signature"):(m=t[0],_=[this.primary,m]),_;case s.direct:return[this.primary].concat(t);default:return c=new Error("cannot verify sigtype "+this.type),[]}}.call(this),(x=this,function(t){var r;if(null!=c||x.is_third_party&&x.type===s.key_revocation)return t();a=function(){var e,t,r,n;for(n=[],e=0,t=(r=this.data_packets).length;et},r.prototype.time_primary_pair=function(){var e,t,r;return e=n.sig_types,(t=this.type)===e.issuer||t===e.persona||t===e.casual||t===e.positive?[this.when_generated(),!!(null!=(r=this.subpacket_index.hashed[M.primary_user_id])?r.flag:void 0)]:null},r.prototype._check_key_sig_expiration=function(e){var t,r,i,o,s,a,u,f,c,h,l;return r=null,t=n.sig_types,o=0,c=0,(l=this.type)!==t.issuer&&l!==t.persona&&l!==t.casual&&l!==t.positive&&l!==t.subkey_binding&&l!==t.primary_binding||(i=(e.subkey||this.primary).timestamp,s=this.subpacket_index.hashed[M.key_expiration_time],f=this.subpacket_index.hashed[M.creation_time],h=this.subpacket_index.hashed[M.sig_expiration_time],u=null!=(a=null!=e?e.now:void 0)?a:J(),null!=i&&(null!=s?s.time:void 0)&&(o=i+s.time),null!=f&&(null!=h?h.time:void 0)&&(c=f.time+h.time),o&&!e.time_travel&&u>o&&(r=new Error("Key expired "+(u-o)+"s ago")),c&&!e.time_travel&&u>c&&(r=new Error("Sig expired "+(u-o)+"s ago"))),[r,o,c]},r.prototype.get_key_flags=function(){var e,t,r;return(null!=(e=this.subpacket_index)&&null!=(t=e.hashed)&&null!=(r=t[n.sig_subpacket.key_flags])?r.all_flags():void 0)||0},r.prototype.get_issuer_key_id=function(){var e,t;return null!=(e=this.subpacket_index)&&null!=(t=e.all[n.sig_subpacket.issuer])?t.id:void 0},r.prototype.get_issuer_fingerprint=function(){var e;return null!=(e=this.subpacket_index.all[M.issuer_fingerprint])?e.fingerprint:void 0},r}(),L=function(){function t(e){this.type=e,this.critical=!1,this.five_byte_len=!1}return t.prototype.set_opts=function(e){var t,r;for(t in e)r=e[t],this[t]=r;return!0},t.prototype.to_buffer=function(){var t;return t=this._v_to_buffer(),e.concat([Z(t.length+1,this.five_byte_len),X(8,this.type|(this.critical?128:0)),t])},t.prototype.to_sig=function(){return null},t.prototype.export_to_option=function(){return null},t}(),s=function(e){function t(e,t){this.buf=e,this.type=t}return ne(t,L),t.parse=function(e,r){return new t(e.consume_rest_to_buffer(),r)},t.prototype._v_to_buffer=function(){return this.buf},t}(),N=function(e){function t(e,r){this.time=r,this.never_expires=0===this.time,t.__super__.constructor.call(this,e)}return ne(t,L),t.parse=function(e,t){return new t(e.read_uint32())},t.prototype._v_to_buffer=function(){return X(32,this.time)},t}(),m=function(t){function r(e,t){var n,i,o,s;for(this.v=t,r.__super__.constructor.call(this,e),i=0,o=(s=this.v).length;i=M.experimental_low&&m<=M.experimental_high)return s;throw new Error("Unknown signature subpacket: "+m)}}().parse(this.slice,m)).set_opts({critical:e,five_byte_len:r}),this.slice.unclamp(t),b},e.prototype.parse=function(){var e;switch(e=this.slice.read_uint8()){case n.versions.signature.V2:return this.parse_v2_or_v3(e,T);case n.versions.signature.V3:return this.parse_v2_or_v3(e,F);case n.versions.signature.V4:return this.parse_v4();default:throw new Error("Unknown signature version: "+e)}},e}(),t.CreationTime=i,t.KeyFlags=p,t.KeyExpirationTime=l,t.PreferredSymmetricAlgorithms=E,t.PreferredHashAlgorithms=w,t.PreferredCompressionAlgorithms=v,t.Features=f,t.KeyServerPreferences=d,t.Issuer=c,t.EmbeddedSignature=o,t.PrimaryUserId=x}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var t,n,i,o,s,a,u,f;t=r(25).openpgp.public_key_algorithms,u=r(502).RSA,n=r(737).DSA,a=r(738).ElGamal,o=r(505).ECDSA,i=r(506).ECDH,s=r(600).EDDSA,f=function(e){switch(e){case t.RSA:case t.RSA_ENCRYPT_ONLY:case t.RSA_SIGN_ONLY:return u;case t.ELGAMAL:return a;case t.DSA:return n;case t.ECDSA:return o;case t.ECDH:return i;case t.EDDSA:return s;default:throw new Error("unknown public key system: "+e)}},e.exports={get_class:f,RSA:u,DSA:n,ElGamal:a}}).call(this)},,,,,,,,,,,,,,,function(e,t,r){"use strict";(function(e){var n=r(5).Buffer,i=r(48).Transform,o=r(440),s=r(62),a=r(97).ok,u=r(5).kMaxLength,f="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(o),h=0;h=u?s=new RangeError(f):t=n.concat(i,o),i=[],e.close(),r(s,t)}e.on("error",function(t){e.removeListener("end",a),e.removeListener("readable",s),r(t)}),e.on("end",a),e.end(t),s()}function g(e,t){if("string"==typeof t&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function m(e){if(!(this instanceof m))return new m(e);B.call(this,e,o.DEFLATE)}function v(e){if(!(this instanceof v))return new v(e);B.call(this,e,o.INFLATE)}function w(e){if(!(this instanceof w))return new w(e);B.call(this,e,o.GZIP)}function k(e){if(!(this instanceof k))return new k(e);B.call(this,e,o.GUNZIP)}function E(e){if(!(this instanceof E))return new E(e);B.call(this,e,o.DEFLATERAW)}function x(e){if(!(this instanceof x))return new x(e);B.call(this,e,o.INFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);B.call(this,e,o.UNZIP)}function A(e){return e===o.Z_NO_FLUSH||e===o.Z_PARTIAL_FLUSH||e===o.Z_SYNC_FLUSH||e===o.Z_FULL_FLUSH||e===o.Z_FINISH||e===o.Z_BLOCK}function B(e,r){var s=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!A(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!A(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:o.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(e,r){D(a),a._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],a.emit("error",n)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var f=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(f=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,f,e.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=f,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function D(t,r){r&&e.nextTick(r),t._handle&&(t._handle.close(),t._handle=null)}function M(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=m,t.Inflate=v,t.Gzip=w,t.Gunzip=k,t.DeflateRaw=E,t.InflateRaw=x,t.Unzip=S,t.createDeflate=function(e){return new m(e)},t.createInflate=function(e){return new v(e)},t.createDeflateRaw=function(e){return new E(e)},t.createInflateRaw=function(e){return new x(e)},t.createGzip=function(e){return new w(e)},t.createGunzip=function(e){return new k(e)},t.createUnzip=function(e){return new S(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new m(t),e,r)},t.deflateSync=function(e,t){return g(new m(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new w(t),e,r)},t.gzipSync=function(e,t){return g(new w(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new E(t),e,r)},t.deflateRawSync=function(e,t){return g(new E(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new S(t),e,r)},t.unzipSync=function(e,t){return g(new S(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new v(t),e,r)},t.inflateSync=function(e,t){return g(new v(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new k(t),e,r)},t.gunzipSync=function(e,t){return g(new k(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new x(t),e,r)},t.inflateRawSync=function(e,t){return g(new x(t),e)},s.inherits(B,i),B.prototype.params=function(r,n,i){if(rt.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=t.Z_FILTERED&&n!=t.Z_HUFFMAN_ONLY&&n!=t.Z_RLE&&n!=t.Z_FIXED&&n!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var s=this;this.flush(o.Z_SYNC_FLUSH,function(){a(s._handle,"zlib binding closed"),s._handle.params(r,n),s._hadError||(s._level=r,s._strategy=n,i&&i())})}else e.nextTick(i)},B.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},B.prototype._flush=function(e){this._transform(n.alloc(0),"",e)},B.prototype.flush=function(t,r){var i=this,s=this._writableState;("function"==typeof t||void 0===t&&!r)&&(r=t,t=o.Z_FULL_FLUSH),s.ended?r&&e.nextTick(r):s.ending?r&&this.once("end",r):s.needDrain?r&&this.once("drain",function(){return i.flush(t,r)}):(this._flushFlag=t,this.write(n.alloc(0),"",r))},B.prototype.close=function(t){D(this,t),e.nextTick(M,this)},B.prototype._transform=function(e,t,r){var i,s=this._writableState,a=(s.ending||s.ended)&&(!e||s.length===e.length);return null===e||n.isBuffer(e)?this._handle?(a?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=s.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(e,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},B.prototype._processChunk=function(e,t,r){var i=e&&e.length,o=this._chunkSize-this._offset,s=0,c=this,h="function"==typeof r;if(!h){var l,p=[],d=0;this.on("error",function(e){l=e}),a(this._handle,"zlib binding closed");do{var _=this._handle.writeSync(t,e,s,i,this._buffer,this._offset,o)}while(!this._hadError&&g(_[0],_[1]));if(this._hadError)throw l;if(d>=u)throw D(this),new RangeError(f);var y=n.concat(p,d);return D(this),y}a(this._handle,"zlib binding closed");var b=this._handle.write(t,e,s,i,this._buffer,this._offset,o);function g(u,f){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var l=o-f;if(a(l>=0,"have should not go down"),l>0){var _=c._buffer.slice(c._offset,c._offset+l);c._offset+=l,h?c.push(_):(p.push(_),d+=_.length)}if((0===f||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=n.allocUnsafe(c._chunkSize)),0===f){if(s+=i-u,i=u,!h)return!0;var y=c._handle.write(t,e,s,i,c._buffer,c._offset,c._chunkSize);return y.callback=g,void(y.buffer=e)}if(!h)return!1;r()}}b.buffer=e,b.callback=g},s.inherits(m,B),s.inherits(v,B),s.inherits(w,B),s.inherits(k,B),s.inherits(E,B),s.inherits(x,B),s.inherits(S,B)}).call(this,r(21))},function(e,t,r){"use strict";(function(e,n){var i=r(97),o=r(441),s=r(442),a=r(445),u=r(448);for(var f in u)t[f]=u[f];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function c(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||a.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},c.prototype.write=function(e,t,r,n,i,o,s){return this._write(!0,e,t,r,n,i,o,s)},c.prototype.writeSync=function(e,t,r,n,i,o,s){return this._write(!1,e,t,r,n,i,o,s)},c.prototype._write=function(r,o,s,a,u,f,c,h){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==t.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===o,"must provide flush value"),this.write_in_progress=!0,o!==t.Z_NO_FLUSH&&o!==t.Z_PARTIAL_FLUSH&&o!==t.Z_SYNC_FLUSH&&o!==t.Z_FULL_FLUSH&&o!==t.Z_FINISH&&o!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=e.alloc(0),u=0,a=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=h,this.strm.output=f,this.strm.next_out=c,this.flush=o,!r)return this._process(),this._checkError()?this._afterSync():void 0;var l=this;return n.nextTick(function(){l._process(),l._after()}),this},c.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},c.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},c.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(e,r,n,o,s){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(e>=8&&e<=15,"invalid windowBits"),i(r>=-1&&r<=9,"invalid compression level"),i(n>=1&&n<=9,"invalid memlevel"),i(o===t.Z_FILTERED||o===t.Z_HUFFMAN_ONLY||o===t.Z_RLE||o===t.Z_FIXED||o===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,o,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(e,r,n,i,u){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=c}).call(this,r(5).Buffer,r(21))},function(e,t,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){"use strict";var n,i=r(98),o=r(443),s=r(308),a=r(309),u=r(444),f=0,c=1,h=3,l=4,p=5,d=0,_=1,y=-2,b=-3,g=-5,m=-1,v=1,w=2,k=3,E=4,x=0,S=2,A=8,B=9,D=15,M=8,P=286,I=30,U=19,R=2*P+1,T=15,C=3,F=258,O=F+C+1,z=32,L=42,N=69,j=73,K=91,q=103,H=113,G=666,Z=1,V=2,Y=3,W=4,X=3;function J(e,t){return e.msg=u[t],t}function $(e){return(e<<1)-(e>4?9:0)}function Q(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function te(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function re(e,t){e.pending_buf[e.pending++]=t}function ne(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-O?e.strstart-(e.w_size-O):0,f=e.window,c=e.w_mask,h=e.prev,l=e.strstart+F,p=f[o+s-1],d=f[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(f[(r=t)+s]===d&&f[r+s-1]===p&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&os){if(e.match_start=t,s=n,n>=a)break;p=f[o+s-1],d=f[o+s]}}}while((t=h[t&c])>u&&0!=--i);return s<=e.lookahead?s:e.lookahead}function oe(e){var t,r,n,o,u,f,c,h,l,p,d=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-O)){i.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=d?n-d:0}while(--r);t=r=d;do{n=e.prev[--t],e.prev[t]=n>=d?n-d:0}while(--r);o+=d}if(0===e.strm.avail_in)break;if(f=e.strm,c=e.window,h=e.strstart+e.lookahead,l=o,p=void 0,(p=f.avail_in)>l&&(p=l),r=0===p?0:(f.avail_in-=p,i.arraySet(c,f.input,f.next_in,p,h),1===f.state.wrap?f.adler=s(f.adler,c,p,h):2===f.state.wrap&&(f.adler=a(f.adler,c,p,h)),f.next_in+=p,f.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=C)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-C,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),o<1||o>B||r!==A||n<8||n>15||t<0||t>9||s<0||s>E)return J(e,y);8===n&&(n=9);var u=new fe;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(oe(e),0===e.lookahead&&t===f)return Z;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,te(e,!1),0===e.strm.avail_out))return Z;if(e.strstart-e.block_start>=e.w_size-O&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===l?(te(e,!0),0===e.strm.avail_out?Y:W):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),Z)}),new ue(4,4,8,4,se),new ue(4,5,16,8,se),new ue(4,6,32,32,se),new ue(4,4,16,16,ae),new ue(8,16,32,32,ae),new ue(8,16,128,128,ae),new ue(8,32,128,256,ae),new ue(32,128,258,1024,ae),new ue(32,258,258,4096,ae)],t.deflateInit=function(e,t){return le(e,t,A,D,M,x)},t.deflateInit2=le,t.deflateReset=he,t.deflateResetKeep=ce,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?y:(e.state.gzhead=t,d):y},t.deflate=function(e,t){var r,i,s,u;if(!e||!e.state||t>p||t<0)return e?J(e,y):y;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===G&&t!==l)return J(e,0===e.avail_out?g:y);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===L)if(2===i.wrap)e.adler=0,re(i,31),re(i,139),re(i,8),i.gzhead?(re(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),re(i,255&i.gzhead.time),re(i,i.gzhead.time>>8&255),re(i,i.gzhead.time>>16&255),re(i,i.gzhead.time>>24&255),re(i,9===i.level?2:i.strategy>=w||i.level<2?4:0),re(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(re(i,255&i.gzhead.extra.length),re(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=N):(re(i,0),re(i,0),re(i,0),re(i,0),re(i,0),re(i,9===i.level?2:i.strategy>=w||i.level<2?4:0),re(i,X),i.status=H);else{var b=A+(i.w_bits-8<<4)<<8;b|=(i.strategy>=w||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(b|=z),b+=31-b%31,i.status=H,ne(i,b),0!==i.strstart&&(ne(i,e.adler>>>16),ne(i,65535&e.adler)),e.adler=1}if(i.status===N)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending!==i.pending_buf_size));)re(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=j)}else i.status=j;if(i.status===j)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=K)}else i.status=K;if(i.status===K)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=q)}else i.status=q;if(i.status===q&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(re(i,255&e.adler),re(i,e.adler>>8&255),e.adler=0,i.status=H)):i.status=H),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&$(t)<=$(r)&&t!==l)return J(e,g);if(i.status===G&&0!==e.avail_in)return J(e,g);if(0!==e.avail_in||0!==i.lookahead||t!==f&&i.status!==G){var m=i.strategy===w?function(e,t){for(var r;;){if(0===e.lookahead&&(oe(e),0===e.lookahead)){if(t===f)return Z;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===l?(te(e,!0),0===e.strm.avail_out?Y:W):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:V}(i,t):i.strategy===k?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=F){if(oe(e),e.lookahead<=F&&t===f)return Z;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=C&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+F;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(r=o._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===l?(te(e,!0),0===e.strm.avail_out?Y:W):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:V}(i,t):n[i.level].func(i,t);if(m!==Y&&m!==W||(i.status=G),m===Z||m===Y)return 0===e.avail_out&&(i.last_flush=-1),d;if(m===V&&(t===c?o._tr_align(i):t!==p&&(o._tr_stored_block(i,0,0,!1),t===h&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,d}return t!==l?d:i.wrap<=0?_:(2===i.wrap?(re(i,255&e.adler),re(i,e.adler>>8&255),re(i,e.adler>>16&255),re(i,e.adler>>24&255),re(i,255&e.total_in),re(i,e.total_in>>8&255),re(i,e.total_in>>16&255),re(i,e.total_in>>24&255)):(ne(i,e.adler>>>16),ne(i,65535&e.adler)),ee(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?d:_)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==L&&t!==N&&t!==j&&t!==K&&t!==q&&t!==H&&t!==G?J(e,y):(e.state=null,t===H?J(e,b):d):y},t.deflateSetDictionary=function(e,t){var r,n,o,a,u,f,c,h,l=t.length;if(!e||!e.state)return y;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==L||r.lookahead)return y;for(1===a&&(e.adler=s(e.adler,t,l,0)),r.wrap=0,l>=r.w_size&&(0===a&&(Q(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,l-r.w_size,r.w_size,0),t=h,l=r.w_size),u=e.avail_in,f=e.next_in,c=e.input,e.avail_in=l,e.next_in=0,e.input=t,oe(r);r.lookahead>=C;){n=r.strstart,o=r.lookahead-(C-1);do{r.ins_h=(r.ins_h<=0;)e[t]=0}var f=0,c=1,h=2,l=29,p=256,d=p+1+l,_=30,y=19,b=2*d+1,g=15,m=16,v=7,w=256,k=16,E=17,x=18,S=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],B=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=new Array(2*(d+2));u(M);var P=new Array(2*_);u(P);var I=new Array(512);u(I);var U=new Array(256);u(U);var R=new Array(l);u(R);var T,C,F,O=new Array(_);function z(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function L(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function N(e){return e<256?I[e]:I[256+(e>>>7)]}function j(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function K(e,t,r){e.bi_valid>m-r?(e.bi_buf|=t<>m-e.bi_valid,e.bi_valid+=r-m):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function G(e,t,r){var n,i,o=new Array(g+1),s=0;for(n=1;n<=g;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=H(o[a]++,a))}}function Z(e){var t;for(t=0;t8?j(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Y(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)W(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],W(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,W(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,u=t.dyn_tree,f=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,d=t.stat_desc.max_length,_=0;for(o=0;o<=g;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rd&&(o=d,_++),u[2*n+1]=o,n>f||(e.bl_count[o]++,s=0,n>=p&&(s=l[n-p]),a=u[2*n],e.opt_len+=a*(o+s),h&&(e.static_len+=a*(c[2*n+1]+s)));if(0!==_){do{for(o=d-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[d]--,_-=2}while(_>0);for(o=d;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>f||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),G(o,f,e.bl_count)}function $(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,f=4;for(0===s&&(u=138,f=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a>=7;n<_;n++)for(O[n]=i<<7,e=0;e<1<0?(e.strm.data_type===a&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t=3&&0===e.bl_tree[2*D[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),u=e.opt_len+3+7>>>3,(f=e.static_len+3+7>>>3)<=u&&(u=f)):u=f=r+5,r+4<=u&&-1!==t?te(e,t,r,n):e.strategy===i||f===u?(K(e,(c<<1)+(n?1:0),3),X(e,M,P)):(K(e,(h<<1)+(n?1:0),3),function(e,t,r,n){var i;for(K(e,t-257,5),K(e,r-1,5),K(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(U[r]+p+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){K(e,c<<1,3),q(e,w,M),function(e){16===e.bi_valid?(j(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){"use strict";var n=r(98),i=r(308),o=r(309),s=r(446),a=r(447),u=0,f=1,c=2,h=4,l=5,p=6,d=0,_=1,y=2,b=-2,g=-3,m=-4,v=-5,w=8,k=1,E=2,x=3,S=4,A=5,B=6,D=7,M=8,P=9,I=10,U=11,R=12,T=13,C=14,F=15,O=16,z=17,L=18,N=19,j=20,K=21,q=22,H=23,G=24,Z=25,V=26,Y=27,W=28,X=29,J=30,$=31,Q=32,ee=852,te=592,re=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function oe(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=k,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(ee),t.distcode=t.distdyn=new n.Buf32(te),t.sane=1,t.back=-1,d):b}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,oe(e)):b}function ae(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?b:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,se(e))):b}function ue(e,t){var r,n;return e?(n=new ie,e.state=n,n.window=null,(r=ae(e,t))!==d&&(e.state=null),r):b}var fe,ce,he=!0;function le(e){if(he){var t;for(fe=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(f,e.lens,0,288,fe,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=fe,e.lenbits=9,e.distcode=ce,e.distbits=5}function pe(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,Be,2,0),ae=0,ue=0,r.mode=E;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",r.mode=J;break}if((15&ae)!==w){e.msg="unknown compression method",r.mode=J;break}if(ue-=4,ke=8+(15&(ae>>>=4)),0===r.wbits)r.wbits=ke;else if(ke>r.wbits){e.msg="invalid window size",r.mode=J;break}r.dmax=1<>8&1),512&r.flags&&(Be[0]=255&ae,Be[1]=ae>>>8&255,r.check=o(r.check,Be,2,0)),ae=0,ue=0,r.mode=x;case x:for(;ue<32;){if(0===oe)break e;oe--,ae+=ee[re++]<>>8&255,Be[2]=ae>>>16&255,Be[3]=ae>>>24&255,r.check=o(r.check,Be,4,0)),ae=0,ue=0,r.mode=S;case S:for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[re++]<>8),512&r.flags&&(Be[0]=255&ae,Be[1]=ae>>>8&255,r.check=o(r.check,Be,2,0)),ae=0,ue=0,r.mode=A;case A:if(1024&r.flags){for(;ue<16;){if(0===oe)break e;oe--,ae+=ee[re++]<>>8&255,r.check=o(r.check,Be,2,0)),ae=0,ue=0}else r.head&&(r.head.extra=null);r.mode=B;case B:if(1024&r.flags&&((he=r.length)>oe&&(he=oe),he&&(r.head&&(ke=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,ee,re,he,ke)),512&r.flags&&(r.check=o(r.check,ee,he,re)),oe-=he,re+=he,r.length-=he),r.length))break e;r.length=0,r.mode=D;case D:if(2048&r.flags){if(0===oe)break e;he=0;do{ke=ee[re+he++],r.head&&ke&&r.length<65536&&(r.head.name+=String.fromCharCode(ke))}while(ke&&he>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=R;break;case I:for(;ue<32;){if(0===oe)break e;oe--,ae+=ee[re++]<>>=7&ue,ue-=7&ue,r.mode=Y;break}for(;ue<3;){if(0===oe)break e;oe--,ae+=ee[re++]<>>=1)){case 0:r.mode=C;break;case 1:if(le(r),r.mode=j,t===p){ae>>>=2,ue-=2;break e}break;case 2:r.mode=z;break;case 3:e.msg="invalid block type",r.mode=J}ae>>>=2,ue-=2;break;case C:for(ae>>>=7&ue,ue-=7&ue;ue<32;){if(0===oe)break e;oe--,ae+=ee[re++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=J;break}if(r.length=65535&ae,ae=0,ue=0,r.mode=F,t===p)break e;case F:r.mode=O;case O:if(he=r.length){if(he>oe&&(he=oe),he>se&&(he=se),0===he)break e;n.arraySet(te,ee,re,he,ie),oe-=he,re+=he,se-=he,ie+=he,r.length-=he;break}r.mode=R;break;case z:for(;ue<14;){if(0===oe)break e;oe--,ae+=ee[re++]<>>=5,ue-=5,r.ndist=1+(31&ae),ae>>>=5,ue-=5,r.ncode=4+(15&ae),ae>>>=4,ue-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=J;break}r.have=0,r.mode=L;case L:for(;r.have>>=3,ue-=3}for(;r.have<19;)r.lens[De[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,xe={bits:r.lenbits},Ee=a(u,r.lens,0,19,r.lencode,0,r.work,xe),r.lenbits=xe.bits,Ee){e.msg="invalid code lengths set",r.mode=J;break}r.have=0,r.mode=N;case N:for(;r.have>>16&255,ge=65535&Ae,!((ye=Ae>>>24)<=ue);){if(0===oe)break e;oe--,ae+=ee[re++]<>>=ye,ue-=ye,r.lens[r.have++]=ge;else{if(16===ge){for(Se=ye+2;ue>>=ye,ue-=ye,0===r.have){e.msg="invalid bit length repeat",r.mode=J;break}ke=r.lens[r.have-1],he=3+(3&ae),ae>>>=2,ue-=2}else if(17===ge){for(Se=ye+3;ue>>=ye)),ae>>>=3,ue-=3}else{for(Se=ye+7;ue>>=ye)),ae>>>=7,ue-=7}if(r.have+he>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=J;break}for(;he--;)r.lens[r.have++]=ke}}if(r.mode===J)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=J;break}if(r.lenbits=9,xe={bits:r.lenbits},Ee=a(f,r.lens,0,r.nlen,r.lencode,0,r.work,xe),r.lenbits=xe.bits,Ee){e.msg="invalid literal/lengths set",r.mode=J;break}if(r.distbits=6,r.distcode=r.distdyn,xe={bits:r.distbits},Ee=a(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,xe),r.distbits=xe.bits,Ee){e.msg="invalid distances set",r.mode=J;break}if(r.mode=j,t===p)break e;case j:r.mode=K;case K:if(oe>=6&&se>=258){e.next_out=ie,e.avail_out=se,e.next_in=re,e.avail_in=oe,r.hold=ae,r.bits=ue,s(e,ce),ie=e.next_out,te=e.output,se=e.avail_out,re=e.next_in,ee=e.input,oe=e.avail_in,ae=r.hold,ue=r.bits,r.mode===R&&(r.back=-1);break}for(r.back=0;be=(Ae=r.lencode[ae&(1<>>16&255,ge=65535&Ae,!((ye=Ae>>>24)<=ue);){if(0===oe)break e;oe--,ae+=ee[re++]<>me)])>>>16&255,ge=65535&Ae,!(me+(ye=Ae>>>24)<=ue);){if(0===oe)break e;oe--,ae+=ee[re++]<>>=me,ue-=me,r.back+=me}if(ae>>>=ye,ue-=ye,r.back+=ye,r.length=ge,0===be){r.mode=V;break}if(32&be){r.back=-1,r.mode=R;break}if(64&be){e.msg="invalid literal/length code",r.mode=J;break}r.extra=15&be,r.mode=q;case q:if(r.extra){for(Se=r.extra;ue>>=r.extra,ue-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=H;case H:for(;be=(Ae=r.distcode[ae&(1<>>16&255,ge=65535&Ae,!((ye=Ae>>>24)<=ue);){if(0===oe)break e;oe--,ae+=ee[re++]<>me)])>>>16&255,ge=65535&Ae,!(me+(ye=Ae>>>24)<=ue);){if(0===oe)break e;oe--,ae+=ee[re++]<>>=me,ue-=me,r.back+=me}if(ae>>>=ye,ue-=ye,r.back+=ye,64&be){e.msg="invalid distance code",r.mode=J;break}r.offset=ge,r.extra=15&be,r.mode=G;case G:if(r.extra){for(Se=r.extra;ue>>=r.extra,ue-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=J;break}r.mode=Z;case Z:if(0===se)break e;if(he=ce-se,r.offset>he){if((he=r.offset-he)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=J;break}he>r.wnext?(he-=r.wnext,de=r.wsize-he):de=r.wnext-he,he>r.length&&(he=r.length),_e=r.window}else _e=te,de=ie-r.offset,he=r.length;he>se&&(he=se),se-=he,r.length-=he;do{te[ie++]=_e[de++]}while(--he);0===r.length&&(r.mode=K);break;case V:if(0===se)break e;te[ie++]=r.length,se--,r.mode=K;break;case Y:if(r.wrap){for(;ue<32;){if(0===oe)break e;oe--,ae|=ee[re++]<>>=v=m>>>24,d-=v,0===(v=m>>>16&255))A[o++]=65535&m;else{if(!(16&v)){if(0==(64&v)){m=_[(65535&m)+(p&(1<>>=v,d-=v),d<15&&(p+=S[n++]<>>=v=m>>>24,d-=v,!(16&(v=m>>>16&255))){if(0==(64&v)){m=y[(65535&m)+(p&(1<u){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=v,d-=v,k>(v=o-s)){if((v=k-v)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,x=l,0===h){if(E+=f-v,v2;)A[o++]=x[E++],A[o++]=x[E++],A[o++]=x[E++],w-=3;w&&(A[o++]=x[E++],w>1&&(A[o++]=x[E++]))}else{E=o-k;do{A[o++]=A[E++],A[o++]=A[E++],A[o++]=A[E++],w-=3}while(w>2);w&&(A[o++]=A[E++],w>1&&(A[o++]=A[E++]))}break}}break}}while(n>3,p&=(1<<(d-=w<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n=1&&0===C[A];A--);if(B>A&&(B=A),0===A)return f[c++]=20971520,f[c++]=20971520,l.bits=1,0;for(S=1;S0&&(0===e||1!==A))return-1;for(F[1]=0,E=1;E<15;E++)F[E+1]=F[E]+C[E];for(x=0;x852||2===e&&I>592)return 1;for(;;){m=E-M,h[x]g?(v=O[z+h[x]],w=R[T+h[x]]):(v=96,w=0),p=1<>M)+(d-=p)]=m<<24|v<<16|w|0}while(0!==d);for(p=1<>=1;if(0!==p?(U&=p-1,U+=p):U=0,x++,0==--C[E]){if(E===A)break;E=t[r+h[x]]}if(E>B&&(U&y)!==_){for(0===M&&(M=B),b+=S,P=1<<(D=E-M);D+M852||2===e&&I>592)return 1;f[_=U&y]=B<<24|D<<16|b-c|0}}return 0!==U&&(f[b+U]=E-M<<24|64<<16|0),l.bits=B,0}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(450),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(17))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,o,s,a,u=1,f={},c=!1,h=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){o.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r>>25)+r|0)<<9|t>>>23)+l|0)<<13|t>>>19)+y|0)<<18|t>>>14,p^=(t=(n^=(t=(a^=(t=(b^=(t=p+n|0)<<7|t>>>25)+p|0)<<9|t>>>23)+b|0)<<13|t>>>19)+a|0)<<18|t>>>14,i^=(t=(d^=(t=(c^=(t=(u^=(t=i+d|0)<<7|t>>>25)+i|0)<<9|t>>>23)+u|0)<<13|t>>>19)+c|0)<<18|t>>>14,f^=(t=(o^=(t=(_^=(t=(h^=(t=f+o|0)<<7|t>>>25)+f|0)<<9|t>>>23)+h|0)<<13|t>>>19)+_|0)<<18|t>>>14,r^=(t=(h^=(t=(c^=(t=(n^=(t=r+h|0)<<7|t>>>25)+r|0)<<9|t>>>23)+n|0)<<13|t>>>19)+c|0)<<18|t>>>14,p^=(t=(l^=(t=(_^=(t=(d^=(t=p+l|0)<<7|t>>>25)+p|0)<<9|t>>>23)+d|0)<<13|t>>>19)+_|0)<<18|t>>>14,i^=(t=(b^=(t=(y^=(t=(o^=(t=i+b|0)<<7|t>>>25)+i|0)<<9|t>>>23)+o|0)<<13|t>>>19)+y|0)<<18|t>>>14,f^=(t=(u^=(t=(a^=(t=(s^=(t=f+u|0)<<7|t>>>25)+f|0)<<9|t>>>23)+s|0)<<13|t>>>19)+a|0)<<18|t>>>14;return[r,n,c,h,l,p,d,_,y,b,i,o,s,a,u,f]},e}(),o=function(t){function r(e,t){var n;if(r.__super__.constructor.call(this,20),this.key=e.clone().endian_reverse(),this.nonce=t.clone().endian_reverse(),(16!==this.key.sigBytes||8!==this.nonce.sigBytes)&&(32!==this.key.sigBytes||8!==(n=this.nonce.sigBytes)&&24!==n))throw new Error("Bad key/nonce lengths");24===this.nonce.sigBytes&&this.xsalsa_setup(),this.input=this.key_iv_setup(this.nonce,this.key),this._reset()}return b(r,s),r.prototype.sigma=f.from_buffer_le(new e("expand 32-byte k")),r.prototype.tau=f.from_buffer_le(new e("expand 16-byte k")),r.blockSize=64,r.prototype.blockSize=r.blockSize,r.keySize=32,r.prototype.keySize=r.keySize,r.ivSize=24,r.prototype.ivSize=r.ivSize,r.prototype.scrub=function(){return this.key.scrub(),this.nonce.scrub(),d.scrub_vec(this.input)},r.prototype.xsalsa_setup=function(){var e;return e=new f(this.nonce.words.slice(0,4)),this.nonce=new f(this.nonce.words.slice(4)),this.key=this.hsalsa20(e,this.key)},r.prototype.hsalsa20=function(e,t){var r,n,i,o;return(i=this.key_iv_setup(e,t))[8]=e.words[2],i[9]=e.words[3],o=this._core(i),n=[0,5,10,15,6,7,8,9],o=function(){var e,t,i;for(i=[],e=0,t=n.length;en;r=0<=n?++e:--e)t.push(this._generateBlock());return t}.call(this),o=(u=[]).concat.apply(u,t)),r=s=0,a=o.length;s0;)this._i===r&&(this._generateBlockBuffer(),this._i=0),n=Math.min(t,r-this._i),i.push(n===r?this._buf:this._buf.slice(this._i,this._i+n)),this._i+=n,t-=n;return e.concat(i)},r.prototype._generateBlockBuffer=function(){var t,r,n,i,o;for(this._buf=new e(this.blockSize),r=i=0,o=(n=this._generateBlock()).length;ii;t=0<=i?++n:--n)r=(r+e.readUInt8(t))%65536;return r},t.encode_length=function(t,r){var n;return null==r&&(r=!1),n=null,t>=8384||r?((n=new e(5)).writeUInt8(255,0),n.writeUInt32BE(t,1)):t<192?(n=new e(1)).writeUInt8(t,0):t>=192&&t<8384&&(n=new e(2)).writeUInt16BE(t-192+49152,0),n},t.ops_to_keyflags=function(e){var t;return t=0,e&n.ops.encrypt&&(t|=n.openpgp.key_flags.encrypt_comm),e&n.ops.decrypt&&(t|=n.openpgp.key_flags.encrypt_comm),e&n.ops.verify&&(t|=n.openpgp.key_flags.sign_data),e&n.ops.sign&&(t|=n.openpgp.key_flags.sign_data),t},t.fit_to_size=function(t,r){var n;return 0===(n=t-r.length)?r:n>0?e.concat([new e(function(){var e,t;for(t=[],e=1;1<=n?e<=n:e>=n;1<=n?++e:--e)t.push(0);return t}()),r]):n<0?r.slice(-t):void 0}}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h;f=r(24),n=r(80).SHA512,r(25).openpgp,c=r(111).nbs,h=r(28),s=h.buffer_to_ui8a,o=h.bufeq_secure,i=r(79).SRF,u={MD5:[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],SHA1:[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],SHA224:[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28],SHA256:[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],SHA384:[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],SHA512:[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64]},t.emsa_pkcs1_encode=function(t,r,i){var o,a,f,h;return null==i&&(i={}),a=i.hasher||n,f=u[a.algname],h=r-f.length-3-a.output_length,o=e.concat([new e([0,1]),new e(function(){var e,t;for(t=[],e=0;0<=h?eh;0<=h?++e:--e)t.push(255);return t}()),new e([0]),new e(f),t]),c(s(o),256)},t.emsa_pkcs1_decode=function(t,r){var n,i,s,a,f;if(n=f=null,a=0,t.length<2)n=new Error("signature was way too short: < 2 bytes");else if(1!==t.readUInt16BE(0))n=new Error("Sig verify error: Didn't get two-byte header 0x00 0x01");else{for(a=2;a=t.length||0!==t.readUInt8(a)?n=new Error("Sig verify error: Missed the 0x0 separator"):(a++,s=u[r.algname],o(new e(s),t.slice(a,s.length+a))?(a+=s.length,(i=t.slice(a)).length!==r.output_length?n=new Error("Sig verify error: trailing garbage in signature"):f=i):n=new Error("Sig verify error: missing ASN header for "+r.algname))}return[n,f]},a=function(t,r){var n,o,s,a,u,c,h;c=f.findDeferral(arguments),o=[],function(e){var r;(r=function(e){var l,p;if(l=e,p=function(){return f.trampoline(function(){return r(e)})},!(o.lengtha;u=0<=a?++e:--e)0!==(s=n.readUInt8(u))&&o.push(s);return p()},{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/pad.iced"}),i().random_bytes(a,h.defer({assign_fn:function(){return n=arguments[0]},lineno:77})),h._fulfill()})(e)}(function(){return r(new e(o))})},t.eme_pkcs1_encode=function(t,r,n){var i,o,u,h,l,p,d;p=f.findDeferral(arguments),l=u=null,function(n){if(t.length>r-11)return n(u=new Error("cannot encrypt message -- it's too long!"));h=r-3-t.length,function(e){d=new f.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/pad.iced",funcname:"eme_pkcs1_encode"}),a(h,d.defer({assign_fn:function(){return i=arguments[0]},lineno:93})),d._fulfill()}(function(){return o=e.concat([new e([0,2]),i,new e([0]),t]),n(l=c(s(o),256))})}(function(){return n(u,l)})},t.eme_pkcs1_decode=function(e){var t,r,n;if(t=n=null,e.length<12)t=new Error("Ciphertext too short, needs to be >= 12 bytes");else if(2!==e.readUInt16BE(0))t=new Error("Failed to find expected header: 0x00 0x02");else{for(r=2;r=e.length?t=new Error("didn't get 0x00 seperator octet"):(r++,n=e.slice(r))}return[t,n]},t.ecc_pkcs5_pad_data=function(t){var r,n,i,o;return r=i=null,(n=40-t.length)<0?r=new Error("Pad underrun"):(o=function(){var e,t;for(t=[],e=0;0<=n?en;0<=n?e++:e--)t.push(n);return t}(),i=e.concat([t,new e(o)])),[r,i]},t.ecc_pkcs5_unpad_data=function(e,t){var r,n,i,o,s,a;if(n=null,(o=e.length-t)<0)n=new Error("Pad length was < 0; pad underrun");else if(e.length%8!=0)n=new Error("Padded data must be a multiple of 8 bytes long");else for(i=s=t,a=e.length;t<=a?sa;i=t<=a?++s:--s)if((r=e.readUInt8(i))!==o){n=new Error("Got bad PKCS#5 pad character "+r+" at position "+i+"; wanted "+o);break}return n}}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l;i=r(25).openpgp.symmetric_key_algorithms,h=r(71),n=h.ciphers.AES,o=r(1422).CAST5,s=r(310).SlicerBuffer,a=h.WordArray,l=r(28).uint_to_buffer,f=r(456).ecc_pkcs5_unpad_data,t.get_cipher=c=function(e){var t;return e||(e=i.AES256),(t=function(){switch(e){case i.AES128:return{klass:n,key_size:16};case i.AES192:return{klass:n,key_size:24};case i.AES256:return{klass:n,key_size:32};case i.CAST5:return{klass:o,key_size:o.keySize};default:throw new Error("unknown cipher: "+e)}}()).type=e,t},t.checksum2=u=function(e){var t,r,n,i;for(r=0,t=n=0,i=e.length;0<=i?ni;t=0<=i?++n:--n)r=r+e.readUInt8(t)&65535;return r},t.import_key_pgp=function(e,t){var r,n,i,o,h;if(null==t&&(t=!1),h=new s(e),null,n=c(h.read_uint8()),o=h.read_buffer(n.key_size),r=h.read_uint16(),null!=(i=u(o)!==r?new Error("Checksum mismatch"):t?f(e,h.offset()):h.rem()?new Error("Junk at the end of input"):null))throw i;return new n.klass(a.from_buffer(o))},t.export_key_pgp=function(t,r){var n;return n=u(r),e.concat([new e([t]),r,l(16,n)])}}).call(this)}).call(this,r(5).Buffer)},function(e,t){(function(){var e;e=function(){function e(){}return e.prototype.fetch=function(e,t,r){return r(new Error("not implemented"))},e}(),t.KeyFetcher=e}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B,D,M,P,I={}.hasOwnProperty,U=function(e,t){for(var r in t)I.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};w=r(24),(A=r(1398)).naive_is_prime,S=A.random_prime,(_=r(111)).nbits,x=_.nbv,_.nbi,s=_.BigInteger,B=r(28),y=B.bufeq_secure,n=B.ASP,E=r(43).make_esc,k=r(25),a=k.openpgp,k.kb,p=r(80).SHA512,D=r(456),g=D.eme_pkcs1_encode,b=D.eme_pkcs1_decode,m=D.emsa_pkcs1_decode,v=D.emsa_pkcs1_encode,M=r(79),d=M.SRF,u=M.MRF,P=r(158),i=P.BaseKey,o=P.BaseKeyPair,h=function(e){function t(e){this.p=e.p,this.q=e.q,this.d=e.d,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.u=e.u,this.pub=e.pub}return U(t,i),t.prototype.decrypt=function(e,t){var r,n,i,o;n=w.findDeferral(arguments),(o=this,function(t){i=new w.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Priv.decrypt"}),o.mod_pow_d_crt(e,i.defer({assign_fn:function(){return r=arguments[0]},lineno:22})),i._fulfill()})(function(){return t(null,r)})},t.prototype.sign=function(e,t){return this.mod_pow_d_crt(e,t)},t.ORDER=["d","p","q","u"],t.prototype.ORDER=t.ORDER,t.prototype.n=function(){return this.p.multiply(this.q)},t.prototype.phi=function(){return this.p.subtract(s.ONE).multiply(this.q.subtract(s.ONE))},t.prototype.lambda=function(){return this.phi.divide(this.p.subtract(s.ONE).gcd(this.q.subtract(s.ONE)))},t.alloc=function(e,r){return i.alloc(t,e,{pub:r})},t.prototype.mod_pow_d_crt=function(e,t){var r,n,i,o,a,u,f,c,h,l,p,_;l=w.findDeferral(arguments),null==this.dP&&(this.dP=this.d.mod(this.p.subtract(s.ONE))),null==this.dQ&&(this.dQ=this.d.mod(this.q.subtract(s.ONE))),null==this.qInv&&(this.qInv=this.q.modInverse(this.p)),r=this.pub.n,function(e){p=new w.Deferrals(e,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Priv.mod_pow_d_crt"}),d().random_zn(r,p.defer({assign_fn:function(){return n=arguments[0]},lineno:141})),p._fulfill()}((_=this,function(){for(o=n.modInverse(r),i=n.modPow(_.pub.e,r),a=e.multiply(i).mod(r),u=a.mod(_.p).modPow(_.dP,_.p),f=a.mod(_.q).modPow(_.dQ,_.q);u.compareTo(f)<0;)u=u.add(_.p);return h=u.subtract(f).multiply(_.qInv).mod(_.p).multiply(_.q).add(f),c=h.multiply(o).mod(r),t(c)}))},t}(),l=function(e){function t(e){this.n=e.n,this.e=e.e}return U(t,i),t.type=a.public_key_algorithms.RSA,t.prototype.type=t.type,t.ORDER=["n","e"],t.prototype.ORDER=t.ORDER,t.prototype.encrypt=function(e,t){return this.mod_pow(e,this.e,t)},t.prototype.verify=function(e,t){return this.mod_pow(e,this.e,t)},t.prototype.nbits=function(){var e;return null!=(e=this.n)?e.bitLength():void 0},t.alloc=function(e){return i.alloc(t,e)},t.prototype.mod_pow=function(e,t,r){return r(e.modPow(t,this.n))},t.prototype.validity_check=function(e){return e(this.n.gcd(this.e).equals(s.ONE)?this.n.mod(x(2)).equals(s.ONE)?this.e.compareTo(s.ONE)<=0?new Error("e <= 1"):this.e.bitLength()>32?new Error("e="+this.e+" > 2^32"):null:new Error("n % 2 != 1"):new Error("gcd(n,e) != 1"))},t}(),c=function(t){function r(e){var t,n;t=e.priv,n=e.pub,r.__super__.constructor.call(this,{priv:t,pub:n})}return U(r,o),r.type=a.public_key_algorithms.RSA,r.prototype.type=r.type,r.prototype.get_type=function(){return this.type},r.klass_name="RSA",r.Pub=l,r.prototype.Pub=l,r.Priv=h,r.prototype.Priv=h,r.parse=function(e){return o.parse(r,e)},r.alloc=function(e){var t,r;return r=e.pub,t=e.priv,o.alloc({pub:r,priv:t})},r.subkey_algo=function(e){return r},r.prototype.sanity_check=function(e){var t,r,n,i,o,s,a,f,c,h;f=w.findDeferral(arguments),t=0===this.priv.n().compareTo(this.pub.n)?null:new Error("pq != n"),(h=this,function(e){if(null!=t)return e();r=u().random_zn(h.pub.n),function(e){c=new w.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),h.encrypt(r,c.defer({assign_fn:function(){return n=arguments[0]},lineno:240})),c._fulfill()}(function(){!function(e){c=new w.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),h.decrypt(n,c.defer({assign_fn:function(){return t=arguments[0],i=arguments[1]},lineno:241})),c._fulfill()}(function(){return e(null==t&&0!==r.compareTo(i)?t=new Error("Decrypt/encrypt failed"):void 0)})})})(function(r){return function(){!function(e){if(null!=t)return e();o=u().random_zn(r.pub.n),function(e){c=new w.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),r.sign(o,c.defer({assign_fn:function(){return s=arguments[0]},lineno:246})),c._fulfill()}(function(){!function(e){c=new w.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),r.verify(s,c.defer({assign_fn:function(){return a=arguments[0]},lineno:247})),c._fulfill()}(function(){return e(0!==o.compareTo(a)&&(t=new Error("Sign/verify failed")))})})}(function(){return e(t)})}}(this))},r.parse_sig=function(e){var t,r,n,i;if(t=(i=_.mpi_from_buffer(e.peek_rest_to_buffer()))[0],n=i[1],i[2],r=i[3],null!=t)throw t;return e.advance(r),n},r.prototype.encrypt=function(e,t){return this.pub.encrypt(e,t)},r.prototype.decrypt=function(e,t){return this.priv.decrypt(e,t)},r.prototype.max_value=function(){return this.pub.n},r.make=function(e){var t,n,i,o,s,a,u,f,c,p,d,_;return u=e.p,p=e.q,o=e.e,e.phi,f=e.p1,d=e.q1,s=e.lambda,a=u.multiply(p),n=(t=o.modInverse(s)).mod(f),i=t.mod(d),_=u.modInverse(p),c=new l({n:a,e:o}),new r({priv:new h({p:u,q:p,d:t,dmp1:n,dmq1:i,u:_,pub:c}),pub:c})},r.prototype.to_openpgp=function(){var e;return(e=new((new RSA).keyObject)).n=this.pub.n,e.e=this.pub.e.intValue(),e.ee=this.pub.e,e.d=this.priv.d,e.p=this.priv.p,e.q=this.priv.q,e.dmp1=this.priv.dmp1,e.dmq1=this.priv.dmq1,e.u=this.priv.u,e},r.prototype.sign=function(e,t){return this.priv.sign(e,t)},r.prototype.verify=function(e,t){return this.pub.verify(e,t)},r.prototype.pad_and_encrypt=function(e,t,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=s=null,(f=this,function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_encrypt"}),g(e,f.pub.n.mpi_byte_length(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:306})),u._fulfill()})(function(e){return function(){!function(t){if(null!=i)return t();!function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_encrypt"}),e.encrypt(o,u.defer({assign_fn:function(){return n=arguments[0]},lineno:308})),u._fulfill()}(function(){return t(s=e.export_output({y_mpi:n}))})}(function(){return r(i,s)})}}(this))},r.prototype.decrypt_and_unpad=function(e,t,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=s=null,(f=this,function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.decrypt_and_unpad"}),f.decrypt(e.y(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:318})),u._fulfill()})(function(e){return function(){var t;return null==i&&(n=o.to_padded_octets(e.pub.n),t=b(n),i=t[0],s=t[1]),r(i,s)}}(this))},r.prototype.pad_and_sign=function(e,t,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),(i=t.hasher)||(i=p),n=i(e),o=v(n,this.pub.n.mpi_byte_length(),{hasher:i}),(f=this,function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_sign"}),f.sign(o,u.defer({assign_fn:function(){return s=arguments[0]},lineno:330})),u._fulfill()})(function(){return r(null,s.to_mpi_buffer())})},r.prototype.verify_unpad_and_check_hash=function(t,r){var n,i,o,s,a,u,f,c,h,l,p,d;h=w.findDeferral(arguments),f=t.sig,i=t.data,a=t.hasher,s=t.hash,o=null,e.isBuffer(f)&&(p=_.mpi_from_buffer(f),o=p[0],f=p[1]),(d=this,function(e){if(null!=o)return e();!function(e){l=new w.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.verify_unpad_and_check_hash"}),d.verify(f,l.defer({assign_fn:function(){return c=arguments[0]},lineno:339})),l._fulfill()}(function(){var t;return n=c.to_padded_octets(d.pub.n),t=m(n,a),o=t[0],u=t[1],e(null==o?(s||(s=a(i)),y(u,s)?void 0:o=new Error("hash mismatch")):void 0)})})(function(){return r(o)})},r.generate=function(e,t){var i,o,a,u,f,c,h,l,p,d,_,y,b,g,m,v;m=w.findDeferral(arguments),p=e.nbits,c=e.iters,o=e.e,i=e.asp,o||(o=65537),a=o,p||(p=4096),c||(c=10),i||(i=new n({})),o=x(a),u=E(t,"generate_rsa_keypair"),f=!0,p>>=1,function(e){var t;(t=function(e){var r;if(r=function(){return w.trampoline(function(){return t(e)})},!f)return e();v=new w.Deferrals(function(){v=new w.Deferrals(function(){v=new w.Deferrals(function(){v=new w.Deferrals(function(){var e;return d.compareTo(b)<=0&&(d=(e=[b,d])[0],b=e[1]),g=b.subtract(s.ONE),_=d.subtract(s.ONE),y=_.multiply(g),l=y.divide(g.gcd(_)),r(0!==y.gcd(o).compareTo(s.ONE)?("function"==typeof progress_hook&&progress_hook({what:"unlucky_phi"}),f=!0):f=!1)},{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),i.progress({what:"found",q:b},u(v.defer({lineno:366}))),v._fulfill()},{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),S({asp:i.section("q"),e:o,nbits:p,iters:c},u(v.defer({assign_fn:function(){return b=arguments[0]},lineno:365}))),v._fulfill()},{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),i.progress({what:"found",p:d},u(v.defer({lineno:364}))),v._fulfill()},{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),S({asp:i.section("p"),e:o,nbits:p,iters:c},u(v.defer({assign_fn:function(){return d=arguments[0]},lineno:363}))),v._fulfill()})(e)}(function(){return h=r.make({p:d,q:b,e:o,phi:y,p1:_,q1:g,lambda:l}),t(null,h)})},r.parse_output=function(e){return f.parse(e)},r.prototype.export_output=function(e){return new f(e)},r.prototype.validity_check=function(e){var t,r,n,i;r=w.findDeferral(arguments),(i=this,function(e){n=new w.Deferrals(e,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.validity_check"}),i.pub.validity_check(n.defer({assign_fn:function(){return t=arguments[0]},lineno:391})),n._fulfill()})(function(){return e(t)})},r}(),f=function(){function e(e){this.y_mpi=e.y_mpi,this.y_buf=e.y_buf}return e.parse=function(t){var r,n,i,o;if(r=(o=_.mpi_from_buffer(t))[0],i=o[1],n=o[2],o[3],null!=r)throw r;if(0!==n.length)throw new Error("junk at the end of input");return new e({y_mpi:i})},e.prototype.y=function(){return this.y_mpi},e.prototype.hide=function(e,t){var r,n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=e.key,o=e.max,s=e.slosh,o||(o=8192),s||(s=128),(f=this,function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Output.hide"}),i.hide({i:f.y(),max:o,slosh:s},u.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:417})),u._fulfill()})(function(e){return function(){return null==r&&(e.y_mpi=n,e.y_buf=null),t(r)}}(this))},e.prototype.find=function(e){var t;return t=e.key,this.y_mpi=t.find(this.y_mpi)},e.prototype.output=function(){return this.y_buf||this.y_mpi.to_mpi_buffer()},e}(),t.RSA=t.Pair=c,t.Output=f}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(24),o=r(72).WordArray,i=r(157).StreamCipher,n=function(){function e(e){var t,r;r=e.value,t=e.len,this._value=null!=r?r.clone():(null==t&&(t=2),new o(function(){var e,r;for(r=[],e=0;0<=t?et;0<=t?++e:--e)r.push(0);return r}()))}return e.prototype.WORD_MAX=4294967295,e.prototype.inc=function(){var t,r;for(t=!0,r=this._value.words.length-1;t&&r>=0;)++this._value.words[r]>e.WORD_MAX?this._value.words[r]=0:t=!1,r--;return this},e.prototype.inc_le=function(){var t,r;for(t=!0,r=0;t&&re.WORD_MAX?this._value.words[r]=0:t=!1,r++;return this},e.prototype.get=function(){return this._value},e.prototype.copy=function(){return this._value.clone()},e}(),e=function(e){function t(e){if(this.block_cipher=e.block_cipher,this.iv=e.iv,t.__super__.constructor.call(this),this.bsiw=this.block_cipher.blockSize/4,this.iv.sigBytes!==this.block_cipher.blockSize)throw new Error("IV is wrong length ("+this.iv.sigBytes+")");this.ctr=new n({value:this.iv})}return function(e,t){for(var r in t)f.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,i),t.prototype.scrub=function(){return this.block_cipher.scrub()},t.prototype.get_pad=function(){var e;return e=this.ctr.copy(),this.ctr.inc(),this.block_cipher.encryptBlock(e.words),e},t}(),a=function(t){var r,n,i,o,s;return r=t.block_cipher,o=t.iv,i=t.input,s=(n=new e({block_cipher:r,iv:o})).encrypt(i),n.scrub(),s},s=function(t,r){var n,i,o,s,a,f,c,h,l;h=u.findDeferral(arguments),n=t.block_cipher,s=t.iv,o=t.input,a=t.progress_hook,c=t.what,i=new e({block_cipher:n,iv:s}),function(e){l=new u.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/triplesec/src/ctr.iced"}),i.bulk_encrypt({input:o,progress_hook:a,what:c},l.defer({assign_fn:function(){return f=arguments[0]},lineno:121})),l._fulfill()}(function(){return r(f)})},t.Counter=n,t.Cipher=e,t.encrypt=a,t.bulk_encrypt=s}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h={}.hasOwnProperty,l=function(e,t){for(var r in t)h.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};c=r(422),i=c.HMAC,f=c.bulk_sign,s=r(403).SHA512,o=r(594).SHA3,a=r(72).WordArray,e=function(){function e(){this.hasherBlockSize=this.hashers[0].hasherBlockSize,this.hasherBlockSizeBytes=4*this.hasherBlockSize,this.reset()}return e.prototype.reset=function(){var e,t,r;for(e=0,t=(r=this.hashers).length;e0?n=new Error("bad r"):s.signum()<=0||a.compareTo(this.curve.p)>0?n=new Error("bad s"):(o=this.curve.n,c=a.modInverse(o),u=i.multiply(c).mod(o),f=s.multiply(c).mod(o),this.curve.G.multiplyTwo(u,this.R,f).affineX.mod(o).equals(s)||(n=new Error("verification failed"))),r(n)},t}(),f=function(e){function t(e){this.x=e.x,this.pub=e.pub}return m(t,i),t.ORDER=["x"],t.prototype.ORDER=t.ORDER,t.alloc=function(e,r){return i.alloc(t,e,{pub:r})},t.prototype.sign=function(e,t){var r,n,i,o,s,a,u,f,c,h,l;f=p.findDeferral(arguments),h=this.pub.curve,s=h.n,r=h.G,i=this.pub.trunc_hash(e),(l=this,function(e){c=new p.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdsa.iced",funcname:"Priv.sign"}),l.pub.curve.random_scalar(c.defer({assign_fn:function(){return o=arguments[0]},lineno:79})),c._fulfill()})(function(e){return function(){if(n=r.multiply(o),0===(a=n.affineX.mod(s)).signum())throw new Error("invalid r-value");return u=o.modInverse(s).multiply(i.add(e.x.multiply(a))).mod(s),t([a,u])}}(this))},t}(),u=function(t){function r(e){var t,n;n=e.pub,t=e.priv,r.__super__.constructor.call(this,{pub:n,priv:t})}return m(r,o),r.Pub=c,r.prototype.Pub=c,r.Priv=f,r.prototype.Priv=f,r.type=s.public_key_algorithms.ECDSA,r.prototype.type=r.type,r.klass_name="ECDSA",r.prototype.get_type=function(){return this.type},r.parse=function(e){return o.parse(r,e)},r.prototype.can_encrypt=function(){return!1},r.subkey_algo=function(e){return e&(s.key_flags.certify_keys|s.key_flags.sign_data)?r:a},r.prototype.fulfills_flags=function(e){return(e&(s.key_flags.certify_keys|s.key_flags.sign_data))===e},r.prototype.verify_unpad_and_check_hash=function(e,t){var n,i,o,s;return s=e.sig,n=e.data,o=e.hasher,i=e.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:r},t)},r.prototype.pad_and_sign=function(t,r,n){var i,o,s,a,u,f,c;u=p.findDeferral(arguments),(o=r.hasher)||(o=SHA512),i=o(t),(c=this,function(e){f=new p.Deferrals(e,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdsa.iced",funcname:"Pair.pad_and_sign"}),c.priv.sign(i,f.defer({assign_fn:function(){return a=arguments[0]},lineno:134})),f._fulfill()})(function(){return n(null,e.concat(function(){var e,t,r;for(r=[],e=0,t=a.length;e0},e.prototype.get_data_signer=function(){return this.lookup.data.length>0?this.lookup.data[0]:null},e.prototype.get_data_signers=function(){return this.lookup.data},e.prototype.get_subkey_binding=function(){return this.lookup.subkey_binding.length?this.lookup.subkey_binding[0]:null},e}(),t.SelfSig=i,t.SubkeyBinding=o,t.Data=n,t.Collection=r}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f={}.hasOwnProperty,c=[].indexOf||function(e){for(var t=0,r=this.length;t0&&(a=0,h=[]),f.is_duplicate_primary()||h.push(f),g()}(function(){var t;a++,t=d._get_issuer(n,f,d.primary),i=t[0],o=t[1],r=t[2],function(t){if(null==i)return t();!function(t){if(o||f.type===e.sig_types.key_revocation)return t();d.warnings.push("Skipping signature by another issuer: "+(null!=i?i.toString("hex"):void 0)+" != "+(null!=r?r.toString("hex"):void 0)),g()}(function(){f.key=d.primary.key,f.primary=d.primary,f.is_third_party=!o,function(e){p=new u.Deferrals(e,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"KeyBlock._verify_sigs"}),f.verify(h,p.defer({assign_fn:function(){return c=arguments[0]},lineno:137}),d.opts),p._fulfill()}(function(){return t(null!=c?(s="Signature failure in packet "+n+": "+c.message+" ("+i.toString("hex")+")",d.warnings.push(s)):d.verified_signatures.push(f))})})}(m)})})(t)})(function(){return t(null)})},t}(),i=function(){function t(e){this.keyfetch=e.keyfetch,this.data_fn=e.data_fn,this.data=e.data,this.strict=e.strict,this.now=e.now,this.literals=[],this.enc_data_packet=null,this.warnings=new o}return t.prototype._get_session_key=function(e){var t,r,n,i,o,s,a,f,c,l,p,d,_,y,b,g;y=u.findDeferral(arguments),n=[],r=null,p=!1,s=function(){var e;for(e=[];this.packets.length&&(c=this.packets[0].to_esk_packet());)n.push(c),this.packets.shift(),e.push(c.get_key_id());return e}.call(this),(g=this,function(e){if(!s.length)return e(t=!1);t=!0,function(e){b=new u.Deferrals(e,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._get_session_key"}),g.keyfetch.fetch(s,h.ops.decrypt,b.defer({assign_fn:function(){return r=arguments[0],f=arguments[1],o=arguments[2]},lineno:178})),b._fulfill()}(function(){!function(e){if(null!=r)return e();l=n[o],a=f.find_pgp_key_material(s[o]),i=a.get_fingerprint(),d=a.key,function(e){b=new u.Deferrals(e,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._get_session_key"}),d.decrypt_and_unpad(l.ekey,{fingerprint:i},b.defer({assign_fn:function(){return r=arguments[0],_=arguments[1],p=arguments[2]},lineno:184})),b._fulfill()}(function(){return e(null==r?g.encryption_subkey=a:void 0)})}(e)})})(function(){return e(r,t,_,p)})},t.prototype._find_encrypted_data=function(e){var t,r;return t=r=null,this.packets.length&&(r=this.packets[0].to_enc_data_packet())?this.packets.pop():t=new Error("Could not find encrypted data packet"),e(t,r)},t.prototype._decrypt_with_session_key=function(e,t,r,n){var i,o,s,a,h,l;a=u.findDeferral(arguments),l=c(function(){return f(e,r)}),o=l[0],i=l[1],function(e){if(null!=o)return e();!function(e){h=new u.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt_with_session_key"}),t.decrypt({cipher:i},h.defer({assign_fn:function(){return o=arguments[0],s=arguments[1]},lineno:206})),h._fulfill()}(e)}(function(){return n(o,s)})},t.prototype._parse=function(e,t){var r;return t((r=p(e))[0],r[1])},t.prototype._decrypt=function(e){var t,r,n,i,o,s,a,f,c,h;f=u.findDeferral(arguments),r=l(e,"Message::decrypt"),(h=this,function(e){c=new u.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),h._get_session_key(r(c.defer({assign_fn:function(){return n=arguments[0],a=arguments[1],o=arguments[2]},lineno:219}))),c._fulfill()})(function(h){return function(){!function(e){if(!n)return e();!function(e){c=new u.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),h._find_encrypted_data(r(c.defer({assign_fn:function(){return t=arguments[0]},lineno:221}))),c._fulfill()}(function(){!function(e){c=new u.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),h._decrypt_with_session_key(a,t,o,r(c.defer({assign_fn:function(){return s=arguments[0]},lineno:222}))),c._fulfill()}(function(){!function(e){c=new u.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),h._parse(s,r(c.defer({assign_fn:function(){return i=arguments[0]},lineno:223}))),c._fulfill()}(function(){return e(h.packets=i.concat(h.packets))})})})}(function(){return e(null)})}}(this))},t.prototype._inflate=function(e){var t,r,n,i,o,s,a;o=u.findDeferral(arguments),i=[],t=l(e,"Message::_inflate"),(a=this,function(e){var f,c,h,l;h=a.packets,c=h.length,f=0,(l=function(e){var p;if(p=function(){return u.trampoline(function(){return++f,l(e)})},!(f>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=e[s=e[o=e[i]]],n=257*e[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^e[e[e[a^o]]],u^=e[e[u]]);return!0},e}(),i=new o,e=function(e){function t(e){this._key=e.clone(),this._doReset()}return function(e,t){for(var r in t)a.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.blockSize=16,t.prototype.blockSize=t.blockSize,t.keySize=32,t.prototype.keySize=t.keySize,t.ivSize=t.blockSize,t.prototype.ivSize=t.ivSize,t.prototype._doReset=function(){var e,t,r,n,o,s,a,u;for(r=this._key.words,t=this._key.sigBytes/4,this._nRounds=t+6,o=4*(this._nRounds+1),this._keySchedule=[],n=a=0;0<=o?ao;n=0<=o?++a:--a)this._keySchedule[n]=n>>24,s=i.SBOX[s>>>24]<<24|i.SBOX[s>>>16&255]<<16|i.SBOX[s>>>8&255]<<8|i.SBOX[255&s],s^=i.RCON[n/t|0]<<24):t>6&&n%t==4&&(s=i.SBOX[s>>>24]<<24|i.SBOX[s>>>16&255]<<16|i.SBOX[s>>>8&255]<<8|i.SBOX[255&s]),this._keySchedule[n-t]^s);for(this._invKeySchedule=[],e=u=0;0<=o?uo;e=0<=o?++u:--u)n=o-e,s=this._keySchedule[n-(e%4?0:4)],this._invKeySchedule[e]=e<4||n<=4?s:i.INV_SUB_MIX[0][i.SBOX[s>>>24]]^i.INV_SUB_MIX[1][i.SBOX[s>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[s>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&s]];return!0},t.prototype.encryptBlock=function(e,t){return null==t&&(t=0),this._doCryptBlock(e,t,this._keySchedule,i.SUB_MIX,i.SBOX)},t.prototype.decryptBlock=function(e,t){var r,n;return null==t&&(t=0),r=[e[t+3],e[t+1]],e[t+1]=r[0],e[t+3]=r[1],this._doCryptBlock(e,t,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX),n=[e[t+3],e[t+1]],e[t+1]=n[0],e[t+3]=n[1],n},t.prototype.scrub=function(){return s(this._keySchedule),s(this._invKeySchedule),this._key.scrub()},t.prototype._doCryptBlock=function(e,t,r,n,i){var o,s,a,u,f,c,h,l,p,d,_;for(s=e[t]^r[0],a=e[t+1]^r[1],u=e[t+2]^r[2],f=e[t+3]^r[3],o=4,d=1,_=this._nRounds;1<=_?d<_:d>_;1<=_?++d:--d)c=n[0][s>>>24]^n[1][a>>>16&255]^n[2][u>>>8&255]^n[3][255&f]^r[o++],h=n[0][a>>>24]^n[1][u>>>16&255]^n[2][f>>>8&255]^n[3][255&s]^r[o++],l=n[0][u>>>24]^n[1][f>>>16&255]^n[2][s>>>8&255]^n[3][255&a]^r[o++],p=n[0][f>>>24]^n[1][s>>>16&255]^n[2][a>>>8&255]^n[3][255&u]^r[o++],s=c,a=h,u=l,f=p;return c=(i[s>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^r[o++],h=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&s])^r[o++],l=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[s>>>8&255]<<8|i[255&a])^r[o++],p=(i[f>>>24]<<24|i[s>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^r[o++],e[t]=c,e[t+1]=h,e[t+2]=l,e[t+3]=p},t}(),t.AES=e}).call(this)},function(e,t,r){(function(){var e,n,i,o,s={}.hasOwnProperty;e=r(157).BlockCipher,o=r(110).scrub_vec,i=function(){return function(){this.P=[[169,103,179,232,4,253,163,118,154,146,128,120,228,221,209,56,13,198,53,152,24,247,236,108,67,117,55,38,250,19,148,72,242,208,139,48,132,84,223,35,25,91,61,89,243,174,162,130,99,1,131,46,217,81,155,124,166,235,165,190,22,12,227,97,192,140,58,245,115,44,37,11,187,78,137,107,83,106,180,241,225,230,189,69,226,244,182,102,204,149,3,86,212,28,30,215,251,195,142,181,233,207,191,186,234,119,57,175,51,201,98,113,129,121,9,173,36,205,249,216,229,197,185,77,68,8,134,231,161,29,170,237,6,112,178,210,65,123,160,17,49,194,39,144,32,246,96,255,150,92,177,171,158,156,82,27,95,147,10,239,145,133,73,238,45,79,143,59,71,135,109,70,214,62,105,100,42,206,203,47,252,151,5,122,172,127,213,26,75,14,167,90,40,20,63,41,136,60,76,2,184,218,176,23,85,31,138,125,87,199,141,116,183,196,159,114,126,21,34,18,88,7,153,52,110,80,222,104,101,188,219,248,200,168,43,64,220,254,50,164,202,16,33,240,211,93,15,0,111,157,54,66,74,94,193,224],[117,243,198,244,219,123,251,200,74,211,230,107,69,125,232,75,214,50,216,253,55,113,241,225,48,15,248,27,135,250,6,63,94,186,174,91,138,0,188,157,109,193,177,14,128,93,210,213,160,132,7,20,181,144,44,163,178,115,76,84,146,116,54,81,56,176,189,90,252,96,98,150,108,66,247,16,124,40,39,140,19,149,156,199,36,70,59,112,202,227,133,203,17,208,147,184,166,131,32,255,159,119,195,204,3,111,8,191,64,231,43,226,121,12,170,130,65,58,234,185,228,154,164,151,126,218,122,23,102,148,161,29,61,240,222,179,11,114,167,28,239,209,83,62,143,51,38,95,236,118,42,73,129,136,238,33,196,26,235,217,197,57,153,205,173,49,139,1,24,35,221,31,78,45,249,72,79,242,101,142,120,92,88,25,141,229,152,87,103,127,5,100,175,99,182,254,245,183,60,165,206,233,104,68,224,77,67,105,41,46,172,21,89,168,10,158,110,71,223,52,53,106,207,220,34,201,192,155,137,212,237,171,18,162,13,82,187,2,47,169,215,97,30,180,80,4,246,194,22,37,134,86,85,9,190,145]],this.P_00=1,this.P_01=0,this.P_02=0,this.P_03=1,this.P_04=1,this.P_10=0,this.P_11=0,this.P_12=1,this.P_13=1,this.P_14=0,this.P_20=1,this.P_21=1,this.P_22=0,this.P_23=0,this.P_24=0,this.P_30=0,this.P_31=1,this.P_32=1,this.P_33=0,this.P_34=1,this.GF256_FDBK=361,this.GF256_FDBK_2=this.GF256_FDBK/2,this.GF256_FDBK_4=this.GF256_FDBK/4,this.RS_GF_FDBK=333,this.SK_STEP=33686018,this.SK_BUMP=16843009,this.SK_ROTL=9}}(),n=new i,t.TwoFish=function(t){function r(e){this._key=e.clone(),this.gMDS0=[],this.gMDS1=[],this.gMDS2=[],this.gMDS3=[],this.gSubKeys=[],this.gSBox=[],this.k64Cnt=0,this._doReset()}return function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,e),r.blockSize=16,r.prototype.blockSize=r.blockSize,r.keySize=32,r.prototype.keySize=r.keySize,r.ivSize=r.blockSize,r.prototype.ivSize=r.ivSize,r.prototype.getByte=function(e,t){return e>>>8*t&255},r.prototype.switchEndianness=function(e){return(255&e)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>24&255},r.prototype.LFSR1=function(e){return e>>1^(0!=(1&e)?n.GF256_FDBK_2:0)},r.prototype.LFSR2=function(e){return e>>2^(0!=(2&e)?n.GF256_FDBK_2:0)^(0!=(1&e)?n.GF256_FDBK_4:0)},r.prototype.Mx_X=function(e){return e^this.LFSR2(e)},r.prototype.Mx_Y=function(e){return e^this.LFSR1(e)^this.LFSR2(e)},r.prototype.RS_rem=function(e){var t,r,i;return r=255&((t=e>>>24&255)<<1^(0!=(128&t)?n.RS_GF_FDBK:0)),e<<8^(i=t>>>1^(0!=(1&t)?n.RS_GF_FDBK>>>1:0)^r)<<24^r<<16^i<<8^t},r.prototype.RS_MDS_Encode=function(e,t){var r,n,i;for(r=t,n=0;n<4;++n)r=this.RS_rem(r);for(r^=e,i=0;i<4;++i)r=this.RS_rem(r);return r},r.prototype.F32=function(e,t){var r,i,o,s,a,u,f,c,h;return r=this.getByte(e,0),i=this.getByte(e,1),o=this.getByte(e,2),s=this.getByte(e,3),a=t[0],u=t[1],f=t[2],c=t[3],1===(h=3&this.k64Cnt)?this.gMDS0[255&n.P[n.P_01][r]^this.getByte(a,0)]^this.gMDS1[255&n.P[n.P_11][i]^this.getByte(a,1)]^this.gMDS2[255&n.P[n.P_21][o]^this.getByte(a,2)]^this.gMDS3[255&n.P[n.P_31][s]^this.getByte(a,3)]:(0===h&&(r=255&n.P[n.P_04][r]^this.getByte(c,0),i=255&n.P[n.P_14][i]^this.getByte(c,1),o=255&n.P[n.P_24][o]^this.getByte(c,2),s=255&n.P[n.P_34][s]^this.getByte(c,3)),(0===h||3===h)&&(r=255&n.P[n.P_03][r]^this.getByte(f,0),i=255&n.P[n.P_13][i]^this.getByte(f,1),o=255&n.P[n.P_23][o]^this.getByte(f,2),s=255&n.P[n.P_33][s]^this.getByte(f,3)),this.gMDS0[255&n.P[n.P_01][255&n.P[n.P_02][r]^this.getByte(u,0)]^this.getByte(a,0)]^this.gMDS1[255&n.P[n.P_11][255&n.P[n.P_12][i]^this.getByte(u,1)]^this.getByte(a,1)]^this.gMDS2[255&n.P[n.P_21][255&n.P[n.P_22][o]^this.getByte(u,2)]^this.getByte(a,2)]^this.gMDS3[255&n.P[n.P_31][255&n.P[n.P_32][s]^this.getByte(u,3)]^this.getByte(a,3)])},r.prototype.Fe32_0=function(e){return this.gSBox[0+2*(255&e)]^this.gSBox[1+2*(e>>>8&255)]^this.gSBox[512+2*(e>>>16&255)]^this.gSBox[513+2*(e>>>24&255)]},r.prototype.Fe32_3=function(e){return this.gSBox[0+2*(e>>>24&255)]^this.gSBox[1+2*(255&e)]^this.gSBox[512+2*(e>>>8&255)]^this.gSBox[513+2*(e>>>16&255)]},r.prototype._doReset=function(){var e,t,r,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B;if(p=[],d=[],w=[],y=[],b=[],g=[],this.k64Cnt=this._key.words.length/2,this.k64Cnt<1)throw"Key size less than 64 bits";if(this.k64Cnt>4)throw"Key size larger than 256 bits";for(a=k=0;k<256;a=++k)u=255&n.P[0][a],y[0]=u,b[0]=255&this.Mx_X(u),g[0]=255&this.Mx_Y(u),u=255&n.P[1][a],y[1]=u,b[1]=255&this.Mx_X(u),g[1]=255&this.Mx_Y(u),this.gMDS0[a]=y[n.P_00]|b[n.P_00]<<8|g[n.P_00]<<16|g[n.P_00]<<24,this.gMDS1[a]=g[n.P_10]|g[n.P_10]<<8|b[n.P_10]<<16|y[n.P_10]<<24,this.gMDS2[a]=b[n.P_20]|g[n.P_20]<<8|y[n.P_20]<<16|g[n.P_20]<<24,this.gMDS3[a]=b[n.P_30]|y[n.P_30]<<8|g[n.P_30]<<16|b[n.P_30]<<24;for(a=E=0,A=this.k64Cnt;0<=A?EA;a=0<=A?++E:--E)m=2*a,p[a]=this.switchEndianness(this._key.words[m]),d[a]=this.switchEndianness(this._key.words[m+1]),w[this.k64Cnt-1-a]=this.RS_MDS_Encode(p[a],d[a]);for(a=x=0,20;x<20;a=++x)v=a*n.SK_STEP,e=this.F32(v,p),e+=t=(t=this.F32(v+n.SK_BUMP,d))<<8|t>>>24,this.gSubKeys[2*a]=e,e+=t,this.gSubKeys[2*a+1]=e<>>32-n.SK_ROTL;for(f=w[0],c=w[1],h=w[2],l=w[3],this.gSBox=[],B=[],a=S=0;S<256;a=++S)r=i=o=s=a,1===(_=3&this.k64Cnt)?(this.gSBox[2*a]=this.gMDS0[255&n.P[n.P_01][r]^this.getByte(f,0)],this.gSBox[2*a+1]=this.gMDS1[255&n.P[n.P_11][i]^this.getByte(f,1)],this.gSBox[2*a+512]=this.gMDS2[255&n.P[n.P_21][o]^this.getByte(f,2)],B.push(this.gSBox[2*a+513]=this.gMDS3[255&n.P[n.P_31][s]^this.getByte(f,3)])):(0===_&&(r=255&n.P[n.P_04][r]^this.getByte(l,0),i=255&n.P[n.P_14][i]^this.getByte(l,1),o=255&n.P[n.P_24][o]^this.getByte(l,2),s=255&n.P[n.P_34][s]^this.getByte(l,3)),0!==_&&3!==_||(r=255&n.P[n.P_03][r]^this.getByte(h,0),i=255&n.P[n.P_13][i]^this.getByte(h,1),o=255&n.P[n.P_23][o]^this.getByte(h,2),s=255&n.P[n.P_33][s]^this.getByte(h,3)),this.gSBox[2*a]=this.gMDS0[255&n.P[n.P_01][255&n.P[n.P_02][r]^this.getByte(c,0)]^this.getByte(f,0)],this.gSBox[2*a+1]=this.gMDS1[255&n.P[n.P_11][255&n.P[n.P_12][i]^this.getByte(c,1)]^this.getByte(f,1)],this.gSBox[2*a+512]=this.gMDS2[255&n.P[n.P_21][255&n.P[n.P_22][o]^this.getByte(c,2)]^this.getByte(f,2)],B.push(this.gSBox[2*a+513]=this.gMDS3[255&n.P[n.P_31][255&n.P[n.P_32][s]^this.getByte(c,3)]^this.getByte(f,3)]));return B},r.prototype.scrub=function(){return o(this.gSubKeys),o(this.gSBox),this._key.scrub()},r.prototype.decryptBlock=function(e,t){var r,n,i,o,s,a,u,f;for(null==t&&(t=0),a=this.switchEndianness(e[t])^this.gSubKeys[4],u=this.switchEndianness(e[t+1])^this.gSubKeys[5],o=this.switchEndianness(e[t+2])^this.gSubKeys[6],s=this.switchEndianness(e[t+3])^this.gSubKeys[7],r=39,f=0;f<16;f+=2)s^=(n=this.Fe32_0(a))+2*(i=this.Fe32_3(u))+this.gSubKeys[r--],o=(o<<1|o>>>31)^n+i+this.gSubKeys[r--],s=s>>>1|s<<31,u^=(n=this.Fe32_0(o))+2*(i=this.Fe32_3(s))+this.gSubKeys[r--],a=(a<<1|a>>>31)^n+i+this.gSubKeys[r--],u=u>>>1|u<<31;return e[t]=this.switchEndianness(o^this.gSubKeys[0]),e[t+1]=this.switchEndianness(s^this.gSubKeys[1]),e[t+2]=this.switchEndianness(a^this.gSubKeys[2]),e[t+3]=this.switchEndianness(u^this.gSubKeys[3])},r.prototype.encryptBlock=function(e,t){var r,n,i,o,s,a,u,f;for(null==t&&(t=0),o=this.switchEndianness(e[t])^this.gSubKeys[0],s=this.switchEndianness(e[t+1])^this.gSubKeys[1],a=this.switchEndianness(e[t+2])^this.gSubKeys[2],u=this.switchEndianness(e[t+3])^this.gSubKeys[3],r=8,f=0;f<16;f+=2)a=(a^=(n=this.Fe32_0(o))+(i=this.Fe32_3(s))+this.gSubKeys[r++])>>>1|a<<31,u=(u<<1|u>>>31)^n+2*i+this.gSubKeys[r++],o=(o^=(n=this.Fe32_0(a))+(i=this.Fe32_3(u))+this.gSubKeys[r++])>>>1|o<<31,s=(s<<1|s>>>31)^n+2*i+this.gSubKeys[r++];return e[t]=this.switchEndianness(a^this.gSubKeys[4]),e[t+1]=this.switchEndianness(u^this.gSubKeys[5]),e[t+2]=this.switchEndianness(o^this.gSubKeys[6]),e[t+3]=this.switchEndianness(s^this.gSubKeys[7])},r}()}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u={}.hasOwnProperty;o=r(72).WordArray,n=r(157).Hasher,e=function(){function e(){this.H=[],this.K=[],this.W=[],this.init()}return e.prototype.isPrime=function(e){var t,r,n;if(2===e||3===e||5===e||7===e)return!0;if(1===e||4===e||6===e||8===e||9===e)return!1;for(r=Math.ceil(Math.sqrt(e)),t=n=2;2<=r?n<=r:n>=r;t=2<=r?++n:--n)if(e%t==0)return!1;return!0},e.prototype.getFractionalBits=function(e){return 4294967296*(e-(0|e))|0},e.prototype.init=function(){var e,t,r;for(e=2,t=0,r=[];t<64;)this.isPrime(e)&&(t<8&&(this.H[t]=this.getFractionalBits(Math.pow(e,.5))),this.K[t]=this.getFractionalBits(Math.pow(e,1/3)),t++),r.push(e++);return r},e}(),s=new e,i=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)u.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.blockSize=16,t.prototype.blockSize=t.blockSize,t.output_size=32,t.prototype.output_size=t.output_size,t.prototype._doReset=function(){return this._hash=new o(s.H.slice(0))},t.prototype.get_output_size=function(){return this.output_size},t.prototype._doProcessBlock=function(e,t){var r,n,i,o,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k;for(r=this._hash.words,i=s.W,n=s.K,o=r[0],a=r[1],u=r[2],f=r[3],c=r[4],h=r[5],l=r[6],b=r[7],g=k=0;k<64;g=++k)g<16?i[g]=0|e[t+g]:(p=((d=i[g-15])<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,_=((y=i[g-2])<<15|y>>>17)^(y<<13|y>>>19)^y>>>10,i[g]=p+i[g-7]+_+i[g-16]),m=o&a^o&u^a&u,v=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=b+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&h^~c&l)+n[g]+i[g],b=l,l=h,h=c,c=f+w|0,f=u,u=a,a=o,o=w+(v+m)|0;return r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+u|0,r[3]=r[3]+f|0,r[4]=r[4]+c|0,r[5]=r[5]+h|0,r[6]=r[6]+l|0,r[7]=r[7]+b|0},t.prototype._doFinalize=function(){var e,t,r,n;return t=(e=this._data).words,n=8*this._nDataBytes,t[(r=8*e.sigBytes)>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},t.prototype.scrub=function(){return this._hash.scrub()},t.prototype.copy_to=function(e){return t.__super__.copy_to.call(this,e),e._hash=this._hash.clone()},t.prototype.clone=function(){var e;return e=new t,this.copy_to(e),e},t}(),a=function(e){var t;return t=(new i).finalize(e),e.scrub(),t},t.SHA256=i,t.transform=a}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(72),o=u.WordArray,s=u.X64Word,u.X64WordArray,n=r(157).Hasher,e=function(){function e(){this.RHO_OFFSETS=[],this.PI_INDEXES=[],this.ROUND_CONSTANTS=[],this.T=[],this.compute_rho_offsets(),this.compute_pi_indexes(),this.compute_round_constants(),this.make_reusables()}return e.prototype.compute_rho_offsets=function(){var e,t,r,n,i,o;for(r=1,n=0,o=[],t=i=0;i<24;t=++i)this.RHO_OFFSETS[r+5*n]=(t+1)*(t+2)/2%64,e=(2*r+3*n)%5,r=n%5,o.push(n=e);return o},e.prototype.compute_pi_indexes=function(){var e,t,r,n;for(n=[],e=r=0;r<5;e=++r)n.push(function(){var r,n;for(n=[],t=r=0;r<5;t=++r)n.push(this.PI_INDEXES[e+5*t]=t+(2*e+3*t)%5*5);return n}.call(this));return n},e.prototype.compute_round_constants=function(){var e,t,r,n,i,o,a,u,f;for(e=1,f=[],r=a=0;a<24;r=++a){for(o=0,i=0,n=u=0;u<7;n=++u)1&e&&((t=(1<w;y=0<=w?++I:--I)n=16711935&((n=e[t+2*y])<<8|n>>>24)|4278255360&(n<<24|n>>>8),i=16711935&((i=e[t+2*y+1])<<8|i>>>24)|4278255360&(i<<24|i>>>8),(b=S[y]).high^=i,b.low^=n;for(N=[],E=U=0;U<24;E=++U){for(M=R=0;R<5;M=++R){for(D=B=0,P=T=0;T<5;P=++T)D^=(b=S[M+5*P]).high,B^=b.low;(f=r.T[M]).high=D,f.low=B}for(M=C=0;C<5;M=++C)for(_=r.T[(M+4)%5],p=(c=r.T[(M+1)%5]).high,l=c.low,D=_.high^(p<<1|l>>>31),B=_.low^(l<<1|p>>>31),P=F=0;F<5;P=++F)(b=S[M+5*P]).high^=D,b.low^=B;for(g=O=1;O<25;g=++O)v=(b=S[g]).high,m=b.low,(k=r.RHO_OFFSETS[g])<32?(D=v<>>32-k,B=m<>>32-k):(D=m<>>64-k,B=v<>>64-k),(u=r.T[r.PI_INDEXES[g]]).high=D,u.low=B;for(o=r.T[0],A=S[0],o.high=A.high,o.low=A.low,M=z=0;z<5;M=++z)for(P=L=0;L<5;P=++L)b=S[g=M+5*P],s=r.T[g],h=r.T[(M+1)%5+5*P],d=r.T[(M+2)%5+5*P],b.high=s.high^~h.high&d.high,b.low=s.low^~h.low&d.low;b=S[0],x=r.ROUND_CONSTANTS[E],b.high^=x.high,N.push(b.low^=x.low)}return N},t.prototype._doFinalize=function(){var e,t,r,n,i,s,a,u,f,c,h,l,p;for(r=(t=this._data).words,8*this._nDataBytes,f=8*t.sigBytes,e=32*this.blockSize,r[f>>>5]|=1<<24-f%32,r[(Math.ceil((f+1)/e)*e>>>5)-1]|=128,t.sigBytes=4*r.length,this._process(),l=this._state,h=(c=this.outputLength/8)/8,n=[],i=p=0;0<=h?ph;i=0<=h?++p:--p)u=16711935&((u=(s=l[i]).high)<<8|u>>>24)|4278255360&(u<<24|u>>>8),a=16711935&((a=s.low)<<8|a>>>24)|4278255360&(a<<24|a>>>8),n.push(a),n.push(u);return new o(n,c)},t.prototype.copy_to=function(e){var r;return t.__super__.copy_to.call(this,e),e._state=function(){var e,t,n,i;for(i=[],e=0,t=(n=this._state).length;e1,(r=function(t){var n;if(n=function(){return o.trampoline(function(){return b?a+=1:a-=1,r(t)})},!0===b&&a>f||!1===b&&a>2,this.len=function(){switch(3&e){case 0:return this.slice.read_uint8();case 1:return this.slice.read_uint16();case 2:return this.slice.read_uint32();case 3:return this.slice.rem()}}.call(this)},t.prototype.parse_tag_and_len_new=function(e){return this.tag=63&e,this.parse_tag_len_new()},t.prototype.parse_tag_len_new=function(){var t,r,n,i,o;for(r=!0,o=[],this.len=0,n=0;r;)r=!1,n=(t=this.slice.read_uint8())<192?t:255===t?this.slice.read_uint32():t<224?(t-192<<8)+(this.slice.read_uint8()+192):(this.header_len||(this.header_len=this.slice.offset()),i=1<<(31&t),o.push(this.slice.read_buffer(i)),r=!0,i),this.len+=n;if(o.length)return o.push(this.slice.read_buffer(n)),this.body=new d(e.concat(o)),this.len=this.body.length,this.real_packet_len=this.slice.offset()},t}(),t.parse=function(e){return b.katch(function(){return new u(new d(e)).parse()})}}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b={}.hasOwnProperty,g=function(e,t){for(var r in t)b.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};h=r(24),l=r(596),c=r(310).SlicerBuffer,d=r(28).uint_to_buffer,y=r(158),i=y.BaseKeyPair,n=y.BaseKey,f=r(79).SRF,_=r(28),p=r(25),o=p.openpgp,u=function(t){function r(e){this.key=e.key}return g(r,n),r.type=o.public_key_algorithms.EDDSA,r.prototype.type=r.type,r.OID=new e([43,6,1,4,1,218,71,15,1]),r.prototype.OID=r.OID,r.MPI_LENGTH_HEADERS=new e([1,7,64]),r.prototype.MPI_LENGTH_HEADERS=r.MPI_LENGTH_HEADERS,r.prototype.nbits=function(){return 255},r.prototype.read_params=function(e){},r.prototype.trunc_hash=function(e){return bn.bn_from_left_n_bits(e,this.nbits())},r.prototype.serialize=function(){return e.concat([new e([this.OID.length]),this.OID,this.MPI_LENGTH_HEADERS,this.key])},r._alloc=function(e){var t,n,i,o,s,a;if(s=(a=new c(e)).rem(),n=a.read_uint8(),o=a.read_buffer(n),t=r.OID,!_.bufeq_secure(o,t))throw new Error("Wrong OID in EdDSA key");if(i=a.read_buffer(r.MPI_LENGTH_HEADERS.length),!_.bufeq_secure(i,r.MPI_LENGTH_HEADERS))throw new Error("Wrong MPI length headers");return[new r({key:a.read_buffer(l.sign.publicKeyLength)}),s-a.rem()]},r.alloc=function(e){var t,n,i,o;i=n=t=null;try{i=(o=r._alloc(e))[0],n=o[1]}catch(e){t=e}return[t,i,n]},r.prototype.verify=function(t,r,n){var i,o,s,a,u,f;return s=t[0],a=t[1],o=l.alloc({publicKey:this.key}),s=_.fit_to_size(l.sign.signatureLength/2,s),a=_.fit_to_size(l.sign.signatureLength/2,a),u=e.concat([s,a]),i=(f=o.verify({payload:r,sig:u,detached:!0}))[0],f[1],n(i)},r}(),a=function(t){function r(e){this.seed=e.seed,this.key=e.key,this.pub=e.pub}return g(r,n),r._alloc=function(t,n){var i,o,s,a,u,f,h,p,d;if(a=(f=new c(t)).rem(),(s=i=Math.ceil(f.read_uint16()/8))!==(o=l.sign.seedLength))throw new Error("Expected "+o+" bytes for EDDSA priv key, got "+s+".");if(p=f.read_buffer(i),u=(d=l.alloc({}).genFromSeed({seed:p})).publicKey,h=d.secretKey,!_.bufeq_secure(n.key,u))throw new Error("Loaded EDDSA private key but it does not match the public key.");return[new r({seed:p,key:new e(h),pub:n}),a-f.rem()]},r.alloc=function(e,t){var n,i,o,s;o=i=n=null;try{o=(s=r._alloc(e,t))[0],i=s[1]}catch(e){n=e}return[n,o,i]},r.prototype.sign=function(t,r){var n,i;return i=l.alloc({secretKey:this.key}).sign({payload:t}),n=l.sign.signatureLength/2,r([new e(i.slice(0,n)),new e(i.slice(n,2*n))])},r.prototype.serialize=function(){return e.concat([d(16,8*l.sign.seedLength),this.seed])},r}(),s=function(t){function r(e){var t,n;n=e.pub,t=e.priv,r.__super__.constructor.call(this,{pub:n,priv:t})}return g(r,i),r.Pub=u,r.prototype.Pub=u,r.Priv=a,r.prototype.Priv=a,r.type=o.public_key_algorithms.EDDSA,r.prototype.type=r.type,r.klass_name="EDDSA",r.prototype.get_type=function(){return this.type},r.parse=function(e){return i.parse(r,e)},r.prototype.can_encrypt=function(){return!1},r.subkey_algo=function(e){return e&(o.key_flags.certify_keys|o.key_flags.sign_data)?r:ECDH},r.prototype.fulfills_flags=function(e){return(e&(o.key_flags.certify_keys|o.key_flags.sign_data))===e},r.prototype.verify_unpad_and_check_hash=function(e,t){var n,i,o,s;return s=e.sig,n=e.data,o=e.hasher,i=e.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:r},t)},r.prototype.pad_and_sign=function(t,r,n){var i,o,s,a,u,f,c,l;f=h.findDeferral(arguments),(o=r.hasher)||(o=SHA512),i=o(t),(l=this,function(e){c=new h.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/eddsa.iced",funcname:"Pair.pad_and_sign"}),l.priv.sign(i,c.defer({assign_fn:function(){return u=arguments[0]},lineno:210})),c._fulfill()})(function(){return s=u[0],a=u[1],n(null,e.concat([d(16,8*s.length),s,d(16,8*a.length),a]))})},r.parse_sig=function(e){var t,n,i,o,s;if(t=e.peek_rest_to_buffer(),n=(s=r.read_sig_from_buf(t))[0],o=s[1],i=s[2],null!=n)throw n;return e.advance(i),o},r.eddsa_value_from_buffer=function(e){var t,r,n,i;return n=i=null,(t=e.readUInt16BE(0))>256||t<216?n=new Error("Got an unexpected number of Bits for an EdDSA value: "+t):(r=2+Math.ceil(t/8),i=e.slice(2,r),e=e.slice(r)),[n,i,e]},r.read_sig_from_buf=function(e){var t,n,i,o,s,a;return s=e.length,o=["r","s"],n=null,t=function(){var t,i,s,u;for(u=[],t=0,i=o.length;tp;)a.encryptBlock(s.words,0),u=s,s=i.from_buffer(l.slice(p,p+o)),u.xor(s,{n_words:s.words.length}),p+=o,s=u,e.push(u.to_buffer());return e}(),e.concat(h).slice(0,l.length)},s=function(t){var r,o,s,a,u,f,c,h,l,p,d;return o=t.block_cipher_class,h=t.key,a=t.cipher,u=t.ciphertext,c=t.iv,o||(o=n),a||(a=new o(i.from_buffer(h))),s=a.blockSize,c||(c=new e(function(){var e,t;for(t=[],e=0;0<=s?es;0<=s?++e:--e)t.push(0);return t}())),r=i.from_buffer(c.slice(0,s)),d=0,l=function(){var e;for(e=[];u.length>d;)a.encryptBlock(r.words,0),f=r,r=i.from_buffer(u.slice(d,d+s)),f.xor(r,{}),d+=s,e.push(f.to_buffer());return e}(),(p=e.concat(l)).slice(p,u.length)},t.encrypt=a,t.decrypt=s}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u;e=r(603).C,i=r(604).PpBuffer,o=r(605).U32MAX,s=function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e){return Math.floor(e)===e},u=function(e){var t,r;return t=Math.floor(e/o),[o-t-((r=e%o)>0?1:0),0===r?0:o-r]},t.Packer=n=function(){function t(e){this._opts=null!=e?e:{},this._buffer=new i}return t.prototype.output=function(){return this._buffer.freeze()},t.prototype.p=function(e){switch(typeof e){case"number":return this.p_number(e);case"string":return this.p_str(e);case"boolean":return this.p_boolean(e);case"undefined":return this.p_null();case"object":if(null==e)return this.p_null();if(s(e))return this.p_array(e);if(i.isBuffer(e))return this.p_bin(e);if(!this.p_ext(e))return this.p_obj(e)}},t.prototype.p_number=function(e){return a(e)?e>=0?this.p_positive_int(e):this.p_negative_int(e):this.p_pack_double(e)},t.prototype.p_pack_double=function(t){return null!=this._opts.floats?(this.p_uint8(e.float),this._buffer.push_float32(t)):(this.p_uint8(e.double),this._buffer.push_float64(t))},t.prototype.p_uint8=function(e){return this._buffer.push_uint8(e)},t.prototype.p_uint16=function(e){return this._buffer.push_uint16(e)},t.prototype.p_uint32=function(e){return this._buffer.push_uint32(e)},t.prototype.p_int8=function(e){return this._buffer.push_int8(e)},t.prototype.p_int16=function(e){return this._buffer.push_int16(e)},t.prototype.p_int32=function(e){return this._buffer.push_int32(e)},t.prototype.p_neg_int64=function(e){var t,r,n;return t=(n=u(0-e))[0],r=n[1],this.p_uint32(t),this.p_uint32(r)},t.prototype.p_boolean=function(t){return this.p_uint8(t?e.true:e.false)},t.prototype.p_null=function(){return this.p_uint8(e.null)},t.prototype.p_array=function(t){var r,n,i,o;for(this.p_len(t.length,e.fix_array_min,e.fix_array_max,e.array16,e.array32),o=[],n=0,i=t.length;n=-32?this.p_int8(t):t>=-128?(this.p_uint8(e.int8),this.p_int8(t)):t>=-32768?(this.p_uint8(e.int16),this.p_int16(t)):t>=-2147483648?(this.p_uint8(e.int32),this.p_int32(t)):(this.p_uint8(e.int64),this.p_neg_int64(t))},t.prototype.p_buffer=function(e){return this._buffer.push_buffer(e)},t.prototype.p_bin=function(t){return this.p_len(t.length,null,null,e.bin16,e.bin32,e.bin8),this.p_buffer(t)},t.prototype.p_str=function(t){var r,n;return r=this._buffer.prepare_utf8(t),n=this._opts.no_str8?null:e.str8,this.p_len(r.length,e.fix_str_min,e.fix_str_max,e.str16,e.str32,n),this.p_buffer(r)},t.prototype.p_len=function(e,t,r,n,i,o){return null==o&&(o=null),null!=t&&null!=r&&e<=r-t?this.p_uint8(e|t):null!=o&&e<=255?(this.p_uint8(o),this.p_uint8(e)):e<=65535?(this.p_uint8(n),this.p_uint16(e)):(this.p_uint8(i),this.p_uint32(e))},t.prototype.p_ext=function(t){var r,n,i,o;if(null==this._opts.ext)return!1;if(i=this._opts.ext(t)){switch(o=i[0],n=(r=i[1]).length){case 1:this.p_uint8(e.fix_ext1);break;case 2:this.p_uint8(e.fix_ext2);break;case 4:this.p_uint8(e.fix_ext4);break;case 8:this.p_uint8(e.fix_ext8);break;case 16:this.p_uint8(e.fix_ext16);break;default:n<=255?(this.p_uint8(e.ext8),this.p_uint8(n)):n<=65535?(this.p_uint8(e.ext16),this.p_uint16(n)):(this.p_uint8(e.ext32),this.p_uint32(n))}return this.p_uint8(o),this.p_buffer(r),!0}return!1},t}(),t.pack=function(e,t){var r;return null==t&&(t={}),(r=new n(t)).p(e),r.output()}}).call(this)},function(e,t){(function(){t.C={null:192,false:194,true:195,bin8:196,bin16:197,bin32:198,ext8:199,ext16:200,ext32:201,float:202,double:203,uint8:204,uint16:205,uint32:206,uint64:207,int8:208,int16:209,int32:210,int64:211,fix_ext1:212,fix_ext2:213,fix_ext4:214,fix_ext8:215,fix_ext16:216,str8:217,str16:218,str32:219,array16:220,array32:221,map16:222,map32:223,fix_str_min:160,fix_str_max:191,fix_array_min:144,fix_array_max:159,fix_map_min:128,fix_map_max:143,fix_array_count_mask:15,fix_map_count_mask:15,fix_str_count_mask:31,negative_fix_min:224,negative_fix_max:255,negative_fix_mask:31,negative_fix_offset:32,positive_fix_max:127,rpc_request:0,rpc_response:1,rpc_notify:2}}).call(this)},function(e,t,r){(function(e){(function(){var n,i;i=r(605).twos_compl_inv,n=e,t.PpBuffer=function(){function e(e){null==e?(this._frozen_buf=null,this._sub_buffers=[],this._limits=[],this._sz=1024,this._small_buf_sz=256,this._logsz=10,this._i=0,this._tot=0):this._freeze_to(e)}return e.prototype._nb=function(){return this._sub_buffers.length},e.prototype._ab=function(){return this._sub_buffers[this._nb()-1]},e.prototype._lib=function(){return 0},e.prototype._finish_sub_buffer=function(){return this._limits.push(this._i),this._i=0},e.prototype._push_sub_buffer=function(e){return this._sub_buffers.length&&this._finish_sub_buffer(),this._lib=function(){return e.length-this._i},this._sub_buffers.push(e),e},e.prototype._make_room=function(){return this._push_sub_buffer(new n(this._sz))},e.prototype._make_room_for_n_bytes=function(e){if(this._lib()this._small_buf_sz?(this._push_sub_buffer(e),this._i=e.length,this._tot+=e.length):((r=Math.min(e.length,this._lib()))>0&&(e.copy(this._ab(),this._i,0,r),this._i+=r,this._tot+=r),r0&&i.push(e.slice(0,r));this._sub_buffers=[],this._frozen_buf=n.concat(i,this._tot)}return this._frozen_buf},e.prototype._freeze_to=function(e){return this._frozen_buf=e,this._tot=e.length,this._sub_buffers=[],this._cp=0,this},e.prototype.bytes_left=function(){return this._tot-this._cp},e.prototype._get=function(e){if(e(t=this.bytes_left()))throw new Error("Corruption: asked for "+e+" bytes, but only "+t+" available");return r=this._cp+e,n=this._frozen_buf.slice(this._cp,r),this._cp=r,n},e.isBuffer=function(e){return n.isBuffer(e)},e}(),t.bufeq=function(e,t){var r,n,i;if(e.length!==t.length)return!1;for(r=n=0,i=e.lenth;0<=i?ni;r=0<=i?++n:--n)if(e.readUInt8(r)!==t.readUInt8(r))return!1;return!0}}).call(this)}).call(this,r(5).Buffer)},function(e,t){(function(){var e;t.pow2=e=function(e){return e<31?1<>t:Math.floor(e/Math.pow(2,t))},t.twos_compl=function(t,r){return t<0?e(r)-Math.abs(t):t},t.twos_compl_inv=function(t,r){return t-e(r)}}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c={}.hasOwnProperty;s=r(24),n=r(25).kb,a=r(71),r(80).SHA512,e=a.Decryptor,a.prng.native_rng,o=r(607).Packet,(u=r(510)).pack,u.box,r(43).make_esc,r(502),(f=r(28)).bufeq_secure,f.bufferify,i=function(t){function r(e){var t,i;this.pub=e.pub,i=e.priv_clear,t=e.priv,this.type=e.type,r.__super__.constructor.call(this),this.priv=null!=t?t:null!=i?{data:i,encryption:n.key_encryption.none}:void 0}return function(e,t){for(var r in t)c.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,o),r.tag=function(){return n.packet_tags.p3skb},r.prototype.tag=function(){return r.tag()},r.prototype.get_packet_body=function(){var e;return e={pub:this.pub,priv:this.priv},null!=this.type&&(e.type=this.type),e},r.prototype.lock=function(e,t){var r,i,o,a,u,f,c,h;f=s.findDeferral(arguments),r=e.asp,u=e.tsenc,a=e.passphrase_generation,(h=this,function(e){c=new s.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/p3skb.iced",funcname:"P3SKB.lock"}),u.run({data:h.priv.data,progress_hook:null!=r?r.progress_hook():void 0},c.defer({assign_fn:function(){return o=arguments[0],i=arguments[1]},lineno:30})),c._fulfill()})(function(e){return function(){return null==o&&(e.priv.data=i,e.priv.encryption=n.key_encryption.triplesec_v3,null!=a&&(e.priv.passphrase_generation=a)),t(o)}}(this))},r.prototype.unlock=function(t,r){var i,o,a,u,f,c,h,l,p,d,_,y;d=s.findDeferral(arguments),o=t.asp,p=t.tsenc,c=t.passphrase_generation,(y=this,function(t){switch(y.priv.encryption){case n.key_encryption.triplesec_v3:case n.key_encryption.triplesec_v2:case n.key_encryption.triplesec_v1:u=new e({enc:p}),h=null!=o?o.progress_hook():void 0,function(e){_=new s.Deferrals(e,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/p3skb.iced",funcname:"P3SKB.unlock"}),u.run({data:y.priv.data,progress_hook:h},_.defer({assign_fn:function(){return f=arguments[0],l=arguments[1]},lineno:42})),_._fulfill()}(function(){return u.scrub(),t(null==f?(y.priv.data=l,y.priv.encryption=n.key_encryption.none):null!=(i=c)&&null!=(a=y.priv.passphrase_generation)&&i!==a?f=new Error("Decryption failed, likely due to old passphrase (wanted v"+i+" but got v"+a+") ["+f.toString()+"]"):void 0)});break;case n.key_encryption.none:return t();default:return t(f=new Error("Unknown key encryption type: "+k.encryption))}})(function(){return r(f)})},r.alloc=function(e){var t,n;if(n=e.tag,t=e.body,n===r.tag())return new r(t);throw new Error("wrong tag found: "+n)},r.prototype.has_private=function(){return null!=this.priv},r.prototype.is_locked=function(){return this.priv.encryption!==n.key_encryption.none},r.prototype.get_private_data=function(){var e;return null!=(e=this.priv)?e.data:void 0},r.prototype.get_public_data=function(){return this.pub},r.prototype.get_key_type=function(){return this.type},r.prototype.is_p3skb=function(){return!0},r}(),t.P3SKB=i}).call(this)},function(e,t,r){(function(){var e,n,i;r(28),i=r(510).seal,e=r(25).kb,n=function(){function t(){}return t.prototype.frame_packet=function(){return{tag:this.tag(),body:this.get_packet_body()}},t.prototype.frame_packet_armored=function(e){var t,r;return t=e.dohash,r=this.frame_packet(),i({obj:r,dohash:t}).toString("base64")},t.prototype.is_signature=function(){return!1},t.prototype.is_p3skb=function(){return!1},t.alloc=function(t){var n,i,o,s;return s=t.tag,n=t.body,i=null,o=function(){switch(s){case e.packet_tags.p3skb:return r(606).P3SKB.alloc({tag:s,body:n});case e.packet_tags.signature:return r(608).Signature.alloc({tag:s,body:n});default:return i=new Error("unknown packet tag: "+s),null}}(),[i,o]},t.prototype.unbox=function(e,t){return t(new Error("unbox() unimplemented for tag="+this.tag))},t}(),t.Packet=n}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c={}.hasOwnProperty;a=r(24),u=r(25),n=u.kb,e=u.openpgp,i=r(607).Packet,f=r(43).make_esc,s=r(609).eddsa,o=function(t){function r(e){this.key=e.key,this.payload=e.payload,this.sig=e.sig,this.detached=e.detached,r.__super__.constructor.call(this)}return function(e,t){for(var r in t)c.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,i),r.SIG_TYPE=n.public_key_algorithms.NACL_EDDSA,r.HASH_TYPE=e.hash_algorithms.SHA512,r.tag=function(){return n.packet_tags.signature},r.prototype.tag=function(){return r.tag()},r.prototype.get_packet_body=function(){var e,t;return t=r.SIG_TYPE,e=r.HASH_TYPE,{key:this.key,payload:this.payload,sig:this.sig,detached:this.detached,sig_type:t,hash_type:e}},r.alloc=function(e){var t,n,i,o,s,a;if(a=e.tag,i=e.body,s=null,null!=(o=a!==r.tag()?new Error("wrong tag found: "+a):(t=i.hash_type)!==(n=r.HASH_TYPE)?new Error("Expected SHA512 (type "+n+"); got "+t):(t=i.sig_type)!==(n=r.SIG_TYPE)?o=new Error("Expected EDDSA (type "+n+"); got "+t):(s=new r(i),null)))throw o;return s},r.prototype.is_signature=function(){return!0},r.prototype.verify=function(e){var t,r,n,i,o,u,c;i=a.findDeferral(arguments),r=f(e,"verify"),u=s.Pair.parse_kb(this.key),t=u[0],n=u[1],(c=this,function(e){if(null!=t)return e();!function(e){o=new a.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.verify"}),n.verify_kb(c,r(o.defer({lineno:58}))),o._fulfill()}(e)})(function(r){return function(){return e(t,{keypair:n,payload:r.payload})}}(this))},r.prototype.unbox=function(e,t){var r,n,i,o,s;i=a.findDeferral(arguments),(s=this,function(e){o=new a.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.unbox"}),s.verify(o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:64})),o._fulfill()})(function(){return t(r,n)})},r.box=function(e,t){var n,i,o,s,u,c,h,l;h=a.findDeferral(arguments),i=e.km,u=e.payload,n=f(t,"@sign"),s=i.get_keypair(),function(e){l=new a.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.box"}),s.sign_kb({payload:u,detached:!0},n(l.defer({assign_fn:function(){return c=arguments[0]},lineno:73}))),l._fulfill()}(function(){return o=new r({key:s.ekid(),payload:u,sig:c,detached:!0}),t(null,o)})},r}(),t.Signature=o,t.sign=o.sign}).call(this)},function(e,t,r){(function(){t.eddsa=r(511),t.dh=r(610)}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v={}.hasOwnProperty;_=r(24),l=r(733).box,f=r(79).SRF,y=r(25),i=y.kb,g=r(28),d=g.genseed,p=g.bufeq_fast,r(158).BaseKey,n=r(747).BaseKeyPair,m=r(511),m.b2u,m.u2b,o=r(511).Pair,c=i.public_key_algorithms.NACL_DH,h=function(e){return new Uint8Array(e)},b=function(t){return new e(t)},u=function(){function t(e){this.key=e}return t.HEADER=new e([i.kid.version,c]),t.TRAILER=new e([i.kid.trailer]),t.LEN=t.HEADER.length+t.TRAILER.length+l.publicKeyLength,t.alloc_kb=function(e){var r;return r=null,[e.length!==t.LEN?new Error("bad key length"):p(e.slice(-1),t.TRAILER)?p(e.slice(0,2),t.HEADER)?(r=new t(e.slice(2,-1)),null):new Error("bad header"):new Error("bad trailing byte"),r]},t.prototype.serialize=function(){return this.key},t.prototype.nbits=function(){return 255},t.prototype.read_params=function(e){},t.prototype.encrypt=function(e,t){var r,n,i,o,s,a,u,c,p,d;c=_.findDeferral(arguments),o=e.plaintext,u=e.sender,i=e.nonce,n=a=null,function(e){if(null!=i)return e(i.length!==l.nonceLength?n=new Error("bad nonce; wrong length (wanted "+l.nonceLength+")"):void 0);!function(e){p=new _.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/nacl/dh.iced",funcname:"Pub.encrypt"}),f().random_bytes(l.nonceLength,p.defer({assign_fn:function(){return i=arguments[0]},lineno:52})),p._fulfill()}(e)}((d=this,function(){return null==n&&(s=l(h(o),h(i),h(d.key),h(u.priv.key)),r=b(s),a={ciphertext:r,nonce:i}),t(n,a)}))},t}(),a=function(){function e(e){this.key=e}return e.prototype.alloc=function(t){var r,n;return r=n=null,t.length!==l.secretKeyLength?r=new Error("Bad secret key length"):n=new e(t),[r,n]},e.prototype.decrypt=function(e,t){var r,n,i,o,s;return r=e.ciphertext,i=e.nonce,s=e.sender,n=o=null,!1===(o=l.open(h(r),h(i),h(s.pub.key),h(this.key)))?(n=new Error("decryption failed"),o=null):o=b(o),t(n,o)},e}(),s=function(e){function t(e){var r,n;n=e.pub,r=e.priv,t.__super__.constructor.call(this,{pub:n,priv:r})}return function(e,t){for(var r in t)v.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.Pub=u,t.prototype.Pub=u,t.Priv=a,t.prototype.Priv=a,t.type=i.public_key_algorithms.NACL_DH,t.prototype.type=t.type,t.prototype.get_type=function(){return this.type},t.klass_name="DH",t.prototype.can_encrypt=function(){return!0},t.prototype.can_sign=function(){return!1},t.prototype.hash=function(){return this.serialize()},t.prototype.encrypt_kb=function(e,t){var r,n,i;return n=e.plaintext,i=e.sender,r=e.nonce,this.pub.encrypt({plaintext:n,sender:i,nonce:r},t)},t.prototype.decrypt_kb=function(e,t){var r,n,i,o,s,a,u,f;a=_.findDeferral(arguments),r=e.ciphertext,i=e.nonce,s=e.sender,n=null,(f=this,function(e){if(null==f.priv)return e(n=new Error("no secret key available"));!function(e){u=new _.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/nacl/dh.iced",funcname:"Pair.decrypt_kb"}),f.priv.decrypt({ciphertext:r,nonce:i,sender:s},u.defer({assign_fn:function(){return n=arguments[0],o=arguments[1]},lineno:125})),u._fulfill()}(e)})(function(){return t(n,o)})},t.subkey_algo=function(e){return e&(C.key_flags.encrypt_comm|C.key_flags.encrypt_storage)?t:o},t.prototype.fulfills_flags=function(e){return(e&(C.key_flags.encrypt_comm|C.key_flags.encrypt_storage))===e},t.prototype.verify_unpad_and_check_hash=function(e,t){return e.sig,e.data,e.hasher,e.hash,t(new Error("verify_unpad_and_check_hash unsupported"))},t.prototype.pad_and_sign=function(e,t,r){return t.hasher,r(new Error("pad_and_sign unsupported"))},t.parse_kb=function(e){return n.parse_kb(t,e)},t.parse_sig=function(e){throw new Error("@parse_sig unsupported")},t.read_sig_from_buf=function(e){return[new Error("@read_sig_from_buf unsupported")]},t.generate=function(e,r){var n,i,o,s,f,c,p,y,g,m,v,w;v=_.findDeferral(arguments),g=e.server_half,y=e.seed,m=e.split,n={seed:y,split:m,len:l.secretKeyLength,server_half:g},function(e){w=new _.Deferrals(e,{parent:v,filename:"/Users/max/src/keybase/kbpgp/src/nacl/dh.iced",funcname:"Pair.generate"}),d(n,w.defer({assign_fn:function(){return i=arguments[0],g=arguments[1].server_half,y=arguments[1].seed},lineno:186})),w._fulfill()}(function(){var e;return c=null,null==i&&(e=l.keyPair.fromSecretKey(h(y)),p=e.secretKey,f=e.publicKey,s=new u(b(f)),o=new a(b(p)),c=new t({pub:s,priv:o})),r(i,c,g)})},t}(),t.DH=t.Pair=s}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h={}.hasOwnProperty;u=r(24),f=r(43).make_esc,i=r(612).burn,c=r(509),o=r(311).decode,e=r(25),n=r(613).SignatureEngineInterface,t.decode_sig=s=function(t){var r,n,i,s,a;return r=t.armored,n=(a=o(r))[0],i=a[1],s=e.openpgp.message_types,null==n&&i.type!==s.generic&&(n=new Error("wrong message type; expected a generic message; got "+i.type)),[n,i]},t.get_sig_body=a=function(e){var t,r,n,i,o;return t=e.armored,i=null,r=(o=s({armored:t}))[0],n=o[1],null==r&&(i=n.body),[r,i]},t.SignatureEngine=function(e){function t(e){this.km=e.km}return function(e,t){for(var r in t)h.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.prototype.get_km=function(){return this.km},t.prototype.box=function(e,t){var r,n,o,s,a,f;s=u.findDeferral(arguments),n={type:"pgp"},(f=this,function(t){if(null==(o=f.km.find_signing_pgp_key()))return t(r=new Error("No signing key found"));!function(t){var f,c;a=new u.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.box"}),i({msg:e,signing_key:o},a.defer({assign_fn:(f=n,c=n,function(){return r=arguments[0],f.pgp=arguments[1],c.raw=arguments[2]}),lineno:37})),a._fulfill()}(function(){return t(null==r?n.armored=n.pgp:void 0)})})(function(){return t(r,n)})},t.prototype.get_unverified_payload_from_raw_sig_body=function(e,t){var r,n,i,o,s,a,h,l,p,d;p=u.findDeferral(arguments),r=e.body,i=f(t,"get_payload_from_raw_sig_body"),l=null,a=new c.Message({}),function(e){d=new u.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),a.parse_and_inflate(r,i(d.defer({assign_fn:function(){return s=arguments[0]},lineno:48}))),d._fulfill()}(function(){return 1!==(h=s.length)||null==(o=s[0])?n=new Error("Got "+h+" literals; only wanted 1"):l=o.data,t(n,l)})},t.prototype.get_body=function(e,t){var r;return t((r=a(e))[0],r[1])},t.prototype.decode=function(e,t){var r;return t((r=s({armored:e}))[0],r[1])},t.prototype.unbox=function(e,t,r){var n,i,o,s,a,h,l;a=u.findDeferral(arguments),null==r&&(r={}),i=f(t,"SignatureEngine::unbox"),(l=this,function(t){if("string"!=typeof e)return t();!function(t){h=new u.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),l.decode(e,i(h.defer({assign_fn:function(){return e=arguments[0]},lineno:72}))),h._fulfill()}(t)})(function(f){return function(){r.keyfetch=f.km,r.strict=!0,n=new c.Message(r),h=new u.Deferrals(function(){h=new u.Deferrals(function(){return t(null,s,e.body)},{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),f._check_result(o,i(h.defer({assign_fn:function(){return s=arguments[0]},lineno:77}))),h._fulfill()},{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),n.parse_and_process({body:e.body},i(h.defer({assign_fn:function(){return o=arguments[0]},lineno:76}))),h._fulfill()}}(this))},t.prototype._check_result=function(e,t){var r,n,i,o,s,a,u;return n=s=null,1!==(o=e.length)||null==(i=e[0])?n=new Error("Expected only one pgp literal; got "+o):null==(a=null!=(u=i.get_data_signer())?u.sig:void 0)?n=new Error("Expected a signature on the payload message"):null==this.km.find_pgp_key(r=a.get_key_id())?n=new Error("Failed sanity check; didn't have a key for '"+r.toString("hex")+"'"):s=i.data,t(n,s)},t}()}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B,D,M,P,I,U={}.hasOwnProperty;E=r(24),x=r(43).make_esc,c=r(742).OnePassSignature,M=r(423),_=M.Signature,a=M.CreationTime,u=M.Issuer,s=r(741).Compressed,f=r(508).Literal,D=r(28).unix_time,d=r(79).SRF,B=r(71),P=r(457),w=P.export_key_pgp,k=P.get_cipher,A=B.util.scrub_buffer,y=B.WordArray,I=r(739),l=I.SEIPD,h=I.PKESK,o=r(25).openpgp,p=r(80).SHA512,v=r(311).encode,b=r(743),g=r(745),n=r(1435).BaseBurner,m=new e(function(){var e,t;for(t=[],e=0;e<16;e++)t.push(0);return t}()),i=function(t){function r(e){var t,n,i,o,s;this.literals=e.literals,this.opts=e.opts,o=e.sign_with,n=e.encrypt_for,s=e.signing_key,i=e.encryption_key,t=e.asp,r.__super__.constructor.call(this,{sign_with:o,encrypt_for:n,signing_key:s,encryption_key:i,asp:t}),this.packets=[],this.opts||(this.opts={}),this.signed_payload=null}return function(e,t){for(var r in t)U.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,n),r.prototype._frame_literals=function(t){var r,n,i,o,s,a,u;s=E.findDeferral(arguments),r=x(t,"Burner::_frame_literals"),o=[],(u=this,function(e){var t,f,c,h;c=u.literals,f=c.length,t=0,(h=function(e){var l;if(l=function(){return E.trampoline(function(){return++t,h(e)})},!(tB;S=0<=B?++e:--e)t.push(f);return t}()),F||(F=function(){var e,t,r;for(r=[],e=0,t=U.length;et?e:t},t=d=0,_=(y=this.userids).length;d<_;t=++d)null!=(p=y[t])&&(h=p.utf8(),a=p.time_primary_pair(),s={userid:p,pair:a,i:t},e=!1,null!=(u=l[h])?(f=o(u.pair[1],a[1]),(null==u.pair[0]||a[0]&&u.pair[0]")+" ("+e[n.filename]+":"+(e[n.lineno]+1)+")"},f=function(e){return"undefined"!=typeof console&&null!==console?console.error("ICED warning: "+e):void 0},t.trampoline=u=function(t){return a(500)?null!=(null!=e?e.nextTick:void 0)?e.nextTick(t):setTimeout(t):t()},t.Deferrals=function(){function e(e,t){this.trace=t,this.continuation=e,this.count=1,this.ret=null}return e.prototype._call=function(e){var t;return this.continuation?(c=e,t=this.continuation,this.continuation=null,t(this.ret)):f("Entered dead await at "+l(e))},e.prototype._fulfill=function(e,t){if(!(--this.count>0))return u((r=this,function(){return r._call(t)}));var r},e.prototype.defer=function(e){return this.count++,this,o(this,e,null,this.trace)},e}(),t.findDeferral=function(e){var t,r,i;for(r=0,i=e.length;ro;n=0<=o?++i:--i)a(r,e,n,1),this.salsa20_8(r),s(t,r,n,0,1);for(n=0;n(n=4294967295)?new Error("asked for too much data"):this.r*this.p>=1<<30?new Error("r & p are too big"):(this.r>n/128/this.p||this.r>n/256||this.N>n/128/this.r)&&new Error("N is too big"),s=new Int32Array(64*this.r),i=new Int32Array(32*this.r*this.N),c=function(e){return e.what+=" (pass 1)","function"==typeof d?d(e):void 0},(w=this,function(e){g=new h.Deferrals(e,{parent:b,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),w.pbkdf2({key:f.clone(),salt:y,dkLen:128*w.r*w.p,c:w.c0,progress_hook:c},g.defer({assign_fn:function(){return r=arguments[0]},lineno:214})),g._fulfill()})(function(e){return function(){var n;r=new Int32Array(r.words),_(r),c=function(t){return function(r){return"function"==typeof d?d({i:r+t*e.N*2,what:"scrypt",total:e.p*e.N*2}):void 0}},u=0,0,m=e.p,v=m>0,(n=function(t){var o,a;if(o=t,a=function(){return h.trampoline(function(){return v?u+=1:u-=1,n(t)})},!0===v&&u>=e.p||!1===v&&u<=e.p)return o();!function(t){g=new h.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),e.smix({B:r.subarray(32*e.r*u),V:i,XY:s,progress_hook:c(u)},g.defer({lineno:221})),g._fulfill()}(a)})(function(){_(r),c=function(e){return e.what+=" (pass 2)","function"==typeof d?d(e):void 0},g=new h.Deferrals(function(){return p(s),p(i),p(r),f.scrub(),t(l)},{parent:b,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),e.pbkdf2({key:f,salt:o.from_i32a(r),dkLen:a,c:e.c1,progress_hook:c},g.defer({assign_fn:function(){return l=arguments[0]},lineno:229})),g._fulfill()})}}(this))},t}(),d=function(e,t){var r,n,o,s,a,u,f,c,l,p,d,_,y,b,g;b=h.findDeferral(arguments),f=e.key,_=e.salt,d=e.r,r=e.N,l=e.p,o=e.c0,s=e.c1,n=e.c,c=e.klass,p=e.progress_hook,a=e.dkLen,u=new i({r:d,N:r,p:l,c:n,c0:o,c1:s,klass:c}),function(e){g=new h.Deferrals(e,{parent:b,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced"}),u.run({key:f,salt:_,progress_hook:p,dkLen:a},g.defer({assign_fn:function(){return y=arguments[0]},lineno:259})),g._fulfill()}(function(){return t(y)})},t.Scrypt=i,t.scrypt=d,t.v_endian_reverse=_}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m;if(f=r(24),function(){},h=r(1402),n=r(1404).ADRBG,o=r(72).WordArray,s=r(504).XOR,d=r(110),_=null,a=function(t){var r;return r=new Uint8Array(t),_(r),new e(r)},null!=(_=null!=(c="undefined"!=typeof window&&null!==window&&null!=(g=window.crypto)?g.getRandomValues:void 0)?c.bind(window.crypto):null!=(c="undefined"!=typeof window&&null!==window&&null!=(m=window.msCrypto)?m.getRandomValues:void 0)?c.bind(window.msCrypto):null))y=a;else try{null!=(p=r(112).rng)&&(y=p)}catch(e){e}l=function(e){if(null==y)throw new Error('No rng found; tried requiring "crypto" and window.crypto');return y(e)},i=function(){function t(){var e;this.meg=new h.Generator,this.adrbg=new n((e=this,function(t,r){return e.gen_seed(t,r)}),s.sign)}return t.prototype.now_to_buffer=function(){var t,r,n,i;return n=(r=Date.now())%1e3,i=Math.floor(r/1e3),(t=new e(8)).writeUInt32BE(i,0),t.writeUInt32BE(n,4),t},t.prototype.gen_seed=function(t,r){var n,i,s,a,u,c,h,p,_;h=f.findDeferral(arguments),a=t/8,(i=[]).push(this.now_to_buffer()),(_=this,function(e){p=new f.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/triplesec/src/prng.iced",funcname:"PRNG.gen_seed"}),_.meg.generate(t,p.defer({assign_fn:function(){return c=arguments[0]},lineno:83})),p._fulfill()})(function(t){return function(){var f,h;for(i.push(t.now_to_buffer()),i.push(new e(c)),i.push(l(a)),i.push(t.now_to_buffer()),s=e.concat(i),u=o.from_buffer(s),d.scrub_buffer(s),f=0,h=i.length;fthis.waiter.seqid?(n=this.waiter,this.waiter={cb:t,seqid:r},n.cb(new Error("our seqid="+n.seqid+" was preempted by "+r))):t(new Error("our seqid="+r+" is too stale (since "+this.waiter.seqid+" is ahead of us)")),this._decref()):r>this.seqid?this.waiter={seqid:r,cb:t}:(t(new Error("our seqid="+r+" is too stale (since "+this.seqid+" is already in flight)")),this._decref())},e.prototype.release=function(){var e,t;return null!=this.waiter?(t=this.waiter,this.seqid=t.seqid,e=t.cb,this.waiter=null,e(null,this)):(this.open=!0,this.seqid=null),this._decref()},e}(),t.SingleFlightTable=function(){function e(){this._jobs={}}return e.prototype._create=function(e){var t;return t=e.key,this._jobs[t]=new i({table:this,key:t})},e.prototype._remove=function(e){var t;return t=e.key,delete this._jobs[t]},e.prototype.enter=function(e,t){var r,n,i;return i=e.seqid,r=e.key,(n=this._jobs[r]||this._create({key:r}))._incref(),n._enter({seqid:i},t)},e}()}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l=[].slice;u=r(24),h=function(){},n=r(43).Canceler,i=r(97),t.uint_to_buffer=function(t,r){var n;switch(n=null,t){case 16:(n=new e(2)).writeUInt16BE(r,0);break;case 32:(n=new e(4)).writeUInt32BE(r,0);break;case 8:(n=new e(1)).writeUInt8(r,0);break;default:throw new Error("Bit types not found: "+nbit)}return n},t.ASP=function(){function e(e){var t,r,i;i=e.progress_hook,r=e.delay,t=e.canceler,this._delay=null!=r?r:2,this._canceler=t||new n,this._progress_hook=i||function(e){},this._section=null}return e.prototype.section=function(e){return this._section=e,this},e.prototype.progress=function(e,t){var r,n,i,o,s;if(o=h,n=u.findDeferral(arguments),this._section&&(e.section=this._section),this._progress_hook(e),null==t)return o();(s=this,function(e){i=new u.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/pgp-utils/src/util.iced",funcname:"ASP.progress"}),s.delay(i.defer({assign_fn:function(){return r=arguments[0]},lineno:43})),i._fulfill()})(function(){return o(t(r))})},e.prototype.delay=function(e){var t,r,n;t=u.findDeferral(arguments),(n=this,function(e){r=new u.Deferrals(e,{parent:t,filename:"/Users/max/src/keybase/pgp-utils/src/util.iced",funcname:"ASP.delay"}),setTimeout(r.defer({lineno:47}),n.delay),r._fulfill()})(function(t){return function(){return e(t._canceler.err())}}(this))},e.prototype.canceler=function(){return this._canceler},e.prototype.progress_hook=function(){return this._progress_hook},e.make=function(t){return t||new e({})},e}(),t.Warnings=function(){function e(){this._w=[]}return e.prototype.push=function(){var e,t;return e=1<=arguments.length?l.call(arguments,0):[],(t=this._w).push.apply(t,e)},e.prototype.warnings=function(){return this._w},e}(),t.bufeq_fast=function(e,t){var r,n,i;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(r=n=0,i=e.length;0<=i?ni;r=0<=i?++n:--n)if(e.readUInt8(r)!==t.readUInt8(r))return!1;return!0},t.bufeq_secure=s=function(e,t){var r,n;return function(){var i,o;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(r=0,n=i=0,o=e.length;0<=o?io;n=0<=o?++i:--i)r|=e.readUInt8(n)^t.readUInt8(n);return 0===r}()},t.streq_secure=function(e,t){var r;return s((r=function(e){return null!=e?a(e):null})(e),r(t))},t.bufferify=a=function(t){if(e.isBuffer(t))return t;if("string"==typeof t)return new e(t,"utf8");throw new Error("Cannot convert to buffer: "+t)},t.katch=f=function(e){var t,r;r=t=null;try{r=e()}catch(e){t=e}return[t,r]},t.akatch=function(e,t){return o(f(e),t)},t.buffer_to_ui8a=function(e){var t,r,n,i;for(r=e.length,n=new Uint8Array(r),t=i=0;0<=r?ir;t=0<=r?++i:--i)n[t]=e.readUInt8(t);return n},t.ui32a_to_ui8a=function(e,t){var r,n,i,o;for(null==t&&(t=null),t||(t=new Uint8Array(4*e.length)),r=0,i=0,o=e.length;i>24&255,t[r++]=n>>16&255,t[r++]=n>>8&255,t[r++]=255&n;return t},t.ui8a_to_ui32a=function(e,t){var r,n,i,o,s;for(null==t&&(t=null),t||(t=new Uint32Array(e.length>>2)),n=0,r=o=0,s=e.length;os;0<=s?++e:--e)t.push(" ");return t}().join("")),o=function(e){return null==s?"":"\n"+function(){var t,r;for(r=[],t=0;0<=e?te;0<=e?++t:--t)r.push(s);return r}().join("")},r=function(e,t){var n,s,a,u,f,c;return Array.isArray(e)?a="["+function(){var n,i,o;for(o=[],n=0,i=e.length;n8?(o=function(){var e,t,i;for(i=[],n=e=0,t=r.length;e0?et;r=e+=a)n.push(u.slice(r,r+a).join(" "));return n}(),s=function(e,t){return function(){var r,n,i;for(i=[],r=0,n=t-e.length;0<=n?rn;0<=n?r++:r--)i.push("0");return i}().join("")+e},function(){var e,t,u;for(u=[],r=e=0,t=i.length;eo;n=0<=o?++i:--i)r[t.length-1-n]=t[n];return r},r.prototype.decrypt=function(e,t){return e=r.reverse_buf(e),v.alloc({}).scalarmult(e,t)},r.prototype.generate=function(e){var t,n,i,o,s;i=g.findDeferral(arguments),(s=this,function(e){o=new g.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve25519.generate"}),s.random_scalar(o.defer({assign_fn:function(){return n=arguments[0]},lineno:291})),o._fulfill()})(function(){return t=v.alloc({}).scalarmult_base(n),n=r.reverse_buf(n),e({x:n,R:t})})},r}(),t.nist_p256=w=function(){var e,t,r,n,o,u;return u=s("FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF"),r=s("FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFC"),n=s("5AC635D8 AA3A93E7 B3EBBD55 769886BC 651D06B0 CC53B0F6 3BCE3C3E 27D2604B"),o=s("FFFFFFFF 00000000 FFFFFFFF FFFFFFFF BCE6FAAD A7179E84 F3B9CAC2 FC632551"),e=s("6B17D1F2 E12C4247 F8BCE6E5 63A440F2 77037D81 2DEB33A0 F4A13945 D898C296"),t=s("4FE342E2 FE1A7F9B 8EE7EB4A 7C0F9E16 2BCE3357 6B315ECE CBB64068 37BF51F5"),new i({p:u,a:r,b:n,Gx:e,Gy:t,n:o,oid:a.nist_p256})},t.nist_p384=k=function(){var e,t,r,n,o,u;return u=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff"),r=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc"),n=s("b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef"),o=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973"),e=s("aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7"),t=s("3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"),new i({p:u,a:r,b:n,Gx:e,Gy:t,n:o,oid:a.nist_p384})},t.nist_p521=E=function(){var e,t,r,n,o,u;return u=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff"),r=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc"),n=s("00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00"),o=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409"),e=s("000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66"),t=s("00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"),new i({p:u,a:r,b:n,Gx:e,Gy:t,n:o,oid:a.nist_p521})},t.brainpool_p256=d=function(){var e,t,r,n,o,u;return u=s("a9fb57db a1eea9bc 3e660a90 9d838d72 6e3bf623 d5262028 2013481d 1f6e5377"),r=s("7d5a0975 fc2c3057 eef67530 417affe7 fb8055c1 26dc5c6c e94a4b44 f330b5d9"),n=s("26dc5c6c e94a4b44 f330b5d9 bbd77cbf 95841629 5cf7e1ce 6bccdc18 ff8c07b6"),o=s("a9fb57db a1eea9bc 3e660a90 9d838d71 8c397aa3 b561a6f7 901e0e82 974856a7"),e=s("8bd2aeb9 cb7e57cb 2c4b482f fc81b7af b9de27e1 e3bd23c2 3a4453bd 9ace3262"),t=s("547ef835 c3dac4fd 97f8461a 14611dc9 c2774513 2ded8e54 5c1d54c7 2f046997"),new i({p:u,a:r,b:n,Gx:e,Gy:t,n:o,oid:a.brainpool_p256})},t.brainpool_p384=_=function(){var e,t,r,n,o,u;return u=s("8cb91e82 a3386d28 0f5d6f7e 50e641df 152f7109 ed5456b4 12b1da19 7fb71123 acd3a729 901d1a71 87470013 3107ec53"),r=s("7bc382c6 3d8c150c 3c72080a ce05afa0 c2bea28e 4fb22787 139165ef ba91f90f 8aa5814a 503ad4eb 04a8c7dd 22ce2826"),n=s("04a8c7dd 22ce2826 8b39b554 16f0447c 2fb77de1 07dcd2a6 2e880ea5 3eeb62d5 7cb43902 95dbc994 3ab78696 fa504c11"),o=s("8cb91e82 a3386d28 0f5d6f7e 50e641df 152f7109 ed5456b3 1f166e6c ac0425a7 cf3ab6af 6b7fc310 3b883202 e9046565"),e=s("1d1c64f0 68cf45ff a2a63a81 b7c13f6b 8847a3e7 7ef14fe3 db7fcafe 0cbd10e8 e826e034 36d646aa ef87b2e2 47d4af1e"),t=s("8abe1d75 20f9c2a4 5cb1eb8e 95cfd552 62b70b29 feec5864 e19c054f f9912928 0e464621 77918111 42820341 263c5315"),new i({p:u,a:r,b:n,Gx:e,Gy:t,n:o,oid:a.brainpool_p384})},t.brainpool_p512=y=function(){var e,t,r,n,o,u;return u=s("aadd9db8 dbe9c48b 3fd4e6ae 33c9fc07 cb308db3 b3c9d20e d6639cca 70330871 7d4d9b00 9bc66842 aecda12a e6a380e6 2881ff2f 2d82c685 28aa6056 583a48f3"),r=s("7830a331 8b603b89 e2327145 ac234cc5 94cbdd8d 3df91610 a83441ca ea9863bc 2ded5d5a a8253aa1 0a2ef1c9 8b9ac8b5 7f1117a7 2bf2c7b9 e7c1ac4d 77fc94ca"),n=s("3df91610 a83441ca ea9863bc 2ded5d5a a8253aa1 0a2ef1c9 8b9ac8b5 7f1117a7 2bf2c7b9 e7c1ac4d 77fc94ca dc083e67 984050b7 5ebae5dd 2809bd63 8016f723"),o=s("aadd9db8 dbe9c48b 3fd4e6ae 33c9fc07 cb308db3 b3c9d20e d6639cca 70330870 553e5c41 4ca92619 41866119 7fac1047 1db1d381 085ddadd b5879682 9ca90069"),e=s("81aee4bd d82ed964 5a21322e 9c4c6a93 85ed9f70 b5d916c1 b43b62ee f4d0098e ff3b1f78 e2d0d48d 50d1687b 93b97d5f 7c6d5047 406a5e68 8b352209 bcb9f822"),t=s("7dde385d 566332ec c0eabfa9 cf7822fd f209f700 24a57b1a a000c55b 881f8111 b2dcde49 4a5f485e 5bca4bd8 8a2763ae d1ca2b2f a8f05406 78cd1e0f 3ad80892"),new i({p:u,a:r,b:n,Gx:e,Gy:t,n:o,oid:a.brainpool_p512})},t.cv25519=b=function(){return new o({oid:a.cv25519})},a={nist_p256:new e([42,134,72,206,61,3,1,7]),nist_p384:new e([43,129,4,0,34]),nist_p521:new e([43,129,4,0,35]),brainpool_p256:new e([43,36,3,3,2,8,1,1,7]),brainpool_p384:new e([43,36,3,3,2,8,1,1,11]),brainpool_p512:new e([43,36,3,3,2,8,1,1,13]),cv25519:new e([43,6,1,4,1,151,85,1,5,1])},u={},a)S=a[m],u[S.toString("hex")]=t[m];for(m in f={Curve25519:b,"NIST P-256":w,"NIST P-384":k,brainpoolP256r1:d,brainpoolP384r1:_,brainpoolP512r1:y},a)f[m]=t[m];t.alloc_by_oid=function(t){var r,n,i;return e.isBuffer(t)&&(t=t.toString("hex")),n=r=null,null!=(i=u[t.toLowerCase()])?r=i():n=new Error("Unknown curve OID: "+t),[n,r]},t.alloc_by_nbits=function(e){var t,r,n;return n=t=null,e||(e=256),null!=(r=function(){switch(e){case 256:return w;case 384:return k;case 521:return E;default:return null}}())?n=r():t=new Error("No curve for "+e+" bits"),[t,n]},t.alloc_by_name=function(e){var t,r,n;return n=r=null,null!=(t=f[e])?r=t():n=new Error("Unknown curve name: "+e),[n,r]}}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(t){var n=r(97),i=r(402).BigInteger,o=i.valueOf(3);function s(e,t,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=e,this.x=t,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(s.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(s.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(s.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),s.fromAffine=function(e,t,r){return new s(e,t,r,i.ONE)},s.prototype.equals=function(e){return e===this||(this.curve.isInfinity(this)?this.curve.isInfinity(e):this.curve.isInfinity(e)?this.curve.isInfinity(this):0===e.y.multiply(this.z).subtract(this.y.multiply(e.z)).mod(this.curve.p).signum()&&0===e.x.multiply(this.z).subtract(this.x.multiply(e.z)).mod(this.curve.p).signum())},s.prototype.negate=function(){var e=this.curve.p.subtract(this.y);return new s(this.curve,this.x,e,this.z)},s.prototype.add=function(e){if(this.curve.isInfinity(this))return e;if(this.curve.isInfinity(e))return this;var t=this.x,r=this.y,n=e.x,i=e.y.multiply(this.z).subtract(r.multiply(e.z)).mod(this.curve.p),a=n.multiply(this.z).subtract(t.multiply(e.z)).mod(this.curve.p);if(0===a.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=a.square(),f=u.multiply(a),c=t.multiply(u),h=i.square().multiply(this.z),l=h.subtract(c.shiftLeft(1)).multiply(e.z).subtract(f).multiply(a).mod(this.curve.p),p=c.multiply(o).multiply(i).subtract(r.multiply(f)).subtract(h.multiply(i)).multiply(e.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(e.z).mod(this.curve.p);return new s(this.curve,l,p,d)},s.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var e=this.x,t=this.y,r=t.multiply(this.z),n=r.multiply(t).mod(this.curve.p),i=this.curve.a,a=e.square().multiply(o);0!==i.signum()&&(a=a.add(this.z.square().multiply(i)));var u=(a=a.mod(this.curve.p)).square().subtract(e.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=a.multiply(o).multiply(e).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(a.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new s(this.curve,u,f,c)},s.prototype.multiply=function(e){if(this.curve.isInfinity(this))return this;if(0===e.signum())return this.curve.infinity;for(var t=e,r=t.multiply(o),n=this.negate(),i=this,s=r.bitLength()-2;s>0;--s){i=i.twice();var a=r.testBit(s);a!=t.testBit(s)&&(i=i.add(a?this:n))}return i},s.prototype.multiplyTwo=function(e,t,r){var n;n=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var i=this.curve.infinity,o=this.add(t);n>=0;){i=i.twice();var s=e.testBit(n),a=r.testBit(n);s?i=a?i.add(o):i.add(this):a&&(i=i.add(t)),--n}return i},s.prototype.getEncoded=function(e){if(null==e&&(e=this.compressed),this.curve.isInfinity(this))return new t("00","hex");var r,n=this.affineX,i=this.affineY,o=Math.floor((this.curve.p.bitLength()+7)/8);return e?(r=new t(1+o)).writeUInt8(i.isEven()?2:3,0):((r=new t(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},s.decodeFrom=function(e,t){var r,o=t.readUInt8(0),a=4!==o,u=i.fromBuffer(t.slice(1,33)),f=Math.floor((e.p.bitLength()+7)/8);if(a){n.equal(t.length,f+1,"Invalid sequence length"),n(2===o||3===o,"Invalid sequence tag");var c=3===o;r=e.pointFromX(c,u)}else{n.equal(t.length,1+f+f,"Invalid sequence length");var h=i.fromBuffer(t.slice(1+f));r=s.fromAffine(e,u,h)}return r.compressed=a,r},s.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},e.exports=s}).call(this,r(5).Buffer)},function(e,t,r){var n=r(97),i=r(402).BigInteger,o=r(731);function s(e,t,r,n,s,a,u){this.p=e,this.a=t,this.b=r,this.G=o.fromAffine(this,n,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=e.add(i.ONE).shiftRight(2)}s.prototype.pointFromX=function(e,t){var r=t.pow(3).add(this.a.multiply(t)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!e&&(n=this.p.subtract(n)),o.fromAffine(this,t,n)},s.prototype.isInfinity=function(e){return e===this.infinity||0===e.z.signum()&&0!==e.y.signum()},s.prototype.isOnCurve=function(e){if(this.isInfinity(e))return!0;var t=e.affineX,r=e.affineY,n=this.a,i=this.b,o=this.p;if(t.signum()<0||t.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=t.pow(3).add(n.multiply(t)).add(i).mod(o);return s.equals(a)},s.prototype.validate=function(e){n(!this.isInfinity(e),"Point is at infinity"),n(this.isOnCurve(e),"Point is not on the curve");var t=e.multiply(this.n);return n(this.isInfinity(t),"Point is not a scalar multiple of G"),!0},e.exports=s},function(e,t,r){(function(t){!function(e){"use strict";var n=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,i){var o,s=0;for(o=0;o>>8)-1}function b(e,t,r,n){return y(e,t,r,n,16)}function g(e,t,r,n){return y(e,t,r,n,32)}function m(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,f=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,_=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,k=s,E=a,x=u,S=f,A=c,B=h,D=l,M=p,P=d,I=_,U=y,R=b,T=g,C=m,F=v,O=0;O<20;O+=2)w^=(i=(R^=(i=(M^=(i=(S^=(i=w+R|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+M|0)<<18|i>>>14,A^=(i=(k^=(i=(T^=(i=(P^=(i=A+k|0)<<7|i>>>25)+A|0)<<9|i>>>23)+P|0)<<13|i>>>19)+T|0)<<18|i>>>14,I^=(i=(B^=(i=(E^=(i=(C^=(i=I+B|0)<<7|i>>>25)+I|0)<<9|i>>>23)+C|0)<<13|i>>>19)+E|0)<<18|i>>>14,F^=(i=(U^=(i=(D^=(i=(x^=(i=F+U|0)<<7|i>>>25)+F|0)<<9|i>>>23)+x|0)<<13|i>>>19)+D|0)<<18|i>>>14,w^=(i=(x^=(i=(E^=(i=(k^=(i=w+x|0)<<7|i>>>25)+w|0)<<9|i>>>23)+k|0)<<13|i>>>19)+E|0)<<18|i>>>14,A^=(i=(S^=(i=(D^=(i=(B^=(i=A+S|0)<<7|i>>>25)+A|0)<<9|i>>>23)+B|0)<<13|i>>>19)+D|0)<<18|i>>>14,I^=(i=(P^=(i=(M^=(i=(U^=(i=I+P|0)<<7|i>>>25)+I|0)<<9|i>>>23)+U|0)<<13|i>>>19)+M|0)<<18|i>>>14,F^=(i=(C^=(i=(T^=(i=(R^=(i=F+C|0)<<7|i>>>25)+F|0)<<9|i>>>23)+R|0)<<13|i>>>19)+T|0)<<18|i>>>14;w=w+o|0,k=k+s|0,E=E+a|0,x=x+u|0,S=S+f|0,A=A+c|0,B=B+h|0,D=D+l|0,M=M+p|0,P=P+d|0,I=I+_|0,U=U+y|0,R=R+b|0,T=T+g|0,C=C+m|0,F=F+v|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=x>>>0&255,e[13]=x>>>8&255,e[14]=x>>>16&255,e[15]=x>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=B>>>0&255,e[25]=B>>>8&255,e[26]=B>>>16&255,e[27]=B>>>24&255,e[28]=D>>>0&255,e[29]=D>>>8&255,e[30]=D>>>16&255,e[31]=D>>>24&255,e[32]=M>>>0&255,e[33]=M>>>8&255,e[34]=M>>>16&255,e[35]=M>>>24&255,e[36]=P>>>0&255,e[37]=P>>>8&255,e[38]=P>>>16&255,e[39]=P>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=U>>>0&255,e[45]=U>>>8&255,e[46]=U>>>16&255,e[47]=U>>>24&255,e[48]=R>>>0&255,e[49]=R>>>8&255,e[50]=R>>>16&255,e[51]=R>>>24&255,e[52]=T>>>0&255,e[53]=T>>>8&255,e[54]=T>>>16&255,e[55]=T>>>24&255,e[56]=C>>>0&255,e[57]=C>>>8&255,e[58]=C>>>16&255,e[59]=C>>>24&255,e[60]=F>>>0&255,e[61]=F>>>8&255,e[62]=F>>>16&255,e[63]=F>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,f=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,_=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(b^=(i=(p^=(i=(f^=(i=o+b|0)<<7|i>>>25)+o|0)<<9|i>>>23)+f|0)<<13|i>>>19)+p|0)<<18|i>>>14,c^=(i=(s^=(i=(g^=(i=(d^=(i=c+s|0)<<7|i>>>25)+c|0)<<9|i>>>23)+d|0)<<13|i>>>19)+g|0)<<18|i>>>14,_^=(i=(h^=(i=(a^=(i=(m^=(i=_+h|0)<<7|i>>>25)+_|0)<<9|i>>>23)+m|0)<<13|i>>>19)+a|0)<<18|i>>>14,v^=(i=(y^=(i=(l^=(i=(u^=(i=v+y|0)<<7|i>>>25)+v|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,c^=(i=(f^=(i=(l^=(i=(h^=(i=c+f|0)<<7|i>>>25)+c|0)<<9|i>>>23)+h|0)<<13|i>>>19)+l|0)<<18|i>>>14,_^=(i=(d^=(i=(p^=(i=(y^=(i=_+d|0)<<7|i>>>25)+_|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,v^=(i=(m^=(i=(g^=(i=(b^=(i=v+m|0)<<7|i>>>25)+v|0)<<9|i>>>23)+b|0)<<13|i>>>19)+g|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=c>>>0&255,e[5]=c>>>8&255,e[6]=c>>>16&255,e[7]=c>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=l>>>0&255,e[21]=l>>>8&255,e[22]=l>>>16&255,e[23]=l>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(e,t,r,n,i,o,s){var a,u,f=new Uint8Array(16),c=new Uint8Array(64);for(u=0;u<16;u++)f[u]=0;for(u=0;u<8;u++)f[u]=o[u];for(;i>=64;){for(m(c,f,s,w),u=0;u<64;u++)e[t+u]=r[n+u]^c[u];for(a=1,u=8;u<16;u++)a=a+(255&f[u])|0,f[u]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(m(c,f,s,w),u=0;u=64;){for(m(u,a,i,w),s=0;s<64;s++)e[t+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(m(u,a,i,w),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function B(e,t,r,n,i,o){var s=new A(o);return s.update(r,n,i),s.finish(e,t),0}function D(e,t,r,n,i,o){var s=new Uint8Array(16);return B(s,0,r,n,i,o),b(e,t,s,0)}function M(e,t,r,n,i){var o;if(r<32)return-1;for(S(e,0,t,0,r,n,i),B(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function P(e,t,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(x(s,0,32,n,i),0!==D(t,16,t,32,r-32,s))return-1;for(S(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function I(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function U(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function T(e,t){var r,i,o,s=n(),a=n();for(r=0;r<16;r++)a[r]=t[r];for(U(a),U(a),U(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,R(a,s,1-o)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function C(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return T(r,e),T(n,t),g(r,0,n,0)}function F(e){var t=new Uint8Array(32);return T(t,e),1&t[0]}function O(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function z(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function N(e,t,r){var n,i,o=0,s=0,a=0,u=0,f=0,c=0,h=0,l=0,p=0,d=0,_=0,y=0,b=0,g=0,m=0,v=0,w=0,k=0,E=0,x=0,S=0,A=0,B=0,D=0,M=0,P=0,I=0,U=0,R=0,T=0,C=0,F=r[0],O=r[1],z=r[2],L=r[3],N=r[4],j=r[5],K=r[6],q=r[7],H=r[8],G=r[9],Z=r[10],V=r[11],Y=r[12],W=r[13],X=r[14],J=r[15];o+=(n=t[0])*F,s+=n*O,a+=n*z,u+=n*L,f+=n*N,c+=n*j,h+=n*K,l+=n*q,p+=n*H,d+=n*G,_+=n*Z,y+=n*V,b+=n*Y,g+=n*W,m+=n*X,v+=n*J,s+=(n=t[1])*F,a+=n*O,u+=n*z,f+=n*L,c+=n*N,h+=n*j,l+=n*K,p+=n*q,d+=n*H,_+=n*G,y+=n*Z,b+=n*V,g+=n*Y,m+=n*W,v+=n*X,w+=n*J,a+=(n=t[2])*F,u+=n*O,f+=n*z,c+=n*L,h+=n*N,l+=n*j,p+=n*K,d+=n*q,_+=n*H,y+=n*G,b+=n*Z,g+=n*V,m+=n*Y,v+=n*W,w+=n*X,k+=n*J,u+=(n=t[3])*F,f+=n*O,c+=n*z,h+=n*L,l+=n*N,p+=n*j,d+=n*K,_+=n*q,y+=n*H,b+=n*G,g+=n*Z,m+=n*V,v+=n*Y,w+=n*W,k+=n*X,E+=n*J,f+=(n=t[4])*F,c+=n*O,h+=n*z,l+=n*L,p+=n*N,d+=n*j,_+=n*K,y+=n*q,b+=n*H,g+=n*G,m+=n*Z,v+=n*V,w+=n*Y,k+=n*W,E+=n*X,x+=n*J,c+=(n=t[5])*F,h+=n*O,l+=n*z,p+=n*L,d+=n*N,_+=n*j,y+=n*K,b+=n*q,g+=n*H,m+=n*G,v+=n*Z,w+=n*V,k+=n*Y,E+=n*W,x+=n*X,S+=n*J,h+=(n=t[6])*F,l+=n*O,p+=n*z,d+=n*L,_+=n*N,y+=n*j,b+=n*K,g+=n*q,m+=n*H,v+=n*G,w+=n*Z,k+=n*V,E+=n*Y,x+=n*W,S+=n*X,A+=n*J,l+=(n=t[7])*F,p+=n*O,d+=n*z,_+=n*L,y+=n*N,b+=n*j,g+=n*K,m+=n*q,v+=n*H,w+=n*G,k+=n*Z,E+=n*V,x+=n*Y,S+=n*W,A+=n*X,B+=n*J,p+=(n=t[8])*F,d+=n*O,_+=n*z,y+=n*L,b+=n*N,g+=n*j,m+=n*K,v+=n*q,w+=n*H,k+=n*G,E+=n*Z,x+=n*V,S+=n*Y,A+=n*W,B+=n*X,D+=n*J,d+=(n=t[9])*F,_+=n*O,y+=n*z,b+=n*L,g+=n*N,m+=n*j,v+=n*K,w+=n*q,k+=n*H,E+=n*G,x+=n*Z,S+=n*V,A+=n*Y,B+=n*W,D+=n*X,M+=n*J,_+=(n=t[10])*F,y+=n*O,b+=n*z,g+=n*L,m+=n*N,v+=n*j,w+=n*K,k+=n*q,E+=n*H,x+=n*G,S+=n*Z,A+=n*V,B+=n*Y,D+=n*W,M+=n*X,P+=n*J,y+=(n=t[11])*F,b+=n*O,g+=n*z,m+=n*L,v+=n*N,w+=n*j,k+=n*K,E+=n*q,x+=n*H,S+=n*G,A+=n*Z,B+=n*V,D+=n*Y,M+=n*W,P+=n*X,I+=n*J,b+=(n=t[12])*F,g+=n*O,m+=n*z,v+=n*L,w+=n*N,k+=n*j,E+=n*K,x+=n*q,S+=n*H,A+=n*G,B+=n*Z,D+=n*V,M+=n*Y,P+=n*W,I+=n*X,U+=n*J,g+=(n=t[13])*F,m+=n*O,v+=n*z,w+=n*L,k+=n*N,E+=n*j,x+=n*K,S+=n*q,A+=n*H,B+=n*G,D+=n*Z,M+=n*V,P+=n*Y,I+=n*W,U+=n*X,R+=n*J,m+=(n=t[14])*F,v+=n*O,w+=n*z,k+=n*L,E+=n*N,x+=n*j,S+=n*K,A+=n*q,B+=n*H,D+=n*G,M+=n*Z,P+=n*V,I+=n*Y,U+=n*W,R+=n*X,T+=n*J,v+=(n=t[15])*F,s+=38*(k+=n*z),a+=38*(E+=n*L),u+=38*(x+=n*N),f+=38*(S+=n*j),c+=38*(A+=n*K),h+=38*(B+=n*q),l+=38*(D+=n*H),p+=38*(M+=n*G),d+=38*(P+=n*Z),_+=38*(I+=n*V),y+=38*(U+=n*Y),b+=38*(R+=n*W),g+=38*(T+=n*X),m+=38*(C+=n*J),o=(n=(o+=38*(w+=n*O))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=f,e[5]=c,e[6]=h,e[7]=l,e[8]=p,e[9]=d,e[10]=_,e[11]=y,e[12]=b,e[13]=g,e[14]=m,e[15]=v}function j(e,t){N(e,t,t)}function K(e,t){var r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=253;r>=0;r--)j(i,i),2!==r&&4!==r&&N(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function q(e,t,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=n(),c=n(),h=n(),l=n(),p=n(),d=n();for(o=0;o<31;o++)s[o]=t[o];for(s[31]=127&t[31]|64,s[0]&=248,O(a,r),o=0;o<16;o++)c[o]=a[o],l[o]=u[o]=h[o]=0;for(u[0]=l[0]=1,o=254;o>=0;--o)R(u,c,i=s[o>>>3]>>>(7&o)&1),R(h,l,i),z(p,u,h),L(u,u,h),z(h,c,l),L(c,c,l),j(l,p),j(d,u),N(u,h,u),N(h,c,p),z(p,u,h),L(u,u,h),j(c,u),L(h,l,d),N(u,h,f),z(u,u,l),N(h,h,u),N(u,l,d),N(l,c,a),j(c,p),R(u,c,i),R(h,l,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=h[o],a[o+48]=c[o],a[o+64]=l[o];var _=a.subarray(32),y=a.subarray(16);return K(_,_),N(y,y,_),T(e,y),0}function H(e,t){return q(e,t,s)}function G(e,t){return i(t,32),H(e,t)}function Z(e,t,r){var n=new Uint8Array(32);return q(n,r,t),v(e,o,n,w)}A.prototype.blocks=function(e,t,r){for(var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k=this.fin?0:2048,E=this.h[0],x=this.h[1],S=this.h[2],A=this.h[3],B=this.h[4],D=this.h[5],M=this.h[6],P=this.h[7],I=this.h[8],U=this.h[9],R=this.r[0],T=this.r[1],C=this.r[2],F=this.r[3],O=this.r[4],z=this.r[5],L=this.r[6],N=this.r[7],j=this.r[8],K=this.r[9];r>=16;)l=h=0,l+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*R,l+=(x+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*K),l+=(S+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*j),l+=(A+=8191&(o>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*N),h=(l+=(B+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*L))>>>13,l&=8191,l+=(D+=a>>>1&8191)*(5*z),l+=(M+=8191&(a>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*O),l+=(P+=8191&(u>>>11|(f=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*F),l+=(I+=8191&(f>>>8|(c=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*C),p=h+=(l+=(U+=c>>>5|k)*(5*T))>>>13,p+=E*T,p+=x*R,p+=S*(5*K),p+=A*(5*j),h=(p+=B*(5*N))>>>13,p&=8191,p+=D*(5*L),p+=M*(5*z),p+=P*(5*O),p+=I*(5*F),h+=(p+=U*(5*C))>>>13,p&=8191,d=h,d+=E*C,d+=x*T,d+=S*R,d+=A*(5*K),h=(d+=B*(5*j))>>>13,d&=8191,d+=D*(5*N),d+=M*(5*L),d+=P*(5*z),d+=I*(5*O),_=h+=(d+=U*(5*F))>>>13,_+=E*F,_+=x*C,_+=S*T,_+=A*R,h=(_+=B*(5*K))>>>13,_&=8191,_+=D*(5*j),_+=M*(5*N),_+=P*(5*L),_+=I*(5*z),y=h+=(_+=U*(5*O))>>>13,y+=E*O,y+=x*F,y+=S*C,y+=A*T,h=(y+=B*R)>>>13,y&=8191,y+=D*(5*K),y+=M*(5*j),y+=P*(5*N),y+=I*(5*L),b=h+=(y+=U*(5*z))>>>13,b+=E*z,b+=x*O,b+=S*F,b+=A*C,h=(b+=B*T)>>>13,b&=8191,b+=D*R,b+=M*(5*K),b+=P*(5*j),b+=I*(5*N),g=h+=(b+=U*(5*L))>>>13,g+=E*L,g+=x*z,g+=S*O,g+=A*F,h=(g+=B*C)>>>13,g&=8191,g+=D*T,g+=M*R,g+=P*(5*K),g+=I*(5*j),m=h+=(g+=U*(5*N))>>>13,m+=E*N,m+=x*L,m+=S*z,m+=A*O,h=(m+=B*F)>>>13,m&=8191,m+=D*C,m+=M*T,m+=P*R,m+=I*(5*K),v=h+=(m+=U*(5*j))>>>13,v+=E*j,v+=x*N,v+=S*L,v+=A*z,h=(v+=B*O)>>>13,v&=8191,v+=D*F,v+=M*C,v+=P*T,v+=I*R,w=h+=(v+=U*(5*K))>>>13,w+=E*K,w+=x*j,w+=S*N,w+=A*L,h=(w+=B*z)>>>13,w&=8191,w+=D*O,w+=M*F,w+=P*C,w+=I*T,E=l=8191&(h=(h=((h+=(w+=U*R)>>>13)<<2)+h|0)+(l&=8191)|0),x=p+=h>>>=13,S=d&=8191,A=_&=8191,B=y&=8191,D=b&=8191,M=g&=8191,P=m&=8191,I=v&=8191,U=w&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=x,this.h[2]=S,this.h[3]=A,this.h[4]=B,this.h[5]=D,this.h[6]=M,this.h[7]=P,this.h[8]=I,this.h[9]=U},A.prototype.finish=function(e,t){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(s[9]>>>15)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(k=0;k<16;k++)E=8*k+Y,P[k]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],I[k]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(k=0;k<80;k++)if(i=U,o=R,s=T,a=C,u=F,f=O,c=z,L,l=N,p=j,d=K,_=q,y=H,b=G,g=Z,V,A=65535&(S=V),B=S>>>16,D=65535&(x=L),M=x>>>16,A+=65535&(S=(H>>>14|F<<18)^(H>>>18|F<<14)^(F>>>9|H<<23)),B+=S>>>16,D+=65535&(x=(F>>>14|H<<18)^(F>>>18|H<<14)^(H>>>9|F<<23)),M+=x>>>16,A+=65535&(S=H&G^~H&Z),B+=S>>>16,D+=65535&(x=F&O^~F&z),M+=x>>>16,x=W[2*k],A+=65535&(S=W[2*k+1]),B+=S>>>16,D+=65535&x,M+=x>>>16,x=P[k%16],B+=(S=I[k%16])>>>16,D+=65535&x,M+=x>>>16,D+=(B+=(A+=65535&S)>>>16)>>>16,A=65535&(S=w=65535&A|B<<16),B=S>>>16,D=65535&(x=v=65535&D|(M+=D>>>16)<<16),M=x>>>16,A+=65535&(S=(N>>>28|U<<4)^(U>>>2|N<<30)^(U>>>7|N<<25)),B+=S>>>16,D+=65535&(x=(U>>>28|N<<4)^(N>>>2|U<<30)^(N>>>7|U<<25)),M+=x>>>16,B+=(S=N&j^N&K^j&K)>>>16,D+=65535&(x=U&R^U&T^R&T),M+=x>>>16,h=65535&(D+=(B+=(A+=65535&S)>>>16)>>>16)|(M+=D>>>16)<<16,m=65535&A|B<<16,A=65535&(S=_),B=S>>>16,D=65535&(x=a),M=x>>>16,B+=(S=w)>>>16,D+=65535&(x=v),M+=x>>>16,R=i,T=o,C=s,F=a=65535&(D+=(B+=(A+=65535&S)>>>16)>>>16)|(M+=D>>>16)<<16,O=u,z=f,L=c,U=h,j=l,K=p,q=d,H=_=65535&A|B<<16,G=y,Z=b,V=g,N=m,k%16==15)for(E=0;E<16;E++)x=P[E],A=65535&(S=I[E]),B=S>>>16,D=65535&x,M=x>>>16,x=P[(E+9)%16],A+=65535&(S=I[(E+9)%16]),B+=S>>>16,D+=65535&x,M+=x>>>16,v=P[(E+1)%16],A+=65535&(S=((w=I[(E+1)%16])>>>1|v<<31)^(w>>>8|v<<24)^(w>>>7|v<<25)),B+=S>>>16,D+=65535&(x=(v>>>1|w<<31)^(v>>>8|w<<24)^v>>>7),M+=x>>>16,v=P[(E+14)%16],B+=(S=((w=I[(E+14)%16])>>>19|v<<13)^(v>>>29|w<<3)^(w>>>6|v<<26))>>>16,D+=65535&(x=(v>>>19|w<<13)^(w>>>29|v<<3)^v>>>6),M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,P[E]=65535&D|M<<16,I[E]=65535&A|B<<16;A=65535&(S=N),B=S>>>16,D=65535&(x=U),M=x>>>16,x=e[0],B+=(S=t[0])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[0]=U=65535&D|M<<16,t[0]=N=65535&A|B<<16,A=65535&(S=j),B=S>>>16,D=65535&(x=R),M=x>>>16,x=e[1],B+=(S=t[1])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[1]=R=65535&D|M<<16,t[1]=j=65535&A|B<<16,A=65535&(S=K),B=S>>>16,D=65535&(x=T),M=x>>>16,x=e[2],B+=(S=t[2])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[2]=T=65535&D|M<<16,t[2]=K=65535&A|B<<16,A=65535&(S=q),B=S>>>16,D=65535&(x=C),M=x>>>16,x=e[3],B+=(S=t[3])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[3]=C=65535&D|M<<16,t[3]=q=65535&A|B<<16,A=65535&(S=H),B=S>>>16,D=65535&(x=F),M=x>>>16,x=e[4],B+=(S=t[4])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[4]=F=65535&D|M<<16,t[4]=H=65535&A|B<<16,A=65535&(S=G),B=S>>>16,D=65535&(x=O),M=x>>>16,x=e[5],B+=(S=t[5])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[5]=O=65535&D|M<<16,t[5]=G=65535&A|B<<16,A=65535&(S=Z),B=S>>>16,D=65535&(x=z),M=x>>>16,x=e[6],B+=(S=t[6])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[6]=z=65535&D|M<<16,t[6]=Z=65535&A|B<<16,A=65535&(S=V),B=S>>>16,D=65535&(x=L),M=x>>>16,x=e[7],B+=(S=t[7])>>>16,D+=65535&x,M+=x>>>16,M+=(D+=(B+=(A+=65535&S)>>>16)>>>16)>>>16,e[7]=L=65535&D|M<<16,t[7]=V=65535&A|B<<16,Y+=128,n-=128}return n}function J(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,X(i,o,t,r),r%=128,n=0;n=0;--i)Q(e,t,n=r[i/8|0]>>(7&i)&1),$(t,e),$(e,e),Q(e,t,n)}function re(e,t){var r=[n(),n(),n(),n()];I(r[0],l),I(r[1],p),I(r[2],u),N(r[3],l,p),te(e,r,t)}function ne(e,t,r){var o,s=new Uint8Array(64),a=[n(),n(),n(),n()];for(r||i(t,32),J(s,t,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),ee(e,a),o=0;o<32;o++)t[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function ae(e,t,r,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),f=new Uint8Array(64),c=new Float64Array(64),h=[n(),n(),n(),n()];J(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=r+64;for(o=0;o=0;r--)j(i,i),1!==r&&N(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}(r,r),N(r,r,o),N(r,r,s),N(r,r,s),N(e[0],r,s),j(i,e[0]),N(i,i,s),C(i,o)&&N(e[0],e[0],d),j(i,e[0]),N(i,i,s),C(i,o)?-1:(F(e[0])===t[31]>>7&&L(e[0],a,e[0]),N(e[3],e[0],e[1]),0)}function fe(e,t,r,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[n(),n(),n(),n()],f=[n(),n(),n(),n()];if(-1,r<64)return-1;if(ue(f,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(be(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;ro;n=0<=o?++i:--i)r|=e.readUInt8(n)^t.readUInt8(n);return 0===r}()}}).call(this)},function(e,t,r){(function(e){(function(){var r,n;t.b2u=r=function(e){return new Uint8Array(e)},t.u2b=n=function(t){return new e(t)},t.Base=function(){function e(e){this.publicKey=e.publicKey,this.secretKey=e.secretKey,this.lib=e.lib}return e.prototype.genFromSeed=function(e){var t,i;return t=e.seed,i=this.lib.js.sign.keyPair.fromSeed(r(t)),this.secretKey=n(i.secretKey),this.publicKey=n(i.publicKey),{secretKey:this.secretKey,publicKey:this.publicKey}},e.prototype.genBoxPair=function(){var e;return e=this.lib.js.box.keyPair(),this.secretKey=n(e.secretKey),this.publicKey=n(e.publicKey),{secretKey:this.secretKey,publicKey:this.publicKey}},e.prototype.get_secret_key=function(){return this.secretKey},e.prototype.get_public_key=function(){return this.publicKey},e}()}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B,D,M,P,I,U,R,T,C={}.hasOwnProperty;S=r(24),i=r(25).openpgp,I=(M=r(71)).hash,b=I.SHA1,I.SHA256,d=r(502).Pair,o=r(737).Pair,f=r(738).Pair,c=r(1426).Pair,a=r(505).Pair,s=r(506).Pair,u=r(600).Pair,n=M.ciphers.AES,A=M.prng.native_rng,k=r(455).calc_checksum,U=r(28),w=U.bufferify,U.unix_time,v=U.bufeq_secure,U.katch,U.make_time_packet,P=U.uint_to_buffer,R=r(601),E=R.decrypt,x=R.encrypt,l=r(175).Packet,_=r(423),m=_.Signature,r(311).encode,T=r(1427),y=T.S2K,g=T.SecretKeyMaterial,D=r(457),r(62),B=r(507),h=function(t){function r(e){this.key=e.key,this.timestamp=e.timestamp,this.passphrase=e.passphrase,this.skm=e.skm,this.opts=e.opts,this.flags=e.flags,this.opts||(this.opts={}),this.flags||(this.flags=0),this._is_duplicate_primary=!1,r.__super__.constructor.call(this)}return function(e,t){for(var r in t)C.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,l),r.prototype._write_private_enc=function(t,r,o){var s,a,u,f,c,h,l,p;return t.push(new e([i.s2k_convention.sha1,i.symmetric_key_algorithms.AES256,i.s2k.salt_iter,i.hash_algorithms.SHA256])),p=(new b).bufhash(r),l=A(8),t.push(l),96,t.push(new e([96])),c=n.keySize,f=(new y).write(o,l,96,c),u=n.blockSize,a=A(u),t.push(a),h=e.concat([r,p]),s=x({block_cipher_class:n,key:f,plaintext:h,iv:a}),t.push(s)},r.prototype._write_private_clear=function(t,r){return t.push(new e([i.s2k_convention.none]),r,P(16,k(r)))},r.prototype._write_public=function(t){var r;return r=this.key.serialize(),t.push(new e([i.versions.keymaterial.V4]),P(32,this.timestamp),new e([this.key.type]),r)},r.prototype._write_dummy=function(t){return t.push(new e([i.s2k_convention.sha1,i.symmetric_key_algorithms.AES256,i.s2k.gnu,2]),new e("GNU","utf8"),new e([1]))},r.prototype.add_flags=function(e){return this.flags|=e},r.prototype.private_body=function(t){var r,n,i,o;return r=[],this._write_public(r),o=null!=(n=this.key.priv)?n.serialize():null,i=t.passphrase||this.passphrase,null==o?this._write_dummy(r):null!=i?this._write_private_enc(r,o,i):this._write_private_clear(r,o),e.concat(r)},r.prototype.private_framed=function(e){var t,r,n;return r=this.private_body(e),t=i.packet_tags,n=e.subkey?t.secret_subkey:t.secret_key,this.frame_packet(n,r)},r.prototype.public_body=function(){var t;return t=[],this._write_public(t),e.concat(t)},r.prototype.get_fingerprint=function(){var t;return t=this.public_body(),(new b).bufhash(e.concat([new e([i.signatures.key]),P(16,t.length),t]))},r.prototype.get_key_id=function(){return this.get_fingerprint().slice(12,20)},r.prototype.get_short_key_id=function(){return this.get_key_id().slice(-4).toString("hex").toUpperCase()},r.prototype.get_klass=function(){return this.key.constructor},r.prototype.export_framed=function(e){return null==e&&(e={}),e.private?this.private_framed(e):this.public_framed(e)},r.prototype.public_framed=function(e){var t,r,n;return null==e&&(e={}),r=this.public_body(),t=i.packet_tags,n=e.subkey?t.public_subkey:t.public_key,this.frame_packet(n,r)},r.prototype.to_signature_payload=function(){var t;return t=this.public_body(),e.concat([new e([i.signatures.key]),P(16,t.length),t])},r.prototype.self_sign_key=function(e,t){var r,n,i,o,s,a,u,f,c,h,l;c=S.findDeferral(arguments),f=e.userids,n=e.lifespan,o=e.raw_payload,r=null,a=[],i=!0,(l=this,function(e){var t,p,d,_;p=(d=f).length,t=0,(_=function(e){var f,y,b;return f=e,b=y=function(){return S.trampoline(function(){return++t,_(e)})},tr.expire_at||!(t.expire_at=r.generated},r.prototype.get_expire_time=function(){return null==this.get_psc()?null:this.is_primary()?this._get_expire_time_on_primary():this._get_expire_time_on_subkey()},r.prototype._get_expire_time_on_primary=function(){var e,t,r,n,i,o,s,a,u,f,c,h;for(s in o=this.get_psc().lookup.self_sigs_by_uid,f=null,this.timestamp,o){for(u=null,c=0,h=(t=o[s]).length;c=u.length)return r();s.update(u.slice(a,a+1048576)),function(e){h=new g.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"MDC.compute"}),i.progress({what:"MDC",total:u.length,i:a},o(h.defer({lineno:122}))),h._fulfill()}(n)})(e)}((l=this,function(){return s.update(l.header),l.computed=s(),r(null,l.computed)}))},r.prototype.check=function(){return y(this.digest,this.computed)},r}(),a=function(){function e(e){this.buf=e}return e.prototype.parse=function(){var e,t,r,n,i;if(r=s.header.length,n=p.output_length+r,i=this.buf.slice(0,-n),e=this.buf.slice(-n),!_(e.slice(0,r),s.header))throw new Error("Missing MDC header");return t=e.slice(r),[new s({digest:t}),i]},e}(),l=function(){function e(e){this.slice=e}return e.prototype.payload_split=function(e){},e.prototype.parse=function(){var e,t;if((t=this.slice.read_uint8())!==i.versions.SEIPD)throw new Error("Unknown SEIPD version "+t);return e=this.slice.consume_rest_to_buffer(),new h({ciphertext:e})},e}(),f=function(){function e(e){this.slice=e}return e.prototype.parse=function(){var e,t,r,n;if((n=this.slice.read_uint8())!==i.versions.PKESK)throw new Error("Unknown PKESK version: "+n);return r=this.slice.read_buffer(8),e=this.slice.read_uint8(),t=d.get_class(e).parse_output(this.slice.consume_rest_to_buffer()),new u({crypto_type:e,key_id:r,ekey:t})},e}(),t.SEIPD=h,t.PKESK=u,t.MDC=s}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l={}.hasOwnProperty;n=r(25).openpgp,(c=(u=r(71)).hash).SHA1,c.SHA256,u.ciphers.AES,u.prng.native_rng,h=r(28),s=h.bufferify,f=h.uint_to_buffer,r(601).encrypt,i=r(175).Packet,a=r(174).userid.parse,o=function(t){function r(e,t){this.components=null!=t?t:null,this.userid=s(e),null==this.compontents&&this._parse(),r.__super__.constructor.call(this),this._time_primary_pair=null,this.primary=!1,this.most_recent_sig=null}return function(e,t){for(var r in t)l.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,i),r.prototype.utf8=function(){return this.userid.toString("utf8")},r.prototype.write=function(){return this.frame_packet(n.packet_tags.userid,this.userid)},r.parse=function(e){return new r(e.consume_rest_to_buffer())},r.prototype.to_userid=function(){return this},r.prototype.cmp=function(e){var t,r;return(t=this.utf8())<(r=e.utf8())?-1:t===r?0:1},r.prototype.to_signature_payload=function(){return e.concat([new e([n.signatures.userid]),f(32,this.userid.length),this.userid])},r.prototype._parse=function(){var e;if(null!=(e=a(this.utf8())))return this.components=e},r.prototype.get_username=function(){var e;return null!=(e=this.components)?e.username:void 0},r.prototype.get_comment=function(){var e;return null!=(e=this.components)?e.comment:void 0},r.prototype.get_email=function(){var e;return null!=(e=this.components)?e.email:void 0},r.prototype.time_primary_pair=function(){var e,t,r,n,i,o;if(null==this._time_primary_pair){for(t=function(){var e,t,r,i,o;for(o=[],e=0,t=(r=this.get_psc().get_self_sigs()).length;e",e)},r.prototype.get_framed_signature_output=function(){var e,t,r;return null!=(e=this.get_psc())&&null!=(t=e.get_self_sig())&&null!=(r=t.sig)?r.get_framed_output():void 0},r.prototype.mark_revoked=function(e){return this.revocation=e},r.prototype.is_revoked=function(){return null!=this.revocation},r}(),t.UserID=o}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p={}.hasOwnProperty;c=r(24),s=r(175).Packet,n=r(25).openpgp,r(424),l=r(439),h=r(28).uint_to_buffer,a=r(1430),f=function(t,r){var n,i,o,s,a,u;a=c.findDeferral(arguments),t=e.concat([new e([120,156]),t]),s=l.createInflate({flush:l.Z_FULL_FLUSH}),n=[],i=function(t){var i;if(null!=(i=r))return null!=t&&"Z_BUF_ERROR"===t.code&&(t=null),r=null,i(t,null!=t?null:e.concat(n))},s.on("readable",function(){var e;if(null!=(e=s.read()))return n.push(e)}),s.on("end",function(){return i(null)}),s.on("error",function(e){return i(e)}),function(e){u=new c.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced"}),s.write(t,u.defer({assign_fn:function(){return o=arguments[0]},lineno:53})),u._fulfill()}(function(){!function(e){if(null!=o)return e();!function(e){u=new c.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced"}),s.end(o),u._fulfill()}(e)}(function(){if(null!=o)return i(o)})})},u=function(e,t){var r,n;r=null;try{n=a(e)}catch(e){r=e}return t(r,n)},i=function(t){function r(e){this.algo=e.algo,this.compressed=e.compressed,this.inflated=e.inflated}return function(e,t){for(var r in t)p.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,s),r.parse=function(e){return new o(e).parse()},r.prototype.inflate=function(e){var t,r,i,o,s;i=c.findDeferral(arguments),t=r=null,(s=this,function(e){switch(s.algo){case n.compression.none:return e(r=s.compressed);case n.compression.zlib:!function(e){o=new c.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),l.inflate(s.compressed,o.defer({assign_fn:function(){return t=arguments[0],r=arguments[1]},lineno:95})),o._fulfill()}(e);break;case n.compression.zip:!function(e){o=new c.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),f(s.compressed,o.defer({assign_fn:function(){return t=arguments[0],r=arguments[1]},lineno:97})),o._fulfill()}(e);break;case n.compression.bzip:!function(e){o=new c.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),u(s.compressed,o.defer({assign_fn:function(){return t=arguments[0],r=arguments[1]},lineno:99})),o._fulfill()}(e);break;default:return e(t=new Error("no known inflation -- algo: "+s.algo))}})(function(){return e(t,r)})},r.prototype.deflate=function(e){var t,r,i,o,s;i=c.findDeferral(arguments),t=r=null,(s=this,function(e){switch(s.algo){case n.compression.none:return e(r=s.inflated);case n.compression.zlib:!function(e){o=new c.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.deflate"}),l.deflate(s.inflated,o.defer({assign_fn:function(){return t=arguments[0],r=arguments[1]},lineno:111})),o._fulfill()}(e);break;case n.compression.zip:!function(e){o=new c.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.deflate"}),fake_zip_deflate(s.inflated,o.defer({assign_fn:function(){return t=arguments[0],r=arguments[1]},lineno:113})),o._fulfill()}(e);break;default:return e(t=new Error("no known deflation -- algo: "+s.algo))}})(function(){return e(t,r)})},r.prototype.write_unframed=function(t){var r,n,i,o,s,a;o=c.findDeferral(arguments),n=i=null,(a=this,function(e){var t;s=new c.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.write_unframed"}),a.deflate(s.defer({assign_fn:(t=a,function(){return n=arguments[0],t.compressed=arguments[1]}),lineno:122})),s._fulfill()})(function(o){return function(){return null==n&&(r=[h(8,o.algo),o.compressed],i=e.concat(r)),t(n,i)}}(this))},r.prototype.write=function(e){var t,r,i,o,s,a;o=c.findDeferral(arguments),t=r=null,(a=this,function(e){s=new c.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.write"}),a.write_unframed(s.defer({assign_fn:function(){return t=arguments[0],i=arguments[1]},lineno:132})),s._fulfill()})(function(o){return function(){return null==t&&(r=o.frame_packet(n.packet_tags.compressed,i)),e(t,r)}}(this))},r}(),o=function(){function e(e){this.slice=e}return e.prototype.parse=function(){var e,t;return e=this.slice.read_uint8(),t=this.slice.consume_rest_to_buffer(),new i({algo:e,compressed:t})},e}(),t.Compressed=i}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h={}.hasOwnProperty;f=r(24),s=r(175).Packet,n=r(25).openpgp,a=r(424),u=r(80),c=r(28).uint_to_buffer,o=function(t){function r(e){this.sig_type=e.sig_type,this.hasher=e.hasher,this.sig_klass=e.sig_klass,this.key_id=e.key_id,this.is_final=e.is_final}return function(e,t){for(var r in t)h.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,s),r.parse=function(e){return new i(e).parse()},r.prototype.write_unframed=function(t){var r,i,o;return i=[n.versions.one_pass_sig,this.sig_type,this.hasher.type,this.sig_klass.type],(r=function(){var e,t,r;for(r=[],e=0,t=i.length;e=1&&"-"===e[0]?"- "+e:e},t.dash_unescape_line=_=function(e){var t,r,n;return r=!1,[null!=(t=e.match(/^-( )?(.*?)$/))?(1!==(null!=(n=t[1])?n.length:void 0)&&(r=!0),t[2]):e,r]},t.dash_unescape_lines=y=function(e,t){var r,n,i;return null==t&&(t=null),function(){var o,s,a,u;for(u=[],r=o=0,s=e.length;o=0&&""===n[i];i+=-1)r++;return r>0&&n.pop(),n.join("\r\n")},t.whitespace_strip=B=function(e){var t;return(t=(e=e.replace(/\r/g,"")).match(/^(.*?)([ \t]*)$/))?t[1]:e},i=function(){function t(e){this.msg=e.msg,this.signing_key=e.signing_key,this.now=e.now}return t.prototype._fix_msg=function(e){return this._cleartext=v(this.msg.toString("utf8")),e(null)},t.prototype._sign_msg=function(t){var r,n,i,a;n=m.findDeferral(arguments),this.sig=new u({sig_type:e.sig_types.canonical_text,key:this.signing_key.key,hashed_subpackets:[new o(this.now||A())],unhashed_subpackets:[new s(this.signing_key.get_key_id())]}),(a=this,function(e){var t;i=new m.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner._sign_msg"}),a.sig.write(a._cleartext.sign,i.defer({assign_fn:(t=a,function(){return r=arguments[0],t._sig_output=arguments[1]}),lineno:117})),i._fulfill()})(function(e){return function(){return t(r,e._sig_output)}}(this))},t.prototype.scrub=function(){},t.prototype.hasher_name=function(){return this.sig.hasher.algname},t.prototype._encode=function(t){return t(null,l(n,this._cleartext.show,this.hasher_name())+b(e.message_types.signature,this._sig_output))},t.prototype.run=function(e){var t,r,n,i,o,s;i=m.findDeferral(arguments),r=x(e,"ClearSigner::run"),(s=this,function(e){o=new m.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._fix_msg(r(o.defer({lineno:139}))),o._fulfill()})(function(s){return function(){o=new m.Deferrals(function(){o=new m.Deferrals(function(){return e(null,t,n)},{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._encode(r(o.defer({assign_fn:function(){return t=arguments[0]},lineno:141}))),o._fulfill()},{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._sign_msg(r(o.defer({assign_fn:function(){return n=arguments[0]},lineno:140}))),o._fulfill()}}(this))},t}(),f=function(t){function r(e){var t,n;n=e.packets,this.clearsign=e.clearsign,t=e.keyfetch,this.now=e.now,r.__super__.constructor.call(this,{packets:n,keyfetch:t})}return function(e,t){for(var r in t)I.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,c),r.prototype._reformat_text=function(t){var r;return r=h(p(this.clearsign.lines)),this._literal=new a({data:r,format:e.literal_formats.utf8,date:this.now||A()}),t(null)},r.prototype._make_hasher=function(e){var t,r;return t=null,r=(this.clearsign.headers.hash||"MD5").trim(),null==(this._sig.hasher=g[r])&&(t=new Error("Unknown hash algorithm: "+r)),e(t)},r.prototype._verify=function(e){var t,r,n,i,o;n=m.findDeferral(arguments),r={now:this.now},(o=this,function(e){i=new m.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier._verify"}),o._sig.verify([o._literal],i.defer({assign_fn:function(){return t=arguments[0]},lineno:183}),r),i._fulfill()})(function(){return e(t)})},r.prototype._check_headers=function(e){var t,r,n;for(r in t=null,n=this.clearsign.headers)if(n[r],"hash"!==r){t=new Error("Unallowed header: "+r);break}return e(t)},r.prototype.run=function(e){var t,r,n,i;r=m.findDeferral(arguments),t=x(e,"Verifier::run"),(i=this,function(e){n=new m.Deferrals(e,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._check_headers(t(n.defer({lineno:200}))),n._fulfill()})(function(i){return function(){n=new m.Deferrals(function(){n=new m.Deferrals(function(){n=new m.Deferrals(function(){n=new m.Deferrals(function(){n=new m.Deferrals(function(){return e(null,i._literal)},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._verify(t(n.defer({lineno:205}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._make_hasher(t(n.defer({lineno:204}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._fetch_key(t(n.defer({lineno:203}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._reformat_text(t(n.defer({lineno:202}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._find_signature(t(n.defer({lineno:201}))),n._fulfill()}}(this))},r}(),t.sign=function(e,t){var r,n,o,s,a,u,f,c,h;c=m.findDeferral(arguments),s=e.msg,f=e.signing_key,a=e.now,r=new i({msg:s,signing_key:f,now:a}),function(e){h=new m.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"sign"}),r.run(h.defer({assign_fn:function(){return o=arguments[0],n=arguments[1],u=arguments[2]},lineno:216})),h._fulfill()}(function(){return r.scrub(),t(o,n,u)})},t.verify=function(e,t){var r,n,i,o,s,a,u,c,h;c=m.findDeferral(arguments),a=e.packets,r=e.clearsign,i=e.keyfetch,s=e.now,u=new f({packets:a,clearsign:r,keyfetch:i,now:s}),function(e){h=new m.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"verify"}),u.run(h.defer({assign_fn:function(){return n=arguments[0],o=arguments[1]},lineno:224})),h._fulfill()}(function(){return t(n,o)})}}).call(this)},function(e,t,r){(function(){var e,n,i;n=r(24),i=r(25),e=i.openpgp,t.Base=function(){function t(e){this.packets=e.packets,this.keyfetch=e.keyfetch,this._sig=null}return t.prototype._find_signature=function(t){var r;return t(1!==(r=this.packets.length)?new Error("Expected one signature packet; got "+r):(this._sig=this.packets[0]).tag!==e.packet_tags.signature?new Error("Expected a signature packet; but got type="+this.packets[0].tag):null)},t.prototype._fetch_key=function(e){var t,r,o,s,a,u,f;a=n.findDeferral(arguments),r=this._sig.get_key_id(),(f=this,function(e){u=new n.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/verifier.iced",funcname:"Base._fetch_key"}),f.keyfetch.fetch([r],i.ops.verify,u.defer({assign_fn:function(){return t=arguments[0],s=arguments[1],arguments[2]},lineno:28})),u._fulfill()})(function(n){return function(){return null==t&&(o=s.find_pgp_key_material(r),n._sig.key=o.key,n._sig.key_manager=s,n._sig.subkey_material=o),e(t)}}(this))},t}()}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v={}.hasOwnProperty;p=r(24),_=r(43).make_esc,m=r(423),a=m.Signature,i=m.CreationTime,o=m.Issuer,g=r(28).unix_time,h=r(71).WordArray,d=r(25),n=d.openpgp,r(598),b=r(80).streamers,l=r(311).encode,s=r(508).Literal,c=r(744).Base,y=r(507),u=function(){function t(e){this.data=e.data,this.hash_streamer=e.hash_streamer,this.signing_key=e.signing_key}return t.prototype.run=function(e){var t,r,n,i,o,s;i=p.findDeferral(arguments),r=_(e,"Signer::run"),(s=this,function(e){o=new p.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._run_hash(r(o.defer({lineno:39}))),o._fulfill()})(function(s){return function(){o=new p.Deferrals(function(){o=new p.Deferrals(function(){return e(null,t,n)},{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._encode(r(o.defer({assign_fn:function(){return t=arguments[0]},lineno:41}))),o._fulfill()},{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._sign(r(o.defer({assign_fn:function(){return n=arguments[0]},lineno:40}))),o._fulfill()}}(this))},t.prototype.scrub=function(){},t.prototype._sign=function(t){var r,s,u,f,c;u=p.findDeferral(arguments),this.sig=new a({sig_type:n.sig_types.canonical_text,key:this.signing_key.key,hashed_subpackets:[new i(g())],unhashed_subpackets:[new o(this.signing_key.get_key_id())],hasher:this.hash_streamer}),r=new e([]),(c=this,function(e){var t;f=new p.Deferrals(e,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer._sign"}),c.sig.write(r,f.defer({assign_fn:(t=c,function(){return s=arguments[0],t._sig_output=arguments[1]}),lineno:60})),f._fulfill()})(function(e){return function(){return t(s,e._sig_output)}}(this))},t.prototype._encode=function(e){return null,e(null,l(n.message_types.signature,this._sig_output))},t.prototype._run_hash=function(e){var t;return t=null,null!=this.hash_streamer||(null!=this.data?(this.hash_streamer=b.SHA512(),this.hash_streamer.update(this.data)):t=new Error("Need either a hasher or data")),e(t)},t}(),f=function(t){function r(e){var t,n;n=e.packets,this.data=e.data,this.data_fn=e.data_fn,t=e.keyfetch,this.now=e.now,r.__super__.constructor.call(this,{packets:n,keyfetch:t})}return function(e,t){for(var r in t)v.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,c),r.prototype._consume_data=function(e){var t,r,n,i,o,s,a,u;s=p.findDeferral(arguments),n=null,(u=this,function(e){if(null==u.data_fn)return e();n=null,u._sig.hasher.klass,o=b[u._sig.hasher.algname](),t=function(e){return o.update(e)},i=!0,function(e){var o;(o=function(e){var f;if(f=function(){return p.trampoline(function(){return o(e)})},!i)return e();a=new p.Deferrals(function(){return f(null!=n||r?i=!1:void 0)},{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier._consume_data"}),u.data_fn(t,a.defer({assign_fn:function(){return n=arguments[0],r=arguments[1]},lineno:102})),a._fulfill()})(e)}(function(){return e(u._sig.hasher=o)})})(function(){return e(n)})},r.prototype._verify=function(e){var t,r,n,i,o,a;i=p.findDeferral(arguments),t=this.data?[new s({data:this.data})]:[],this.literals=t,n={now:this.now},(a=this,function(e){o=new p.Deferrals(e,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier._verify"}),a._sig.verify(t,o.defer({assign_fn:function(){return r=arguments[0]},lineno:114}),n),o._fulfill()})(function(){return e(r)})},r.prototype._make_literals=function(t){return this.literals.length||this.literals.push(new s({data:new e([])})),this.literals[0].push_sig(new y.Data({sig:this._sig})),t(null)},r.prototype.run=function(e){var t,r,n,i;r=p.findDeferral(arguments),t=_(e,"Verifier::run"),(i=this,function(e){n=new p.Deferrals(e,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._find_signature(t(n.defer({lineno:129}))),n._fulfill()})(function(i){return function(){n=new p.Deferrals(function(){n=new p.Deferrals(function(){n=new p.Deferrals(function(){n=new p.Deferrals(function(){return e(null,i.literals)},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._make_literals(t(n.defer({lineno:133}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._verify(t(n.defer({lineno:132}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._consume_data(t(n.defer({lineno:131}))),n._fulfill()},{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._fetch_key(t(n.defer({lineno:130}))),n._fulfill()}}(this))},r}(),t.sign=function(e,t){var r,n,i,o,s,a,f,c,h,l;h=p.findDeferral(arguments),r=e.data,o=e.hash_streamer,c=e.signing_key,s=e.now,a=new u({data:r,hash_streamer:o,signing_key:c,now:s}),function(e){l=new p.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"sign"}),a.run(l.defer({assign_fn:function(){return i=arguments[0],n=arguments[1],f=arguments[2]},lineno:140})),l._fulfill()}(function(){return a.scrub(),t(i,n,f)})},t.verify=function(e,t){var r,n,i,o,s,a,u,c,h,l;h=p.findDeferral(arguments),r=e.data,n=e.data_fn,u=e.packets,o=e.keyfetch,a=e.now,c=new f({data:r,data_fn:n,packets:u,keyfetch:o,now:a}),function(e){l=new p.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"verify"}),c.run(l.defer({assign_fn:function(){return i=arguments[0],s=arguments[1]},lineno:148})),l._fulfill()}(function(){return t(i,s)})}}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h;e=r(603).C,c=r(604),s=c.bufeq,n=c.PpBuffer,(h=r(605)).pow2,f=h.twos_compl_inv,i=h.U32MAX,u=r(602).pack,a=function(e,t){return{type:e,raw:t}},t.Unpacker=o=function(){function t(e,t){this._opts=null!=t?t:{},this._orig_buffer=e,this._buffer=new n(e),this._ext=this._opts.ext||(this._opts.no_ext?null:a)}return t.prototype.u_buf=function(e){return this._buffer.read_buffer(e)},t.prototype.u_str=function(e){return this.u_buf(e).toString("utf8")},t.prototype.u_bin=function(e){return this.u_buf(e)},t.prototype.u_ext=function(e){var t,r;if(r=this.u_uint8(),t=this.u_buf(e),null!=this._opts.ext)return this._opts.ext(r,t);throw new Error("No ext hook but got message type: "+r)},t.prototype.u_array=function(e){var t,r;for(r=[],t=0;0<=e?te;0<=e?++t:--t)r.push(this.u());return r},t.prototype.u_map=function(e){var t,r,n,i,o,s,a;for(i={},n=[],t=o=0;0<=e?oe;t=0<=e?++o:--o){if(r=this.u(),n.push(r),null!=i[r])throw new Error("duplicate key '"+r+"'");i[r]=this.u()}if(this._opts.strict)for(t=s=0,a=n.length-1;0<=a?sa;t=0<=a?++s:--s)if(n[t]>n[t+1])throw new Error("unsorted object keys in strict mode: "+n[t]+" > "+n[t+1]);return i},t.prototype.u_uint8=function(){return this._buffer.read_uint8()},t.prototype.u_uint16=function(){return this._buffer.read_uint16()},t.prototype.u_uint32=function(){return this._buffer.read_uint32()},t.prototype.u_int8=function(){return this._buffer.read_int8()},t.prototype.u_int16=function(){return this._buffer.read_int16()},t.prototype.u_int32=function(){return this._buffer.read_int32()},t.prototype.u_uint64=function(){return this.u_uint32()*i+this.u_uint32()},t.prototype.u_double=function(){return this._buffer.read_float64()},t.prototype.u_float=function(){return this._buffer.read_float32()},t.prototype.u_int64=function(){var e,t,r;return e=(r=function(){var e,t;for(t=[],e=0;e<2;++e)t.push(this.u_uint32());return t}.call(this))[0],t=r[1],i*(e-i)+t},t.prototype.u=function(){var t,r;if((t=this.u_uint8())<=e.positive_fix_max)return t;if(t>=e.negative_fix_min&&t<=e.negative_fix_max)return f(t,8);if(t>=e.fix_str_min&&t<=e.fix_str_max)return r=t&e.fix_str_count_mask,this.u_str(r);if(t>=e.fix_array_min&&t<=e.fix_array_max)return r=t&e.fix_array_count_mask,this.u_array(r);if(t>=e.fix_map_min&&t<=e.fix_map_max)return r=t&e.fix_map_count_mask,this.u_map(r);switch(t){case e.null:return null;case e.true:return!0;case e.false:return!1;case e.uint8:return this.u_uint8();case e.uint16:return this.u_uint16();case e.uint32:return this.u_uint32();case e.uint64:return this.u_uint64();case e.int8:return this.u_int8();case e.int16:return this.u_int16();case e.int32:return this.u_int32();case e.int64:return this.u_int64();case e.double:return this.u_double();case e.float:return this.u_float();case e.str8:return this.u_str(this.u_uint8());case e.str16:return this.u_str(this.u_uint16());case e.str32:return this.u_str(this.u_uint32());case e.bin8:return this.u_bin(this.u_uint8());case e.bin16:return this.u_bin(this.u_uint16());case e.bin32:return this.u_bin(this.u_uint32());case e.array16:return this.u_array(this.u_uint16());case e.array32:return this.u_array(this.u_uint32());case e.map16:return this.u_map(this.u_uint16());case e.map32:return this.u_map(this.u_uint32());case e.fix_ext1:return this.u_ext(1);case e.fix_ext2:return this.u_ext(2);case e.fix_ext4:return this.u_ext(4);case e.fix_ext8:return this.u_ext(8);case e.fix_ext16:return this.u_ext(16);case e.ext8:return this.u_ext(this.u_uint8());case e.ext16:return this.u_ext(this.u_uint16());case e.ext32:return this.u_ext(this.u_uint32());default:throw new Error("unhandled type "+t)}},t.prototype.unpack=function(){var e,t,r,n;if(n=this.u(),this._opts.strict){if((e=(r=u(n,{sort_keys:!0})).length)!==(t=this._orig_buffer.length))throw new Error("encoding size mismatch: wanted "+e+" but got "+t);if(!s(r,this._orig_buffer))throw new Error("Got non-standard encoding in strict mode")}return n},t}(),t.unpack=function(e,t){return null==t&&(t={}),new o(e,t).unpack()}}).call(this)},function(e,t,r){(function(){var e,n={}.hasOwnProperty;e=r(158).BaseKeyPair,t.BaseKeyPair=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(r,e),r.prototype.export_secret_key_kb=function(e,t){var r,n,i;return r=null,null==(n=null!=(i=this.priv)?i.key:void 0)&&(r=new Error("no private key available")),t(r,n)},r}()}).call(this)},function(e,t,r){(function(){var e,n,i,o={}.hasOwnProperty;e=r(458).KeyFetcher,i=function(e){return e.toString("hex")},n=function(t){function r(){this._keys={},this._kms={}}return function(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,e),r.prototype.add_key_manager=function(e){var t,r,n,o,s,a;for(a=[],o=0,s=(r=e.export_pgp_keys_to_keyring()).length;o=0&&(t&o)===t?i=this.key:n=new Error("Key not found"),r(n,i)},r.prototype.get_keypair=function(){return this.key},r.prototype.get_primary_keypair=function(){return this.key},r.prototype.can_verify=function(){return!0},r.prototype.can_sign=function(){var e;return null!=(e=this.key)?e.can_sign():void 0},r.prototype.eq=function(e){return this.key.eq(e.key)},r.import_private=function(e,n){var i,s,a,u,f,c,h;if(D,c=E.findDeferral(arguments),s=e.hex,u=e.raw,i=f=null,null!=s)try{u=new t(s,"hex")}catch(e){return n(e)}!function(e){h=new E.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.import_private"}),o.import_private({raw:u},h.defer({assign_fn:function(){return i=arguments[0],a=arguments[1]},lineno:69})),h._fulfill()}(function(){return null==i&&(f=new r({key:a})),n(i,f)})},r.import_public=function(e,n){var i,a,u,f,c,h,l,p;if(D,h=E.findDeferral(arguments),a=e.hex,f=e.raw,i=c=null,null!=a)try{f=new t(a,"hex")}catch(e){return n(e)}p=o.parse_kb(f),i=p[0],u=p[1],function(e){if(null==i)return e(c=new r({key:u}));!function(e){l=new E.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.import_public"}),s.import_public({raw:f},l.defer({assign_fn:function(){return i=arguments[0],c=arguments[1]},lineno:84})),l._fulfill()}(e)}(function(){return n(i,c)})},r.prototype.check_public_eq=function(e){return this.eq(e)},r.prototype.export_public=function(e,t){return e.asp,e.regen,t(null,this.key.ekid().toString("hex"))},r.prototype.export_private=function(e,t){var r,n,i,o,s,a;o=E.findDeferral(arguments),e.asp,n=e.p3skb,e.passphrase,r=i=null,(a=this,function(e){if(n)return e(r=new Error("No support yet for P3SKB encrypted secret key exports"));!function(e){s=new E.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.export_private"}),a.key.export_secret_key_kb({},s.defer({assign_fn:function(){return r=arguments[0],i=arguments[1]},lineno:106})),s._fulfill()}(e)})(function(){return t(r,i)})},r.prototype.export_server_half=function(){var e;return null!=(e=this.server_half)?e.toString("hex"):void 0},r.prototype.get_ekid=function(){return this.get_keypair().ekid()},r.prototype.get_fp2=function(){return this.get_ekid()},r.prototype.get_fp2_formatted=function(){return y.encode(this.get_fp2())},r.prototype.get_type=function(){return"kb"},r.prototype.make_sig_eng=function(){return new h({km:this})},r}(),s=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return U(r,u),r.generate=function(e,t){return e.algo=i,e.klass=r,u.generate(e,t)},r.prototype.make_sig_eng=function(){return null},r.prototype.can_sign=function(){return!1},r.prototype.can_verify=function(){return!1},r.prototype.can_encrypt=function(){return!0},r.prototype.can_decrypt=function(){var e;return null!=(null!=(e=this.key)?e.priv:void 0)},r.import_private=function(e,n){var i,o,s,a,u,f;if(D,u=E.findDeferral(arguments),o=e.hex,a=e.raw,i=null,null!=o)try{a=new t(o,"hex")}catch(e){return n(e)}!function(e){f=new E.Deferrals(e,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"EncKeyManager.import_private"}),r.generate({seed:a},f.defer({assign_fn:function(){return i=arguments[0],s=arguments[1]},lineno:152})),f._fulfill()}(function(){return n(i,s)})},r.prototype.get_mask=function(){return n.key_flags.encrypt_comm|n.key_flags.encrypt_storage},r.import_public=function(e,n){var o,s,a,u,f,c;if(s=e.hex,u=e.raw,f=null,null!=s)try{u=new t(s,"hex")}catch(e){return n(e)}return o=(c=i.parse_kb(u))[0],a=c[1],null==o&&(f=new r({key:a})),n(o,f)},r}(),B=function(e){var r,n,i,o;if(r=e.armored,n=e.binary,i=e.rawobj,null,null==r&&null==i&&null==n)return[new Error("need either 'armored' or 'binary' or 'rawobj'"),null];if(null!=r&&(n=new t(r,"base64")),null!=n)try{i=v.unseal(n)}catch(e){return[e,null]}return[(o=d(i))[0],o[1],n]},A=function(e,t){var r,n,i,o,s,a,f,c,h;c=E.findDeferral(arguments),r=e.armored,n=e.binary,a=e.rawobj,i=e.encrypt_for,o=S(t,"unbox"),function(e){h=new E.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),_(B({armored:r,binary:n,rawobj:a}),o(h.defer({assign_fn:function(){return s=arguments[0],n=arguments[1]},lineno:195}))),h._fulfill()}(function(){h=new E.Deferrals(function(){return null!=f.keypair&&(f.km=new u({key:f.keypair})),null!=f.sender_keypair&&(f.sender_km=new u({key:f.sender_keypair})),null!=f.receiver_keypair&&(f.receiver_km=new u({key:f.receiver_keypair})),t(null,f,n)},{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),s.unbox({encrypt_for:i},o(h.defer({assign_fn:function(){return f=arguments[0]},lineno:196}))),h._fulfill()})},b=function(e,t){var r,n,i,o,s,u,f,h,l,p,d,_;d=E.findDeferral(arguments),s=e.msg,p=e.sign_with,i=e.encrypt_for,r=e.anonymous,u=e.nonce,o=S(t,"box"),s=g(s),function(e){null!=i?function(e){_=new E.Deferrals(e,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),a.box({sign_with:p,encrypt_for:i,plaintext:s,anonymous:r,nonce:u},o(_.defer({assign_fn:function(){return h=arguments[0]},lineno:213}))),_._fulfill()}(e):function(e){_=new E.Deferrals(e,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),c.box({km:p,payload:s},o(_.defer({assign_fn:function(){return h=arguments[0]},lineno:215}))),_._fulfill()}(e)}(function(){return f=h.frame_packet(),l=v.seal({obj:f,dohash:!1}),n=l.toString("base64"),t(null,n,l)})},k=function(e){var t,r,n;return t=e.armored,[(n=m({armored:t}))[0],null!=(r=n[1])?r.body:void 0]},m=function(e){var r;return r=e.armored,[null,{body:new t(r,"base64"),type:n.message_types.generic,payload:r}]},h=function(e){function r(e){this.km=e.km}return U(r,l),r.prototype.get_km=function(){return this.km},r.prototype.get_unverified_payload_from_raw_sig_body=function(e,t){var r,n,i,o,s,a;s=E.findDeferral(arguments),r=e.body,n=S(t,"get_payload_from_raw_sig_body"),function(e){a=new E.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),p(function(){return v.unseal(r)},n(a.defer({assign_fn:function(){return o=arguments[0]},lineno:250}))),a._fulfill()}(function(){a=new E.Deferrals(function(){return t(null,i.payload)},{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),_(d(o),n(a.defer({assign_fn:function(){return i=arguments[0]},lineno:251}))),a._fulfill()})},r.prototype.get_body=function(e,t){var r;return t((r=k(e))[0],r[1])},r.prototype.box=function(e,t){var r,n,i,o,s,a;o=E.findDeferral(arguments),n=S(t,"SignatureEngine::box"),(a=this,function(t){s=new E.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.box"}),b({msg:e,sign_with:a.km},n(s.defer({assign_fn:function(){return r=arguments[0],i=arguments[1]},lineno:264}))),s._fulfill()})(function(){return t(null,{type:"kb",armored:r,kb:r,raw:i})})},r.prototype.unbox=function(e,r,n){var i,o,s,a,u,f,c,h,l;c=E.findDeferral(arguments),null==n&&(n={}),a=S(r,"SignatureEngine::unbox"),s=u=null,i=t.isBuffer(e)?{binary:e}:{armored:e},function(e){h=new E.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.unbox"}),A(i,a(h.defer({assign_fn:function(){return f=arguments[0],o=arguments[1]},lineno:275}))),h._fulfill()}((l=this,function(){return f.km.eq(l.km)?u=f.payload:(f.km.get_ekid().toString("hex"),l.km.get_ekid().toString("hex"),s=new w.WrongSigningKeyError("Got wrong signing key")),r(s,u,o)}))},r}(),e.exports={box:b,unbox:A,unbox_decode:B,KeyManager:u,EncKeyManager:s,decode_sig:m,get_sig_body:k}}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f={}.hasOwnProperty;s=r(24),a=r(25),n=a.kb,a.openpgp,i=r(607).Packet,u=r(43).make_esc,o=r(609).dh,e=function(e){function t(e){this.encrypt_for=e.encrypt_for,this.sign_with=e.sign_with,this.plaintext=e.plaintext,this.ciphertext=e.ciphertext,this.sender_key=e.sender_key,this.nonce=e.nonce,this.anonymous=e.anonymous,t.__super__.constructor.call(this),this.ephemeral=!1}return function(e,t){for(var r in t)f.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,i),t.ENC_TYPE=n.public_key_algorithms.NACL_DH,t.tag=function(){return n.packet_tags.encryption},t.prototype.tag=function(){return t.tag()},t.prototype.get_packet_body=function(){var e;return e=t.ENC_TYPE,{sender_key:this.sender_key,ciphertext:this.ciphertext,nonce:this.nonce,enc_type:e,receiver_key:this.receiver_key}},t.alloc=function(e){var r,n,i,o,s,a;if(a=e.tag,i=e.body,s=null,null!=(o=a!==t.tag()?new Error("wrong tag found: "+a):(r=i.enc_type)!==(n=t.ENC_TYPE)?o=new Error("Expected Curve25519 DH (type "+n+"); got "+r):(s=new t(i),null)))throw o;return s},t.prototype.is_signature=function(){return!1},t.prototype.get_sender_keypair=function(e,t){var r,n,i,a,u,f,c;u=s.findDeferral(arguments),a=e.sign_with,r=e.encrypt,n=i=null,(c=this,function(e){if(null!=a)return e(i=a.get_keypair());!function(e){if(null!=c.sign_with)return e(i=c.sign_with.get_keypair());!function(e){if(null!=c.sender_keypair)return e(i=c.sender_keypair);!function(e){var t;if(!r)return e(null!=c.sender_key?(t=o.Pair.parse_kb(c.sender_key),n=t[0],c.sender_keypair=t[1],null==n?i=c.sender_keypair:void 0):n=new Error("Cannot encrypt without a sender keypair"));!function(e){var t;f=new s.Deferrals(e,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.get_sender_keypair"}),o.Pair.generate({},f.defer({assign_fn:(t=c,function(){return n=arguments[0],t.sender_keypair=arguments[1]}),lineno:56})),f._fulfill()}(function(){return i=c.sender_keypair,e(c.ephemeral=!0)})}(e)}(e)}(e)})(function(){return t(n,i)})},t.prototype.encrypt=function(e,t){var r,n,i,o,a,f;o=s.findDeferral(arguments),r=u(t,"encrypt"),(f=this,function(e){a=new s.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.encrypt"}),f.get_sender_keypair({encrypt:!0},r(a.defer({assign_fn:function(){return i=arguments[0]},lineno:71}))),a._fulfill()})(function(e){return function(){var u,f;n=e.encrypt_for.get_keypair(),a=new s.Deferrals(function(){return e.anonymous&&!e.ephemeral||(e.sender_key=i.ekid()),e.anonymous||(e.receiver_key=n.ekid()),t(null)},{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.encrypt"}),n.encrypt_kb({plaintext:e.plaintext,sender:i,nonce:e.nonce},r(a.defer({assign_fn:(u=e,f=e,function(){return u.ciphertext=arguments[0].ciphertext,f.nonce=arguments[0].nonce}),lineno:73}))),a._fulfill()}}(this))},t.prototype.decrypt=function(e,t){var r,n,i,o,a,f,c,h,l;c=s.findDeferral(arguments),f=e.sign_with,n=e.encrypt_for,i=u(t,"decrypt"),(l=this,function(e){h=new s.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.decrypt"}),l.get_sender_keypair({sign_with:f},i(h.defer({assign_fn:function(){return a=arguments[0]},lineno:82}))),h._fulfill()})(function(e){return function(){var u;r={ciphertext:e.ciphertext,nonce:e.nonce,sender:a},o=n.get_keypair(),h=new s.Deferrals(function(){return t(null,{sender_keypair:a,plaintext:e.plaintext,receiver_keypair:o})},{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.decrypt"}),o.decrypt_kb(r,i(h.defer({assign_fn:(u=e,function(){return u.plaintext=arguments[0]}),lineno:85}))),h._fulfill()}}(this))},t.prototype.unbox=function(e,t){var r,n,i,o,a,u;o=s.findDeferral(arguments),r=e.encrypt_for,(u=this,function(e){a=new s.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.unbox"}),u.decrypt({encrypt_for:r},a.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:91})),a._fulfill()})(function(){return t(n,i)})},t.box=function(e,r){var n,i,o,a,u,f,c,h,l;h=s.findDeferral(arguments),c=e.sign_with,i=e.encrypt_for,f=e.plaintext,n=e.anonymous,a=e.nonce,u=new t({sign_with:c,encrypt_for:i,plaintext:f,anonymous:n,nonce:a}),function(e){l=new s.Deferrals(e,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.box"}),u.encrypt({},l.defer({assign_fn:function(){return o=arguments[0]},lineno:98})),l._fulfill()}(function(){return null!=o&&(u=null),r(o,u)})},t}(),t.Encryption=e}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){(function(){var e,n,i,o,s,a=[].slice;e=r(590),t.iced=n=r(722),s=function(e,t,r,i){var o,s,u,f,c;f=n.findDeferral(arguments),s=new n.Rendezvous,i[0]=s.id(!0).defer({assign_fn:function(){return o=a.call(arguments,0)},lineno:20,context:c}),setTimeout(s.id(!1).defer({lineno:21,context:c}),t),function(e){c=new n.Deferrals(e,{parent:f,filename:"/Users/max/src/iced/iced-runtime/src/library.iced"}),s.wait(c.defer({assign_fn:function(){return u=arguments[0]},lineno:22})),c._fulfill()}(function(){return r&&(r[0]=u),e.apply(null,o)})},t.timeout=function(e,t,r){var n;return s(e,t,r,n=[]),n[0]},i=function(e,t,r){var i,o,s;o=n.findDeferral(arguments),function(e){s=new n.Deferrals(e,{parent:o,filename:"/Users/max/src/iced/iced-runtime/src/library.iced"}),r[0]=s.defer({assign_fn:function(){return i=arguments[0]},lineno:39}),s._fulfill()}(function(){return i||(t[0]=!1),e()})},t.iand=function(e,t){var r;return i(e,t,r=[]),r[0]},o=function(e,t,r){var i,o,s;o=n.findDeferral(arguments),function(e){s=new n.Deferrals(e,{parent:o,filename:"/Users/max/src/iced/iced-runtime/src/library.iced"}),r[0]=s.defer({assign_fn:function(){return i=arguments[0]},lineno:58}),s._fulfill()}(function(){return i&&(t[0]=!0),e()})},t.ior=function(e,t){var r;return o(e,t,r=[]),r[0]},t.Pipeliner=function(){function t(t,r){this.window=t||1,this.delay=r||0,this.queue=[],this.n_out=0,this.cb=null,this[e.deferrals]=this,this.defer=this._defer}return t.prototype.waitInQueue=function(e){var t,r,i;t=n.findDeferral(arguments),(i=this,function(e){var o;(o=function(e){var s,a;if(s=e,a=function(){return n.trampoline(function(){return o(e)})},!(i.n_out>=i.window))return s();!function(e){r=new n.Deferrals(e,{parent:t,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),i.cb=r.defer({lineno:100}),r._fulfill()}(a)})(e)})(function(i){return function(){i.n_out++,function(e){if(!i.delay)return e();!function(e){r=new n.Deferrals(e,{parent:t,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),setTimeout(r.defer({lineno:108}),i.delay),r._fulfill()}(e)}(function(){return e()})}}(this))},t.prototype.__defer=function(e,t){var r,i,o,s,u;o=n.findDeferral(arguments),function(r){s=new n.Deferrals(r,{parent:o,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.__defer"}),i=s.defer({lineno:122}),e[0]=function(){var e,r;return e=1<=arguments.length?a.call(arguments,0):[],null!=(r=t.assign_fn)&&r.apply(null,e),i()},s._fulfill()}((u=this,function(){if(u.n_out--,u.cb)return r=u.cb,u.cb=null,r()}))},t.prototype._defer=function(e){var t;return t=[],this.__defer(t,e),t[0]},t.prototype.flush=function(e){var t,r,i,o,s;r=e,t=n.findDeferral(arguments),o=this,(i=function(e){var r,a;if(r=e,a=function(){return n.trampoline(function(){return i(e)})},!o.n_out)return r();!function(e){s=new n.Deferrals(e,{parent:t,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.flush"}),o.cb=s.defer({lineno:151}),s._fulfill()}(a)})(r)},t}()}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w;f=r(24),v=r(402),p=v.nbv,v.nbi,i=v.BigInteger,r(71).prng.native_rng,b=r(1411).small_primes,c=r(43).make_esc,e=r(28).ASP,l=r(111).nbs,w=r(79),o=w.MRF,a=w.SRF,function(){function e(){this.start=Date.now()}e.prototype.stop=function(){return Date.now()-this.start}}(),n=function(){function e(){this.tot=0,this.n=0}return e.prototype.start=function(){return this._t=Date.now()},e.prototype.stop=function(){var e;return e=Date.now()-this._t,console.log("ran in "+e),this.tot+=e,this.n++},e.prototype.avg=function(){return this.tot/this.n},e}(),_=function(e,t){return e.modInt(t)},new n,u=function(e){var t,r,n,i,o;for(i=p(1),r=e.bitLength(),r--,t=e.byteLength(),n=o=r;r<=0?o<=0:o>=0;n=r<=0?++o:--o)(i=i.square()).byteLength()>t&&(i=i.mod(e)),e.testBit(n)&&(i=i.shiftLeft(1));return i.compareTo(e)>0&&(i=i.mod(e)),0===i.compareTo(p(2))},g=function(e){var t,r,n,s,a,u,f,c;if(a=e.s,s=e.r,r=e.p,n=e.p1,0!==(u=o().random_zn(r).modPow(s,r)).compareTo(i.ONE))for(t=f=c=a-1;c<=0?f<=0:f>=0;t=c<=0?++f:--f)if(0!==u.compareTo(n)){if(0===t)return!1;if(0===(u=u.square().mod(r)).compareTo(i.ONE))return!1}return!0},m=function(e){var t,r;return!((t=e.p).compareTo(i.ZERO)<=0)&&(t.compareTo(p(7))<=0?2===(r=t.intValue())||3===r||5===r||7===r:!!t.testBit(0))},h=function(t,r){var n,o,s,a,u,h,l,p,d,_,y;_=f.findDeferral(arguments),u=t.p,a=t.iter,(n=t.asp)||(n=new e({})),a||(a=10),o=c(r,"miller_rabin"),p=m({p:u}),function(e){if(!p)return e();h=u.subtract(i.ONE),d=h.getLowestSetBit(),l=h.shiftRight(d),p=!0,function(e){var t,r,i,c;s=0,i=(t=a)>0?1:-1,r=t>0,(c=function(e){var t,b;if(t=e,b=function(){return f.trampoline(function(){return s+=i,c(e)})},!0===r&&s>=a||!1===r&&s<=a)return t();y=new f.Deferrals(function(){!function(e){if(g({s:d,r:l,p:u,p1:h}))return e();p=!1,t()}(b)},{parent:_,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),n.progress({what:"mr",i:s,total:a,p:u},o(y.defer({lineno:122}))),y._fulfill()})(e)}(function(){!function(e){y=new f.Deferrals(e,{parent:_,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),n.progress({what:"mr",i:a,total:a,p:u},o(y.defer({lineno:127}))),y._fulfill()}(e)})}(function(){return r(null,p)})},s=function(){function e(e,t){this.p=e,this.sieve=t,this.inc=0,this.maxinc=-1,this.sievepos=_(this.p,this.sieve.length),this.calcmods()}return e.prototype.getp=function(){return this.p},e.prototype.setmax=function(e){if(-1!==this.maxinc)throw new Error("can only setmax() once");return this.maxinc=e},e.prototype.calcmods=function(){var e;return this.p=this.p.add(p(this.inc)),-1!==this.maxinc&&(this.maxinc-=this.inc),this.inc=0,this.mods=function(){var t,r,n;for(n=[],t=0,r=b.length;t=t;)if(this.mods[e]-=t,this.mods[e]+this.inc===0)return!0;return!1},e.prototype.next_weak=function(){for(var e;;){if(e=this.sieve[this.sievepos],this.sievepos=(this.sievepos+e)%this.sieve.length,this.inc+=e,this.inc>this.maxinc&&this.maxinc>0)return this.tmp=p(0),this.tmp;if(this.inc<0&&this.calcmods(),!this.decrement_mods_find_divisor())return this.tmp=this.p.add(p(this.inc)),this.tmp}},e.prototype.next_fermat=function(){for(;;)if(this.next_weak(),!this.tmp||u(this.tmp))return this.tmp},e.prototype.next_strong=function(e){for(null==e&&(e=32);;)if(this.next_weak(),!this.tmp||u(this.tmp)&&probab_prime(this.tmp,e))return this.tmp},e}(),d=function(e,t){var r,n,a,l,d,_,y,b,g,m,v,w,k,E,x,S;x=f.findDeferral(arguments),k=e.start,m=e.range,w=e.sieve,r=e.asp,(d=e.iters)||(d=20),(y=new s(k,w)).setmax(m),g=function(){var e;for(e=[];(b=y.next_weak()).compareTo(i.ZERO)>0;)e.push(b);return e}(),n=c(t,"prime_search"),v=null,function(e){var t;(t=function(e){var i,s;if(i=e,s=function(){return f.trampoline(function(){return t(e)})},!g.length||null!=v)return i();a=o().random_word()%g.length,_=g[a],S=new f.Deferrals(function(){!function(e){if(!u(_))return e();!function(e){S=new f.Deferrals(e,{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),h({p:_,iters:d,asp:r},n(S.defer({assign_fn:function(){return l=arguments[0]},lineno:229}))),S._fulfill()}(function(){!function(e){S=new f.Deferrals(e,{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),r.progress({what:"passed_mr",p:_},n(S.defer({lineno:230}))),S._fulfill()}(function(){return e(l?v=_:r.progress({what:"failed_mr",p:_}))})})}(function(){return E=g.pop(),s(at)return!0;if(e%r==0)return!1}return!1},t.fermat2_test=u,t.nbs=l,t.small_primes=b,t.miller_rabin=h,t.random_prime=y}).call(this)},function(e,t){function r(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}r.keys=function(){return[]},r.resolve=r,e.exports=r,r.id=1399},function(e,t,r){(function(t){!function(){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function n(){return new r(null)}r.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],f=this[e++]>>14,c=a*u+f*s;i=((u=s*u+((16383&c)<<14)+r[n]+i)>>28)+(c>>14)+a*f,r[n++]=268435455&u}return i},r.prototype.DB=28,r.prototype.DM=268435455,r.prototype.DV=1<<28;r.prototype.FV=Math.pow(2,52),r.prototype.F1=24,r.prototype.F2=4;var i,o,s="0123456789abcdefghijklmnopqrstuvwxyz",a=new Array;for(i="0".charCodeAt(0),o=0;o<=9;++o)a[i++]=o;for(i="a".charCodeAt(0),o=10;o<36;++o)a[i++]=o;for(i="A".charCodeAt(0),o=10;o<36;++o)a[i++]=o;function u(e){return s.charAt(e)}function f(e,t){var r=a[e.charCodeAt(t)];return null==r?-1:r}function c(e){var t=n();return t.fromInt(e),t}function h(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function l(e){this.m=e}function p(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function m(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function v(){}function w(e){return e}function k(e){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}l.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},l.prototype.revert=function(e){return e},l.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},l.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},l.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},p.prototype.convert=function(e){var t=n();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},p.prototype.revert=function(e){var t=n();return e.copyTo(t),this.reduce(t),t},p.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},p.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},r.prototype.fromString=function(e,t,n){var i;if(16==t)i=4;else if(8==t)i=3;else if(256==t)i=8;else if(2==t)i=1;else if(32==t)i=5;else{if(4!=t)return this.fromRadix(e,t),this;i=2}this.t=0,this.s=0;for(var o=e.length,s=!1,a=0;--o>=0;){var u=8==i?255&e[o]:f(e,o);u<0?"-"==e.charAt(o)&&(s=!0):(s=!1,0==a?this[this.t++]=u:a+i>this.DB?(this[this.t-1]|=(u&(1<>this.DB-a):this[this.t-1]|=u<=this.DB&&(a-=this.DB))}return n||8!=i||0==(128&e[0])||(this.s=-1,a>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},r.prototype.multiplyTo=function(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(c,a),s.lShiftTo(c,i)):(o.copyTo(a),s.copyTo(i));var l=a.t,p=a[l-1];if(0!=p){var d=p*(1<1?a[l-2]>>this.F2:0),_=this.FV/d,y=(1<=0&&(i[i.t++]=1,i.subTo(v,i)),r.ONE.dlShiftTo(l,v),v.subTo(a,a);a.t=0;){var w=i[--g]==p?this.DM:Math.floor(i[g]*_+(i[g-1]+b)*y);if((i[g]+=a.am(0,w,i,m,0,l))0&&i.rShiftTo(c,i),u<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var i=n(),o=n(),s=t.convert(this),a=h(e)-1;for(s.copyTo(i);--a>=0;)if(t.sqrTo(i,o),(e&1<0)t.mulTo(o,s,i);else{var u=i;i=o,o=u}return t.revert(i)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=u(r));s>=0;)a>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=u(r));return i?o:"0"},r.prototype.negate=function(){var e=n();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=n();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new l(t):new p(t),this.exp(e,r)},r.ZERO=c(0),r.ONE=c(1),v.prototype.convert=w,v.prototype.revert=w,v.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},v.prototype.sqrTo=function(e,t){e.squareTo(t)},k.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t},k.prototype.revert=function(e){return e},k.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},k.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},k.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],x=(1<<26)/E[E.length-1];function h(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=c(r),o=n(),s=n(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(e)+a},r.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),o=!1,s=0,a=0,u=0;u=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(r.ONE.shiftLeft(e-1),_,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(r.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},r.prototype.millerRabin=function(e){var t=this.subtract(r.ONE),i=t.getLowestSetBit();if(i<=0)return!1;var o=t.shiftRight(i);(e=e+1>>1)>E.length&&(e=E.length);for(var s=n(),a=0;a>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(e){var t=this.t,r=new Array;r[0]=this.s;var n,i=this.DB-t*this.DB%8,o=0;if(t-- >0)for(i>i)!=(this.s&this.DM)>>i&&(r[o++]=n|this.s<=0;)i<8?(n=(this[t]&(1<>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),e&&(0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o),(o>0||n!=this.s)&&(r[o++]=n);return r},r.prototype.equals=function(e){return 0==this.compareTo(e)},r.prototype.min=function(e){return this.compareTo(e)<0?this:e},r.prototype.max=function(e){return this.compareTo(e)>0?this:e},r.prototype.and=function(e){var t=n();return this.bitwiseTo(e,d,t),t},r.prototype.or=function(e){var t=n();return this.bitwiseTo(e,_,t),t},r.prototype.xor=function(e){var t=n();return this.bitwiseTo(e,y,t),t},r.prototype.andNot=function(e){var t=n();return this.bitwiseTo(e,b,t),t},r.prototype.not=function(){for(var e=n(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var _=n();for(i.sqrTo(a[1],_);u<=d;)a[u]=n(),i.mulTo(_,a[u-2],a[u]),u+=2}var y,b,g=e.t-1,m=!0,v=n();for(o=h(e[g])-1;g>=0;){for(o>=f?y=e[g]>>o-f&d:(y=(e[g]&(1<0&&(y|=e[g-1]>>this.DB+o-f)),u=r;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),m)a[y].copyTo(s),m=!1;else{for(;u>1;)i.sqrTo(s,v),i.sqrTo(v,s),u-=2;u>0?i.sqrTo(s,v):(b=s,s=v,v=b),i.mulTo(v,a[y],s)}for(;g>=0&&0==(e[g]&1<=0?(n.subTo(i,n),t&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(n,i),t&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(r.ONE)?r.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},r.prototype.pow=function(e){return this.exp(e,new v)},r.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=E[E.length-1]){for(t=0;t>8),r+=String.fromCharCode(255&t),r+=util.bin2str(e)},r.prototype.square=function(){var e=n();return this.squareTo(e),e},r.prototype.fromBuffer=function(e){return this.fromString(function(e){for(var t=e.length,r=new Uint8Array(t),n=0;n"},r.fromHex=function(e){if(!e.match(/^[a-fA-F0-9]*$/))throw new Error("hex string invalid: "+e);if(e.length%2!=0)throw new Error("got an odd-length hex-string");return new r(e,16)},r.valueOf=function(e){return function(e){return"number"==typeof e?c(e):e}(e)},r.prototype.toBuffer=function(e){var r;e||(e=0);var n=this.signum();r=0==n?[]:this.toByteArray(n<0);var i=new t(r);if((diff=e-r.length)>0){var o=new t(diff);o.fill(0),i=t.concat([o,i])}return i},r.prototype.byteLength=function(){return this.t},r.prototype.toDERInteger=function(){return this.toByteArray(!0)},r.fromDERInteger=function(e){var t=n();return t.fromString(e,256,!1),t},r.prototype.toByteArrayUnsigned=function(){return new Uint8Array(this.toBuffer())},r.fromByteArrayUnsigned=function(e){return r.fromBuffer(new t(e))},r.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")},e.exports={BigInteger:r,nbi:n,nbv:c,Montgomery:p,Classic:l,nbits:h}}()}).call(this,r(5).Buffer)},function(e,t,r){(function(t){!function(){var n=r(723).engine,o=n(0),s=n(1);function a(e,r){if(!(this instanceof a))return new a(e,r);if("string"==typeof e)e=e.replace(/\s+/g,""),r||(r=10),this._v=n(e,r);else if("number"==typeof e)this._v=n(e);else if("object"==typeof e&&Array.isArray(e))this._v=n.fromBuffer(new t(e));else{if(e.constructor!=o.constructor)throw new Error("failed to get valid inner object in constructor");this._v=e}}function u(e){return new a(n(e))}function f(e){return"number"==typeof e?u(e):e}a.prototype.bitLength=function(){return 0==this.signum()?0:this._v.bitLength()},a.prototype.byteLength=function(){return this.bitLength()>>3},a.prototype.modPowInt=function(e,t){return new a(this._v.powm(n(e),t._v))},a.prototype.modInt=function(e){return this._v.mod(n(e)).toNumber()},a.prototype.testBit=function(e){var t=s.shiftLeft(e);return this._v.and(t).eq(o)?0:1},a.prototype.setBit=function(e){var t=n(1).shiftLeft(e);return new a(this._v.or(t))},a.prototype.shiftLeft=function(e){return new a(this._v.shiftLeft(e))},a.prototype.shiftRight=function(e){return new a(this._v.shiftRight(e))},a.prototype.compareTo=function(e){return this._v.cmp(e._v)},a.prototype.modPow=function(e,t){return new a(this._v.powm(e._v,t._v))},a.prototype.square=function(){return new a(this._v.mul(this._v))},a.prototype.mod=function(e){var t=this._v.mod(e._v);return t.cmp(o)<0&&(t=t.add(e._v)),new a(t)},a.prototype.abs=function(){return new a(this._v.abs())},a.prototype.pow=function(e){return new a(this._v.pow(f(e)._v))},a.prototype.intValue=function(){return this._v.toNumber()},a.prototype.signum=function(){var e=this._v.cmp(o);return ret=e>0?1:0===e?0:-1,ret},a.prototype.negate=function(){return new a(this._v.neg())},a.prototype.equals=function(e){return this._v.eq(e._v)},a.prototype.subtract=function(e){return new a(this._v.sub(e._v))},a.prototype.add=function(e){return new a(this._v.add(e._v))},a.prototype.multiply=function(e){return new a(this._v.mul(e._v))},a.prototype.divide=function(e){if(this._v.ge(o)&&e._v.ge(o))i=this._v.div(e._v);else{var t=this.signum()*e.signum();i=this._v.abs().div(e._v.abs()),t<0&&(i=i.neg())}return new a(i)},a.prototype.gcd=function(e){return new a(this._v.gcd(e._v))},a.prototype.fromBuffer=function(e){return new a(n.fromBuffer(e))},a.fromByteArrayUnsigned=function(e){return a.fromBuffer(new t(e))},a.fromBuffer=function(e){return new a(n.fromBuffer(e))},a.fromDERInteger=function(e){var t;if(0==e.length)t=a.ZERO;else if(0==e[0])t=a.fromBuffer(e);else if(t=a.fromBuffer(e),128&e[0]){var r=a.ONE.shiftLeft(t.bitLength());t=t.subtract(r)}return t},a.prototype.compute_twos_complement=function(){var e=this.add(a.ONE).bitLength(),t=Math.floor(e/8)+1;return a.ONE.shiftLeft(8*t).add(this)},a.prototype.toDERInteger=function(){var e=null,r=this.signum();if(0==r)e=new t([0]);else if(r<0){e=this.compute_twos_complement().toBuffer()}else{e=this.toBuffer();this.bitLength()%8==0&&(pad=new t([0]),e=t.concat([pad,e]))}return function(e){for(var t=new Array,r=0;r0){var n=new t(diff);n.fill(0),r=t.concat([n,r])}return r},a.prototype.toHex=function(e){var t=this;return this.signum()<0&&(t=this.compute_twos_complement()),t.toBuffer(e).toString("hex")},a.prototype.clone=function(){return new a(n(this._v))},a.prototype.getLowestSetBit=function(){for(var e=this._v.bitLength(),t=-1,r=n(1),i=0;i"},a.prototype.toString=function(e){e||(e=10);var t=this._v.toString(e);return 0==t.length?t="0":16==e&&t.length>1&&("0"==t[0]?t=t.slice(1):"-0"==t.slice(0,2)&&(t="-"+t.slice(2))),t},a.valueOf=function(e){return f(e)},a.ZERO=u(0),a.ONE=u(1),e.exports={BigInteger:a,nbi:function(){return new a(n(0))},nbv:u,nbits:function(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}}}()}).call(this,r(5).Buffer)},function(e,t,r){(function(){t.Generator=r(1403).Generator}).call(this)},function(e,t,r){(function(){var e,n,i;n=r(24),i=function(){},e=e=function(){function e(e){e=e||{},this.lazy_loop_delay=e.lazy_loop_delay||30,this.loop_delay=e.loop_delay||5,this.work_min=e.work_min||1,this.auto_stop_bits=e.auto_stop_bits||4096,this.max_bits_per_delta=e.max_bits_per_delta||4,this.auto_stop=!e.auto_stop||e.auto_stop,this.entropies=[],this.running=!0,this.is_generating=!1,this.timer_race_loop()}return e.prototype.generate=function(e,t){var r,i,o,s,a,u;s=n.findDeferral(arguments),this.is_generating=!0,this.running||this.resume(),i=0,o=[],(u=this,function(t){var f,c;f=[],(c=function(t){var h,l;if(h=function(){return n.trampoline(function(){return c(t)})},l=function(e){return f.push(e),h()},!(i7500)throw new Error("generate cannot generate > 7500 bits in 1 call.");if(this.reseed_counter>=1e4)throw new Error("Need a reseed!");for(t=[],0;0===t.length||t.length*t[0].length*4100))return e();!function(e){s=new u.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),a.gen_seed(256,s.defer({assign_fn:function(){return n=arguments[0]},lineno:153})),s._fulfill()}(function(){return e(a.drbg.reseed(n))})}(function(){return r=a.drbg.generate(e),a.lock.release(),t(r)})})}}(this))},e}(),t.DRBG=i,t.ADRBG=n}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h,l,p,d={}.hasOwnProperty;h=r(24),f=r(72).WordArray,r(454),e=r(591).AES,a=r(592).TwoFish,r(503),i=r(504).Concat,r(403).SHA512,s=r(454).Salsa20,n=(p=r(724)).Base,u=p.V,l=r(43).make_esc,o=function(t){function r(e){var t,n;n=e.key,t=e.enc,r.__super__.constructor.call(this,{key:n}),null!=t&&(this.key=t.key,this.derived_keys=t.derived_keys)}return function(e,t){for(var r in t)d.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,n),r.prototype.read_header=function(e){var t;return e(null==(t=this.ct.unshift(2))?new Error("Ciphertext underrun in header"):null==(this.version=u[t.words[1]])?new Error("bad header; couldn't find a good version (got "+t.words[1]+")"):t.words[0]!==this.version.header[0]?new Error("Bad header: unrecognized magic value"):null)},r.prototype.verify_sig=function(e,t){var r,n,o,s,a,u;s=h.findDeferral(arguments),(u=this,function(t){if(null==(o=u.ct.unshift(i.get_output_size()/4)))return t(n=new Error("Ciphertext underrun in signature"));!function(t){a=new h.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.verify_sig"}),u.sign({input:u.ct,key:e,salt:u.salt},a.defer({assign_fn:function(){return n=arguments[0],r=arguments[1]},lineno:63})),a._fulfill()}(function(){return t(n=null!=n?n:o.equal(r)?null:new Error("Signature mismatch or bad decryption key"))})})(function(){return t(n)})},r.prototype.unshift_iv=function(e,t,r){var n;return r(null!=(n=this.ct.unshift(e/4))?null:new Error("Ciphertext underrun in "+t),n)},r.prototype.read_salt=function(e){return e(null==(this.salt=this.ct.unshift(this.version.salt_size/4))?new Error("Ciphertext underrrun in read_salt"):null)},r.prototype.generate_keys=function(e,t){var r,n,i,o,s,a;o=h.findDeferral(arguments),i=e.progress_hook,(a=this,function(e){s=new h.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.generate_keys"}),a.kdf({salt:a.salt,progress_hook:i},s.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:114})),s._fulfill()})(function(){return t(r,n)})},r.prototype.run=function(t,r){var n,i,o,u,c,p,d,_;p=h.findDeferral(arguments),n=t.data,u=t.progress_hook,i=l(r,"Decryptor::run"),this.ct=f.from_buffer(n),(_=this,function(e){d=new h.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),_.read_header(i(d.defer({lineno:141}))),d._fulfill()})(function(t){return function(){d=new h.Deferrals(function(){var n;d=new h.Deferrals(function(){d=new h.Deferrals(function(){d=new h.Deferrals(function(){d=new h.Deferrals(function(){d=new h.Deferrals(function(){d=new h.Deferrals(function(){d=new h.Deferrals(function(){d=new h.Deferrals(function(){return r(null,c.to_buffer())},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.run_salsa20({iv:o,input:t.ct,key:t.keys.salsa20,output_iv:!1,progress_hook:u},i(d.defer({assign_fn:function(){return c=arguments[0]},lineno:150}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.unshift_iv(s.ivSize,"Salsa",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:149}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.run_twofish({iv:o,input:t.ct,key:t.keys.twofish,progress_hook:u},i(d.defer({assign_fn:function(){return arguments[0]},lineno:148}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.unshift_iv(a.ivSize,"2fish",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:147}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.run_aes({iv:o,input:t.ct,key:t.keys.aes,progress_hook:u},i(d.defer({assign_fn:function(){return arguments[0]},lineno:146}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.unshift_iv(e.ivSize,"AES",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:145}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.verify_sig(t.keys.hmac,i(d.defer({lineno:144}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.generate_keys({progress_hook:u},i(d.defer({assign_fn:(n=t,function(){return n.keys=arguments[0]}),lineno:143}))),d._fulfill()},{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),t.read_salt(i(d.defer({lineno:142}))),d._fulfill()}}(this))},r.prototype.clone=function(){var e,t;return(e=new r({key:null!=(t=this.key)?t.to_buffer():void 0,rng:this.rng,version:this.version})).derived_keys=this.clone_derived_keys(),e},r}(),c=function(e,t){var r,n,i,s,a,u,f,c;f=h.findDeferral(arguments),s=e.key,r=e.data,a=e.progress_hook,n=new o({key:s}),function(e){c=new h.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/dec.iced"}),n.run({data:r,progress_hook:a},c.defer({assign_fn:function(){return i=arguments[0],u=arguments[1]},lineno:180})),c._fulfill()}(function(){return n.scrub(),t(i,u)})},t.Decryptor=o,t.decrypt=c}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a={}.hasOwnProperty;o=r(72).WordArray,e=r(157).Hasher,i=[],n=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)a.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,e),r.blockSize=16,r.prototype.blockSize=r.blockSize,r.output_size=20,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new o([1732584193,4023233417,2562383102,271733878,3285377520])},r.prototype._doProcessBlock=function(e,t){var r,n,o,s,a,u,f,c,h,l;for(n=(r=this._hash.words)[0],o=r[1],s=r[2],a=r[3],u=r[4],f=l=0;l<80;f=++l)f<16?i[f]=0|e[t+f]:(c=i[f-3]^i[f-8]^i[f-14]^i[f-16],i[f]=c<<1|c>>>31),h=(n<<5|n>>>27)+u+i[f],h+=f<20?1518500249+(o&s|~o&a):f<40?1859775393+(o^s^a):f<60?(o&s|o&a|s&a)-1894007588:(o^s^a)-899497514,u=a,a=s,s=o<<30|o>>>2,o=n,n=h;return r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0},r.prototype._doFinalize=function(){var e,t,r,n;return t=(e=this._data).words,n=8*this._nDataBytes,t[(r=8*e.sigBytes)>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},r.prototype.copy_to=function(e){return r.__super__.copy_to.call(this,e),e._hash=this._hash.clone()},r.prototype.clone=function(){var e;return e=new r,this.copy_to(e),e},r}(),s=s=function(e){var t;return t=(new n).finalize(e),e.scrub(),t},t.SHA1=n,t.transform=s}).call(this)},function(e,t,r){(function(){var e,n,i,o,s={}.hasOwnProperty;i=r(72).WordArray,n=r(593).SHA256,e=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.output_size=28,t.prototype.output_size=t.output_size,t.prototype._doReset=function(){return this._hash=new i([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},t.prototype._doFinalize=function(){var e;return(e=t.__super__._doFinalize.call(this)).sigBytes-=4,e},t.prototype.clone=function(){var e;return e=new t,this.copy_to(e),e},t}(),o=function(t){var r;return r=(new e).finalize(t),t.scrub(),r},t.SHA224=e,t.transform=o}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f={}.hasOwnProperty;a=r(72),o=a.X64WordArray,a.WordArray,i=(u=r(403)).SHA512,e=u.Global,n=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)f.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,i),r.output_size=48,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new o(e.convert([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]))},r.prototype._doFinalize=function(){var e;return(e=r.__super__._doFinalize.call(this)).sigBytes-=16,e},r.prototype.clone=function(){var e;return e=new r,this.copy_to(e),e},r}(),s=function(e){var t;return t=(new n).finalize(e),e.scrub(),t},t.SHA384=n,t.transform=s}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h={}.hasOwnProperty;f=r(72).WordArray,s=r(157).Hasher,i=function(){return function(){var e;this.T=function(){var t,r;for(r=[],e=t=0;t<64;e=++t)r.push(4294967296*Math.abs(Math.sin(e+1))|0);return r}()}}(),c=new i,t.MD5=u=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)h.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,s),r.blockSize=16,r.prototype.blockSize=r.blockSize,r.output_size=16,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new f([1732584193,4023233417,2562383102,271733878])},r.prototype._doProcessBlock=function(t,r){var i,s,u,f,h,l,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B,D,M,P,I;for(M=I=0;I<16;M=++I)x=t[P=r+M],t[P]=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8);return i=this._hash.words,s=t[r+0],u=t[r+1],y=t[r+2],b=t[r+3],g=t[r+4],m=t[r+5],v=t[r+6],w=t[r+7],k=t[r+8],E=t[r+9],f=t[r+10],h=t[r+11],l=t[r+12],p=t[r+13],d=t[r+14],_=t[r+15],S=i[0],A=i[1],B=i[2],D=i[3],S=e(S,A,B,D,s,7,c.T[0]),D=e(D,S,A,B,u,12,c.T[1]),B=e(B,D,S,A,y,17,c.T[2]),A=e(A,B,D,S,b,22,c.T[3]),S=e(S,A,B,D,g,7,c.T[4]),D=e(D,S,A,B,m,12,c.T[5]),B=e(B,D,S,A,v,17,c.T[6]),A=e(A,B,D,S,w,22,c.T[7]),S=e(S,A,B,D,k,7,c.T[8]),D=e(D,S,A,B,E,12,c.T[9]),B=e(B,D,S,A,f,17,c.T[10]),A=e(A,B,D,S,h,22,c.T[11]),S=e(S,A,B,D,l,7,c.T[12]),D=e(D,S,A,B,p,12,c.T[13]),B=e(B,D,S,A,d,17,c.T[14]),A=e(A,B,D,S,_,22,c.T[15]),S=n(S,A,B,D,u,5,c.T[16]),D=n(D,S,A,B,v,9,c.T[17]),B=n(B,D,S,A,h,14,c.T[18]),A=n(A,B,D,S,s,20,c.T[19]),S=n(S,A,B,D,m,5,c.T[20]),D=n(D,S,A,B,f,9,c.T[21]),B=n(B,D,S,A,_,14,c.T[22]),A=n(A,B,D,S,g,20,c.T[23]),S=n(S,A,B,D,E,5,c.T[24]),D=n(D,S,A,B,d,9,c.T[25]),B=n(B,D,S,A,b,14,c.T[26]),A=n(A,B,D,S,k,20,c.T[27]),S=n(S,A,B,D,p,5,c.T[28]),D=n(D,S,A,B,y,9,c.T[29]),B=n(B,D,S,A,w,14,c.T[30]),A=n(A,B,D,S,l,20,c.T[31]),S=o(S,A,B,D,m,4,c.T[32]),D=o(D,S,A,B,k,11,c.T[33]),B=o(B,D,S,A,h,16,c.T[34]),A=o(A,B,D,S,d,23,c.T[35]),S=o(S,A,B,D,u,4,c.T[36]),D=o(D,S,A,B,g,11,c.T[37]),B=o(B,D,S,A,w,16,c.T[38]),A=o(A,B,D,S,f,23,c.T[39]),S=o(S,A,B,D,p,4,c.T[40]),D=o(D,S,A,B,s,11,c.T[41]),B=o(B,D,S,A,b,16,c.T[42]),A=o(A,B,D,S,v,23,c.T[43]),S=o(S,A,B,D,E,4,c.T[44]),D=o(D,S,A,B,l,11,c.T[45]),B=o(B,D,S,A,_,16,c.T[46]),A=o(A,B,D,S,y,23,c.T[47]),S=a(S,A,B,D,s,6,c.T[48]),D=a(D,S,A,B,w,10,c.T[49]),B=a(B,D,S,A,d,15,c.T[50]),A=a(A,B,D,S,m,21,c.T[51]),S=a(S,A,B,D,l,6,c.T[52]),D=a(D,S,A,B,b,10,c.T[53]),B=a(B,D,S,A,f,15,c.T[54]),A=a(A,B,D,S,u,21,c.T[55]),S=a(S,A,B,D,k,6,c.T[56]),D=a(D,S,A,B,_,10,c.T[57]),B=a(B,D,S,A,v,15,c.T[58]),A=a(A,B,D,S,p,21,c.T[59]),S=a(S,A,B,D,g,6,c.T[60]),D=a(D,S,A,B,h,10,c.T[61]),B=a(B,D,S,A,y,15,c.T[62]),A=a(A,B,D,S,E,21,c.T[63]),i[0]=i[0]+S|0,i[1]=i[1]+A|0,i[2]=i[2]+B|0,i[3]=i[3]+D|0},r.prototype._doFinalize=function(){var e,t,r,n,i,o,s,a,u,f,c;for(n=(r=this._data).words,a=8*this._nDataBytes,n[(s=8*r.sigBytes)>>>5]|=128<<24-s%32,u=Math.floor(a/4294967296),f=a,n[15+(s+64>>>9<<4)]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),n[14+(s+64>>>9<<4)]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),r.sigBytes=4*(n.length+1),this._process(),e=(i=this._hash).words,o=c=0;c<4;o=++c)t=e[o],e[o]=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8);return i},r.prototype.copy_to=function(e){return r.__super__.copy_to.call(this,e),e._hash=this._hash.clone()},r.prototype.clone=function(){var e;return e=new r,this.copy_to(e),e},r}(),e=function(e,t,r,n,i,o,s){var a;return((a=e+(t&r|~t&n)+i+s)<>>32-o)+t},n=function(e,t,r,n,i,o,s){var a;return((a=e+(t&n|r&~n)+i+s)<>>32-o)+t},o=function(e,t,r,n,i,o,s){var a;return((a=e+(t^r^n)+i+s)<>>32-o)+t},a=function(e,t,r,n,i,o,s){var a;return((a=e+(r^(t|~n))+i+s)<>>32-o)+t},t.transform=function(e){var t;return t=(new u).finalize(e),e.scrub(),t}}).call(this)},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h,l,p,d,_={}.hasOwnProperty;d=r(72),s=d.WordArray,d.X64Word,d.X64WordArray,i=r(157).Hasher,n=function(){return function(){this._zl=new s([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),this._zr=new s([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),this._sl=new s([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),this._sr=new s([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),this._hl=new s([0,1518500249,1859775393,2400959708,2840853838]),this._hr=new s([1352829926,1548603684,1836072691,2053994217,0])}}(),e=new n,o=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return function(e,t){for(var r in t)_.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,i),r.blockSize=16,r.prototype.blockSize=r.blockSize,r.output_size=20,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new s([1732584193,4023233417,2562383102,271733878,3285377520])},r.prototype.get_output_size=function(){return this.output_size},r.prototype._doProcessBlock=function(t,r){var n,i,o,s,p,d,_,y,b,g,m,v,w,k,E,x,S,A,B,D,M,P,I;for(E=P=0;P<16;E=++P)i=t[x=r+E],t[x]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);for(n=this._hash.words,w=e._hl.words,k=e._hr.words,D=e._zl.words,M=e._zr.words,S=e._sl.words,A=e._sr.words,s=o=n[0],d=p=n[1],y=_=n[2],g=b=n[3],v=m=n[4],E=I=0;I<80;E=++I)B=o+t[r+D[E]]|0,B+=E<16?a(p,_,b)+w[0]:E<32?u(p,_,b)+w[1]:E<48?f(p,_,b)+w[2]:E<64?c(p,_,b)+w[3]:h(p,_,b)+w[4],B=(B=l(B|=0,S[E]))+m|0,o=m,m=b,b=l(_,10),_=p,p=B,B=s+t[r+M[E]]|0,B+=E<16?h(d,y,g)+k[0]:E<32?c(d,y,g)+k[1]:E<48?f(d,y,g)+k[2]:E<64?u(d,y,g)+k[3]:a(d,y,g)+k[4],B=(B=l(B|=0,A[E]))+v|0,s=v,v=g,g=l(y,10),y=d,d=B;return B=n[1]+_+g|0,n[1]=n[2]+b+v|0,n[2]=n[3]+m+s|0,n[3]=n[4]+o+d|0,n[4]=n[0]+p+y|0,n[0]=B},r.prototype._doFinalize=function(){var e,t,r,n,i,o,s,a,u;for(n=(r=this._data).words,a=8*this._nDataBytes,n[(s=8*r.sigBytes)>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r.sigBytes=4*(n.length+1),this._process(),e=(i=this._hash).words,o=u=0;u<5;o=++u)t=e[o],e[o]=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8);return i},r.prototype.scrub=function(){return this._hash.scrub()},r.prototype.copy_to=function(e){return r.__super__.copy_to.call(this,e),e._hash=this._hash.clone()},r.prototype.clone=function(){var e;return e=new r,this.copy_to(e),e},r}(),a=function(e,t,r){return e^t^r},u=function(e,t,r){return e&t|~e&r},f=function(e,t,r){return(e|~t)^r},c=function(e,t,r){return e&r|t&~r},h=function(e,t,r){return e^(t|~r)},l=function(e,t){return e<>>32-t},p=function(e){var t;return t=(new o).finalize(e),e.scrub(),t},t.RIPEMD160=o,t.transform=p}).call(this)},function(e,t){(function(){t.small_primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007,10009,10037,10039,10061,10067,10069,10079,10091,10093,10099,10103,10111,10133,10139,10141,10151,10159,10163,10169,10177,10181,10193,10211,10223,10243,10247,10253,10259,10267,10271,10273,10289,10301,10303,10313,10321,10331,10333,10337,10343,10357,10369,10391,10399,10427,10429,10433,10453,10457,10459,10463,10477,10487,10499,10501,10513,10529,10531,10559,10567,10589,10597,10601,10607,10613,10627,10631,10639,10651,10657,10663,10667,10687,10691,10709,10711,10723,10729,10733,10739,10753,10771,10781,10789,10799,10831,10837,10847,10853,10859,10861,10867,10883,10889,10891,10903,10909,10937,10939,10949,10957,10973,10979,10987,10993,11003,11027,11047,11057,11059,11069,11071,11083,11087,11093,11113,11117,11119,11131,11149,11159,11161,11171,11173,11177,11197,11213,11239,11243,11251,11257,11261,11273,11279,11287,11299,11311,11317,11321,11329,11351,11353,11369,11383,11393,11399,11411,11423,11437,11443,11447,11467,11471,11483,11489,11491,11497,11503,11519,11527,11549,11551,11579,11587,11593,11597,11617,11621,11633,11657,11677,11681,11689,11699,11701,11717,11719,11731,11743,11777,11779,11783,11789,11801,11807,11813,11821,11827,11831,11833,11839,11863,11867,11887,11897,11903,11909,11923,11927,11933,11939,11941,11953,11959,11969,11971,11981,11987,12007,12011,12037,12041,12043,12049,12071,12073,12097,12101,12107,12109,12113,12119,12143,12149,12157,12161,12163,12197,12203,12211,12227,12239,12241,12251,12253,12263,12269,12277,12281,12289,12301,12323,12329,12343,12347,12373,12377,12379,12391,12401,12409,12413,12421,12433,12437,12451,12457,12473,12479,12487,12491,12497,12503,12511,12517,12527,12539,12541,12547,12553,12569,12577,12583,12589,12601,12611,12613,12619,12637,12641,12647,12653,12659,12671,12689,12697,12703,12713,12721,12739,12743,12757,12763,12781,12791,12799,12809,12821,12823,12829,12841,12853,12889,12893,12899,12907,12911,12917,12919,12923,12941,12953,12959,12967,12973,12979,12983,13001,13003,13007,13009,13033,13037,13043,13049,13063,13093,13099,13103,13109,13121,13127,13147,13151,13159,13163,13171,13177,13183,13187,13217,13219,13229,13241,13249,13259,13267,13291,13297,13309,13313,13327,13331,13337,13339,13367,13381,13397,13399,13411,13417,13421,13441,13451,13457,13463,13469,13477,13487,13499,13513,13523,13537,13553,13567,13577,13591,13597,13613,13619,13627,13633,13649,13669,13679,13681,13687,13691,13693,13697,13709,13711,13721,13723,13729,13751,13757,13759,13763,13781,13789,13799,13807,13829,13831,13841,13859,13873,13877,13879,13883,13901,13903,13907,13913,13921,13931,13933,13963,13967,13997,13999,14009,14011,14029,14033,14051,14057,14071,14081,14083,14087,14107,14143,14149,14153,14159,14173,14177,14197,14207,14221,14243,14249,14251,14281,14293,14303,14321,14323,14327,14341,14347,14369,14387,14389,14401,14407,14411,14419,14423,14431,14437,14447,14449,14461,14479,14489,14503,14519,14533,14537,14543,14549,14551,14557,14561,14563,14591,14593,14621,14627,14629,14633,14639,14653,14657,14669,14683,14699,14713,14717,14723,14731,14737,14741,14747,14753,14759,14767,14771,14779,14783,14797,14813,14821,14827,14831,14843,14851,14867,14869,14879,14887,14891,14897,14923,14929,14939,14947,14951,14957,14969,14983,15013,15017,15031,15053,15061,15073,15077,15083,15091,15101,15107,15121,15131,15137,15139,15149,15161,15173,15187,15193,15199,15217,15227,15233,15241,15259,15263,15269,15271,15277,15287,15289,15299,15307,15313,15319,15329,15331,15349,15359,15361,15373,15377,15383,15391,15401,15413,15427,15439,15443,15451,15461,15467,15473,15493,15497,15511,15527,15541,15551,15559,15569,15581,15583,15601,15607,15619,15629,15641,15643,15647,15649,15661,15667,15671,15679,15683,15727,15731,15733,15737,15739,15749,15761,15767,15773,15787,15791,15797,15803,15809,15817,15823,15859,15877,15881,15887,15889,15901,15907,15913,15919,15923,15937,15959,15971,15973,15991,16001,16007,16033,16057,16061,16063,16067,16069,16073,16087,16091,16097,16103,16111,16127,16139,16141,16183,16187,16189,16193,16217,16223,16229,16231,16249,16253,16267,16273,16301,16319,16333,16339,16349,16361,16363,16369,16381,16411,16417,16421,16427,16433,16447,16451,16453,16477,16481,16487,16493,16519,16529,16547,16553,16561,16567,16573,16603,16607,16619,16631,16633,16649,16651,16657,16661,16673,16691,16693,16699,16703,16729,16741,16747,16759,16763,16787,16811,16823,16829,16831,16843,16871,16879,16883,16889,16901,16903,16921,16927,16931,16937,16943,16963,16979,16981,16987,16993,17011,17021,17027,17029,17033,17041,17047,17053,17077,17093,17099,17107,17117,17123,17137,17159,17167,17183,17189,17191,17203,17207,17209,17231,17239,17257,17291,17293,17299,17317,17321,17327,17333,17341,17351,17359,17377,17383,17387,17389,17393,17401,17417,17419,17431,17443,17449,17467,17471,17477,17483,17489,17491,17497,17509,17519,17539,17551,17569,17573,17579,17581,17597,17599,17609,17623,17627,17657,17659,17669,17681,17683,17707,17713,17729,17737,17747,17749,17761,17783,17789,17791,17807,17827,17837,17839,17851,17863,17881,17891,17903,17909,17911,17921,17923,17929,17939,17957,17959,17971,17977,17981,17987,17989,18013,18041,18043,18047,18049,18059,18061,18077,18089,18097,18119,18121,18127,18131,18133,18143,18149,18169,18181,18191,18199,18211,18217,18223,18229,18233,18251,18253,18257,18269,18287,18289,18301,18307,18311,18313,18329,18341,18353,18367,18371,18379,18397,18401,18413,18427,18433,18439,18443,18451,18457,18461,18481,18493,18503,18517,18521,18523,18539,18541,18553,18583,18587,18593,18617,18637,18661,18671,18679,18691,18701,18713,18719,18731,18743,18749,18757,18773,18787,18793,18797,18803,18839,18859,18869,18899,18911,18913,18917,18919,18947,18959,18973,18979,19001,19009,19013,19031,19037,19051,19069,19073,19079,19081,19087,19121,19139,19141,19157,19163,19181,19183,19207,19211,19213,19219,19231,19237,19249,19259,19267,19273,19289,19301,19309,19319,19333,19373,19379,19381,19387,19391,19403,19417,19421,19423,19427,19429,19433,19441,19447,19457,19463,19469,19471,19477,19483,19489,19501,19507,19531,19541,19543,19553,19559,19571,19577,19583,19597,19603,19609,19661,19681,19687,19697,19699,19709,19717,19727,19739,19751,19753,19759,19763,19777,19793,19801,19813,19819,19841,19843,19853,19861,19867,19889,19891,19913,19919,19927,19937,19949,19961,19963,19973,19979,19991,19993,19997,20011,20021,20023,20029,20047,20051,20063,20071,20089,20101,20107,20113,20117,20123,20129,20143,20147,20149,20161,20173,20177,20183,20201,20219,20231,20233,20249,20261,20269,20287,20297,20323,20327,20333,20341,20347,20353,20357,20359,20369,20389,20393,20399,20407,20411,20431,20441,20443,20477,20479,20483,20507,20509,20521,20533,20543,20549,20551,20563,20593,20599,20611,20627,20639,20641,20663,20681,20693,20707,20717,20719,20731,20743,20747,20749,20753,20759,20771,20773,20789,20807,20809,20849,20857,20873,20879,20887,20897,20899,20903,20921,20929,20939,20947,20959,20963,20981,20983,21001,21011,21013,21017,21019,21023,21031,21059,21061,21067,21089,21101,21107,21121,21139,21143,21149,21157,21163,21169,21179,21187,21191,21193,21211,21221,21227,21247,21269,21277,21283,21313,21317,21319,21323,21341,21347,21377,21379,21383,21391,21397,21401,21407,21419,21433,21467,21481,21487,21491,21493,21499,21503,21517,21521,21523,21529,21557,21559,21563,21569,21577,21587,21589,21599,21601,21611,21613,21617,21647,21649,21661,21673,21683,21701,21713,21727,21737,21739,21751,21757,21767,21773,21787,21799,21803,21817,21821,21839,21841,21851,21859,21863,21871,21881,21893,21911,21929,21937,21943,21961,21977,21991,21997,22003,22013,22027,22031,22037,22039,22051,22063,22067,22073,22079,22091,22093,22109,22111,22123,22129,22133,22147,22153,22157,22159,22171,22189,22193,22229,22247,22259,22271,22273,22277,22279,22283,22291,22303,22307,22343,22349,22367,22369,22381,22391,22397,22409,22433,22441,22447,22453,22469,22481,22483,22501,22511,22531,22541,22543,22549,22567,22571,22573,22613,22619,22621,22637,22639,22643,22651,22669,22679,22691,22697,22699,22709,22717,22721,22727,22739,22741,22751,22769,22777,22783,22787,22807,22811,22817,22853,22859,22861,22871,22877,22901,22907,22921,22937,22943,22961,22963,22973,22993,23003,23011,23017,23021,23027,23029,23039,23041,23053,23057,23059,23063,23071,23081,23087,23099,23117,23131,23143,23159,23167,23173,23189,23197,23201,23203,23209,23227,23251,23269,23279,23291,23293,23297,23311,23321,23327,23333,23339,23357,23369,23371,23399,23417,23431,23447,23459,23473,23497,23509,23531,23537,23539,23549,23557,23561,23563,23567,23581,23593,23599,23603,23609,23623,23627,23629,23633,23663,23669,23671,23677,23687,23689,23719,23741,23743,23747,23753,23761,23767,23773,23789,23801,23813,23819,23827,23831,23833,23857,23869,23873,23879,23887,23893,23899,23909,23911,23917,23929,23957,23971,23977,23981,23993,24001,24007,24019,24023,24029,24043,24049,24061,24071,24077,24083,24091,24097,24103,24107,24109,24113,24121,24133,24137,24151,24169,24179,24181,24197,24203,24223,24229,24239,24247,24251,24281,24317,24329,24337,24359,24371,24373,24379,24391,24407,24413,24419,24421,24439,24443,24469,24473,24481,24499,24509,24517,24527,24533,24547,24551,24571,24593,24611,24623,24631,24659,24671,24677,24683,24691,24697,24709,24733,24749,24763,24767,24781,24793,24799,24809,24821,24841,24847,24851,24859,24877,24889,24907,24917,24919,24923,24943,24953,24967,24971,24977,24979,24989,25013,25031,25033,25037,25057,25073,25087,25097,25111,25117,25121,25127,25147,25153,25163,25169,25171,25183,25189,25219,25229,25237,25243,25247,25253,25261,25301,25303,25307,25309,25321,25339,25343,25349,25357,25367,25373,25391,25409,25411,25423,25439,25447,25453,25457,25463,25469,25471,25523,25537,25541,25561,25577,25579,25583,25589,25601,25603,25609,25621,25633,25639,25643,25657,25667,25673,25679,25693,25703,25717,25733,25741,25747,25759,25763,25771,25793,25799,25801,25819,25841,25847,25849,25867,25873,25889,25903,25913,25919,25931,25933,25939,25943,25951,25969,25981,25997,25999,26003,26017,26021,26029,26041,26053,26083,26099,26107,26111,26113,26119,26141,26153,26161,26171,26177,26183,26189,26203,26209,26227,26237,26249,26251,26261,26263,26267,26293,26297,26309,26317,26321,26339,26347,26357,26371,26387,26393,26399,26407,26417,26423,26431,26437,26449,26459,26479,26489,26497,26501,26513,26539,26557,26561,26573,26591,26597,26627,26633,26641,26647,26669,26681,26683,26687,26693,26699,26701,26711,26713,26717,26723,26729,26731,26737,26759,26777,26783,26801,26813,26821,26833,26839,26849,26861,26863,26879,26881,26891,26893,26903,26921,26927,26947,26951,26953,26959,26981,26987,26993,27011,27017,27031,27043,27059,27061,27067,27073,27077,27091,27103,27107,27109,27127,27143,27179,27191,27197,27211,27239,27241,27253,27259,27271,27277,27281,27283,27299,27329,27337,27361,27367,27397,27407,27409,27427,27431,27437,27449,27457,27479,27481,27487,27509,27527,27529,27539,27541,27551,27581,27583,27611,27617,27631,27647,27653,27673,27689,27691,27697,27701,27733,27737,27739,27743,27749,27751,27763,27767,27773,27779,27791,27793,27799,27803,27809,27817,27823,27827,27847,27851,27883,27893,27901,27917,27919,27941,27943,27947,27953,27961,27967,27983,27997,28001,28019,28027,28031,28051,28057,28069,28081,28087,28097,28099,28109,28111,28123,28151,28163,28181,28183,28201,28211,28219,28229,28277,28279,28283,28289,28297,28307,28309,28319,28349,28351,28387,28393,28403,28409,28411,28429,28433,28439,28447,28463,28477,28493,28499,28513,28517,28537,28541,28547,28549,28559,28571,28573,28579,28591,28597,28603,28607,28619,28621,28627,28631,28643,28649,28657,28661,28663,28669,28687,28697,28703,28711,28723,28729,28751,28753,28759,28771,28789,28793,28807,28813,28817,28837,28843,28859,28867,28871,28879,28901,28909,28921,28927,28933,28949,28961,28979,29009,29017,29021,29023,29027,29033,29059,29063,29077,29101,29123,29129,29131,29137,29147,29153,29167,29173,29179,29191,29201,29207,29209,29221,29231,29243,29251,29269,29287,29297,29303,29311,29327,29333,29339,29347,29363,29383,29387,29389,29399,29401,29411,29423,29429,29437,29443,29453,29473,29483,29501,29527,29531,29537,29567,29569,29573,29581,29587,29599,29611,29629,29633,29641,29663,29669,29671,29683,29717,29723,29741,29753,29759,29761,29789,29803,29819,29833,29837,29851,29863,29867,29873,29879,29881,29917,29921,29927,29947,29959,29983,29989,30011,30013,30029,30047,30059,30071,30089,30091,30097,30103,30109,30113,30119,30133,30137,30139,30161,30169,30181,30187,30197,30203,30211,30223,30241,30253,30259,30269,30271,30293,30307,30313,30319,30323,30341,30347,30367,30389,30391,30403,30427,30431,30449,30467,30469,30491,30493,30497,30509,30517,30529,30539,30553,30557,30559,30577,30593,30631,30637,30643,30649,30661,30671,30677,30689,30697,30703,30707,30713,30727,30757,30763,30773,30781,30803,30809,30817,30829,30839,30841,30851,30853,30859,30869,30871,30881,30893,30911,30931,30937,30941,30949,30971,30977,30983,31013,31019,31033,31039,31051,31063,31069,31079,31081,31091,31121,31123,31139,31147,31151,31153,31159,31177,31181,31183,31189,31193,31219,31223,31231,31237,31247,31249,31253,31259,31267,31271,31277,31307,31319,31321,31327,31333,31337,31357,31379,31387,31391,31393,31397,31469,31477,31481,31489,31511,31513,31517,31531,31541,31543,31547,31567,31573,31583,31601,31607,31627,31643,31649,31657,31663,31667,31687,31699,31721,31723,31727,31729,31741,31751,31769,31771,31793,31799,31817,31847,31849,31859,31873,31883,31891,31907,31957,31963,31973,31981,31991,32003,32009,32027,32029,32051,32057,32059,32063,32069,32077,32083,32089,32099,32117,32119,32141,32143,32159,32173,32183,32189,32191,32203,32213,32233,32237,32251,32257,32261,32297,32299,32303,32309,32321,32323,32327,32341,32353,32359,32363,32369,32371,32377,32381,32401,32411,32413,32423,32429,32441,32443,32467,32479,32491,32497,32503,32507,32531,32533,32537,32561,32563,32569,32573,32579,32587,32603,32609,32611,32621,32633,32647,32653,32687,32693,32707,32713,32717,32719,32749,32771,32779,32783,32789,32797,32801,32803,32831,32833,32839,32843,32869,32887,32909,32911,32917,32933,32939,32941,32957,32969,32971,32983,32987,32993,32999,33013,33023,33029,33037,33049,33053,33071,33073,33083,33091,33107,33113,33119,33149,33151,33161,33179,33181,33191,33199,33203,33211,33223,33247,33287,33289,33301,33311,33317,33329,33331,33343,33347,33349,33353,33359,33377,33391,33403,33409,33413,33427,33457,33461,33469,33479,33487,33493,33503,33521,33529,33533,33547,33563,33569,33577,33581,33587,33589,33599,33601,33613,33617,33619,33623,33629,33637,33641,33647,33679,33703,33713,33721,33739,33749,33751,33757,33767,33769,33773,33791,33797,33809,33811,33827,33829,33851,33857,33863,33871,33889,33893,33911,33923,33931,33937,33941,33961,33967,33997,34019,34031,34033,34039,34057,34061,34123,34127,34129,34141,34147,34157,34159,34171,34183,34211,34213,34217,34231,34253,34259,34261,34267,34273,34283,34297,34301,34303,34313,34319,34327,34337,34351,34361,34367,34369,34381,34403,34421,34429,34439,34457,34469,34471,34483,34487,34499,34501,34511,34513,34519,34537,34543,34549,34583,34589,34591,34603,34607,34613,34631,34649,34651,34667,34673,34679,34687,34693,34703,34721,34729,34739,34747,34757,34759,34763,34781,34807,34819,34841,34843,34847,34849,34871,34877,34883,34897,34913,34919,34939,34949,34961,34963,34981,35023,35027,35051,35053,35059,35069,35081,35083,35089,35099,35107,35111,35117,35129,35141,35149,35153,35159,35171,35201,35221,35227,35251,35257,35267,35279,35281,35291,35311,35317,35323,35327,35339,35353,35363,35381,35393,35401,35407,35419,35423,35437,35447,35449,35461,35491,35507,35509,35521,35527,35531,35533,35537,35543,35569,35573,35591,35593,35597,35603,35617,35671,35677,35729,35731,35747,35753,35759,35771,35797,35801,35803,35809,35831,35837,35839,35851,35863,35869,35879,35897,35899,35911,35923,35933,35951,35963,35969,35977,35983,35993,35999,36007,36011,36013,36017,36037,36061,36067,36073,36083,36097,36107,36109,36131,36137,36151,36161,36187,36191,36209,36217,36229,36241,36251,36263,36269,36277,36293,36299,36307,36313,36319,36341,36343,36353,36373,36383,36389,36433,36451,36457,36467,36469,36473,36479,36493,36497,36523,36527,36529,36541,36551,36559,36563,36571,36583,36587,36599,36607,36629,36637,36643,36653,36671,36677,36683,36691,36697,36709,36713,36721,36739,36749,36761,36767,36779,36781,36787,36791,36793,36809,36821,36833,36847,36857,36871,36877,36887,36899,36901,36913,36919,36923,36929,36931,36943,36947,36973,36979,36997,37003,37013,37019,37021,37039,37049,37057,37061,37087,37097,37117,37123,37139,37159,37171,37181,37189,37199,37201,37217,37223,37243,37253,37273,37277,37307,37309,37313,37321,37337,37339,37357,37361,37363,37369,37379,37397,37409,37423,37441,37447,37463,37483,37489,37493,37501,37507,37511,37517,37529,37537,37547,37549,37561,37567,37571,37573,37579,37589,37591,37607,37619,37633,37643,37649,37657,37663,37691,37693,37699,37717,37747,37781,37783,37799,37811,37813,37831,37847,37853,37861,37871,37879,37889,37897,37907,37951,37957,37963,37967,37987,37991,37993,37997,38011,38039,38047,38053,38069,38083,38113,38119,38149,38153,38167,38177,38183,38189,38197,38201,38219,38231,38237,38239,38261,38273,38281,38287,38299,38303,38317,38321,38327,38329,38333,38351,38371,38377,38393,38431,38447,38449,38453,38459,38461,38501,38543,38557,38561,38567,38569,38593,38603,38609,38611,38629,38639,38651,38653,38669,38671,38677,38693,38699,38707,38711,38713,38723,38729,38737,38747,38749,38767,38783,38791,38803,38821,38833,38839,38851,38861,38867,38873,38891,38903,38917,38921,38923,38933,38953,38959,38971,38977,38993,39019,39023,39041,39043,39047,39079,39089,39097,39103,39107,39113,39119,39133,39139,39157,39161,39163,39181,39191,39199,39209,39217,39227,39229,39233,39239,39241,39251,39293,39301,39313,39317,39323,39341,39343,39359,39367,39371,39373,39383,39397,39409,39419,39439,39443,39451,39461,39499,39503,39509,39511,39521,39541,39551,39563,39569,39581,39607,39619,39623,39631,39659,39667,39671,39679,39703,39709,39719,39727,39733,39749,39761,39769,39779,39791,39799,39821,39827,39829,39839,39841,39847,39857,39863,39869,39877,39883,39887,39901,39929,39937,39953,39971,39979,39983,39989,40009,40013,40031,40037,40039,40063,40087,40093,40099,40111,40123,40127,40129,40151,40153,40163,40169,40177,40189,40193,40213,40231,40237,40241,40253,40277,40283,40289,40343,40351,40357,40361,40387,40423,40427,40429,40433,40459,40471,40483,40487,40493,40499,40507,40519,40529,40531,40543,40559,40577,40583,40591,40597,40609,40627,40637,40639,40693,40697,40699,40709,40739,40751,40759,40763,40771,40787,40801,40813,40819,40823,40829,40841,40847,40849,40853,40867,40879,40883,40897,40903,40927,40933,40939,40949,40961,40973,40993,41011,41017,41023,41039,41047,41051,41057,41077,41081,41113,41117,41131,41141,41143,41149,41161,41177,41179,41183,41189,41201,41203,41213,41221,41227,41231,41233,41243,41257,41263,41269,41281,41299,41333,41341,41351,41357,41381,41387,41389,41399,41411,41413,41443,41453,41467,41479,41491,41507,41513,41519,41521,41539,41543,41549,41579,41593,41597,41603,41609,41611,41617,41621,41627,41641,41647,41651,41659,41669,41681,41687,41719,41729,41737,41759,41761,41771,41777,41801,41809,41813,41843,41849,41851,41863,41879,41887,41893,41897,41903,41911,41927,41941,41947,41953,41957,41959,41969,41981,41983,41999,42013,42017,42019,42023,42043,42061,42071,42073,42083,42089,42101,42131,42139,42157,42169,42179,42181,42187,42193,42197,42209,42221,42223,42227,42239,42257,42281,42283,42293,42299,42307,42323,42331,42337,42349,42359,42373,42379,42391,42397,42403,42407,42409,42433,42437,42443,42451,42457,42461,42463,42467,42473,42487,42491,42499,42509,42533,42557,42569,42571,42577,42589,42611,42641,42643,42649,42667,42677,42683,42689,42697,42701,42703,42709,42719,42727,42737,42743,42751,42767,42773,42787,42793,42797,42821,42829,42839,42841,42853,42859,42863,42899,42901,42923,42929,42937,42943,42953,42961,42967,42979,42989,43003,43013,43019,43037,43049,43051,43063,43067,43093,43103,43117,43133,43151,43159,43177,43189,43201,43207,43223,43237,43261,43271,43283,43291,43313,43319,43321,43331,43391,43397,43399,43403,43411,43427,43441,43451,43457,43481,43487,43499,43517,43541,43543,43573,43577,43579,43591,43597,43607,43609,43613,43627,43633,43649,43651,43661,43669,43691,43711,43717,43721,43753,43759,43777,43781,43783,43787,43789,43793,43801,43853,43867,43889,43891,43913,43933,43943,43951,43961,43963,43969,43973,43987,43991,43997,44017,44021,44027,44029,44041,44053,44059,44071,44087,44089,44101,44111,44119,44123,44129,44131,44159,44171,44179,44189,44201,44203,44207,44221,44249,44257,44263,44267,44269,44273,44279,44281,44293,44351,44357,44371,44381,44383,44389,44417,44449,44453,44483,44491,44497,44501,44507,44519,44531,44533,44537,44543,44549,44563,44579,44587,44617,44621,44623,44633,44641,44647,44651,44657,44683,44687,44699,44701,44711,44729,44741,44753,44771,44773,44777,44789,44797,44809,44819,44839,44843,44851,44867,44879,44887,44893,44909,44917,44927,44939,44953,44959,44963,44971,44983,44987,45007,45013,45053,45061,45077,45083,45119,45121,45127,45131,45137,45139,45161,45179,45181,45191,45197,45233,45247,45259,45263,45281,45289,45293,45307,45317,45319,45329,45337,45341,45343,45361,45377,45389,45403,45413,45427,45433,45439,45481,45491,45497,45503,45523,45533,45541,45553,45557,45569,45587,45589,45599,45613,45631,45641,45659,45667,45673,45677,45691,45697,45707,45737,45751,45757,45763,45767,45779,45817,45821,45823,45827,45833,45841,45853,45863,45869,45887,45893,45943,45949,45953,45959,45971,45979,45989,46021,46027,46049,46051,46061,46073,46091,46093,46099,46103,46133,46141,46147,46153,46171,46181,46183,46187,46199,46219,46229,46237,46261,46271,46273,46279,46301,46307,46309,46327,46337,46349,46351,46381,46399,46411,46439,46441,46447,46451,46457,46471,46477,46489,46499,46507,46511,46523,46549,46559,46567,46573,46589,46591,46601,46619,46633,46639,46643,46649,46663,46679,46681,46687,46691,46703,46723,46727,46747,46751,46757,46769,46771,46807,46811,46817,46819,46829,46831,46853,46861,46867,46877,46889,46901,46919,46933,46957,46993,46997,47017,47041,47051,47057,47059,47087,47093,47111,47119,47123,47129,47137,47143,47147,47149,47161,47189,47207,47221,47237,47251,47269,47279,47287,47293,47297,47303,47309,47317,47339,47351,47353,47363,47381,47387,47389,47407,47417,47419,47431,47441,47459,47491,47497,47501,47507,47513,47521,47527,47533,47543,47563,47569,47581,47591,47599,47609,47623,47629,47639,47653,47657,47659,47681,47699,47701,47711,47713,47717,47737,47741,47743,47777,47779,47791,47797,47807,47809,47819,47837,47843,47857,47869,47881,47903,47911,47917,47933,47939,47947,47951,47963,47969,47977,47981,48017,48023,48029,48049,48073,48079,48091,48109,48119,48121,48131,48157,48163,48179,48187,48193,48197,48221,48239,48247,48259,48271,48281,48299,48311,48313,48337,48341,48353,48371,48383,48397,48407,48409,48413,48437,48449,48463,48473,48479,48481,48487,48491,48497,48523,48527,48533,48539,48541,48563,48571,48589,48593,48611,48619,48623,48647,48649,48661,48673,48677,48679,48731,48733,48751,48757,48761,48767,48779,48781,48787,48799,48809,48817,48821,48823,48847,48857,48859,48869,48871,48883,48889,48907,48947,48953,48973,48989,48991,49003,49009,49019,49031,49033,49037,49043,49057,49069,49081,49103,49109,49117,49121,49123,49139,49157,49169,49171,49177,49193,49199,49201,49207,49211,49223,49253,49261,49277,49279,49297,49307,49331,49333,49339,49363,49367,49369,49391,49393,49409,49411,49417,49429,49433,49451,49459,49463,49477,49481,49499,49523,49529,49531,49537,49547,49549,49559,49597,49603,49613,49627,49633,49639,49663,49667,49669,49681,49697,49711,49727,49739,49741,49747,49757,49783,49787,49789,49801,49807,49811,49823,49831,49843,49853,49871,49877,49891,49919,49921,49927,49937,49939,49943,49957,49991,49993,49999,50021,50023,50033,50047,50051,50053,50069,50077,50087,50093,50101,50111,50119,50123,50129,50131,50147,50153,50159,50177,50207,50221,50227,50231,50261,50263,50273,50287,50291,50311,50321,50329,50333,50341,50359,50363,50377,50383,50387,50411,50417,50423,50441,50459,50461,50497,50503,50513,50527,50539,50543,50549,50551,50581,50587,50591,50593,50599,50627,50647,50651,50671,50683,50707,50723,50741,50753,50767,50773,50777,50789,50821,50833,50839,50849,50857,50867,50873,50891,50893,50909,50923,50929,50951,50957,50969,50971,50989,50993,51001,51031,51043,51047,51059,51061,51071,51109,51131,51133,51137,51151,51157,51169,51193,51197,51199,51203,51217,51229,51239,51241,51257,51263,51283,51287,51307,51329,51341,51343,51347,51349,51361,51383,51407,51413,51419,51421,51427,51431,51437,51439,51449,51461,51473,51479,51481,51487,51503,51511,51517,51521,51539,51551,51563,51577,51581,51593,51599,51607,51613,51631,51637,51647,51659,51673,51679,51683,51691,51713,51719,51721,51749,51767,51769,51787,51797,51803,51817,51827,51829,51839,51853,51859,51869,51871,51893,51899,51907,51913,51929,51941,51949,51971,51973,51977,51991,52009,52021,52027,52051,52057,52067,52069,52081,52103,52121,52127,52147,52153,52163,52177,52181,52183,52189,52201,52223,52237,52249,52253,52259,52267,52289,52291,52301,52313,52321,52361,52363,52369,52379,52387,52391,52433,52453,52457,52489,52501,52511,52517,52529,52541,52543,52553,52561,52567,52571,52579,52583,52609,52627,52631,52639,52667,52673,52691,52697,52709,52711,52721,52727,52733,52747,52757,52769,52783,52807,52813,52817,52837,52859,52861,52879,52883,52889,52901,52903,52919,52937,52951,52957,52963,52967,52973,52981,52999,53003,53017,53047,53051,53069,53077,53087,53089,53093,53101,53113,53117,53129,53147,53149,53161,53171,53173,53189,53197,53201,53231,53233,53239,53267,53269,53279,53281,53299,53309,53323,53327,53353,53359,53377,53381,53401,53407,53411,53419,53437,53441,53453,53479,53503,53507,53527,53549,53551,53569,53591,53593,53597,53609,53611,53617,53623,53629,53633,53639,53653,53657,53681,53693,53699,53717,53719,53731,53759,53773,53777,53783,53791,53813,53819,53831,53849,53857,53861,53881,53887,53891,53897,53899,53917,53923,53927,53939,53951,53959,53987,53993,54001,54011,54013,54037,54049,54059,54083,54091,54101,54121,54133,54139,54151,54163,54167,54181,54193,54217,54251,54269,54277,54287,54293,54311,54319,54323,54331,54347,54361,54367,54371,54377,54401,54403,54409,54413,54419,54421,54437,54443,54449,54469,54493,54497,54499,54503,54517,54521,54539,54541,54547,54559,54563,54577,54581,54583,54601,54617,54623,54629,54631,54647,54667,54673,54679,54709,54713,54721,54727,54751,54767,54773,54779,54787,54799,54829,54833,54851,54869,54877,54881,54907,54917,54919,54941,54949,54959,54973,54979,54983,55001,55009,55021,55049,55051,55057,55061,55073,55079,55103,55109,55117,55127,55147,55163,55171,55201,55207,55213,55217,55219,55229,55243,55249,55259,55291,55313,55331,55333,55337,55339,55343,55351,55373,55381,55399,55411,55439,55441,55457,55469,55487,55501,55511,55529,55541,55547,55579,55589,55603,55609,55619,55621,55631,55633,55639,55661,55663,55667,55673,55681,55691,55697,55711,55717,55721,55733,55763,55787,55793,55799,55807,55813,55817,55819,55823,55829,55837,55843,55849,55871,55889,55897,55901,55903,55921,55927,55931,55933,55949,55967,55987,55997,56003,56009,56039,56041,56053,56081,56087,56093,56099,56101,56113,56123,56131,56149,56167,56171,56179,56197,56207,56209,56237,56239,56249,56263,56267,56269,56299,56311,56333,56359,56369,56377,56383,56393,56401,56417,56431,56437,56443,56453,56467,56473,56477,56479,56489,56501,56503,56509,56519,56527,56531,56533,56543,56569,56591,56597,56599,56611,56629,56633,56659,56663,56671,56681,56687,56701,56711,56713,56731,56737,56747,56767,56773,56779,56783,56807,56809,56813,56821,56827,56843,56857,56873,56891,56893,56897,56909,56911,56921,56923,56929,56941,56951,56957,56963,56983,56989,56993,56999,57037,57041,57047,57059,57073,57077,57089,57097,57107,57119,57131,57139,57143,57149,57163,57173,57179,57191,57193,57203,57221,57223,57241,57251,57259,57269,57271,57283,57287,57301,57329,57331,57347,57349,57367,57373,57383,57389,57397,57413,57427,57457,57467,57487,57493,57503,57527,57529,57557,57559,57571,57587,57593,57601,57637,57641,57649,57653,57667,57679,57689,57697,57709,57713,57719,57727,57731,57737,57751,57773,57781,57787,57791,57793,57803,57809,57829,57839,57847,57853,57859,57881,57899,57901,57917,57923,57943,57947,57973,57977,57991,58013,58027,58031,58043,58049,58057,58061,58067,58073,58099,58109,58111,58129,58147,58151,58153,58169,58171,58189,58193,58199,58207,58211,58217,58229,58231,58237,58243,58271,58309,58313,58321,58337,58363,58367,58369,58379,58391,58393,58403,58411,58417,58427,58439,58441,58451,58453,58477,58481,58511,58537,58543,58549,58567,58573,58579,58601,58603,58613,58631,58657,58661,58679,58687,58693,58699,58711,58727,58733,58741,58757,58763,58771,58787,58789,58831,58889,58897,58901,58907,58909,58913,58921,58937,58943,58963,58967,58979,58991,58997,59009,59011,59021,59023,59029,59051,59053,59063,59069,59077,59083,59093,59107,59113,59119,59123,59141,59149,59159,59167,59183,59197,59207,59209,59219,59221,59233,59239,59243,59263,59273,59281,59333,59341,59351,59357,59359,59369,59377,59387,59393,59399,59407,59417,59419,59441,59443,59447,59453,59467,59471,59473,59497,59509,59513,59539,59557,59561,59567,59581,59611,59617,59621,59627,59629,59651,59659,59663,59669,59671,59693,59699,59707,59723,59729,59743,59747,59753,59771,59779,59791,59797,59809,59833,59863,59879,59887,59921,59929,59951,59957,59971,59981,59999,60013,60017,60029,60037,60041,60077,60083,60089,60091,60101,60103,60107,60127,60133,60139,60149,60161,60167,60169,60209,60217,60223,60251,60257,60259,60271,60289,60293,60317,60331,60337,60343,60353,60373,60383,60397,60413,60427,60443,60449,60457,60493,60497,60509,60521,60527,60539,60589,60601,60607,60611,60617,60623,60631,60637,60647,60649,60659,60661,60679,60689,60703,60719,60727,60733,60737,60757,60761,60763,60773,60779,60793,60811,60821,60859,60869,60887,60889,60899,60901,60913,60917,60919,60923,60937,60943,60953,60961,61001,61007,61027,61031,61043,61051,61057,61091,61099,61121,61129,61141,61151,61153,61169,61211,61223,61231,61253,61261,61283,61291,61297,61331,61333,61339,61343,61357,61363,61379,61381,61403,61409,61417,61441,61463,61469,61471,61483,61487,61493,61507,61511,61519,61543,61547,61553,61559,61561,61583,61603,61609,61613,61627,61631,61637,61643,61651,61657,61667,61673,61681,61687,61703,61717,61723,61729,61751,61757,61781,61813,61819,61837,61843,61861,61871,61879,61909,61927,61933,61949,61961,61967,61979,61981,61987,61991,62003,62011,62017,62039,62047,62053,62057,62071,62081,62099,62119,62129,62131,62137,62141,62143,62171,62189,62191,62201,62207,62213,62219,62233,62273,62297,62299,62303,62311,62323,62327,62347,62351,62383,62401,62417,62423,62459,62467,62473,62477,62483,62497,62501,62507,62533,62539,62549,62563,62581,62591,62597,62603,62617,62627,62633,62639,62653,62659,62683,62687,62701,62723,62731,62743,62753,62761,62773,62791,62801,62819,62827,62851,62861,62869,62873,62897,62903,62921,62927,62929,62939,62969,62971,62981,62983,62987,62989,63029,63031,63059,63067,63073,63079,63097,63103,63113,63127,63131,63149,63179,63197,63199,63211,63241,63247,63277,63281,63299,63311,63313,63317,63331,63337,63347,63353,63361,63367,63377,63389,63391,63397,63409,63419,63421,63439,63443,63463,63467,63473,63487,63493,63499,63521,63527,63533,63541,63559,63577,63587,63589,63599,63601,63607,63611,63617,63629,63647,63649,63659,63667,63671,63689,63691,63697,63703,63709,63719,63727,63737,63743,63761,63773,63781,63793,63799,63803,63809,63823,63839,63841,63853,63857,63863,63901,63907,63913,63929,63949,63977,63997,64007,64013,64019,64033,64037,64063,64067,64081,64091,64109,64123,64151,64153,64157,64171,64187,64189,64217,64223,64231,64237,64271,64279,64283,64301,64303,64319,64327,64333,64373,64381,64399,64403,64433,64439,64451,64453,64483,64489,64499,64513,64553,64567,64577,64579,64591,64601,64609,64613,64621,64627,64633,64661,64663,64667,64679,64693,64709,64717,64747,64763,64781,64783,64793,64811,64817,64849,64853,64871,64877,64879,64891,64901,64919,64921,64927,64937,64951,64969,64997,65003,65011,65027,65029,65033,65053,65063,65071,65089,65099,65101,65111,65119,65123,65129,65141,65147,65167,65171,65173,65179,65183,65203,65213,65239,65257,65267,65269,65287,65293,65309,65323,65327,65353,65357,65371,65381,65393,65407,65413,65419,65423,65437,65447,65449,65479,65497,65519,65521,65537,65539,65543,65551,65557,65563,65579,65581,65587,65599,65609,65617,65629,65633,65647,65651,65657,65677,65687,65699,65701,65707,65713,65717,65719,65729,65731,65761,65777,65789,65809,65827,65831,65837,65839,65843,65851,65867,65881,65899,65921,65927,65929,65951,65957,65963,65981,65983,65993,66029,66037,66041,66047,66067,66071,66083,66089,66103,66107,66109,66137,66161,66169,66173,66179,66191,66221,66239,66271,66293,66301,66337,66343,66347,66359,66361,66373,66377,66383,66403,66413,66431,66449,66457,66463,66467,66491,66499,66509,66523,66529,66533,66541,66553,66569,66571,66587,66593,66601,66617,66629,66643,66653,66683,66697,66701,66713,66721,66733,66739,66749,66751,66763,66791,66797,66809,66821,66841,66851,66853,66863,66877,66883,66889,66919,66923,66931,66943,66947,66949,66959,66973,66977,67003,67021,67033,67043,67049,67057,67061,67073,67079,67103,67121,67129,67139,67141,67153,67157,67169,67181,67187,67189,67211,67213,67217,67219,67231,67247,67261,67271,67273,67289,67307,67339,67343,67349,67369,67391,67399,67409,67411,67421,67427,67429,67433,67447,67453,67477,67481,67489,67493,67499,67511,67523,67531,67537,67547,67559,67567,67577,67579,67589,67601,67607,67619,67631,67651,67679,67699,67709,67723,67733,67741,67751,67757,67759,67763,67777,67783,67789,67801,67807,67819,67829,67843,67853,67867,67883,67891,67901,67927,67931,67933,67939,67943,67957,67961,67967,67979,67987,67993,68023,68041,68053,68059,68071,68087,68099,68111,68113,68141,68147,68161,68171,68207,68209,68213,68219,68227,68239,68261,68279,68281,68311,68329,68351,68371,68389,68399,68437,68443,68447,68449,68473,68477,68483,68489,68491,68501,68507,68521,68531,68539,68543,68567,68581,68597,68611,68633,68639,68659,68669,68683,68687,68699,68711,68713,68729,68737,68743,68749,68767,68771,68777,68791,68813,68819,68821,68863,68879,68881,68891,68897,68899,68903,68909,68917,68927,68947,68963,68993,69001,69011,69019,69029,69031,69061,69067,69073,69109,69119,69127,69143,69149,69151,69163,69191,69193,69197,69203,69221,69233,69239,69247,69257,69259,69263,69313,69317,69337,69341,69371,69379,69383,69389,69401,69403,69427,69431,69439,69457,69463,69467,69473,69481,69491,69493,69497,69499,69539,69557,69593,69623,69653,69661,69677,69691,69697,69709,69737,69739,69761,69763,69767,69779,69809,69821,69827,69829,69833,69847,69857,69859,69877,69899,69911,69929,69931,69941,69959,69991,69997,70001,70003,70009,70019,70039,70051,70061,70067,70079,70099,70111,70117,70121,70123,70139,70141,70157,70163,70177,70181,70183,70199,70201,70207,70223,70229,70237,70241,70249,70271,70289,70297,70309,70313,70321,70327,70351,70373,70379,70381,70393,70423,70429,70439,70451,70457,70459,70481,70487,70489,70501,70507,70529,70537,70549,70571,70573,70583,70589,70607,70619,70621,70627,70639,70657,70663,70667,70687,70709,70717,70729,70753,70769,70783,70793,70823,70841,70843,70849,70853,70867,70877,70879,70891,70901,70913,70919,70921,70937,70949,70951,70957,70969,70979,70981,70991,70997,70999,71011,71023,71039,71059,71069,71081,71089,71119,71129,71143,71147,71153,71161,71167,71171,71191,71209,71233,71237,71249,71257,71261,71263,71287,71293,71317,71327,71329,71333,71339,71341,71347,71353,71359,71363,71387,71389,71399,71411,71413,71419,71429,71437,71443,71453,71471,71473,71479,71483,71503,71527,71537,71549,71551,71563,71569,71593,71597,71633,71647,71663,71671,71693,71699,71707,71711,71713,71719,71741,71761,71777,71789,71807,71809,71821,71837,71843,71849,71861,71867,71879,71881,71887,71899,71909,71917,71933,71941,71947,71963,71971,71983,71987,71993,71999,72019,72031,72043,72047,72053,72073,72077,72089,72091,72101,72103,72109,72139,72161,72167,72169,72173,72211,72221,72223,72227,72229,72251,72253,72269,72271,72277,72287,72307,72313,72337,72341,72353,72367,72379,72383,72421,72431,72461,72467,72469,72481,72493,72497,72503,72533,72547,72551,72559,72577,72613,72617,72623,72643,72647,72649,72661,72671,72673,72679,72689,72701,72707,72719,72727,72733,72739,72763,72767,72797,72817,72823,72859,72869,72871,72883,72889,72893,72901,72907,72911,72923,72931,72937,72949,72953,72959,72973,72977,72997,73009,73013,73019,73037,73039,73043,73061,73063,73079,73091,73121,73127,73133,73141,73181,73189,73237,73243,73259,73277,73291,73303,73309,73327,73331,73351,73361,73363,73369,73379,73387,73417,73421,73433,73453,73459,73471,73477,73483,73517,73523,73529,73547,73553,73561,73571,73583,73589,73597,73607,73609,73613,73637,73643,73651,73673,73679,73681,73693,73699,73709,73721,73727,73751,73757,73771,73783,73819,73823,73847,73849,73859,73867,73877,73883,73897,73907,73939,73943,73951,73961,73973,73999,74017,74021,74027,74047,74051,74071,74077,74093,74099,74101,74131,74143,74149,74159,74161,74167,74177,74189,74197,74201,74203,74209,74219,74231,74257,74279,74287,74293,74297,74311,74317,74323,74353,74357,74363,74377,74381,74383,74411,74413,74419,74441,74449,74453,74471,74489,74507,74509,74521,74527,74531,74551,74561,74567,74573,74587,74597,74609,74611,74623,74653,74687,74699,74707,74713,74717,74719,74729,74731,74747,74759,74761,74771,74779,74797,74821,74827,74831,74843,74857,74861,74869,74873,74887,74891,74897,74903,74923,74929,74933,74941,74959,75011,75013,75017,75029,75037,75041,75079,75083,75109,75133,75149,75161,75167,75169,75181,75193,75209,75211,75217,75223,75227,75239,75253,75269,75277,75289,75307,75323,75329,75337,75347,75353,75367,75377,75389,75391,75401,75403,75407,75431,75437,75479,75503,75511,75521,75527,75533,75539,75541,75553,75557,75571,75577,75583,75611,75617,75619,75629,75641,75653,75659,75679,75683,75689,75703,75707,75709,75721,75731,75743,75767,75773,75781,75787,75793,75797,75821,75833,75853,75869,75883,75913,75931,75937,75941,75967,75979,75983,75989,75991,75997,76001,76003,76031,76039,76079,76081,76091,76099,76103,76123,76129,76147,76157,76159,76163,76207,76213,76231,76243,76249,76253,76259,76261,76283,76289,76303,76333,76343,76367,76369,76379,76387,76403,76421,76423,76441,76463,76471,76481,76487,76493,76507,76511,76519,76537,76541,76543,76561,76579,76597,76603,76607,76631,76649,76651,76667,76673,76679,76697,76717,76733,76753,76757,76771,76777,76781,76801,76819,76829,76831,76837,76847,76871,76873,76883,76907,76913,76919,76943,76949,76961,76963,76991,77003,77017,77023,77029,77041,77047,77069,77081,77093,77101,77137,77141,77153,77167,77171,77191,77201,77213,77237,77239,77243,77249,77261,77263,77267,77269,77279,77291,77317,77323,77339,77347,77351,77359,77369,77377,77383,77417,77419,77431,77447,77471,77477,77479,77489,77491,77509,77513,77521,77527,77543,77549,77551,77557,77563,77569,77573,77587,77591,77611,77617,77621,77641,77647,77659,77681,77687,77689,77699,77711,77713,77719,77723,77731,77743,77747,77761,77773,77783,77797,77801,77813,77839,77849,77863,77867,77893,77899,77929,77933,77951,77969,77977,77983,77999,78007,78017,78031,78041,78049,78059,78079,78101,78121,78137,78139,78157,78163,78167,78173,78179,78191,78193,78203,78229,78233,78241,78259,78277,78283,78301,78307,78311,78317,78341,78347,78367,78401,78427,78437,78439,78467,78479,78487,78497,78509,78511,78517,78539,78541,78553,78569,78571,78577,78583,78593,78607,78623,78643,78649,78653,78691,78697,78707,78713,78721,78737,78779,78781,78787,78791,78797,78803,78809,78823,78839,78853,78857,78877,78887,78889,78893,78901,78919,78929,78941,78977,78979,78989,79031,79039,79043,79063,79087,79103,79111,79133,79139,79147,79151,79153,79159,79181,79187,79193,79201,79229,79231,79241,79259,79273,79279,79283,79301,79309,79319,79333,79337,79349,79357,79367,79379,79393,79397,79399,79411,79423,79427,79433,79451,79481,79493,79531,79537,79549,79559,79561,79579,79589,79601,79609,79613,79621,79627,79631,79633,79657,79669,79687,79691,79693,79697,79699,79757,79769,79777,79801,79811,79813,79817,79823,79829,79841,79843,79847,79861,79867,79873,79889,79901,79903,79907,79939,79943,79967,79973,79979,79987,79997,79999,80021,80039,80051,80071,80077,80107,80111,80141,80147,80149,80153,80167,80173,80177,80191,80207,80209,80221,80231,80233,80239,80251,80263,80273,80279,80287,80309,80317,80329,80341,80347,80363,80369,80387,80407,80429,80447,80449,80471,80473,80489,80491,80513,80527,80537,80557,80567,80599,80603,80611,80621,80627,80629,80651,80657,80669,80671,80677,80681,80683,80687,80701,80713,80737,80747,80749,80761,80777,80779,80783,80789,80803,80809,80819,80831,80833,80849,80863,80897,80909,80911,80917,80923,80929,80933,80953,80963,80989,81001,81013,81017,81019,81023,81031,81041,81043,81047,81049,81071,81077,81083,81097,81101,81119,81131,81157,81163,81173,81181,81197,81199,81203,81223,81233,81239,81281,81283,81293,81299,81307,81331,81343,81349,81353,81359,81371,81373,81401,81409,81421,81439,81457,81463,81509,81517,81527,81533,81547,81551,81553,81559,81563,81569,81611,81619,81629,81637,81647,81649,81667,81671,81677,81689,81701,81703,81707,81727,81737,81749,81761,81769,81773,81799,81817,81839,81847,81853,81869,81883,81899,81901,81919,81929,81931,81937,81943,81953,81967,81971,81973,82003,82007,82009,82013,82021,82031,82037,82039,82051,82067,82073,82129,82139,82141,82153,82163,82171,82183,82189,82193,82207,82217,82219,82223,82231,82237,82241,82261,82267,82279,82301,82307,82339,82349,82351,82361,82373,82387,82393,82421,82457,82463,82469,82471,82483,82487,82493,82499,82507,82529,82531,82549,82559,82561,82567,82571,82591,82601,82609,82613,82619,82633,82651,82657,82699,82721,82723,82727,82729,82757,82759,82763,82781,82787,82793,82799,82811,82813,82837,82847,82883,82889,82891,82903,82913,82939,82963,82981,82997,83003,83009,83023,83047,83059,83063,83071,83077,83089,83093,83101,83117,83137,83177,83203,83207,83219,83221,83227,83231,83233,83243,83257,83267,83269,83273,83299,83311,83339,83341,83357,83383,83389,83399,83401,83407,83417,83423,83431,83437,83443,83449,83459,83471,83477,83497,83537,83557,83561,83563,83579,83591,83597,83609,83617,83621,83639,83641,83653,83663,83689,83701,83717,83719,83737,83761,83773,83777,83791,83813,83833,83843,83857,83869,83873,83891,83903,83911,83921,83933,83939,83969,83983,83987,84011,84017,84047,84053,84059,84061,84067,84089,84121,84127,84131,84137,84143,84163,84179,84181,84191,84199,84211,84221,84223,84229,84239,84247,84263,84299,84307,84313,84317,84319,84347,84349,84377,84389,84391,84401,84407,84421,84431,84437,84443,84449,84457,84463,84467,84481,84499,84503,84509,84521,84523,84533,84551,84559,84589,84629,84631,84649,84653,84659,84673,84691,84697,84701,84713,84719,84731,84737,84751,84761,84787,84793,84809,84811,84827,84857,84859,84869,84871,84913,84919,84947,84961,84967,84977,84979,84991,85009,85021,85027,85037,85049,85061,85081,85087,85091,85093,85103,85109,85121,85133,85147,85159,85193,85199,85201,85213,85223,85229,85237,85243,85247,85259,85297,85303,85313,85331,85333,85361,85363,85369,85381,85411,85427,85429,85439,85447,85451,85453,85469,85487,85513,85517,85523,85531,85549,85571,85577,85597,85601,85607,85619,85621,85627,85639,85643,85661,85667,85669,85691,85703,85711,85717,85733,85751,85781,85793,85817,85819,85829,85831,85837,85843,85847,85853,85889,85903,85909,85931,85933,85991,85999,86011,86017,86027,86029,86069,86077,86083,86111,86113,86117,86131,86137,86143,86161,86171,86179,86183,86197,86201,86209,86239,86243,86249,86257,86263,86269,86287,86291,86293,86297,86311,86323,86341,86351,86353,86357,86369,86371,86381,86389,86399,86413,86423,86441,86453,86461,86467,86477,86491,86501,86509,86531,86533,86539,86561,86573,86579,86587,86599,86627,86629,86677,86689,86693,86711,86719,86729,86743,86753,86767,86771,86783,86813,86837,86843,86851,86857,86861,86869,86923,86927,86929,86939,86951,86959,86969,86981,86993,87011,87013,87037,87041,87049,87071,87083,87103,87107,87119,87121,87133,87149,87151,87179,87181,87187,87211,87221,87223,87251,87253,87257,87277,87281,87293,87299,87313,87317,87323,87337,87359,87383,87403,87407,87421,87427,87433,87443,87473,87481,87491,87509,87511,87517,87523,87539,87541,87547,87553,87557,87559,87583,87587,87589,87613,87623,87629,87631,87641,87643,87649,87671,87679,87683,87691,87697,87701,87719,87721,87739,87743,87751,87767,87793,87797,87803,87811,87833,87853,87869,87877,87881,87887,87911,87917,87931,87943,87959,87961,87973,87977,87991,88001,88003,88007,88019,88037,88069,88079,88093,88117,88129,88169,88177,88211,88223,88237,88241,88259,88261,88289,88301,88321,88327,88337,88339,88379,88397,88411,88423,88427,88463,88469,88471,88493,88499,88513,88523,88547,88589,88591,88607,88609,88643,88651,88657,88661,88663,88667,88681,88721,88729,88741,88747,88771,88789,88793,88799,88801,88807,88811,88813,88817,88819,88843,88853,88861,88867,88873,88883,88897,88903,88919,88937,88951,88969,88993,88997,89003,89009,89017,89021,89041,89051,89057,89069,89071,89083,89087,89101,89107,89113,89119,89123,89137,89153,89189,89203,89209,89213,89227,89231,89237,89261,89269,89273,89293,89303,89317,89329,89363,89371,89381,89387,89393,89399,89413,89417,89431,89443,89449,89459,89477,89491,89501,89513,89519,89521,89527,89533,89561,89563,89567,89591,89597,89599,89603,89611,89627,89633,89653,89657,89659,89669,89671,89681,89689,89753,89759,89767,89779,89783,89797,89809,89819,89821,89833,89839,89849,89867,89891,89897,89899,89909,89917,89923,89939,89959,89963,89977,89983,89989,90001,90007,90011,90017,90019,90023,90031,90053,90059,90067,90071,90073,90089,90107,90121,90127,90149,90163,90173,90187,90191,90197,90199,90203,90217,90227,90239,90247,90263,90271,90281,90289,90313,90353,90359,90371,90373,90379,90397,90401,90403,90407,90437,90439,90469,90473,90481,90499,90511,90523,90527,90529,90533,90547,90583,90599,90617,90619,90631,90641,90647,90659,90677,90679,90697,90703,90709,90731,90749,90787,90793,90803,90821,90823,90833,90841,90847,90863,90887,90901,90907,90911,90917,90931,90947,90971,90977,90989,90997,91009,91019,91033,91079,91081,91097,91099,91121,91127,91129,91139,91141,91151,91153,91159,91163,91183,91193,91199,91229,91237,91243,91249,91253,91283,91291,91297,91303,91309,91331,91367,91369,91373,91381,91387,91393,91397,91411,91423,91433,91453,91457,91459,91463,91493,91499,91513,91529,91541,91571,91573,91577,91583,91591,91621,91631,91639,91673,91691,91703,91711,91733,91753,91757,91771,91781,91801,91807,91811,91813,91823,91837,91841,91867,91873,91909,91921,91939,91943,91951,91957,91961,91967,91969,91997,92003,92009,92033,92041,92051,92077,92083,92107,92111,92119,92143,92153,92173,92177,92179,92189,92203,92219,92221,92227,92233,92237,92243,92251,92269,92297,92311,92317,92333,92347,92353,92357,92363,92369,92377,92381,92383,92387,92399,92401,92413,92419,92431,92459,92461,92467,92479,92489,92503,92507,92551,92557,92567,92569,92581,92593,92623,92627,92639,92641,92647,92657,92669,92671,92681,92683,92693,92699,92707,92717,92723,92737,92753,92761,92767,92779,92789,92791,92801,92809,92821,92831,92849,92857,92861,92863,92867,92893,92899,92921,92927,92941,92951,92957,92959,92987,92993,93001,93047,93053,93059,93077,93083,93089,93097,93103,93113,93131,93133,93139,93151,93169,93179,93187,93199,93229,93239,93241,93251,93253,93257,93263,93281,93283,93287,93307,93319,93323,93329,93337,93371,93377,93383,93407,93419,93427,93463,93479,93481,93487,93491,93493,93497,93503,93523,93529,93553,93557,93559,93563,93581,93601,93607,93629,93637,93683,93701,93703,93719,93739,93761,93763,93787,93809,93811,93827,93851,93871,93887,93889,93893,93901,93911,93913,93923,93937,93941,93949,93967,93971,93979,93983,93997,94007,94009,94033,94049,94057,94063,94079,94099,94109,94111,94117,94121,94151,94153,94169,94201,94207,94219,94229,94253,94261,94273,94291,94307,94309,94321,94327,94331,94343,94349,94351,94379,94397,94399,94421,94427,94433,94439,94441,94447,94463,94477,94483,94513,94529,94531,94541,94543,94547,94559,94561,94573,94583,94597,94603,94613,94621,94649,94651,94687,94693,94709,94723,94727,94747,94771,94777,94781,94789,94793,94811,94819,94823,94837,94841,94847,94849,94873,94889,94903,94907,94933,94949,94951,94961,94993,94999,95003,95009,95021,95027,95063,95071,95083,95087,95089,95093,95101,95107,95111,95131,95143,95153,95177,95189,95191,95203,95213,95219,95231,95233,95239,95257,95261,95267,95273,95279,95287,95311,95317,95327,95339,95369,95383,95393,95401,95413,95419,95429,95441,95443,95461,95467,95471,95479,95483,95507,95527,95531,95539,95549,95561,95569,95581,95597,95603,95617,95621,95629,95633,95651,95701,95707,95713,95717,95723,95731,95737,95747,95773,95783,95789,95791,95801,95803,95813,95819,95857,95869,95873,95881,95891,95911,95917,95923,95929,95947,95957,95959,95971,95987,95989,96001,96013,96017,96043,96053,96059,96079,96097,96137,96149,96157,96167,96179,96181,96199,96211,96221,96223,96233,96259,96263,96269,96281,96289,96293,96323,96329,96331,96337,96353,96377,96401,96419,96431,96443,96451,96457,96461,96469,96479,96487,96493,96497,96517,96527,96553,96557,96581,96587,96589,96601,96643,96661,96667,96671,96697,96703,96731,96737,96739,96749,96757,96763,96769,96779,96787,96797,96799,96821,96823,96827,96847,96851,96857,96893,96907,96911,96931,96953,96959,96973,96979,96989,96997,97001,97003,97007,97021,97039,97073,97081,97103,97117,97127,97151,97157,97159,97169,97171,97177,97187,97213,97231,97241,97259,97283,97301,97303,97327,97367,97369,97373,97379,97381,97387,97397,97423,97429,97441,97453,97459,97463,97499,97501,97511,97523,97547,97549,97553,97561,97571,97577,97579,97583,97607,97609,97613,97649,97651,97673,97687,97711,97729,97771,97777,97787,97789,97813,97829,97841,97843,97847,97849,97859,97861,97871,97879,97883,97919,97927,97931,97943,97961,97967,97973,97987,98009,98011,98017,98041,98047,98057,98081,98101,98123,98129,98143,98179,98207,98213,98221,98227,98251,98257,98269,98297,98299,98317,98321,98323,98327,98347,98369,98377,98387,98389,98407,98411,98419,98429,98443,98453,98459,98467,98473,98479,98491,98507,98519,98533,98543,98561,98563,98573,98597,98621,98627,98639,98641,98663,98669,98689,98711,98713,98717,98729,98731,98737,98773,98779,98801,98807,98809,98837,98849,98867,98869,98873,98887,98893,98897,98899,98909,98911,98927,98929,98939,98947,98953,98963,98981,98993,98999,99013,99017,99023,99041,99053,99079,99083,99089,99103,99109,99119,99131,99133,99137,99139,99149,99173,99181,99191,99223,99233,99241,99251,99257,99259,99277,99289,99317,99347,99349,99367,99371,99377,99391,99397,99401,99409,99431,99439,99469,99487,99497,99523,99527,99529,99551,99559,99563,99571,99577,99581,99607,99611,99623,99643,99661,99667,99679,99689,99707,99709,99713,99719,99721,99733,99761,99767,99787,99793,99809,99817,99823,99829,99833,99839,99859,99871,99877,99881,99901,99907,99923,99929,99961,99971,99989,99991,100003,100019,100043,100049,100057,100069,100103,100109,100129,100151,100153,100169,100183,100189,100193,100207,100213,100237,100267,100271,100279,100291,100297,100313,100333,100343,100357,100361,100363,100379,100391,100393,100403,100411,100417,100447,100459,100469,100483,100493,100501,100511,100517,100519,100523,100537,100547,100549,100559,100591,100609,100613,100621,100649,100669,100673,100693,100699,100703,100733,100741,100747,100769,100787,100799,100801,100811,100823,100829,100847,100853,100907,100913,100927,100931,100937,100943,100957,100981,100987,100999,101009,101021,101027,101051,101063,101081,101089,101107,101111,101113,101117,101119,101141,101149,101159,101161,101173,101183,101197,101203,101207,101209,101221,101267,101273,101279,101281,101287,101293,101323,101333,101341,101347,101359,101363,101377,101383,101399,101411,101419,101429,101449,101467,101477,101483,101489,101501,101503,101513,101527,101531,101533,101537,101561,101573,101581,101599,101603,101611,101627,101641,101653,101663,101681,101693,101701,101719,101723,101737,101741,101747,101749,101771,101789,101797,101807,101833,101837,101839,101863,101869,101873,101879,101891,101917,101921,101929,101939,101957,101963,101977,101987,101999,102001,102013,102019,102023,102031,102043,102059,102061,102071,102077,102079,102101,102103,102107,102121,102139,102149,102161,102181,102191,102197,102199,102203,102217,102229,102233,102241,102251,102253,102259,102293,102299,102301,102317,102329,102337,102359,102367,102397,102407,102409,102433,102437,102451,102461,102481,102497,102499,102503,102523,102533,102539,102547,102551,102559,102563,102587,102593,102607,102611,102643,102647,102653,102667,102673,102677,102679,102701,102761,102763,102769,102793,102797,102811,102829,102841,102859,102871,102877,102881,102911,102913,102929,102931,102953,102967,102983,103001,103007,103043,103049,103067,103069,103079,103087,103091,103093,103099,103123,103141,103171,103177,103183,103217,103231,103237,103289,103291,103307,103319,103333,103349,103357,103387,103391,103393,103399,103409,103421,103423,103451,103457,103471,103483,103511,103529,103549,103553,103561,103567,103573,103577,103583,103591,103613,103619,103643,103651,103657,103669,103681,103687,103699,103703,103723,103769,103787,103801,103811,103813,103837,103841,103843,103867,103889,103903,103913,103919,103951,103963,103967,103969,103979,103981,103991,103993,103997,104003,104009,104021,104033,104047,104053,104059,104087,104089,104107,104113,104119,104123,104147,104149,104161,104173,104179,104183,104207,104231,104233,104239,104243,104281,104287,104297,104309,104311,104323,104327,104347,104369,104381,104383,104393,104399,104417,104459,104471,104473,104479,104491,104513,104527,104537,104543,104549,104551,104561,104579,104593,104597,104623,104639,104651,104659,104677,104681,104683,104693,104701,104707,104711,104717,104723,104729]}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y;y=r(728),p=y.trim,y.strip,h=y.katch,y.bufeq_fast,d=y.uint_to_buffer,l=function(e){return null==e&&(e=""),e+"\n"},t.Encoder=n=function(){function e(e){this.C=e}return e.prototype.frame=function(e){var t;return t=function(){var e,t;for(t=[],e=0;e<5;++e)t.push("-");return t}().join(""),{begin:l(t+"BEGIN PGP "+e+t),end:l(t+"END PGP "+e+t)}},e.prototype.b64e=function(e){var t,r,n,i;return i=e.toString("base64"),64,n=function(){var e,n,o;for(o=[],r=e=0,n=i.length;e16;)r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r<<8^u[255&(r>>16^e.readUInt8(n+0))])<<8^u[255&(r>>16^e.readUInt8(n+1))])<<8^u[255&(r>>16^e.readUInt8(n+2))])<<8^u[255&(r>>16^e.readUInt8(n+3))])<<8^u[255&(r>>16^e.readUInt8(n+4))])<<8^u[255&(r>>16^e.readUInt8(n+5))])<<8^u[255&(r>>16^e.readUInt8(n+6))])<<8^u[255&(r>>16^e.readUInt8(n+7))])<<8^u[255&(r>>16^e.readUInt8(n+8))])<<8^u[255&(r>>16^e.readUInt8(n+9))])<<8^u[255&(r>>16^e.readUInt8(n+10))])<<8^u[255&(r>>16^e.readUInt8(n+11))])<<8^u[255&(r>>16^e.readUInt8(n+12))])<<8^u[255&(r>>16^e.readUInt8(n+13))])<<8^u[255&(r>>16^e.readUInt8(n+14))])<<8^u[255&(r>>16^e.readUInt8(n+15))],n+=16;for(i=n,o=e.length;n<=o?io;n<=o?++i:--i)r=r<<8^u[255&(r>>16^e.readUInt8(n++))];return 16777215&r},c=function(e,t){return a(s(e),t)},t.crc24_to_base64=a=function(e,t){return null==t&&(t=!0),(t?"=":"")+d(32,e).slice(1,4).toString("base64")},f=function(e){return l(c(e,!0))},_=function(e,t){return c(e,!1)===t},t.Message=i=function(){function e(e){this.body=e.body,this.type=e.type,this.comment=e.comment,this.version=e.version,this.pre=e.pre,this.post=e.post,this.lines=[],this.fields={},this.payload=null}return e.prototype.unsplit=function(e){return e.join("\n")},e.prototype.raw=function(){return this.unsplit(this.lines)},e.prototype.finish_unframe=function(e){var t,r;if(r=e.pre,t=e.post,this.pre=this.unsplit(r),this.post=this.unsplit(t),null!=this.clearsign)return this.clearsign.body=this.unsplit(this.clearsign.lines)},e.prototype.make_clearsign=function(){return this.clearsign={headers:{},lines:[],body:null}},e}(),t.Parser=o=function(){function t(e,t){this.strict=(null!=t?t:{}).strict,this.init(e)}return t.prototype.init=function(t){return this.data=e.isBuffer(t)?t.toString("utf8"):t,this.lines=this.data.split(/\r?\n/),this.checksum=null,this.body=null,this.type=null,this.ret=null,this.last_type=null},t.prototype.parse=function(){return this.ret=new i({}),this.unframe(),this.check_charset(),this.pop_headers(),this.parse_type(),this.strip_empties_in_footer(),this.strict&&this.verify_base64_lines(),this.trim_lines(),this.find_checksum(),this.read_body(),this.check_checksum(),this.ret},t.prototype.parse_type=function(){return this.ret.type=this.ret.fields.type=this.type},t.prototype.last_line=function(){return this.payload.slice(-1)[0]},t.prototype.mparse=function(){var e,t,r;for(r=[],e=!0;e;)this.skip(),this.lines.length?(t=this.parse(),r.push(t),this.init(t.post)):e=!1;return r},t.prototype.skip=function(){var e;for(e=[];this.lines.length&&!this.lines[0].match(/\S+/);)e.push(this.lines.shift());return e},t.prototype.read_body=function(){var t;return this.ret.payload=this.payload.join("\n"),t=this.payload.join(""),this.ret.body=new e(t,"base64")},t.prototype.check_checksum=function(){if(this.ret.fields.checksum=this.checksum,null!=this.checksum&&!_(this.ret.body,this.checksum))throw new Error("checksum mismatch")},t.prototype.pop_headers=function(){var e,t,r;for(r=[];this.payload.length;)if(t=(e=this.payload.shift()).match(/^Version: (.*)/))r.push(this.ret.version=t[1]);else if(null!=(t=e.match(/^Comment: (.*)/)))r.push(this.ret.comment=t[1]);else{if(null==e||0===e.length||e.match(/^\s+$/))break;if(!e.match(/^\S+: .+$/))throw new Error("bad PGP armor found; expected a newline")}return r},t.prototype.strip_empties_in_footer=function(){var e,t;for(t=[];null!=(e=this.last_line())?e.match(/^\s*$/):void 0;)t.push(this.payload.pop());return t},t.prototype.verify_base64_lines=function(){var e,t,r,n,i,o;for(t=/^[a-zA-Z0-9\/+=]+$/,80,o=[],r=0,n=(i=this.payload).length;r80)throw new Error("armor line longer than 80 characters");o.push(void 0)}return o},t.prototype.trim_lines=function(){var e;return this.payload=function(){var t,r,n,i;for(i=[],t=0,r=(n=this.payload).length;t)?$/,null!=(r=e.match(n))&&(t={username:r[1],comment:r[2],email:r[3]}),t},t.format=function(e){var t,r,n,i;return t=[],(null!=(r=e.username)?r.length:void 0)&&t.push(e.username),(null!=(n=e.comment)?n.length:void 0)&&t.push("("+e.comment+")"),(null!=(i=e.email)?i.length:void 0)&&t.push("<"+e.email+">"),t.join(" ")}}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o;o=r(24),n=r(79).SRF,t.bufxor=i=function(t,r){var n,i,o;return n=function(){var e,n,s;for(s=[],o=e=0,n=t.length;e>>24&255,t[r+1]=o>>>16&255,t[r+2]=o>>>8&255,t[r+3]=255&o,t[r+4]=n>>>24&255,t[r+5]=n>>>16&255,t[r+6]=n>>>8&255,t[r+7]=255&n;return t},e.prototype._decrypt_ui8a=function(e){var t,r,n,i,o,s,a;for(i=e.length,t=new Uint8Array(i),r=a=0;a>>24&255,t[r+1]=o>>>16&255,t[r+2]=o>>>8&255,t[r+3]=255&o,t[r+4]=n>>>24&255,t[r+5]=n>>16&255,t[r+6]=n>>8&255,t[r+7]=255&n;return t},e.prototype.keySchedule=function(e){var t,r,i,o,s,a,u,f,c,h,l,p,d,_,y,b,g;for(c=function(){var t,r,n,i;for(i=[],t=0,r=(n=e.words).length;t>>2]>>>24-8*(3&t[2])&255],h^=n.sBox[5][c[t[3]>>>2]>>>24-8*(3&t[3])&255],h^=n.sBox[6][c[t[4]>>>2]>>>24-8*(3&t[4])&255],h^=n.sBox[7][c[t[5]>>>2]>>>24-8*(3&t[5])&255],h^=n.sBox[l[o]][c[t[6]>>>2]>>>24-8*(3&t[6])&255],c[t[0]]=h;for(o=y=0;y<4;o=++y)r=n.scheduleB[f][o],h=n.sBox[4][c[r[0]>>>2]>>>24-8*(3&r[0])&255],h^=n.sBox[5][c[r[1]>>>2]>>>24-8*(3&r[1])&255],h^=n.sBox[6][c[r[2]>>>2]>>>24-8*(3&r[2])&255],h^=n.sBox[7][c[r[3]>>>2]>>>24-8*(3&r[3])&255],h^=n.sBox[4+o][c[r[4]>>>2]>>>24-8*(3&r[4])&255],s[a]=h,a++}for(g=[],i=b=0;b<16;i=++b)this.masking[i]=s[i],g.push(this.rotate[i]=31&s[16+i]);return g},e.prototype.f1=function(e,t,r){var i,o;return i=(o=t+e)<>>32-r,(n.sBox[0][i>>>24]^n.sBox[1][i>>>16&255])-n.sBox[2][i>>>8&255]+n.sBox[3][255&i]},e.prototype.f2=function(e,t,r){var i,o;return i=(o=t^e)<>>32-r,n.sBox[0][i>>>24]-n.sBox[1][i>>>16&255]+n.sBox[2][i>>>8&255]^n.sBox[3][255&i]},e.prototype.f3=function(e,t,r){var i,o;return i=(o=t-e)<>>32-r,(n.sBox[0][i>>>24]+n.sBox[1][i>>>16&255]^n.sBox[2][i>>>8&255])-n.sBox[3][255&i]},e}(),t.CAST5=e}).call(this)},function(e,t,r){(function(){var e,n,i,o;n=r(71).WordArray,r(28).bufeq_secure,e=n.from_hex("A6A6A6A6A6A6A6A6"),o=function(e){return e.split(e.words.length>>1)},t.wrap=function(t){var r,o,s,a,u,f,c,h,l,p,d,_,y,b,g,m,v,w,k;if(d=t.plaintext,p=t.key,c=t.cipher,h=(k=i({input:d,key:p,cipher:c}))[0],u=k[1],o=k[2],null!=h)throw h;for(r=e,f=u,y=new n([0,0]),b=0;b<6;++b)for(l=g=0,v=f.length;g=0;p=g+=-1)_=f[p],r.xor(y,{}),s=r.clone().concat(_),o.decryptBlock(s.words),r=s.slice(0,2),f[p]=s.slice(2,4),y.words[1]--;if(r.equal(e)){for(u=new n([]),m=0,v=f.length;m=0.2.1","iced-error":">=0.0.10","iced-lock":"^1.0.2","iced-runtime":"^1.0.3","keybase-ecurve":"^1.0.0","keybase-nacl":"^1.0.0",minimist:"^1.2.0","pgp-utils":">=0.0.34",purepack:">=1.0.4",triplesec:">=3.0.27",tweetnacl:"^0.13.1"},description:"Keybase's PGP Implementation",devDependencies:{browserify:"^15.0.0",colors:"0.6.2","iced-coffee-script":"108.0.11","iced-test":">=0.0.21",icsify:"^0.8.0","uglify-js":"^2.4.13"},directories:{lib:"lib/"},homepage:"http://github.com/keybase/kbpgp",keywords:["crypto","pgp","keybase"],license:"BSD-3-Clause",main:"./lib/main.js",name:"kbpgp",repository:{type:"git",url:"git://github.com/keybase/kbpgp.git"},scripts:{test:"make test"},version:"2.0.82"}},function(e,t,r){(function(){var e,n,i,o,s,a,u,f,c,h,l,p={}.hasOwnProperty,d=function(e,t){for(var r in t)p.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};r(111),(f=r(28)).bufeq_secure,f.ASP,r(43).make_esc,u=r(25),i=u.openpgp,u.kb,c=r(158),n=c.BaseKeyPair,e=c.BaseKey,(h=r(79)).SRF,h.MRF,(l=r(456)).eme_pkcs1_encode,l.eme_pkcs1_decode,a=function(t){function r(e){this.raw=e}return d(r,e),r.type=i.public_key_algorithms.ELGAMAL_SIGN_AND_ENCRYPT,r.prototype.type=r.type,r.ORDER=[],r.prototype.ORDER=r.ORDER,r.alloc=function(t){return e.alloc(r,t)},r.prototype.encrypt=function(e,t){return t(null)},r}(),s=function(t){function r(e){this.raw=e}return d(r,e),r.ORDER=[],r.prototype.ORDER=r.ORDER,r.prototype.serialize=function(){return null},r.alloc=function(t,n){return e.alloc(r,t,{pub:n})},r.prototype.decrypt=function(e,t){return t(null)},r}(),o=function(e){function t(e){var r,n;n=e.pub,r=e.priv,t.__super__.constructor.call(this,{pub:n,priv:r})}return d(t,n),t.Pub=a,t.prototype.Pub=a,t.Priv=s,t.prototype.Priv=s,t.type=i.public_key_algorithms.ELGAMAL_SIGN_AND_ENCRYPT,t.prototype.type=t.type,t.prototype.fulfills_flags=function(e){return!1},t.prototype.is_toxic=function(){return!0},t.prototype.can_sign=function(){return!1},t.prototype.can_decrypt=function(){return!1},t.prototype.err=function(){return new Error("refusing to use ElGamal Sign+Encrypt")},t.parse=function(e){return n.parse(t,e)},t.prototype.pad_and_encrypt=function(e,t){return t(this.err(),null)},t.prototype.decrypt_and_unpad=function(e,t,r){return r(this.err(),null)},t.parse_output=function(e){return null},t.prototype.export_output=function(e){return null},t}(),t.ElGamalSignEncrypt=t.Pair=o}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h;r(71),n=r(25).openpgp,h=r(80),a=h.alloc,o=h.SHA256,f=h.streamers,i=function(){function t(){this.hash=o,this.streamer=f.SHA256()}return t.prototype._count=function(e,t){return 16+(15&e)<<(e>>4)+t},t.prototype.set_hash_algorithm=function(e){return null!=(this.hash=a(e))?this.streamer=f[this.hash.algname]():(console.warn("No such hash: "+e+"; defaulting to SHA-256"),this.hash=o,this.streamer=f.SHA256())},t.prototype.read=function(e){var t;switch(this.type=e.read_uint8(),this.type){case n.s2k.plain:this.set_hash_algorithm(e.read_uint8());break;case n.s2k.salt:this.set_hash_algorithm(e.read_uint8()),this.salt=e.read_buffer(8);break;case n.s2k.salt_iter:this.set_hash_algorithm(e.read_uint8()),this.salt=e.read_buffer(8),this.EXPBIAS=6,t=e.read_uint8(),this.count=this._count(t,this.EXPBIAS);break;case n.s2k.gnu:this.read_gnu_extensions(e);break;default:throw new Error("unknown s2k type! "+this.type)}return this},t.prototype.read_gnu_extensions=function(e){var t;if(e.read_uint8(),"GNU"!==e.read_buffer(3).toString("utf8"))throw new Error("Malformed GNU-extension: "+ext);switch(t=e.read_uint8()+1e3){case 1001:return this.type=n.s2k.gnu_dummy;default:throw new Error("unknown s2k gnu protection mode: "+t)}},t.prototype.write=function(e,t,r,n){return this.type=3,this.salt=t,this.count=this._count(r,6),this.s2kLength=10,this.produce_key(e,n)},t.prototype.is_dummy=function(){return this.type===n.s2k.gnu_dummy},t.prototype.produce_key=function(t,r){var i,o,s,a;return null==r&&(r=16),function(){switch(this.type){case n.s2k.plain:return this.hash(t);case n.s2k.salt:return this.hash(e.concat([this.salt,t]));case n.s2k.salt_iter:return a=e.concat([this.salt,t]),i=u({alg:this.hash.algname,seed:a,count:this.count}),null==r||24!==r&&32!==r?i:(s=new e([0]),o=u({alg:this.hash.algname,seed:a,count:this.count,prefix:s}),e.concat([i,o]));default:return null}}.call(this).slice(0,r)},t}(),c={},u=function(t){var r,n,i,o,s,a,u,h,l,p,d,_;if(r=t.alg,l=t.seed,i=t.count,a=t.prefix,o=r+"-"+l.toString("base64")+"-"+i,null!=a&&(o+="-"+a.toString("base64")),null!=(_=c[o]))return _;for(p=f[r](),null!=a&&p.update(a),n=e.concat(function(){var e,t;for(t=[],e=0;e<4096;++e)t.push(l);return t}()),d=0;d+n.length<=i;)p.update(n),d+=n.length;return u=i-d,s=Math.ceil(u/l.length),h=p(e.concat(function(){var e,t;for(t=[],e=0;0<=s?es;0<=s?++e:--e)t.push(l);return t}()).slice(0,u)),c[o]=h,h},s=function(){function e(){this.s2k_convention=null,this.s2k=null,this.iv=null,this.cipher=null,this.payload=null}return e.prototype.is_dummy=function(){return null!=this.s2k&&this.s2k.is_dummy()},e.prototype.has_private=function(){return!this.is_dummy()},e.prototype.is_locked=function(){return this.s2k_convention!==n.s2k_convention.none&&!this.is_dummy()},e}(),t.S2K=i,t.SecretKeyMaterial=s}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c,h,l,p,d,_,y,b={}.hasOwnProperty,g=function(e,t){for(var r in t)b.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};l=r(24),f=r(71).WordArray,u=r(310).SlicerBuffer,y=r(71),n=y.ciphers.AES,i=r(174).util.ASP,p=r(43).make_esc,d=function(t,r){return e.concat([t,t.slice(t.length-r)])},o=function(){function t(e){var t,r;this.block_cipher_class=e.block_cipher_class,r=e.key,this.cipher=e.cipher,this.resync=e.resync,t=e.asp,this.block_cipher_class||(this.block_cipher_class=n),this.cipher||(this.cipher=new this.block_cipher_class(f.from_buffer(r))),this.block_size=this.cipher.blockSize,this.out_bufs=[],this.asp=i.make(t)}return t.prototype.compact=function(){var t;return t=e.concat(this.out_bufs),this.out_bufs=[t],t},t}(),a=function(t){function r(e){var t,n,i,o,s,a;n=e.block_cipher_class,o=e.key,i=e.cipher,s=e.prefixrandom,a=e.resync,t=e.asp,r.__super__.constructor.call(this,{block_cipher_class:n,key:o,cipher:i,resync:a,asp:t}),this._init(s)}return g(r,o),r.prototype._enc=function(){return this.FRE=f.from_buffer(this.FR),this.cipher.encryptBlock(this.FRE.words,0)},r.prototype._emit_sb=function(t){var r,n,i;return r=(n=this.block_size-t.rem())>0?(i=new e(function(){var e,t;for(t=[],e=0;0<=n?en;0<=n?++e:--e)t.push(0);return t}()),e.concat([t.consume_rest_to_buffer(),i])):t.read_buffer(this.block_size),this._emit_buf(r)},r.prototype._emit_buf=function(t){var r;return(r=f.from_buffer(t.slice(0,this.block_size))).xor(this.FRE,{n_words:Math.min(r.words.length,this.FRE.words.length)}),t=r.to_buffer(),this.out_bufs.push(t),this.FR=new e(t)},r.prototype._init=function(t){var r,n,i,o;return this.FR=new e(function(){var e,t,r;for(r=[],i=e=0,t=this.block_size;0<=t?et;i=0<=t?++e:--e)r.push(0);return r}.call(this)),t=d(t,2),this._enc(),this._emit_buf(t),this._enc(),r=this.FRE.to_buffer(),n=new e(function(){var e,n;for(n=[],i=e=0;e<2;i=++e)n.push(r.readUInt8(i)^t.readUInt8(this.block_size+i));return n}.call(this)),this.out_bufs.push(n),o=this.resync?2:0,this.compact().copy(this.FR,0,o,o+this.block_size),this._enc()},r.prototype.enc=function(t,r){var n,i,o,s,a,c,h,d,_,y,b,g;y=l.findDeferral(arguments),h=new u(t),o=p(r,"Encryptor::enc"),this.resync?this._emit_sb(h):(n=e.concat([new e([0,0]),h.read_buffer(this.block_size-2)]),(_=f.from_buffer(n)).xor(this.FRE,{}),n=_.to_buffer().slice(2),this.out_bufs.push(n),(i=this.compact()).copy(this.FR,0,i.length-this.block_size,i.length)),d=h.rem(),(g=this,function(e){b=new l.Deferrals(e,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Encryptor.enc"}),g.asp.progress({what:"ofcb encryption",i:0,total:d},o(b.defer({lineno:168}))),b._fulfill()})(function(e){return function(){var n;(n=function(t){var r,i,a;if(r=t,a=function(){return l.trampoline(function(){return n(t)})},!(s=h.rem()))return r();for(i=0;i<4096&&(e._enc(),e._emit_sb(h),s=h.rem());i++);!function(t){b=new l.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Encryptor.enc"}),e.asp.progress({what:"ofcb encryption",i:d-s,total:d},o(b.defer({lineno:177}))),b._fulfill()}(a)})(function(){return c=e.compact(),a=t.length+e.block_size+2,c=c.slice(0,a),r(null,c)})}}(this))},r}(),s=function(e){function t(e){var r,n,i,o,s;n=e.block_cipher_class,o=e.key,i=e.cipher,e.prefixrandom,s=e.resync,this.ciphertext=e.ciphertext,r=e.asp,t.__super__.constructor.call(this,{block_cipher_class:n,key:o,cipher:i,resync:s,asp:r}),this._init()}return g(t,o),t.prototype._init=function(){return this.reset()},t.prototype.reset=function(){return this.sb=new u(this.ciphertext)},t.prototype.next_block=function(){return f.from_buffer(this.sb.read_buffer_at_most(this.block_size))},t.prototype.get_prefix=function(){return this._prefix},t.prototype.check=function(e){var t,r,n,i;return this.reset(),r=new f(function(){var e,t,r;for(r=[],e=0,t=this.block_size/4;0<=t?et;0<=t?++e:--e)r.push(0);return r}.call(this)),this.cipher.encryptBlock(r.words,0),t=this.next_block(),r.xor(t,{}),this._prefix=r.to_buffer(),this.cipher.encryptBlock(t.words,0),e((n=65535&r.words.slice(-1)[0])===(i=t.words[0]>>>16^this.sb.peek_uint16())?null:new Error("Canary block mismatch: "+n+" != "+i))},t.prototype.dec=function(e){var t,r,n,i,o,s,a,u,f;a=l.findDeferral(arguments),this.reset(),this.resync&&this.sb.advance(2),n=this.next_block(),r=p(e,"Decryption::dec"),s=this.sb.rem(),(f=this,function(e){u=new l.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Decryptor.dec"}),f.asp.progress({what:"ofcb decrypt",i:0,total:s},r(u.defer({lineno:239}))),u._fulfill()})(function(f){return function(){var c;(c=function(e){var o,h,p;if(o=e,p=function(){return l.trampoline(function(){return c(e)})},!(i=f.sb.rem()))return o();for(h=0;h<4096&&(t=n,f.cipher.encryptBlock(t.words,0),n=f.next_block(),t.xor(n,{}),f.out_bufs.push(t.to_buffer().slice(0,n.sigBytes)),i=f.sb.rem());h++);!function(e){u=new l.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Decryptor.dec"}),f.asp.progress({what:"ofcb decrypt",i:s-i,total:s},r(u.defer({lineno:251}))),u._fulfill()}(p)})(function(){return o=f.compact(),f.resync||(o=o.slice(2)),e(null,o)})}}(this))},t}(),h=function(e,t){var r,n,i,o,s,u,f;return n=e.block_cipher_class,o=e.key,i=e.cipher,u=e.prefixrandom,f=e.resync,s=e.plaintext,r=e.asp,new a({block_cipher_class:n,key:o,cipher:i,prefixrandom:u,resync:f,asp:r}).enc(s,t)},c=function(e,t){var r,n,i,o,a,u,f,c,h,p,d;p=l.findDeferral(arguments),n=e.block_cipher_class,f=e.key,i=e.cipher,h=e.resync,o=e.ciphertext,r=e.asp,a=new s({block_cipher_class:n,key:f,cipher:i,resync:h,ciphertext:o,asp:r}),function(e){d=new l.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced"}),a.check(d.defer({assign_fn:function(){return u=arguments[0]},lineno:267})),d._fulfill()}(function(){!function(e){if(null!=u)return e();!function(e){d=new l.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced"}),a.dec(d.defer({assign_fn:function(){return u=arguments[0],c=arguments[1]},lineno:268})),d._fulfill()}(e)}(function(){return t(u,c)})})},t.encrypt=h,t.decrypt=c,t.Decryptor=s,_=r(112).rng}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(e){(function(){var n,i,o,s,a,u,f,c={}.hasOwnProperty;n=r(25).openpgp,(u=(s=r(71)).hash).SHA1,u.SHA256,s.ciphers.AES,s.prng.native_rng,(f=r(28)).bufferify,a=f.uint_to_buffer,r(601).encrypt,i=r(175).Packet,r(174).userid.parse,o=function(t){function r(e){this.data=e,r.__super__.constructor.call(this)}return function(e,t){for(var r in t)c.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,i),r.prototype.write=function(){return this.frame_packet(n.packet_tags.user_attribute,this.data)},r.parse=function(e){return new r(e.consume_rest_to_buffer())},r.prototype.to_user_attribute=function(){return this},r.prototype.to_signature_payload=function(){return e.concat([new e([n.signatures.user_attribute]),a(32,this.data.length),this.data])},r}(),t.UserAttribute=o}).call(this)}).call(this,r(5).Buffer)},function(e,t,n){(function(t){ /** * this is a port of pyflate * @url http://www.paul.sladen.org/projects/pyflate/ * @author kirilloid * @license CC-SA 3.0 * @usage ArchUtils.bz2.decode(str) * @example ArchUtils.bz2.decode( * "BZh91AY&SYN\xEC\xE86\0\0\2Q\x80\0\x10@\0\6D\x90\x80 " + * "\x001\6LA\1\xA7\xA9\xA5\x80\xBB\x941\xF8\xBB\x92)\xC2\x84\x82wgA\xB0" * ) == "hello world\n"; */ var n=function(){"use strict"; /** * bwt_reverse code from wikipedia (slightly modified) * @url http://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform * @license: CC-SA 3.0 */function e(e,t){var r=e.length;if(t>=r)throw RangeError("Out of bound");if(t<0)throw RangeError("Out of bound");var n=e;e=e.join(""),n.sort();for(var i={},o=r-1;o>=0;o--)i[n[o]]=o;var s=[];for(o=0;o0;e[i]=e[--i]);r.push(e[0]=n)}var r=function(){this.init=function(e){this.masks=[];for(var t=0;t<31;t++)this.masks[t]=(1<>1;return this.readbits(t)*(1<>this.bits-e&t;return this.bits-=e,this.bitfield&=~(t<this.max_bits&&(this.max_bits=e.bits)},this)}};return{bz2:{decode:function(n){var o=new r;if(o.init(n),o.readbits(16),104!=o.readbits(8))throw"Unknown (not type 'h'uffman Bzip2) compression method";var s=o.readbits(8);if(!(49<=s&&s<=57))throw"Unknown (not size '1'-'9') Bzip2 blocksize";function a(e){for(var t=[],r=e.readbits(16),n=32768;n>0;n>>=1)if(r&n)for(var i=e.readbits(16),o=32768;o>0;o>>=1)t.push(Boolean(i&o));else for(var s=0;s<16;s++)t.push(!1);return t}s-=48;var u=[];return function(){for(;;){var r=o.readbits2(48);if(o.readbits2(32),54156738319193!=r){if(25779555029136==r){o.readbits(7&o.bits);break}throw"Illegal Bzip2 blocktype = 0x"+r.toString(16)}if(o.readbits(1))throw"Bzip2 randomised support not implemented";var n=o.readbits(24),s=a(o),f=o.readbits(3);if(2>f||f>6)throw RangeError("Bzip2: Number of Huffman groups not in range 2..6");for(var c=[0,1,2,3,4,5,6].slice(0,f),h=[],l=0,p=o.readbits(15);l=f)throw RangeError("More than max ("+f+") groups");t(c,d,h)}for(var _=[],y=s.reduce(function(e,t){return e+t},0)+2,b=0;b20)throw RangeError("Bzip2 Huffman length code outside range 0..20");for(;o.readbits(1);)g-=2*o.readbits(1)-1;m.push(g)}_.push(m)}for(var v=[],w=0;w<_.length;w++){var k=new i;k.process(_[w]),v.push(k)}var E=[];for(d=s.length-1;d>=0;d--)s[d]&&E.push(String.fromCharCode(d));E.reverse();for(var x,S,A=0,B=0,D=0,M=0,P=[];;){for(var I in--B<=0&&(B=50,A<=h.length&&(x=v[h[A++]])),x.faht)if(o.bits>o.bits-I]){o.bitfield&=o.masks[o.bits-=I],S=S.code;break}if(0<=S&&S<=1)0==D&&(M=1),D+=M<0;D--)P.push(U);if(S==y-1)break;t(E,S-1,P)}}for(var R=e(P,n),T=[],C=(l=0,R.length);l0;F--)T.push(d);l+=5}else T.push(R[l++]);u.push(T.join(""))}}(),u.join("")}}}}();e.exports=function(e){return s=e.toString("binary"),r=n.bz2.decode(s),new t(r,"binary")}}).call(this,n(5).Buffer)},function(e,t,r){(function(){var e,n,i={}.hasOwnProperty;n=r(175).Packet,e=function(e){function t(e,t){this.type=e,this.body=t}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t}(),t.Generic=e}).call(this)},function(e,t,r){(function(){t.KeyMaterial=r(736).KeyMaterial,t.Signature=r(423).Signature,t.UserID=r(740).UserID}).call(this)},function(e,t,r){(function(){t.pack=r(602).pack,t.unpack=r(746).unpack,t.Buffer=r(604).PpBuffer,t.frame=r(1434)}).call(this)},function(e,t,r){(function(e){(function(){var n,i,o,s;o=r(602).pack,s=r(746).unpack,n=r(603).C,t.pack=function(t,r){var n,i;return null==r&&(r={}),i=o(t,r),n=o(i.length),e.concat([n,i])},t.frame_len=i=function(e){return e<=n.positive_fix_max?1:e===n.uint8?2:e===n.uint16?3:e===n.uint32?5:0},t.unpack=function(e,t){var r,n,o,a,u;if(null==t&&(t={}),e.length<1)throw new Error("need a buffer > 1 bytes");if(n=e.readUInt8(0),0===(o=i(n)))throw new Error("no data frame found");if(e.length1)r=new Error("specify only one of `encrypt_for`, `encryption_keys` and `encryption_key`");else if(null!=this.encrypt_for)for(this.encryption_keys=[],n=s=0,a=(u=this.encrypt_for=t(this.encrypt_for)).length;s0;)e=n.divideAndRemainder(this.basebn),a=e[0],u=e[1],t=this.alphabet[u.intValue()],n=a,r.push(t);return r}.call(this)).reverse(),s=[],f=0,c=e.length;fc;a=0<=c?++e:--e)t.push(0);return t}()),d=t.slice(c),a=l=d.length-1;l>=0;a=l+=-1){if(n=d[a],null==(o=this.lookup[n]))throw new Error("Value passed is not a valid BaseX string.");u=u.add(r.multiply(s(o))),r=r.multiply(this.basebn)}return e.concat([f,new e(u.toByteArray())])},t}(),t.base58=new n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base32=new n("abcdefghijkmnpqrstuvwxyz23456789"),t.base91=new n("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-_=+{}[]|;:,<>./?")}).call(this)}).call(this,r(5).Buffer)},function(e,t,r){(function(){var e,n,i;n=r(612).burn,i=r(509),e=r(611).SignatureEngine,t.box=n,t.unbox=i.do_message,t.SignatureEngine=e}).call(this)},function(e,t,r){(function(){t.curves=r(730),t.ECDSA=r(505).ECDSA,t.ECDH=r(506).ECDH,t.EDDSA=r(600).EDDSA}).call(this)},function(e,t,r){(function(){var e,n,i,o;n=r(25).kb,i=r(606).P3SKB,o=r(608).Signature,e=r(750).Encryption,t.alloc=function(t){var r,s,a,u;return u=t.tag,r=t.body,s=null,a=function(){switch(u){case n.packet_tags.p3skb:return i.alloc({tag:u,body:r});case n.packet_tags.signature:return o.alloc({tag:u,body:r});case n.packet_tags.encryption:return e.alloc({tag:u,body:r});default:return s=new Error("unknown packet tag: "+u),null}}(),[s,a]}}).call(this)},function(e,t,r){(function(){var e,n,i,o,s;e=r(24),o=r(721),s=r(611),i=r(749),t.import_armored_public=function(t,r){var n,s,a,u,f,c,h,l;h=e.findDeferral(arguments),n=t.armored,s=t.asp,u=t.opts,c=null,function(t){n.match(/^-{5}BEGIN PGP PUBLIC KEY BLOCK-{5}/)?function(t){l=new e.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/ukm.iced",funcname:"import_armored_public"}),o.KeyManager.import_from_armored_pgp({armored:n,asp:s,opts:u},l.defer({assign_fn:function(){return a=arguments[0],f=arguments[1],c=arguments[2]},lineno:12})),l._fulfill()}(t):function(t){l=new e.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/ukm.iced",funcname:"import_armored_public"}),i.KeyManager.import_public({hex:n},l.defer({assign_fn:function(){return a=arguments[0],f=arguments[1]},lineno:14})),l._fulfill()}(t)}(function(){return r(a,f,c)})},n=function(e){return e.match(/^-{5}BEGIN PGP MESSAGE-{5}/)},t.decode_sig=function(e){var t;return t=e.armored,n(t)?s.decode_sig({armored:t}):i.decode_sig({armored:t})},t.get_sig_body=function(e){var t;return t=e.armored,n(t)?s.get_sig_body({armored:t}):i.get_sig_body({armored:t})}}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(1),i=r(46),o=r.n(i),s=r(3),a=r(47),u=r.n(a);function f(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){f(o,n,i,s,a,"next",e)}function a(e){f(o,n,i,s,a,"throw",e)}s(void 0)})}} /** * PGP functions. * * @author tlwr [toby@toby.codes] * @author Matt C [matt@artemisbot.uk] * @author n1474335 [n1474335@gmail.com] * * @copyright Crown Copyright 2018 * @license Apache-2.0 * */var h=u.a?u.a.promisify:a.promisify,l=o.a.ASP({progress_hook:function(e){var t="";switch(e.what){case"guess":t="Guessing a prime";break;case"fermat":t="Factoring prime using Fermat's factorization method";break;case"mr":t="Performing Miller-Rabin primality test";break;case"passed_mr":t="Passed Miller-Rabin primality test";break;case"failed_mr":t="Failed Miller-Rabin primality test";break;case"found":t="Prime found";break;default:t="Stage: ".concat(e.what)}"function"==typeof importScripts&&self.sendStatusMessage(t)}});function p(e){return{1024:1024,2048:1024,4096:2048,256:256,384:256}[e]}function d(e,t){return _.apply(this,arguments)}function _(){return(_=c(regeneratorRuntime.mark(function e(t,r){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h(o.a.KeyManager.import_from_armored_pgp)({armored:t,opts:{no_check_keys:!0}});case 3:if(!(n=e.sent).is_pgp_locked()){e.next=11;break}if(!r){e.next=10;break}return e.next=8,h(n.unlock_pgp.bind(n))({passphrase:r});case 8:e.next=11;break;case 10:throw new s.a("Did not provide passphrase with locked private key.");case 11:return e.abrupt("return",n);case 14:throw e.prev=14,e.t0=e.catch(0),new s.a("Could not import private key: ".concat(e.t0));case 17:case"end":return e.stop()}},e,this,[[0,14]])}))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=c(regeneratorRuntime.mark(function e(t){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h(o.a.KeyManager.import_from_armored_pgp)({armored:t,opts:{no_check_keys:!0}});case 3:return r=e.sent,e.abrupt("return",r);case 7:throw e.prev=7,e.t0=e.catch(0),new s.a("Could not import public key: ".concat(e.t0));case 10:case"end":return e.stop()}},e,this,[[0,7]])}))).apply(this,arguments)}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(e,t){for(var r=0;r"));var c=o.a.const.openpgp.certify_keys;c|=o.a.const.openpgp.sign_data,c|=o.a.const.openpgp.auth,c|=o.a.const.openpgp.encrypt_comm;var h={userid:f,ecc:"ecc"===n,primary:{nbits:i,flags:c|=o.a.const.openpgp.encrypt_storage,expire_in:0},subkeys:[{nbits:p(i),flags:o.a.const.openpgp.sign_data,expire_in:252288e3},{nbits:p(i),flags:o.a.const.openpgp.encrypt_comm|o.a.const.openpgp.encrypt_storage,expire_in:63072e3}],asp:l};return new Promise(function(){var e,t=(e=regeneratorRuntime.mark(function e(t,r){var n,i,a,u,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,S(o.a.KeyManager.generate)(h);case 3:return n=e.sent,e.next=6,S(n.sign.bind(n))({});case 6:return i=n,a={},s&&(a.passphrase=s),e.next=10,S(i.export_pgp_private.bind(i))(a);case 10:return u=e.sent,e.next=13,S(i.export_pgp_public.bind(i))({});case 13:f=e.sent,t(u+"\n"+f.trim()),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),r("Error whilst generating key pair: ".concat(e.t0));case 20:case"end":return e.stop()}},e,this,[[0,17]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){m(o,n,i,s,a,"next",e)}function a(e){m(o,n,i,s,a,"throw",e)}s(void 0)})});return function(e,r){return t.apply(this,arguments)}}())}}])&&w(r.prototype,i),s&&w(r,s),t}();function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function M(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function P(e,t){for(var r=0;r
","Arguments: the ASCII-armoured PGP private key of the recipient, ","(and the private key password if necessary).","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),e.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",e.inputType="string",e.outputType="string",e.args=[{name:"Private key of recipient",type:"text",value:""},{name:"Private key passphrase",type:"string",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(t,r){var n,i,a,u,f,c,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,i=D(r,2),a=i[0],u=i[1],f=new o.a.keyring.KeyRing,a){e.next=3;break}throw new s.a("Enter the private key of the recipient.");case 3:return e.next=5,d(a,u);case 5:return h=e.sent,f.add_key_manager(h),e.prev=7,e.next=10,T(o.a.unbox)({armored:n,keyfetch:f,asp:l});case 10:c=e.sent,e.next=16;break;case 13:throw e.prev=13,e.t0=e.catch(7),new s.a("Couldn't decrypt message with provided private key: ".concat(e.t0));case 16:return e.abrupt("return",c.toString());case 17:case"end":return e.stop()}},e,this,[[7,13]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){M(o,n,i,s,a,"next",e)}function a(e){M(o,n,i,s,a,"throw",e)}s(void 0)})});return function(e,r){return t.apply(this,arguments)}}()}])&&P(r.prototype,i),a&&P(r,a),t}();function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function z(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function L(e,t){for(var r=0;r
","Arguments: the ASCII-armoured PGP public key of the signer, ","the ASCII-armoured private key of the recipient (and the private key password if necessary).","

","This operation uses PGP to decrypt and verify an encrypted digital signature.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),e.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",e.inputType="string",e.outputType="string",e.args=[{name:"Public key of signer",type:"text",value:""},{name:"Private key of recipient",type:"text",value:""},{name:"Private key password",type:"string",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&K(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(t,r){var n,i,a,u,f,c,h,p,_,b,g,m,v;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,i=O(r,3),a=i[0],u=i[1],f=i[2],c=new o.a.keyring.KeyRing,a){e.next=3;break}throw new s.a("Enter the public key of the signer.");case 3:if(u){e.next=5;break}throw new s.a("Enter the private key of the recipient.");case 5:return e.next=7,d(u,f);case 7:return p=e.sent,e.next=10,y(a);case 10:return _=e.sent,c.add_key_manager(p),c.add_key_manager(_),e.prev=13,e.next=16,q(o.a.unbox)({armored:n,keyfetch:c,asp:l});case 16:if(h=e.sent,!(b=h[0].get_data_signer())){e.next=32;break}if(!(g=b.get_key_manager())){e.next=29;break}return m=g.get_userids_mark_primary()[0].components,v="Signed by ",(m.email||m.username||m.comment)&&(m.username&&(v+="".concat(m.username," ")),m.comment&&(v+="".concat(m.comment," ")),m.email&&(v+="<".concat(m.email,">")),v+="\n"),v+=["PGP fingerprint: ".concat(g.get_pgp_fingerprint().toString("hex")),"Signed on ".concat(new Date(1e3*b.sig.hashed_subpackets[0].time).toUTCString()),"----------------------------------\n"].join("\n"),v+=h.toString(),e.abrupt("return",v.trim());case 29:throw new s.a("Could not identify a key manager.");case 30:e.next=33;break;case 32:throw new s.a("The data does not appear to be signed.");case 33:e.next=38;break;case 35:throw e.prev=35,e.t0=e.catch(13),new s.a("Couldn't verify message: ".concat(e.t0));case 38:case"end":return e.stop()}},e,this,[[13,35]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){z(o,n,i,s,a,"next",e)}function a(e){z(o,n,i,s,a,"throw",e)}s(void 0)})});return function(e,r){return t.apply(this,arguments)}}()}])&&L(r.prototype,i),a&&L(r,a),t}();function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function V(e,t){for(var r=0;r
","Arguments: the ASCII-armoured PGP public key of the recipient.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),e.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",e.inputType="string",e.outputType="string",e.args=[{name:"Public key of recipient",type:"text",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(t,r){var n,i,a,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,i=r[0]){e.next=3;break}throw new s.a("Enter the public key of the recipient.");case 3:return e.next=5,y(i);case 5:return u=e.sent,e.prev=6,e.next=9,J(o.a.box)({msg:n,encrypt_for:u,asp:l});case 9:a=e.sent,e.next=15;break;case 12:throw e.prev=12,e.t0=e.catch(6),new s.a("Couldn't encrypt message with provided public key: ".concat(e.t0));case 15:return e.abrupt("return",a.toString());case 16:case"end":return e.stop()}},e,this,[[6,12]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){Z(o,n,i,s,a,"next",e)}function a(e){Z(o,n,i,s,a,"throw",e)}s(void 0)})});return function(e,r){return t.apply(this,arguments)}}()}])&&V(r.prototype,i),a&&V(r,a),t}();function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function te(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function re(e,t){for(var r=0;r
","Arguments: the ASCII-armoured private key of the signer (plus the private key password if necessary)","and the ASCII-armoured PGP public key of the recipient.","

","This operation uses PGP to produce an encrypted digital signature.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),e.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",e.inputType="string",e.outputType="string",e.args=[{name:"Private key of signer",type:"text",value:""},{name:"Private key passphrase",type:"string",value:""},{name:"Public key of recipient",type:"text",value:""}],e}var r,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(t,n["a"]),r=t,(i=[{key:"run",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(t,r){var n,i,a,u,f,c,h,p;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,i=ee(r,3),a=i[0],u=i[1],f=i[2],a){e.next=3;break}throw new s.a("Enter the private key of the signer.");case 3:if(f){e.next=5;break}throw new s.a("Enter the public key of the recipient.");case 5:return e.next=7,d(a,u);case 7:return h=e.sent,e.next=10,y(f);case 10:return p=e.sent,e.prev=11,e.next=14,se(o.a.box)({msg:n,encrypt_for:p,sign_with:h,asp:l});case 14:c=e.sent,e.next=20;break;case 17:throw e.prev=17,e.t0=e.catch(11),new s.a("Couldn't sign message: ".concat(e.t0));case 20:return e.abrupt("return",c);case 21:case"end":return e.stop()}},e,this,[[11,17]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){te(o,n,i,s,a,"next",e)}function a(e){te(o,n,i,s,a,"throw",e)}s(void 0)})});return function(e,r){return t.apply(this,arguments)}}()}])&&re(r.prototype,i),a&&re(r,a),t}(),ue="undefined"==typeof self?{}:self.OpModules||{};ue.PGP={"Generate PGP Key Pair":A,"PGP Decrypt":C,"PGP Decrypt and Verify":H,"PGP Encrypt":$,"PGP Encrypt and Sign":ae};t.default=ue}]);